(function() {/*
 Notice * This file contains works from many authors under various (but compatible) licenses. Please see legal.txt for more information. **/
(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,w=Object.keys,_=i.bind,j=function(n){return n instanceof j?n:this instanceof j?(this._wrapped=n,void 0):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):
n._=j,j.VERSION="1.5.2";var A=j.each=j.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length)for(var u=0,i=n.length;i>u;u++){if(t.call(e,n[u],u,n)===r)return}else for(var a=j.keys(n),u=0,i=a.length;i>u;u++)if(t.call(e,n[a[u]],a[u],n)===r)return};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var E="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=
function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(E);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,
n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(E);return r},j.find=j.detect=function(n,t,r){var e;return O(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,
e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var O=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:O(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,
t){return j.map(n,function(n){return n[t]})},j.where=function(n,t,r){return j.isEmpty(t)?r?void 0:[]:j[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},j.findWhere=function(n,t){return j.where(n,t,!0)},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);if(!t&&j.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>e.computed&&(e={value:n,computed:a})}),e.value},
j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);if(!t&&j.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a<e.computed&&(e={value:n,computed:a})}),e.value},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e},j.sample=function(n,t,r){return arguments.length<2||r?n[j.random(n.length-1)]:j.shuffle(n).slice(0,Math.max(0,t))};var k=function(n){return j.isFunction(n)?
n:function(t){return t[n]}};j.sortBy=function(n,t,r){var e=k(t);return j.pluck(j.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={},i=null==r?j.identity:k(r);return A(t,function(r,a){var o=i.call(e,r,a,t);n(u,o,r)}),u}};j.groupBy=F(function(n,t,r){(j.has(n,t)?n[t]:n[t]=[]).push(r)}),
j.indexBy=F(function(n,t,r){n[t]=r}),j.countBy=F(function(n,t){j.has(n,t)?n[t]++:n[t]=1}),j.sortedIndex=function(n,t,r,e){r=null==r?j.identity:k(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])<u?i=o+1:a=o}return i},j.toArray=function(n){return n?j.isArray(n)?o.call(n):n.length===+n.length?j.map(n,j.identity):j.values(n):[]},j.size=function(n){return null==n?0:n.length===+n.length?n.length:j.keys(n).length},j.first=j.head=j.take=function(n,t,r){return null==n?void 0:null==
t||r?n[0]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var M=function(n,t,r){return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||j.isArguments(n)?t?a.apply(r,n):M(n,t,r):r.push(n)}),r)};j.flatten=function(n,t){return M(n,
t,[])},j.without=function(n){return j.difference(n,o.call(arguments,1))},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},j.union=function(){return j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.indexOf(t,n)>=0})})},j.difference=function(n){var t=
c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+
r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var R=function(){};j.bind=function(n,t){var r,e;if(_&&
n.bind===_)return _.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var u=new R;R.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},j.bindAll=function(n){var t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");
return A(t,function(t){n[t]=j.bind(n[t],n)}),n},j.memoize=function(n,t){var r={};return t||(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},j.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},j.defer=function(n){return j.delay.apply(j,[n,1].concat(o.call(arguments,1)))},j.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var c=function(){o=r.leading===!1?0:new Date,a=null,i=n.apply(e,
u)};return function(){var l=new Date;o||r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u)):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u,i,a,o;return function(){i=this,u=arguments,a=new Date;var c=function(){var l=new Date-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u)))},l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u)),o}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=
n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=w||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){for(var t=
j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},j.pairs=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},j.invert=function(n){for(var t={},r=j.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t=
{},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==
t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case "[object String]":return n==String(t);case "[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case "[object Date]":case "[object Boolean]":return+n==+t;case "[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==
t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||
j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==
typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=
function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var I={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}};I.unescape=j.invert(I.escape);var T={escape:new RegExp("["+j.keys(I.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(I.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(T[n],function(t){return I[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?
r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,
r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+
"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o;}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;
return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);(function(){var h=this,p=h.Backbone,e;e=typeof exports!=="undefined"?exports:h.Backbone={};e.VERSION="0.5.1";var f=h._;if(!f&&typeof require!=="undefined")f=require("underscore")._;var g=h.jQuery||h.Zepto;e.noConflict=function(){h.Backbone=p;return this};e.emulateHTTP=!1;e.emulateJSON=!1;e.Events={bind:function(a,b){var c=this._callbacks||(this._callbacks={});(c[a]||(c[a]=[])).push(b);return this},unbind:function(a,b){var c;if(a){if(c=this._callbacks)if(b){c=c[a];if(!c)return this;for(var d=0,e=c.length;d<
e;d++)if(b===c[d]){c[d]=null;break}}else c[a]=[]}else this._callbacks={};return this},trigger:function(a){var b,c,d,e,f=2;if(!(c=this._callbacks))return this;for(;f--;)if(b=f?a:"all",b=c[b])for(var g=0,h=b.length;g<h;g++)(d=b[g])?(e=f?Array.prototype.slice.call(arguments,1):arguments,d.apply(this,e)):(b.splice(g,1),g--,h--);return this}};e.Model=function(a,b){var c;a||(a={});if(c=this.defaults)f.isFunction(c)&&(c=c()),a=f.extend({},c,a);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");
this.set(a,{silent:!0});this._changed=!1;this._previousAttributes=f.clone(this.attributes);if(b&&b.collection)this.collection=b.collection;this.initialize(a,b)};f.extend(e.Model.prototype,e.Events,{_previousAttributes:null,_changed:!1,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.attributes[a];return this._escapedAttributes[a]=(b==null?"":
""+b).replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27").replace(/\//g,"&#x2F;")},has:function(a){return this.attributes[a]!=null},set:function(a,b){b||(b={});if(!a)return this;if(a.attributes)a=a.attributes;var c=this.attributes,d=this._escapedAttributes;if(!b.silent&&this.validate&&!this._performValidation(a,b))return!1;if(this.idAttribute in a)this.id=a[this.idAttribute];var e=this._changing;this._changing=!0;
for(var g in a){var h=a[g];if(!f.isEqual(c[g],h))c[g]=h,delete d[g],this._changed=!0,b.silent||this.trigger("change:"+g,this,h,b)}!e&&!b.silent&&this._changed&&this.change(b);this._changing=!1;return this},unset:function(a,b){if(!(a in this.attributes))return this;b||(b={});var c={};c[a]=void 0;if(!b.silent&&this.validate&&!this._performValidation(c,b))return!1;delete this.attributes[a];delete this._escapedAttributes[a];a==this.idAttribute&&delete this.id;this._changed=!0;b.silent||(this.trigger("change:"+
a,this,void 0,b),this.change(b));return this},clear:function(a){a||(a={});var b,c=this.attributes,d={};for(b in c)d[b]=void 0;if(!a.silent&&this.validate&&!this._performValidation(d,a))return!1;this.attributes={};this._escapedAttributes={};this._changed=!0;if(!a.silent){for(b in c)this.trigger("change:"+b,this,void 0,a);this.change(a)}return this},fetch:function(a){a||(a={});var b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)};a.error=i(a.error,b,a);return(this.sync||
e.sync).call(this,"read",this,a)},save:function(a,b){b||(b={});if(a&&!this.set(a,b))return!1;var c=this,d=b.success;b.success=function(a,e,f){if(!c.set(c.parse(a,f),b))return!1;d&&d(c,a,f)};b.error=i(b.error,c,b);var f=this.isNew()?"create":"update";return(this.sync||e.sync).call(this,f,this,b)},destroy:function(a){a||(a={});if(this.isNew())return this.trigger("destroy",this,this.collection,a);var b=this,c=a.success;a.success=function(d){b.trigger("destroy",b,b.collection,a);c&&c(b,d)};a.error=i(a.error,
b,a);return(this.sync||e.sync).call(this,"delete",this,a)},url:function(){var a=k(this.collection)||this.urlRoot||l();if(this.isNew())return a;return a+(a.charAt(a.length-1)=="/"?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this)},isNew:function(){return this.id==null},change:function(a){this.trigger("change",this,a);this._previousAttributes=f.clone(this.attributes);this._changed=!1},hasChanged:function(a){if(a)return this._previousAttributes[a]!=
this.attributes[a];return this._changed},changedAttributes:function(a){a||(a=this.attributes);var b=this._previousAttributes,c=!1,d;for(d in a)f.isEqual(b[d],a[d])||(c=c||{},c[d]=a[d]);return c},previous:function(a){if(!a||!this._previousAttributes)return null;return this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},_performValidation:function(a,b){var c=this.validate(a);if(c)return b.error?b.error(this,c,b):this.trigger("error",this,c,b),!1;return!0}});
e.Collection=function(a,b){b||(b={});if(b.comparator)this.comparator=b.comparator;f.bindAll(this,"_onModelEvent","_removeReference");this._reset();a&&this.reset(a,{silent:!0});this.initialize.apply(this,arguments)};f.extend(e.Collection.prototype,e.Events,{model:e.Model,initialize:function(){},toJSON:function(){return this.map(function(a){return a.toJSON()})},add:function(a,b){if(f.isArray(a))for(var c=0,d=a.length;c<d;c++)this._add(a[c],b);else this._add(a,b);return this},remove:function(a,b){if(f.isArray(a))for(var c=
0,d=a.length;c<d;c++)this._remove(a[c],b);else this._remove(a,b);return this},get:function(a){if(a==null)return null;return this._byId[a.id!=null?a.id:a]},getByCid:function(a){return a&&this._byCid[a.cid||a]},at:function(a){return this.models[a]},sort:function(a){a||(a={});if(!this.comparator)throw Error("Cannot sort a set without a comparator");this.models=this.sortBy(this.comparator);a.silent||this.trigger("reset",this,a);return this},pluck:function(a){return f.map(this.models,function(b){return b.get(a)})},
reset:function(a,b){a||(a=[]);b||(b={});this.each(this._removeReference);this._reset();this.add(a,{silent:!0});b.silent||this.trigger("reset",this,b);return this},fetch:function(a){a||(a={});var b=this,c=a.success;a.success=function(d,f,e){b[a.add?"add":"reset"](b.parse(d,e),a);c&&c(b,d)};a.error=i(a.error,b,a);return(this.sync||e.sync).call(this,"read",this,a)},create:function(a,b){var c=this;b||(b={});a=this._prepareModel(a,b);if(!a)return!1;var d=b.success;b.success=function(a,e,f){c.add(a,b);
d&&d(a,e,f)};a.save(null,b);return a},parse:function(a){return a},chain:function(){return f(this.models).chain()},_reset:function(){this.length=0;this.models=[];this._byId={};this._byCid={}},_prepareModel:function(a,b){if(a instanceof e.Model){if(!a.collection)a.collection=this}else{var c=a;a=new this.model(c,{collection:this});a.validate&&!a._performValidation(c,b)&&(a=!1)}return a},_add:function(a,b){b||(b={});a=this._prepareModel(a,b);if(!a)return!1;var c=this.getByCid(a)||this.get(a);if(c)throw Error(["Can't add the same model to a set twice",
c.id]);this._byId[a.id]=a;this._byCid[a.cid]=a;this.models.splice(b.at!=null?b.at:this.comparator?this.sortedIndex(a,this.comparator):this.length,0,a);a.bind("all",this._onModelEvent);this.length++;b.silent||a.trigger("add",a,this,b);return a},_remove:function(a,b){b||(b={});a=this.getByCid(a)||this.get(a);if(!a)return null;delete this._byId[a.id];delete this._byCid[a.cid];this.models.splice(this.indexOf(a),1);this.length--;b.silent||a.trigger("remove",a,this,b);this._removeReference(a);return a},
_removeReference:function(a){this==a.collection&&delete a.collection;a.unbind("all",this._onModelEvent)},_onModelEvent:function(a,b,c,d){(a=="add"||a=="remove")&&c!=this||(a=="destroy"&&this._remove(b,d),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],this._byId[b.id]=b),this.trigger.apply(this,arguments))}});f.each(["forEach","each","map","reduce","reduceRight","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max",
"min","sortBy","sortedIndex","toArray","size","first","rest","last","without","indexOf","lastIndexOf","isEmpty"],function(a){e.Collection.prototype[a]=function(){return f[a].apply(f,[this.models].concat(f.toArray(arguments)))}});e.Router=function(a){a||(a={});if(a.routes)this.routes=a.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var q=/:([\w\d]+)/g,r=/\*([\w\d]+)/g,s=/[-[\]{}()+?.,\\^$|#\s]/g;f.extend(e.Router.prototype,e.Events,{initialize:function(){},route:function(a,b,c){e.history||
(e.history=new e.History);f.isRegExp(a)||(a=this._routeToRegExp(a));e.history.route(a,f.bind(function(d){d=this._extractParameters(a,d);c.apply(this,d);this.trigger.apply(this,["route:"+b].concat(d))},this))},navigate:function(a,b){e.history.navigate(a,b)},_bindRoutes:function(){if(this.routes){var a=[],b;for(b in this.routes)a.unshift([b,this.routes[b]]);b=0;for(var c=a.length;b<c;b++)this.route(a[b][0],a[b][1],this[a[b][1]])}},_routeToRegExp:function(a){a=a.replace(s,"\\$&").replace(q,"([^/]*)").replace(r,
"(.*?)");return RegExp("^"+a+"$")},_extractParameters:function(a,b){return a.exec(b).slice(1)}});e.History=function(){this.handlers=[];f.bindAll(this,"checkUrl")};var j=/^#*/,t=/msie [\w.]+/,m=!1;f.extend(e.History.prototype,{interval:50,getFragment:function(a,b){if(a==null)if(this._hasPushState||b){a=window.location.pathname;var c=window.location.search;c&&(a+=c);a.indexOf(this.options.root)==0&&(a=a.substr(this.options.root.length))}else a=window.location.hash;return a.replace(j,"")},start:function(a){if(m)throw Error("Backbone.history has already been started");
this.options=f.extend({},{root:"/"},this.options,a);this._wantsPushState=!!this.options.pushState;this._hasPushState=!(!this.options.pushState||!window.history||!window.history.pushState);a=this.getFragment();var b=document.documentMode;if(b=t.exec(navigator.userAgent.toLowerCase())&&(!b||b<=7))this.iframe=g('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(a);this._hasPushState?g(window).bind("popstate",this.checkUrl):"onhashchange"in window&&!b?
g(window).bind("hashchange",this.checkUrl):setInterval(this.checkUrl,this.interval);this.fragment=a;m=!0;a=window.location;b=a.pathname==this.options.root;if(this._wantsPushState&&!this._hasPushState&&!b)this.fragment=this.getFragment(null,!0),window.location.replace(this.options.root+"#"+this.fragment);else if(this._wantsPushState&&this._hasPushState&&b&&a.hash)this.fragment=a.hash.replace(j,""),window.history.replaceState({},document.title,a.protocol+"//"+a.host+this.options.root+this.fragment);
return this.loadUrl()},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();a==this.fragment&&this.iframe&&(a=this.getFragment(this.iframe.location.hash));if(a==this.fragment||a==decodeURIComponent(this.fragment))return!1;this.iframe&&this.navigate(a);this.loadUrl()||this.loadUrl(window.location.hash)},loadUrl:function(a){var b=this.fragment=this.getFragment(a);return f.any(this.handlers,function(a){if(a.route.test(b))return a.callback(b),!0})},
navigate:function(a,b){var c=(a||"").replace(j,"");if(!(this.fragment==c||this.fragment==decodeURIComponent(c))){if(this._hasPushState){var d=window.location;c.indexOf(this.options.root)!=0&&(c=this.options.root+c);this.fragment=c;window.history.pushState({},document.title,d.protocol+"//"+d.host+c)}else if(window.location.hash=this.fragment=c,this.iframe&&c!=this.getFragment(this.iframe.location.hash))this.iframe.document.open().close(),this.iframe.location.hash=c;b&&this.loadUrl(a)}}});e.View=function(a){this.cid=
f.uniqueId("view");this._configure(a||{});this._ensureElement();this.delegateEvents();this.initialize.apply(this,arguments)};var u=/^(\S+)\s*(.*)$/,n=["model","collection","el","id","attributes","className","tagName"];f.extend(e.View.prototype,e.Events,{tagName:"div",$:function(a){return g(a,this.el)},initialize:function(){},render:function(){return this},remove:function(){g(this.el).remove();return this},make:function(a,b,c){a=document.createElement(a);b&&g(a).attr(b);c&&g(a).html(c);return a},delegateEvents:function(a){if(a||
(a=this.events))for(var b in g(this.el).unbind(".delegateEvents"+this.cid),a){var c=this[a[b]];if(!c)throw Error('Event "'+a[b]+'" does not exist');var d=b.match(u),e=d[1];d=d[2];c=f.bind(c,this);e+=".delegateEvents"+this.cid;d===""?g(this.el).bind(e,c):g(this.el).delegate(d,e,c)}},_configure:function(a){this.options&&(a=f.extend({},this.options,a));for(var b=0,c=n.length;b<c;b++){var d=n[b];a[d]&&(this[d]=a[d])}this.options=a},_ensureElement:function(){if(this.el){if(f.isString(this.el))this.el=
g(this.el).get(0)}else{var a=this.attributes||{};if(this.id)a.id=this.id;if(this.className)a["class"]=this.className;this.el=this.make(this.tagName,a)}}});e.Model.extend=e.Collection.extend=e.Router.extend=e.View.extend=function(a,b){var c=v(this,a,b);c.extend=this.extend;return c};var w={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};e.sync=function(a,b,c){var d=w[a];c=f.extend({type:d,dataType:"json",processData:!1},c);if(!c.url)c.url=k(b)||l();if(!c.data&&b&&(a=="create"||a=="update"))c.contentType=
"application/json",c.data=JSON.stringify(b.toJSON());if(e.emulateJSON)c.contentType="application/x-www-form-urlencoded",c.processData=!0,c.data=c.data?{model:c.data}:{};if(e.emulateHTTP&&(d==="PUT"||d==="DELETE")){if(e.emulateJSON)c.data._method=d;c.type="POST";c.beforeSend=function(a){a.setRequestHeader("X-HTTP-Method-Override",d)}}return g.ajax(c)};var o=function(){},v=function(a,b,c){var d;d=b&&b.hasOwnProperty("constructor")?b.constructor:function(){return a.apply(this,arguments)};f.extend(d,
a);o.prototype=a.prototype;d.prototype=new o;b&&f.extend(d.prototype,b);c&&f.extend(d,c);d.prototype.constructor=d;d.__super__=a.prototype;return d},k=function(a){if(!a||!a.url)return null;return f.isFunction(a.url)?a.url():a.url},l=function(){throw Error('A "url" property or function must be specified');},i=function(a,b,c){return function(d){a?a(b,d,c):b.trigger("error",b,d,c)}}}).call(this);var fakeworker=function(global){function extend(dest,src){for(var i in src)dest[i]=src[i]}var userAgent=navigator.userAgent.toLowerCase();var browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};function httpSuccess(xhr){try{return!xhr.status&&location.protocol=="file:"||xhr.status>=200&&
xhr.status<300||xhr.status==304||xhr.status==1223||browser.safari&&xhr.status==undefined}catch(e){}return false}function __syncXhrGet(url,fn){var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;xhr.open("GET",url,false);xhr.send("");if(httpSuccess(xhr))fn(xhr);else throw new Error("Could not load resource("+url+") result="+xhr.status+":"+xhr.statusText);}function parseUri(str){var o=parseUri.options,m=o.parser[o.strictMode?"strict":"loose"].exec(str),uri={},i=14;
while(i--)uri[o.key[i]]=m[i]||"";uri[o.q.name]={};uri[o.key[12]].replace(o.q.parser,function($0,$1,$2){if($1)uri[o.q.name][$1]=$2});return uri}parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function absolutePath(path){var e=document.createElement("span");e.innerHTML='<a href="'+path+'" />';return e.firstChild.href}function FakeMessageEvent(worker){extend(this,Event);Event.constructor.call(this);this.currentTarget=worker;this.srcElement=worker;this.target=worker;this.timestamp=(new Date).getTime()}
FakeMessageEvent.prototype={initMessageEvent:function(type,canBubble,cancelable,data,origin,lastEventId,source,ports){this.initMessageEventNS("",type,canBubble,cancelable,data,origin,lastEventId,source,ports)},initMessageEventNS:function(namespaceURI,type,canBubble,cancelable,data,origin,lastEventId,source,ports){this.namespaceURI=namespaceURI;this.type=type;this.canBubble=canBubble;this.cancelable=cancelable;this.data=data;this.origin=origin;this.lastEventId=lastEventId;this.source=source;this.ports=
ports}};function FakeErrorEvent(worker){extend(this,Event);Event.constructor.call(this);this.currentTarget=worker;this.srcElement=worker;this.target=worker;this.timestamp=(new Date).getTime()}FakeErrorEvent.prototype={initErrorEvent:function(type,canBubble,cancelable,message,filename,lineno){this.initErrorEventNS("",type,canBubble,cancelable,message,filename,lineno)},initErrorEventNS:function(namespaceURI,type,canBubble,cancelable,message,filename,lineno){this.namespaceURI=namespaceURI;this.type=
type;this.canBubble=canBubble;this.cancelable=cancelable;this.message=message;this.filename=filename;this.lineno=lineno}};var nativeWorker=global["Worker"];var FakeWorker=function(url){var self=this;this._listenerNamespaces={};this._eventQueues={};__syncXhrGet(url,function(xhr){try{self._workerContext=new FakeWorkerContext(url,xhr.responseText,self)}catch(e){throw e;}})};FakeWorker.prototype={isFake:true,addEventListener:function(type,listener,useCapture){this.addEventListenerNS("",type,listener,
useCapture)},addEventListenerNS:function(namespaceURI,type,listener,useCapture){var namespace=this._listenerNamespaces[namespaceURI];if(!namespace)this._listenerNamespaces[namespaceURI]=namespace={};var listeners=namespace[type];if(!listeners)namespace[type]=listeners=[];listeners.push(listener)},removeEventListener:function(type,listener,useCapture){this.removeEventListener("",type,listener,useCapture)},removeEventListenerNS:function(namespaceURI,eventName,fn,useCapture){var namespace=this._listenerNamespaces[namespaceURI];
if(namespace){var listeners=namespace[type];if(listeners)for(var i=0;i<listeners.length;i++)if(listeners[i]===listener)delete listeners[i]}},dispatchEvent:function(event){if(typeof this["on"+event.type]=="function")this["on"+event.type].call(this,event);var namespace=this._listenerNamespaces[event.namespaceURI];if(namespace){var listeners=namespace[event.type];if(listeners)for(var i=0;i<listeners.length;i++)listeners[i].call(this,event)}return true},postMessage:function(msg){var self=this;var workerContext=
this._workerContext;if(typeof workerContext.onmessage=="function"){var event=new FakeMessageEvent(self);event.initMessageEvent("message",false,false,msg,"","",null,null);setTimeout(function(){try{workerContext.onmessage.call(workerContext,event)}catch(e){var errorEvent=new FakeErrorEvent(self);var lineno=e.line||e.lineNumber;errorEvent.initErrorEvent("error",false,false,e.message,workerContext.location.filename,lineno);self.dispatchEvent(errorEvent);throw e;}},0)}},terminate:function(){this._workerContext.close()}};
function FakeWorkerLocation(url){var absolute=absolutePath(url);var parsed=parseUri(absolute);this.href=absolute;this.protocol=parsed.protocol+":";this.host=parsed.port?parsed.host+":"+parsed.port:parsed.host;this.hostname=parsed.host;this.port=parsed.port;this.pathname=parsed.path;this.search=parsed.query?"?"+parsed.query:"";this.hash=parsed.anchor?"#"+parsed.anchor:"";this.filename=parsed.file}FakeWorkerLocation.prototype={toString:function(){return this.href}};function FakeWorkerContext(url,source,
worker){var postMessage=this.postMessage=function(msg){var event=new FakeMessageEvent(worker);event.initMessageEvent("message",false,false,msg,"","",null,null);setTimeout(function(){worker.dispatchEvent(event)},0)};var setTimeout=this.setTimeout=global.setTimeout;var clearTimeout=this.clearTimeout=global.clearTimeout;var setInterval=this.setInterval=global.setInterval;var clearInterval=this.clearInterval=global.clearInterval;var XMLHttpRequest=this.XMLHttpRequest=global.XMLHttpRequest;var openDatabase=
this.openDatabase=global.openDatabase;var openDatabaseSync=this.openDatabaseSync=global.openDatabaseSync;var WebSocket=this.WebSocket=global.WebSocket;var EventSource=this.EventSource=global.EventSource;var MessageChannel=this.MessageChannel=global.MessageChannel;var Worker=this.Worker=FakeWorker;var location=this.location=new FakeWorkerLocation(url);var close=this.close=function(){this.closing=true};var navigator=this.navigator=global.navigator;var self=this.self=this;var importScripts=this.importScripts=
function(){for(var i=0;i<arguments.length;i++)__syncXhrGet(arguments[i],function(xhr){eval(xhr.responseText)})};eval(source);try{if(typeof onmessage=="function")this.onmessage=onmessage}catch(e){}}var ret={nativeWorker:nativeWorker,install:function(){global["Worker"]=FakeWorker},uninstall:function(){global["Worker"]=nativeWorker}};if(typeof Worker==="undefined"||browser.opera)ret.install();return ret}(this);(function(exports){exports.utils=exports.utils||{};if(!String.fromCodePoint)(function(){var defineProperty=function(){var result;try{var object={};var $defineProperty=Object.defineProperty;result=$defineProperty(object,object,object)&&$defineProperty}catch(error){}return result}();var stringFromCharCode=String.fromCharCode;var floor=Math.floor;var fromCodePoint=function(){var MAX_SIZE=16384;var codeUnits=[];var highSurrogate;var lowSurrogate;var index=-1;var length=arguments.length;if(!length)return"";
var result="";while(++index<length){var codePoint=Number(arguments[index]);if(!isFinite(codePoint)||codePoint<0||codePoint>1114111||floor(codePoint)!==codePoint)throw RangeError("Invalid code point: "+codePoint);if(codePoint<=65535)codeUnits.push(codePoint);else{codePoint-=65536;highSurrogate=(codePoint>>10)+55296;lowSurrogate=codePoint%1024+56320;codeUnits.push(highSurrogate,lowSurrogate)}if(index+1===length||codeUnits.length>MAX_SIZE){result+=stringFromCharCode.apply(null,codeUnits);codeUnits.length=
0}}return result};if(defineProperty)defineProperty(String,"fromCodePoint",{"value":fromCodePoint,"configurable":true,"writable":true});else String.fromCodePoint=fromCodePoint})();if(!Element.prototype.scrollIntoViewIfNeeded)Element.prototype.scrollIntoViewIfNeeded=function(centerIfNeeded){function withinBounds(value,min,max,extent){if(centerIfNeeded===false||max<=value+extent&&value<=min+extent)return Math.min(max,Math.max(min,value));return(min+max)/2}function makeArea(left,top,width,height){return{"left":left,
"top":top,"width":width,"height":height,"right":left+width,"bottom":top+height,"translate":function(x,y){return makeArea(x+left,y+top,width,height)},"relativeFromTo":function(lhs,rhs){var newLeft=left,newTop=top;lhs=lhs.offsetParent;rhs=rhs.offsetParent;if(lhs===rhs)return area;for(;lhs;lhs=lhs.offsetParent){newLeft+=lhs.offsetLeft+lhs.clientLeft;newTop+=lhs.offsetTop+lhs.clientTop}for(;rhs;rhs=rhs.offsetParent){newLeft-=rhs.offsetLeft+rhs.clientLeft;newTop-=rhs.offsetTop+rhs.clientTop}return makeArea(newLeft,
newTop,width,height)}}}var parent,elem=this,area=makeArea(this.offsetLeft,this.offsetTop,this.offsetWidth,this.offsetHeight);while((parent=elem.parentNode)instanceof HTMLElement){var clientLeft=parent.offsetLeft+parent.clientLeft;var clientTop=parent.offsetTop+parent.clientTop;area=area.relativeFromTo(elem,parent).translate(-clientLeft,-clientTop);parent.scrollLeft=withinBounds(parent.scrollLeft,area.right-parent.clientWidth,area.left,parent.clientWidth);parent.scrollTop=withinBounds(parent.scrollTop,
area.bottom-parent.clientHeight,area.top,parent.clientHeight);area=area.translate(clientLeft-parent.scrollLeft,clientTop-parent.scrollTop);elem=parent}};if(window.NodeList&&!NodeList.prototype.forEach)NodeList.prototype.forEach=function(callback,thisArg){thisArg=thisArg||window;for(var i=0;i<this.length;i++)callback.call(thisArg,this[i],i,this)};exports.console=exports.console||{log:function(){},warn:function(){},error:function(){},assert:function(){}};if(!String.prototype.startsWith)String.prototype.startsWith=
function(search,pos){return this.substr(!pos||pos<0?0:+pos,search.length)===search};if(!String.prototype.endsWith)String.prototype.endsWith=function(search,thisLen){if(thisLen===undefined||thisLen>this.length)thisLen=this.length;return this.substring(thisLen-search.length,thisLen)===search};console.assert=function(condition,message){if(!condition)if(exports._trnDebugMode)throw new Error("Assertion failed: "+message);else console.warn("Assertion failed: "+message)};exports.$log=exports.$out=function(){Array.prototype.forEach.call(arguments,
function(e){console.log(e)})};var ie=function(){var ua=navigator.userAgent.toLowerCase();var match=/(msie) ([\w.]+)/.exec(ua)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(ua);return match?parseInt(match[2],10):match}();exports.utils.ie=ie;exports.utils.windowsApp=false;exports.utils.isEdge=!!navigator.userAgent.match(/Edge/i);exports.utils.isMobileDevice=function(){return!!(!ie&&(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||
navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Touch/i)||navigator.userAgent.match(/IEMobile/i)||navigator.userAgent.match(/Silk/i)))}();exports.busyLoop=function(step,finished,sync){var start=Date.now();function nextSlice(){while(step())if(Date.now()-start>100&&!sync){start=Date.now();setTimeout(nextSlice,0);return}finished()}nextSlice()};exports.utils.mouseUpEventBug=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/i);exports.utils.isChrome=function(){var opera=window.navigator.userAgent.match(/OPR/);
var maxthon=window.navigator.userAgent.match(/Maxthon/);var edge=window.navigator.userAgent.match(/Edge/);return window.navigator.userAgent.match(/Chrome\/(.*?) /)&&!opera&&!maxthon&&!edge}();var chromeVersion=function(){var match=window.navigator.userAgent.match(/Chrome\/(.*?) /);return match?parseInt(match[1],10):match}();exports.utils.chromeHasSubzero=exports.utils.isChrome&&chromeVersion>=56;exports.utils.isSafari=window.navigator.userAgent.match(/Safari/)&&!exports.utils.isChrome&&!exports.utils.isEdge;
exports.utils.isIOS=window.navigator.userAgent.match(/(iPad|iPhone|iPod)/i);exports.utils.isFirefox=window.navigator.userAgent.match(/Firefox/);exports.utils.disableFormCharacterProcessing=window.navigator.userAgent.indexOf("Android")>-1;var multiplierOverride;var getCanvasMultiplier=function(){return function(){if(!_.isUndefined(multiplierOverride))return multiplierOverride;return Math.min(window.devicePixelRatio,2)||1}}();exports.utils.getCanvasMultiplier=getCanvasMultiplier;exports.utils.setCanvasMultiplier=
function(value){multiplierOverride=value};exports.utils.unsetCanvasMultiplier=function(){multiplierOverride=undefined};exports.utils.canvasFontMultiplier=function(){var canvas=document.createElement("canvas");var ctx=canvas.getContext("2d");var testSize=20;ctx.font=testSize+"px f0";return parseFloat(ctx.font)/testSize}();if(window.CanvasPixelArray)window.CanvasPixelArray.prototype.set=function(arr){var l=this.length,i=0;for(;i<l;i+=4){this[i]=arr[i];this[i+1]=arr[i+1];this[i+2]=arr[i+2];this[i+3]=
255}};if(!window.Uint8ClampedArray)window.Uint8ClampedArray=window.Uint8Array;var canvasClipBug=function(){function basicClipIssue(){var canvas=document.createElement("canvas");canvas.style.width="1px";canvas.style.height="1px";var ctx=canvas.getContext("2d");ctx.fillStyle="#FFFFFF";ctx.fillRect(0,0,1,1);ctx.beginPath();ctx.rect(0,0,1,1);ctx.clip();ctx.fillStyle="#000000";ctx.fillRect(0,0,1,1);var val=ctx.getImageData(0,0,1,1).data[0];return val===255}function nonIntegerValueIssue(){var canvas=document.createElement("canvas");
canvas.style.width="5px";canvas.style.height="5px";var ctx=canvas.getContext("2d");ctx.rect(0,0,4.5,4.5);ctx.clip();ctx.fillStyle="#FFFFFF";ctx.fillRect(0,0,5,5);ctx.clearRect(0,0,5,5);var val=ctx.getImageData(1,1,1,1).data[3];return val!==0}return basicClipIssue()||nonIntegerValueIssue()}();exports.utils.canvasClipBug=canvasClipBug;var typedArrayApply=function(){if(exports.Uint8Array)try{var testArray=new exports.Uint8Array(new ArrayBuffer(1));String.fromCharCode.apply(null,testArray);return true}catch(e){return false}else return false}();
exports.utils.typedArrayApply=typedArrayApply;exports.utils.hasObjectURL=!!(exports.URL&&exports.URL.createObjectURL);if(!Document.prototype.createAttributeNS)Document.prototype.createAttributeNS=function(namespaceURI,qualifiedName){var dummy=this.createElement("dummy");dummy.setAttributeNS(namespaceURI,qualifiedName,"");var attr=dummy.attributes[0];dummy.removeAttributeNode(attr);return attr};if(!Element.prototype.setAttributeNodeNS)Element.prototype.setAttributeNodeNS=Element.prototype.setAttributeNode;
exports.utils.xmlSerializerNamespaceSupported=function(){var body=document.createElementNS("http://www.w3.org/1999/xhtml","body");var attr=document.createAttributeNS("http://www.xfa.org/schema/xfa-data/1.0/","xfa:spec");attr.nodeValue="2.0.2";body.setAttributeNodeNS(attr);attr=document.createAttributeNS("http://www.xfa.org/schema/xfa-data/1.0/","xfa:APIVersion");attr.nodeValue="Acrobat:10.1.3";body.setAttributeNodeNS(attr);var serializer=new XMLSerializer;var annotstr=serializer.serializeToString(body);
function passTest(actual){return actual.indexOf(' xmlns="http://www.w3.org/1999/xhtml"')>0&&actual.indexOf(' xfa:spec="2.0.2"')>0&&actual.indexOf(' xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"')>0&&actual.indexOf(' xfa:APIVersion="Acrobat:10.1.3"')>0}var result=passTest(annotstr);var $body=$("<body>").attr({"xmlns":"http://www.w3.org/1999/xhtml","xmlns:xfa":"http://www.xfa.org/schema/xfa-data/1.0/","xfa:APIVersion":"Acrobat:10.1.3","xfa:spec":"2.0.2"});annotstr=serializer.serializeToString($body[0]);
exports.utils.xmlSerializerJQueryNamespaceSupported=passTest(annotstr);return result}();window.matchMedia||(window.matchMedia=function(){var styleMedia=window.styleMedia||window.media;if(!styleMedia){var style=document.createElement("style"),script=document.getElementsByTagName("script")[0],info=null;style.type="text/css";style.id="matchmediajs-test";script.parentNode.insertBefore(style,script);info="getComputedStyle"in window&&window.getComputedStyle(style,null)||style.currentStyle;styleMedia={matchMedium:function(media){var text=
"@media "+media+"{ #matchmediajs-test { width: 1px; } }";if(style.styleSheet)style.styleSheet.cssText=text;else style.textContent=text;return info.width==="1px"}}}return function(media){return{matches:styleMedia.matchMedium(media||"all"),media:media||"all"}}}());(function(){if(window.matchMedia&&window.matchMedia("all").addListener)return false;var localMatchMedia=window.matchMedia,hasMediaQueries=localMatchMedia("only all").matches,isListening=false,timeoutID=0,queries=[],handleChange=function(){clearTimeout(timeoutID);
timeoutID=setTimeout(function(){for(var i=0,il=queries.length;i<il;i++){var mql=queries[i].mql,listeners=queries[i].listeners||[],matches=localMatchMedia(mql.media).matches;if(matches!==mql.matches){mql.matches=matches;for(var j=0,jl=listeners.length;j<jl;j++)listeners[j].call(window,mql)}}},30)};window.matchMedia=function(media){var mql=localMatchMedia(media),listeners=[],index=0;mql.addListener=function(listener){if(!hasMediaQueries)return;if(!isListening){isListening=true;window.addEventListener("resize",
handleChange,true)}if(index===0)index=queries.push({mql:mql,listeners:listeners});listeners.push(listener)};mql.removeListener=function(listener){for(var i=0,il=listeners.length;i<il;i++)if(listeners[i]===listener)listeners.splice(i,1)};return mql}})();exports.utils.specialBlendSupportedTest=function(){var canvas=document.createElement("canvas");canvas.width=1;canvas.height=1;var ctx=canvas.getContext("2d");ctx.fillStyle="#000";ctx.fillRect(0,0,1,1);ctx.globalCompositeOperation="multiply";ctx.fillStyle=
"#fff";ctx.fillRect(0,0,1,1);var result=ctx.getImageData(0,0,1,1).data[0]===0;exports.utils.specialBlendSupported=result;return result}();exports.utils.supportsImageDataConstructor=function(){try{new ImageData(1,1);return true}catch(e){return false}}();var vendors=["webkit","moz"];for(var i=0;i<vendors.length&&!window.requestAnimationFrame;++i){var vp=vendors[i];window.requestAnimationFrame=window[vp+"RequestAnimationFrame"];window.cancelAnimationFrame=window[vp+"CancelAnimationFrame"]||window[vp+
"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var lastTime=0;window.requestAnimationFrame=function(callback){var now=Date.now();var nextTime=Math.max(lastTime+16,now);return setTimeout(function(){callback(lastTime=nextTime)},nextTime-now)};window.cancelAnimationFrame=clearTimeout}exports.utils.hasClass=function(element,cls){return(" "+element.className+" ").indexOf(" "+cls+" ")>-1};exports.utils.eventHandler=
{on:function(){this.applyWithArgs($(this).on,arguments);return this},off:function(){this.applyWithArgs($(this).off,arguments);return this},trigger:function(){this.applyWithArgs($(this).triggerHandler,arguments);return this},applyWithArgs:function(func,args){func.apply($(this),Array.prototype.slice.call(args))},one:function(){this.applyWithArgs($(this).one,arguments);return this}};exports.utils.isEditableElement=function(ele){return ele.is("input:text")||ele.is("textarea")};if(!exports.server)exports.server=
{log:function(){},error:function(){},capture:function(){}};var arrprint=function(array,msg){var str="[";for(var i=0;i<array.length;i++){str+=array[i];if(i>=array.length-1)break;str+=", "}str+="]";if(!_.isUndefined(msg))str+=" "+msg;console.log(str)};exports.utils.arrprint=arrprint;var logvar=function(varname,variable){if(_.isArray(varname)&&_.isArray(variable)&&varname.length===variable.length){var varlist="";for(var i=0;i<varname.length;i++)varlist=varlist+varname[i]+": "+variable[i]+" ";console.log(varlist)}else console.log(varname+
": "+variable)};exports.utils.logvar=logvar;var fCmp=function(f1,f2){var eps=1E-6;return Math.abs(f1-f2)<eps};exports.utils.fCmp=fCmp;var documentReady=function(callback){if(document.readyState==="complete")callback();else if(document.addEventListener)exports.addEventListener("load",function(){callback()},false);else if(document.attachEvent)exports.attachEvent("onload",function(){callback()})};exports.utils.documentReady=documentReady;exports.runEval=function(str,c,t){c.clo=undefined;t.clo=undefined;
eval(str);str=null};if(typeof Object.defineProperties==="undefined"){Object.defineProperty=function(prototype,name,property){if(property.get)prototype.__defineGetter__(name,property.get);if(property.set)prototype.__defineSetter__(name,property.set)};Object.defineProperties=function(prototype,properties){for(var name in properties)if(properties.hasOwnProperty(name)){var property=properties[name];Object.defineProperty(prototype,name,property)}}}if(!HTMLCanvasElement.prototype.toBlob&&HTMLCanvasElement.prototype.msToBlob)HTMLCanvasElement.prototype.toBlob=
function(callback){callback(HTMLCanvasElement.prototype.msToBlob.call(this))};var canvasProto=CanvasRenderingContext2D.prototype;var originalTransform=CanvasRenderingContext2D.prototype.transform;var originalTranslate=CanvasRenderingContext2D.prototype.translate;var originalScale=CanvasRenderingContext2D.prototype.scale;var originalRotate=CanvasRenderingContext2D.prototype.rotate;var originalSetTransform=CanvasRenderingContext2D.prototype.setTransform;var originalSave=CanvasRenderingContext2D.prototype.save;
var originalRestore=CanvasRenderingContext2D.prototype.restore;_(canvasProto).extend({getTransformReference:function(){var contextArray=this.canvas.mtxArray;if(!contextArray||!contextArray.length)contextArray=this.canvas.mtxArray=[new XODText.Matrix2D(1,0,0,1,0,0)];return contextArray[contextArray.length-1]},getTransform:function(){var copy=new XODText.Matrix2D;copy.initMatrix(this.getTransformReference());return copy},setCurrentTransform:function(transform){this.canvas.mtxArray[this.canvas.mtxArray.length-
1]=transform},transform:function(a,b,c,d,h,v){this.getTransformReference().concat(new XODText.Matrix2D(a,b,c,d,h,v));return originalTransform.apply(this,arguments)},translate:function(h,v){this.getTransformReference().concat(new XODText.Matrix2D(1,0,0,1,h,v));return originalTranslate.apply(this,arguments)},scale:function(x,y){this.getTransformReference().concat(new XODText.Matrix2D(x,0,0,y,0,0));return originalScale.apply(this,arguments)},rotate:function(angle){this.getTransformReference().concat(new XODText.Matrix2D.rotationMatrix(angle));
return originalRotate.apply(this,arguments)},setTransform:function(a,b,c,d,h,v){this.getTransformReference();this.setCurrentTransform(new XODText.Matrix2D(a,b,c,d,h,v));return originalSetTransform.apply(this,arguments)},save:function(){var currentTransform=this.getTransformReference();var newMatrix=new XODText.Matrix2D;newMatrix.initMatrix(currentTransform);this.canvas.mtxArray.push(newMatrix);return originalSave.apply(this,arguments)},restore:function(){var mtxArray=this.canvas.mtxArray;if(mtxArray&&
mtxArray.length)mtxArray.pop();return originalRestore.apply(this,arguments)}});Object.defineProperties(canvasProto,{w:{set:function(val){this.lineWidth=val}},c:{set:function(val){this.lineCap=val}},s:{set:function(val){this.strokeStyle=val}},f:{set:function(val){this.fillStyle=val}},a:{set:function(val){this.globalAlpha=val}},n:{set:function(val){this.font=val}},i:{set:function(val){this.miterLimit=val}},j:{set:function(val){this.lineJoin=val}},g:{set:function(val){this.globalCompositeOperation=val}}});
_(canvasProto).extend({S:function(){if(typeof this.saves==="undefined")this.saves=0;this.saves++;this.save()},r:function(){this.saves--;this.restore()},t:canvasProto.transform,T:canvasProto.translate,ro:canvasProto.rotate,L:canvasProto.createLinearGradient,R:canvasProto.createRadialGradient,P:canvasProto.createPattern,b:canvasProto.beginPath,z:canvasProto.closePath,F:canvasProto.fill,X:canvasProto.stroke,C:canvasProto.clip,M:canvasProto.moveTo,m:canvasProto.measureText,l:canvasProto.lineTo,q:canvasProto.quadraticCurveTo,
B:canvasProto.bezierCurveTo,x:canvasProto.fillText,fillTextCustom:function(text,x,y){},xc:function(text,x,y){},tm:function(mapping){},cgb:function(){},cge:function(){},xw:function(text,x,y,skipLast){this.fillText(text,x,y)},xcw:function(text,x,y,skipLast){},I:function(img){if(typeof img!=="undefined")this.drawImage.apply(this,arguments)},Z:canvasProto.setTransform,d:canvasProto.getImageData,D:canvasProto.putImageData,e:canvasProto.scale,cr:function(x,y,w,h){this.beginPath();this.rect(x,y,w,h);this.clip()},
createCanvas:function(){return document.createElement("canvas")}});Object.defineProperty(TextMetrics.prototype,"W",{get:function(){return this.width}});var CanvasGradientPrototype;if(typeof exports.CanvasGradient==="undefined")CanvasGradientPrototype=document.createElement("canvas").getContext("2d").createLinearGradient(0,0,0,0).__proto__;else CanvasGradientPrototype=CanvasGradient.prototype;_(CanvasGradientPrototype).extend({A:CanvasGradientPrototype.addColorStop});exports.utils.isRectIntersecting=
function(rect1,rect2){if(rect1.x1<=rect2.x2&&rect1.x2>=rect2.x1&&rect1.y1<=rect2.y2&&rect1.y2>=rect2.y1)return true;return false};exports.utils.containsRect=function(rect1,rect2){if(rect1.x1<=rect2.x1&&rect1.x2>=rect2.x2&&rect1.y1<=rect2.y1&&rect1.y2>=rect2.y2)return true;return false};exports.utils.getRectIntersection=function(rect1,rect2){var rect={x1:0,y1:0,x2:0,y2:0};if(exports.utils.isRectIntersecting(rect1,rect2)===true){rect.x1=Math.max(rect1.x1,rect2.x1);rect.y1=Math.max(rect1.y1,rect2.y1);
rect.x2=Math.min(rect1.x2,rect2.x2);rect.y2=Math.min(rect1.y2,rect2.y2)}return rect};exports.utils.normalizeRect=function(pt1,pt2){var x1=pt1.x;var x2=pt2.x;var y1=pt1.y;var y2=pt2.y;if(pt1.x>pt2.x){x2=pt1.x;x1=pt2.x}if(pt1.y>pt2.y){y2=pt1.y;y1=pt2.y}return{x1:x1,y1:y1,x2:x2,y2:y2}};exports.utils.getRotationOffsets=function(rotation,w,h){var dx=0,dy=0;rotation=Number(rotation);switch(rotation){case 90:dy=w;break;case 180:dx=w;dy=h;break;case 270:dx=h;break}return{dx:dx,dy:dy}};exports.json2xml=function(o,
tab){var toXml=function(v,name,ind){var xml="";if(v instanceof Array)for(var i=0,n=v.length;i<n;i++)xml+=ind+toXml(v[i],name,ind+"\t")+"\n";else if(typeof v==="object"){var hasChild=false;xml+=ind+"<"+name;for(var m in v)if(m.charAt(0)=="@")xml+=" "+m.substr(1)+'="'+v[m].toString()+'"';else hasChild=true;xml+=hasChild?">":"/>";if(hasChild){for(var m in v)if(m=="#text")xml+=v[m];else if(m=="#cdata")xml+="<![CDATA["+v[m]+"]]\x3e";else if(m.charAt(0)!="@")xml+=toXml(v[m],m,ind+"\t");xml+=(xml.charAt(xml.length-
1)=="\n"?ind:"")+"</"+name+">"}}else xml+=ind+"<"+name+">"+v.toString()+"</"+name+">";return xml},xml="";for(var m in o)xml+=toXml(o[m],m,"");return tab?xml.replace(/\t/g,tab):xml.replace(/\t|\n/g,"")};exports.roundToPrecision=function(number,precision){var factor=Math.pow(10,precision);var tempNumber=number*factor;var roundedTempNumber=Math.round(tempNumber);return roundedTempNumber/factor};if(!Array.prototype.fill)Object.defineProperty(Array.prototype,"fill",{value:function(value){if(this==null)throw new TypeError("this is null or not defined");
var O=Object(this);var len=O.length>>>0;var start=arguments[1];var relativeStart=start>>0;var k=relativeStart<0?Math.max(len+relativeStart,0):Math.min(relativeStart,len);var end=arguments[2];var relativeEnd=end===undefined?len:end>>0;var final=relativeEnd<0?Math.max(len+relativeEnd,0):Math.min(relativeEnd,len);while(k<final){O[k]=value;k++}return O}});exports.joinPaths=function(){var lhs,rhs;var arr=[];arr[arguments.length-1]=null;var i=0;if(arguments.length>0){rhs=arguments[i].endsWith("/")?arguments[i].length-
1:arguments[i].length;arr[i]=arguments[i].substring(0,rhs)}for(i=1;i<arguments.length-1;++i){lhs=arguments[i].startsWith("/")?1:0;rhs=arguments[i].endsWith("/")?arguments[i].length-1:arguments[i].length;arr[i]=arguments[i].substring(lhs,rhs)}if(arguments.length>1){lhs=arguments[i].startsWith("/")?1:0;arr[i]=arguments[i].substring(lhs,arguments[i].length)}return arr.join("/")};exports.utils.utf8_decode=function(utftext){var string="";var i=0;var c1=0,c2=0,c3=0;while(i<utftext.length){c1=utftext.charCodeAt(i);
if(c1<128){string+=String.fromCharCode(c1);i++}else if(c1>191&&c1<224){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode((c1&31)<<6|c2&63);i+=2}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode((c1&15)<<12|(c2&63)<<6|c3&63);i+=3}}return string}})(window);function XMLWriter(a,b){if(a)this.encoding=a;if(b)this.version=b}
(function(){XMLWriter.prototype={encoding:"ISO-8859-1",version:"1.0",formatting:"indented",indentChar:"\t",indentation:1,newLine:"\n",writeStartDocument:function(a){this.close();this.stack=[];this.standalone=a},writeEndDocument:function(){this.active=this.root;this.stack=[]},writeDocType:function(a){this.doctype=a},writeStartElement:function(c,d){if(d)c=d+":"+c;var a=this,b=a.active,e={n:c,a:{},c:[]};if(b){b.c.push(e);this.stack.push(b)}else a.root=e;a.active=e},writeEndElement:function(){this.active=
this.stack.pop()||this.root},writeAttributeString:function(a,b){if(this.active)this.active.a[a]=b},writeString:function(a){if(this.active)this.active.c.push(a)},writeElementString:function(a,b,c){this.writeStartElement(a,c);this.writeString(b);this.writeEndElement()},writeCDATA:function(a){this.writeString("<![CDATA["+a+"]]\x3e")},writeComment:function(a){this.writeString("\x3c!-- "+a+" --\x3e")},flush:function(){var a=this,b="",c="",d=a.indentation,e=a.formatting.toLowerCase()=="indented",f='<?xml version="'+
a.version+'" encoding="'+a.encoding+'"';if(a.stack&&a.stack[0])a.writeEndDocument();if(a.standalone!==undefined)f+=' standalone="'+!!a.standalone+'"';f+=" ?>";f=[f];if(a.doctype&&a.root)f.push("<!DOCTYPE "+a.root.n+" "+a.doctype+">");if(e)while(d--)b+=a.indentChar;if(a.root)k(a.root,c,b,f);return f.join(e?a.newLine:"")},close:function(){var a=this;if(a.root)j(a.root);a.active=a.root=a.stack=null},getDocument:function(){return(new DOMParser).parseFromString(this.flush(),"text/xml")}};function j(a){var l=
a.c.length;while(l--)if(typeof a.c[l]=="object")j(a.c[l]);a.n=a.a=a.c=null}function k(a,b,c,d){var e=b+"<"+a.n,f=a.c.length,g,h,i=0;for(g in a.a)e+=" "+g+'="'+a.a[g]+'"';e+=f?">":" />";d.push(e);if(f){do{h=a.c[i++];if(typeof h=="string")if(f==1)return d.push(d.pop()+h+"</"+a.n+">");else d.push(b+c+h);else if(typeof h=="object")k(h,b+c,c,d)}while(i<f);d.push(b+"</"+a.n+">")}}})();var idbModules={};
(function(idbModules){function callback(fn,context,event,func){event.target=context;typeof context[fn]==="function"&&context[fn].apply(context,[event]);typeof func==="function"&&func()}function throwDOMException(name,message,error){var e=new DOMException.constructor(0,message);e.name=name;e.message=message;e.stack=arguments.callee.caller;idbModules.DEBUG&&console.log(name,message,error,e);throw e;}var StringList=function(){this.length=0;this._items=[]};StringList.prototype={contains:function(str){return-1!==this._items.indexOf(str)},
item:function(key){return this._items[key]},indexOf:function(str){return this._items.indexOf(str)},push:function(item){this._items.push(item);this.length+=1},splice:function(){this._items.splice.apply(this._items,arguments);this.length=this._items.length}};idbModules.util={"throwDOMException":throwDOMException,"callback":callback,"quote":function(arg){return"'"+arg+"'"},"StringList":StringList}})(idbModules);
(function(idbModules){var Sca=function(){return{"encode":function(val){return JSON.stringify(val)},"decode":function(val){return JSON.parse(val)}}}();idbModules.Sca=Sca})(idbModules);
(function(idbModules){var collations=["","number","string","boolean","object","undefined"];var getGenericEncoder=function(){return{"encode":function(key){return collations.indexOf(typeof key)+"-"+JSON.stringify(key)},"decode":function(key){if(typeof key==="undefined")return undefined;else return JSON.parse(key.substring(2))}}};var types={"number":getGenericEncoder("number"),"boolean":getGenericEncoder(),"object":getGenericEncoder(),"string":{"encode":function(key){return collations.indexOf("string")+
"-"+key},"decode":function(key){return""+key.substring(2)}},"undefined":{"encode":function(key){return collations.indexOf("undefined")+"-undefined"},"decode":function(key){return undefined}}};var Key=function(){return{encode:function(key){return types[typeof key].encode(key)},decode:function(key){return types[collations[key.substring(0,1)]].decode(key)}}}();idbModules.Key=Key})(idbModules);
(function(idbModules,undefined){var Event=function(type,debug){return{"type":type,debug:debug,bubbles:false,cancelable:false,eventPhase:0,timeStamp:new Date}};idbModules.Event=Event})(idbModules);
(function(idbModules){var IDBRequest=function(){this.onsuccess=this.onerror=this.result=this.error=this.source=this.transaction=null;this.readyState="pending"};var IDBOpenRequest=function(){this.onblocked=this.onupgradeneeded=null};IDBOpenRequest.prototype=IDBRequest;idbModules.IDBRequest=IDBRequest;idbModules.IDBOpenRequest=IDBOpenRequest})(idbModules);
(function(idbModules,undefined){var IDBKeyRange=function(lower,upper,lowerOpen,upperOpen){this.lower=lower;this.upper=upper;this.lowerOpen=lowerOpen;this.upperOpen=upperOpen};IDBKeyRange.only=function(value){return new IDBKeyRange(value,value,true,true)};IDBKeyRange.lowerBound=function(value,open){return new IDBKeyRange(value,undefined,open,undefined)};IDBKeyRange.upperBound=function(value){return new IDBKeyRange(undefined,value,undefined,open)};IDBKeyRange.bound=function(lower,upper,lowerOpen,upperOpen){return new IDBKeyRange(lower,
upper,lowerOpen,upperOpen)};idbModules.IDBKeyRange=IDBKeyRange})(idbModules);
(function(idbModules,undefined){function IDBCursor(range,direction,idbObjectStore,cursorRequest,keyColumnName,valueColumnName){this.__range=range;this.source=this.__idbObjectStore=idbObjectStore;this.__req=cursorRequest;this.key=undefined;this.direction=direction;this.__keyColumnName=keyColumnName;this.__valueColumnName=valueColumnName;if(!this.source.transaction.__active)idbModules.util.throwDOMException("TransactionInactiveError - The transaction this IDBObjectStore belongs to is not active.");this.__offset=
-1;this.__lastKeyContinued=undefined;this["continue"]()}IDBCursor.prototype.__find=function(key,tx,success,error){var me=this;var sql=["SELECT * FROM ",idbModules.util.quote(me.__idbObjectStore.name)];var sqlValues=[];sql.push("WHERE ",me.__keyColumnName," NOT NULL");if(me.__range&&(me.__range.lower||me.__range.upper)){sql.push("AND");if(me.__range.lower){sql.push(me.__keyColumnName+(me.__range.lowerOpen?" >=":" >")+" ?");sqlValues.push(idbModules.Key.encode(me.__range.lower))}me.__range.lower&&me.__range.upper&&
sql.push("AND");if(me.__range.upper){sql.push(me.__keyColumnName+(me.__range.upperOpen?" <= ":" < ")+" ?");sqlValues.push(idbModules.Key.encode(me.__range.upper))}}if(typeof key!=="undefined"){me.__lastKeyContinued=key;me.__offset=0}if(me.__lastKeyContinued!==undefined){sql.push("AND "+me.__keyColumnName+" >= ?");sqlValues.push(idbModules.Key.encode(me.__lastKeyContinued))}sql.push("ORDER BY ",me.__keyColumnName);sql.push("LIMIT 1 OFFSET "+me.__offset);idbModules.DEBUG&&console.log(sql.join(" "),
sqlValues);tx.executeSql(sql.join(" "),sqlValues,function(tx,data){if(data.rows.length===1){var key=idbModules.Key.decode(data.rows.item(0)[me.__keyColumnName]);var val=me.__valueColumnName==="value"?idbModules.Sca.decode(data.rows.item(0)[me.__valueColumnName]):idbModules.Key.decode(data.rows.item(0)[me.__valueColumnName]);success(key,val)}else{idbModules.DEBUG&&console.log("Reached end of cursors");success(undefined,undefined)}},function(tx,data){idbModules.DEBUG&&console.log("Could not execute Cursor.continue");
error(data)})};IDBCursor.prototype["continue"]=function(key){var me=this;this.__idbObjectStore.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__offset++;me.__find(key,tx,function(key,val){me.key=key;me.value=val;success(typeof me.key!=="undefined"?me:undefined,me.__req)},function(data){error(data)})})};IDBCursor.prototype.advance=function(count){if(count<=0)idbModules.util.throwDOMException("Type Error - Count is invalid - 0 or negative",count);var me=this;this.__idbObjectStore.transaction.__addToTransactionQueue(function(tx,
args,success,error){me.__offset+=count;me.__find(undefined,tx,function(key,value){me.key=key;me.value=value;success(typeof me.key!=="undefined"?me:undefined,me.__req)},function(data){error(data)})})};IDBCursor.prototype.update=function(valueToUpdate){var me=this;return this.__idbObjectStore.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__find(undefined,tx,function(key,value){var sql="UPDATE "+idbModules.util.quote(me.__idbObjectStore.name)+" SET value = ? WHERE key = ?";idbModules.DEBUG&&
console.log(sql,valueToUpdate,key);tx.executeSql(sql,[idbModules.Sca.encode(valueToUpdate),idbModules.Key.encode(key)],function(tx,data){if(data.rowsAffected===1)success(key);else error("No rowns with key found"+key)},function(tx,data){error(data)})},function(data){error(data)})})};IDBCursor.prototype["delete"]=function(){var me=this;return this.__idbObjectStore.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__find(undefined,tx,function(key,value){var sql="DELETE FROM  "+idbModules.util.quote(me.__idbObjectStore.name)+
" WHERE key = ?";idbModules.DEBUG&&console.log(sql,key);tx.executeSql(sql,[idbModules.Key.encode(key)],function(tx,data){if(data.rowsAffected===1)success(undefined);else error("No rowns with key found"+key)},function(tx,data){error(data)})},function(data){error(data)})})};idbModules.IDBCursor=IDBCursor})(idbModules);
(function(idbModules,undefined){function IDBIndex(indexName,idbObjectStore){this.indexName=indexName;this.__idbObjectStore=this.source=idbObjectStore}IDBIndex.prototype.__createIndex=function(indexName,keyPath,optionalParameters){var me=this;var transaction=me.__idbObjectStore.transaction;transaction.__addToTransactionQueue(function(tx,args,success,failure){me.__idbObjectStore.__getStoreProps(tx,function(){function error(){idbModules.util.throwDOMException(0,"Could not create new index",arguments)}
if(transaction.mode!==2)idbModules.util.throwDOMException(0,"Invalid State error, not a version transaction",me.transaction);var idxList=JSON.parse(me.__idbObjectStore.__storeProps.indexList);if(typeof idxList[indexName]!=="undefined")idbModules.util.throwDOMException(0,"Index already exists on store",idxList);var columnName=indexName;idxList[indexName]={"columnName":columnName,"keyPath":keyPath,"optionalParams":optionalParameters};me.__idbObjectStore.__storeProps.indexList=JSON.stringify(idxList);
var sql=["ALTER TABLE",idbModules.util.quote(me.__idbObjectStore.name),"ADD",columnName,"BLOB"].join(" ");idbModules.DEBUG&&console.log(sql);tx.executeSql(sql,[],function(tx,data){tx.executeSql("SELECT * FROM "+idbModules.util.quote(me.__idbObjectStore.name),[],function(tx,data){(function initIndexForRow(i){if(i<data.rows.length)try{var value=idbModules.Sca.decode(data.rows.item(i).value);var indexKey=eval("value['"+keyPath+"']");tx.executeSql("UPDATE "+idbModules.util.quote(me.__idbObjectStore.name)+
" set "+columnName+" = ? where key = ?",[idbModules.Key.encode(indexKey),data.rows.item(i).key],function(tx,data){initIndexForRow(i+1)},error)}catch(e){initIndexForRow(i+1)}else{idbModules.DEBUG&&console.log("Updating the indexes in table",me.__idbObjectStore.__storeProps);tx.executeSql("UPDATE __sys__ set indexList = ? where name = ?",[me.__idbObjectStore.__storeProps.indexList,me.__idbObjectStore.name],function(){me.__idbObjectStore.__setReadyState("createIndex",true);success(me)},error)}})(0)},
error)},error)},"createObjectStore")})};IDBIndex.prototype.openCursor=function(range,direction){var cursorRequest=new idbModules.IDBRequest;var cursor=new idbModules.IDBCursor(range,direction,this.source,cursorRequest,this.indexName,"value");return cursorRequest};IDBIndex.prototype.openKeyCursor=function(range,direction){var cursorRequest=new idbModules.IDBRequest;var cursor=new idbModules.IDBCursor(range,direction,this.source,cursorRequest,this.indexName,"key");return cursorRequest};IDBIndex.prototype.__fetchIndexData=
function(key,opType){var me=this;return me.__idbObjectStore.transaction.__addToTransactionQueue(function(tx,args,success,error){var sql=["SELECT * FROM ",idbModules.util.quote(me.__idbObjectStore.name)," WHERE",me.indexName,"NOT NULL"];var sqlValues=[];if(typeof key!=="undefined"){sql.push("AND",me.indexName," = ?");sqlValues.push(idbModules.Key.encode(key))}idbModules.DEBUG&&console.log("Trying to fetch data for Index",sql.join(" "),sqlValues);tx.executeSql(sql.join(" "),sqlValues,function(tx,data){var d;
if(typeof opType==="count")d=data.rows.length;else if(data.rows.length===0)d=undefined;else if(opType==="key")d=idbModules.Key.decode(data.rows.item(0).key);else d=idbModules.Sca.decode(data.rows.item(0).value);success(d)},error)})};IDBIndex.prototype.get=function(key){return this.__fetchIndexData(key,"value")};IDBIndex.prototype.getKey=function(key){return this.__fetchIndexData(key,"key")};IDBIndex.prototype.count=function(key){return this.__fetchIndexData(key,"count")};idbModules.IDBIndex=IDBIndex})(idbModules);
(function(idbModules){var IDBObjectStore=function(name,idbTransaction,ready){this.name=name;this.transaction=idbTransaction;this.__ready={};this.__setReadyState("createObjectStore",typeof ready==="undefined"?true:ready);this.indexNames=new idbModules.util.StringList};IDBObjectStore.prototype.__setReadyState=function(key,val){this.__ready[key]=val};IDBObjectStore.prototype.__waitForReady=function(callback,key){var ready=true;if(typeof key!=="undefined")ready=typeof this.__ready[key]==="undefined"?
true:this.__ready[key];else for(var x in this.__ready)if(!this.__ready[x])ready=false;if(ready)callback();else{idbModules.DEBUG&&console.log("Waiting for to be ready",key);var me=this;window.setTimeout(function(){me.__waitForReady(callback,key)},100)}};IDBObjectStore.prototype.__getStoreProps=function(tx,callback,waitOnProperty){var me=this;this.__waitForReady(function(){if(me.__storeProps){idbModules.DEBUG&&console.log("Store properties - cached",me.__storeProps);callback(me.__storeProps)}else tx.executeSql("SELECT * FROM __sys__ where name = ?",
[me.name],function(tx,data){if(data.rows.length!==1)callback();else{me.__storeProps={"name":data.rows.item(0).name,"indexList":data.rows.item(0).indexList,"autoInc":data.rows.item(0).autoInc,"keyPath":data.rows.item(0).keyPath};idbModules.DEBUG&&console.log("Store properties",me.__storeProps);callback(me.__storeProps)}},function(){callback()})},waitOnProperty)};IDBObjectStore.prototype.__deriveKey=function(tx,value,key,callback){function getNextAutoIncKey(){tx.executeSql("SELECT * FROM sqlite_sequence where name like ?",
[me.name],function(tx,data){if(data.rows.length!==1)callback(0);else callback(data.rows.item(0).seq)},function(tx,error){idbModules.util.throwDOMException(0,"Data Error - Could not get the auto increment value for key",error)})}var me=this;me.__getStoreProps(tx,function(props){if(!props)idbModules.util.throwDOMException(0,"Data Error - Could not locate defination for this table",props);if(props.keyPath){if(typeof key!=="undefined")idbModules.util.throwDOMException(0,"Data Error - The object store uses in-line keys and the key parameter was provided",
props);if(value)try{var primaryKey=eval("value['"+props.keyPath+"']");if(!primaryKey)if(props.autoInc==="true")getNextAutoIncKey();else idbModules.util.throwDOMException(0,"Data Error - Could not eval key from keyPath");else callback(primaryKey)}catch(e){idbModules.util.throwDOMException(0,"Data Error - Could not eval key from keyPath",e)}else idbModules.util.throwDOMException(0,"Data Error - KeyPath was specified, but value was not")}else if(typeof key!=="undefined")callback(key);else if(props.autoInc===
"false")idbModules.util.throwDOMException(0,"Data Error - The object store uses out-of-line keys and has no key generator and the key parameter was not provided. ",props);else getNextAutoIncKey()})};IDBObjectStore.prototype.__insertData=function(tx,value,primaryKey,success,error){var paramMap={};if(typeof primaryKey!=="undefined")paramMap.key=idbModules.Key.encode(primaryKey);var indexes=JSON.parse(this.__storeProps.indexList);for(var key in indexes)try{paramMap[indexes[key].columnName]=idbModules.Key.encode(eval("value['"+
indexes[key].keyPath+"']"))}catch(e){error(e)}var sqlStart=["INSERT INTO ",idbModules.util.quote(this.name),"("];var sqlEnd=[" VALUES ("];var sqlValues=[];for(key in paramMap){sqlStart.push(key+",");sqlEnd.push("?,");sqlValues.push(paramMap[key])}sqlStart.push("value )");sqlEnd.push("?)");sqlValues.push(idbModules.Sca.encode(value));var sql=sqlStart.join(" ")+sqlEnd.join(" ");idbModules.DEBUG&&console.log("SQL for adding",sql,sqlValues);tx.executeSql(sql,sqlValues,function(tx,data){success(primaryKey)},
function(tx,err){error(err)})};IDBObjectStore.prototype.add=function(value,key){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__deriveKey(tx,value,key,function(primaryKey){me.__insertData(tx,value,primaryKey,success,error)})})};IDBObjectStore.prototype.put=function(value,key){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__deriveKey(tx,value,key,function(primaryKey){var sql="DELETE FROM "+idbModules.util.quote(me.name)+
" where key = ?";tx.executeSql(sql,[idbModules.Key.encode(primaryKey)],function(tx,data){idbModules.DEBUG&&console.log("Did the row with the",primaryKey,"exist? ",data.rowsAffected);me.__insertData(tx,value,primaryKey,success,error)},function(tx,err){error(err)})})})};IDBObjectStore.prototype.get=function(key){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__waitForReady(function(){var primaryKey=idbModules.Key.encode(key);idbModules.DEBUG&&console.log("Fetching",
me.name,primaryKey);tx.executeSql("SELECT * FROM "+idbModules.util.quote(me.name)+" where key = ?",[primaryKey],function(tx,data){idbModules.DEBUG&&console.log("Fetched data",data);try{if(0===data.rows.length)return success();success(idbModules.Sca.decode(data.rows.item(0).value))}catch(e){idbModules.DEBUG&&console.log(e);success(undefined)}},function(tx,err){error(err)})})})};IDBObjectStore.prototype["delete"]=function(key){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,
success,error){me.__waitForReady(function(){var primaryKey=idbModules.Key.encode(key);idbModules.DEBUG&&console.log("Fetching",me.name,primaryKey);tx.executeSql("DELETE FROM "+idbModules.util.quote(me.name)+" where key = ?",[primaryKey],function(tx,data){idbModules.DEBUG&&console.log("Deleted from database",data.rowsAffected);success()},function(tx,err){error(err)})})})};IDBObjectStore.prototype.clear=function(){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__waitForReady(function(){tx.executeSql("DELETE FROM "+
idbModules.util.quote(me.name),[],function(tx,data){idbModules.DEBUG&&console.log("Cleared all records from database",data.rowsAffected);success()},function(tx,err){error(err)})})})};IDBObjectStore.prototype.count=function(key){var me=this;return me.transaction.__addToTransactionQueue(function(tx,args,success,error){me.__waitForReady(function(){var sql="SELECT * FROM "+idbModules.util.quote(me.name)+(typeof key!=="undefined"?" WHERE key = ?":"");var sqlValues=[];typeof key!=="undefined"&&sqlValues.push(idbModules.Key.encode(key));
tx.executeSql(sql,sqlValues,function(tx,data){success(data.rows.length)},function(tx,err){error(err)})})})};IDBObjectStore.prototype.openCursor=function(range,direction){var cursorRequest=new idbModules.IDBRequest;var cursor=new idbModules.IDBCursor(range,direction,this,cursorRequest,"key","value");return cursorRequest};IDBObjectStore.prototype.index=function(indexName){var index=new idbModules.IDBIndex(indexName,this);return index};IDBObjectStore.prototype.createIndex=function(indexName,keyPath,
optionalParameters){var me=this;optionalParameters=optionalParameters||{};me.__setReadyState("createIndex",false);var result=new idbModules.IDBIndex(indexName,me);me.__waitForReady(function(){result.__createIndex(indexName,keyPath,optionalParameters)},"createObjectStore");me.indexNames.push(indexName);return result};IDBObjectStore.prototype.deleteIndex=function(indexName){var result=new idbModules.IDBIndex(indexName,this,false);result.__deleteIndex(indexName);return result};idbModules.IDBObjectStore=
IDBObjectStore})(idbModules);
(function(idbModules){var READ=0;var READ_WRITE=1;var VERSION_TRANSACTION=2;var IDBTransaction=function(storeNames,mode,db){if(typeof mode==="number"){this.mode=mode;mode!==2&&idbModules.DEBUG&&console.log("Mode should be a string, but was specified as ",mode)}else if(typeof mode==="string")switch(mode){case "readonly":this.mode=READ_WRITE;break;case "readwrite":this.mode=READ;break;default:this.mode=READ;break}this.storeNames=typeof storeNames==="string"?[storeNames]:storeNames;for(var i=0;i<this.storeNames.length;i++)if(!db.objectStoreNames.contains(this.storeNames[i]))idbModules.util.throwDOMException(0,
"The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened.",this.storeNames[i]);this.__active=true;this.__running=false;this.__requests=[];this.__aborted=false;this.db=db;this.error=null;this.onabort=this.onerror=this.oncomplete=null;var me=this};IDBTransaction.prototype.__executeRequests=function(){if(this.__running&&this.mode!==VERSION_TRANSACTION){idbModules.DEBUG&&console.log("Looks like the request set is already running",
this.mode);return}this.__running=true;var me=this;window.setTimeout(function(){if(me.mode!==2&&!me.__active)idbModules.util.throwDOMException(0,"A request was placed against a transaction which is currently not active, or which is finished",me.__active);me.db.__db.transaction(function(tx){me.__tx=tx;var q=null,i=0;function success(result,req){if(req)q.req=req;q.req.readyState="done";q.req.result=result;delete q.req.error;var e=idbModules.Event("success");idbModules.util.callback("onsuccess",q.req,
e);i++;executeRequest()}function error(errorVal){q.req.readyState="done";q.req.error="DOMError";var e=idbModules.Event("error",arguments);idbModules.util.callback("onerror",q.req,e);i++;executeRequest()}try{function executeRequest(){if(i>=me.__requests.length){me.__active=false;me.__requests=[];return}q=me.__requests[i];q.op(tx,q.args,success,error)}executeRequest()}catch(e){idbModules.DEBUG&&console.log("An exception occured in transaction",arguments);typeof me.onerror==="function"&&me.onerror()}},
function(){idbModules.DEBUG&&console.log("An error in transaction",arguments);typeof me.onerror==="function"&&me.onerror()},function(){idbModules.DEBUG&&console.log("Transaction completed",arguments);typeof me.oncomplete==="function"&&me.oncomplete()})},1)};IDBTransaction.prototype.__addToTransactionQueue=function(callback,args){if(!this.__active&&this.mode!==VERSION_TRANSACTION)idbModules.util.throwDOMException(0,"A request was placed against a transaction which is currently not active, or which is finished.",
this.__mode);var request=new idbModules.IDBRequest;request.source=this.db;this.__requests.push({"op":callback,"args":args,"req":request});this.__executeRequests();return request};IDBTransaction.prototype.objectStore=function(objectStoreName){return new idbModules.IDBObjectStore(objectStoreName,this)};IDBTransaction.prototype.abort=function(){!this.__active&&idbModules.util.throwDOMException(0,"A request was placed against a transaction which is currently not active, or which is finished",this.__active)};
IDBTransaction.prototype.READ_ONLY=0;IDBTransaction.prototype.READ_WRITE=1;IDBTransaction.prototype.VERSION_CHANGE=2;idbModules.IDBTransaction=IDBTransaction})(idbModules);
(function(idbModules){var IDBDatabase=function(db,name,version,storeProperties){this.__db=db;this.version=version;this.__storeProperties=storeProperties;this.objectStoreNames=new idbModules.util.StringList;for(var i=0;i<storeProperties.rows.length;i++)this.objectStoreNames.push(storeProperties.rows.item(i).name);this.name=name;this.onabort=this.onerror=this.onversionchange=null};IDBDatabase.prototype.createObjectStore=function(storeName,createOptions){var me=this;createOptions=createOptions||{};createOptions.keyPath=
createOptions.keyPath||null;var result=new idbModules.IDBObjectStore(storeName,me.__versionTransaction,false);var transaction=me.__versionTransaction;transaction.__addToTransactionQueue(function(tx,args,success,failure){function error(){idbModules.util.throwDOMException(0,"Could not create new object store",arguments)}if(!me.__versionTransaction)idbModules.util.throwDOMException(0,"Invalid State error",me.transaction);var sql=["CREATE TABLE",idbModules.util.quote(storeName),"(key BLOB",createOptions.autoIncrement?
", inc INTEGER PRIMARY KEY AUTOINCREMENT":"PRIMARY KEY",", value BLOB)"].join(" ");idbModules.DEBUG&&console.log(sql);tx.executeSql(sql,[],function(tx,data){tx.executeSql("INSERT INTO __sys__ VALUES (?,?,?,?)",[storeName,createOptions.keyPath,createOptions.autoIncrement?true:false,"{}"],function(){result.__setReadyState("createObjectStore",true);success(result)},error)},error)});me.objectStoreNames.push(storeName);return result};IDBDatabase.prototype.deleteObjectStore=function(storeName){var error=
function(){idbModules.util.throwDOMException(0,"Could not delete ObjectStore",arguments)};var me=this;!me.objectStoreNames.contains(storeName)&&error("Object Store does not exist");me.objectStoreNames.splice(me.objectStoreNames.indexOf(storeName),1);var transaction=me.__versionTransaction;transaction.__addToTransactionQueue(function(tx,args,success,failure){if(!me.__versionTransaction)idbModules.util.throwDOMException(0,"Invalid State error",me.transaction);me.__db.transaction(function(tx){tx.executeSql("SELECT * FROM __sys__ where name = ?",
[storeName],function(tx,data){if(data.rows.length>0)tx.executeSql("DROP TABLE "+idbModules.util.quote(storeName),[],function(){tx.executeSql("DELETE FROM __sys__ WHERE name = ?",[storeName],function(){},error)},error)})})})};IDBDatabase.prototype.close=function(){};IDBDatabase.prototype.transaction=function(storeNames,mode){var transaction=new idbModules.IDBTransaction(storeNames,mode||1,this);return transaction};idbModules.IDBDatabase=IDBDatabase})(idbModules);
(function(idbModules){var DEFAULT_DB_SIZE=4*1024*1024;if(!window.openDatabase)return;try{var sysdb=window.openDatabase("__sysdb__",1,"System Database",DEFAULT_DB_SIZE)}catch(err){window.openDatabase=undefined;return}sysdb.transaction(function(tx){tx.executeSql("SELECT * FROM dbVersions",[],function(t,data){},function(){sysdb.transaction(function(tx){tx.executeSql("CREATE TABLE IF NOT EXISTS dbVersions (name VARCHAR(255), version INT);",[],function(){},function(){idbModules.util.throwDOMException("Could not create table __sysdb__ to save DB versions")})})})},
function(){idbModules.DEBUG&&console.log("Error in sysdb transaction - when selecting from dbVersions",arguments)});var shimIndexedDB={open:function(name,version){try{window.openDatabase("__test__",1,"Test Database",26*1024*1024)}catch(err){return}var req=new idbModules.IDBOpenRequest;var calledDbCreateError=false;function dbCreateError(){if(calledDbCreateError)return;var e=idbModules.Event("error",arguments);req.readyState="done";req.error="DOMError";idbModules.util.callback("onerror",req,e);calledDbCreateError=
true}function openDB(oldVersion){var db=window.openDatabase(name,1,name,DEFAULT_DB_SIZE);req.readyState="done";if(typeof version==="undefined")version=oldVersion||1;if(version<=0||oldVersion>version)idbModules.util.throwDOMException(0,"An attempt was made to open a database using a lower version than the existing version.",version);db.transaction(function(tx){tx.executeSql("CREATE TABLE IF NOT EXISTS __sys__ (name VARCHAR(255), keyPath VARCHAR(255), autoInc BOOLEAN, indexList BLOB)",[],function(){tx.executeSql("SELECT * FROM __sys__",
[],function(tx,data){var e=idbModules.Event("success");req.source=req.result=new idbModules.IDBDatabase(db,name,version,data);if(oldVersion<version)sysdb.transaction(function(systx){systx.executeSql("UPDATE dbVersions set version = ? where name = ?",[version,name],function(){var e=idbModules.Event("upgradeneeded");e.oldVersion=oldVersion;e.newVersion=version;req.transaction=req.result.__versionTransaction=new idbModules.IDBTransaction([],2,req.source);idbModules.util.callback("onupgradeneeded",req,
e,function(){var e=idbModules.Event("success");idbModules.util.callback("onsuccess",req,e)})},dbCreateError)},dbCreateError);else idbModules.util.callback("onsuccess",req,e)},dbCreateError)},dbCreateError)},dbCreateError)}sysdb.transaction(function(tx){tx.executeSql("SELECT * FROM dbVersions where name = ?",[name],function(tx,data){if(data.rows.length===0)tx.executeSql("INSERT INTO dbVersions VALUES (?,?)",[name,version||1],function(){openDB(0)},dbCreateError);else openDB(data.rows.item(0).version)},
dbCreateError)},dbCreateError);return req},"deleteDatabase":function(name){var req=new idbModules.IDBOpenRequest;var calledDBError=false;function dbError(msg){if(calledDBError)return;req.readyState="done";req.error="DOMError";var e=idbModules.Event("error");e.message=msg;e.debug=arguments;idbModules.util.callback("onerror",req,e);calledDBError=true}var version=null;function deleteFromDbVersions(){sysdb.transaction(function(systx){systx.executeSql("DELETE FROM dbVersions where name = ? ",[name],function(){req.result=
undefined;var e=idbModules.Event("success");e.newVersion=null;e.oldVersion=version;idbModules.util.callback("onsuccess",req,e)},dbError)},dbError)}sysdb.transaction(function(systx){systx.executeSql("SELECT * FROM dbVersions where name = ?",[name],function(tx,data){if(data.rows.length===0){req.result=undefined;var e=idbModules.Event("success");e.newVersion=null;e.oldVersion=version;idbModules.util.callback("onsuccess",req,e);return}version=data.rows.item(0).version;var db=window.openDatabase(name,
1,name,DEFAULT_DB_SIZE);db.transaction(function(tx){tx.executeSql("SELECT * FROM __sys__",[],function(tx,data){var tables=data.rows;(function deleteTables(i){if(i>=tables.length)tx.executeSql("DROP TABLE __sys__",[],function(){deleteFromDbVersions()},dbError);else tx.executeSql("DROP TABLE "+idbModules.util.quote(tables.item(i).name),[],function(){deleteTables(i+1)},function(){deleteTables(i+1)})})(0)},function(e){deleteFromDbVersions()})},dbError)})},dbError);return req},"cmp":function(key1,key2){return idbModules.Key.encode(key1)>
idbModules.Key.encode(key2)?1:key1===key2?0:-1}};idbModules.shimIndexedDB=shimIndexedDB})(idbModules);
(function(window,idbModules){if(typeof window.openDatabase!=="undefined"){window.shimIndexedDB=idbModules.shimIndexedDB;if(window.shimIndexedDB){window.shimIndexedDB.__useShim=function(){window._indexedDB=idbModules.shimIndexedDB;window._IDBDatabase=idbModules.IDBDatabase;window._IDBTransaction=idbModules.IDBTransaction;window._IDBCursor=idbModules.IDBCursor;window._IDBKeyRange=idbModules.IDBKeyRange};window.shimIndexedDB.__debug=function(val){idbModules.DEBUG=val}}}try{window.indexedDB=window.indexedDB||
window.webkitIndexedDB||window.mozIndexedDB||window.oIndexedDB||window.msIndexedDB;if((typeof window.indexedDB==="undefined"||window.indexedDB===null)&&typeof window.openDatabase!=="undefined")window.shimIndexedDB.__useShim();else if(typeof window.openDatabase!=="undefined"){window.IDBDatabase=window.IDBDatabase||window.webkitIDBDatabase;window.IDBTransaction=window.IDBTransaction||window.webkitIDBTransaction;window.IDBCursor=window.IDBCursor||window.webkitIDBCursor;window.IDBKeyRange=window.IDBKeyRange||
window.webkitIDBKeyRange;if(!window.IDBTransaction)window.IDBTransaction={};window.IDBTransaction.READ_ONLY=window.IDBTransaction.READ_ONLY||"readonly";window.IDBTransaction.READ_WRITE=window.IDBTransaction.READ_WRITE||"readwrite"}}catch(error){console.warn("No access to IndexedDB")}})(window,idbModules);(function(exports){exports.setImmediate||function(){var uid=0;var storage={};var firstCall=true;var slice=Array.prototype.slice;var message="IM";function fastApply(args){var func=args[0];switch(args.length){case 1:return func();case 2:return func(args[1]);case 3:return func(args[1],args[2])}return func.apply(window,slice.call(args,1))}function callback(event){var key=event.data;var data;if(typeof key=="string"&&key.indexOf(message)==0){data=storage[key];if(data){delete storage[key];fastApply(data)}}}
exports.setImmediate=function setImmediate(){var id=uid++;var key=message+id;var i=arguments.length;var args=new Array(i);while(i--)args[i]=arguments[i];storage[key]=args;if(firstCall){firstCall=false;exports.addEventListener("message",callback)}exports.postMessage(key,"*");return id};exports.clearImmediate=function clearImmediate(id){delete storage[message+id]}}()})(typeof self==="undefined"?this:self);(function(global){global.createPromiseCapability=function(){var promiseCapability={};var promise=new Promise(function(resolve,reject){promiseCapability.resolve=resolve;promiseCapability.reject=reject});promiseCapability.promise=promise;return promiseCapability};var NativePromise=global["Promise"];var nativePromiseSupported=NativePromise&&"resolve"in NativePromise&&"reject"in NativePromise&&"all"in NativePromise&&"race"in NativePromise&&function(){var resolve;new NativePromise(function(r){resolve=
r});return typeof resolve==="function"}();if(typeof exports!=="undefined"&&exports){exports.Promise=nativePromiseSupported?NativePromise:Promise;exports.Polyfill=Promise}else if(typeof define=="function"&&define.amd)define(function(){return nativePromiseSupported?NativePromise:Promise});else if(!nativePromiseSupported)global["Promise"]=Promise;var PENDING="pending";var SEALED="sealed";var FULFILLED="fulfilled";var REJECTED="rejected";var NOOP=function(){};function isArray(value){return Object.prototype.toString.call(value)===
"[object Array]"}var asyncSetTimer=typeof setImmediate!=="undefined"?setImmediate:setTimeout;var asyncQueue=[];var asyncTimer;function asyncFlush(){for(var i=0;i<asyncQueue.length;i++)asyncQueue[i][0](asyncQueue[i][1]);asyncQueue=[];asyncTimer=false}function asyncCall(callback,arg){asyncQueue.push([callback,arg]);if(!asyncTimer){asyncTimer=true;asyncSetTimer(asyncFlush,0)}}function invokeResolver(resolver,promise){function resolvePromise(value){resolve(promise,value)}function rejectPromise(reason){reject(promise,
reason)}try{resolver(resolvePromise,rejectPromise)}catch(e){rejectPromise(e)}}function invokeCallback(subscriber){var owner=subscriber.owner;var settled=owner.state_;var value=owner.data_;var callback=subscriber[settled];var promise=subscriber.then;if(typeof callback==="function"){settled=FULFILLED;try{value=callback(value)}catch(e){reject(promise,e)}}if(!handleThenable(promise,value)){if(settled===FULFILLED)resolve(promise,value);if(settled===REJECTED)reject(promise,value)}}function handleThenable(promise,
value){var resolved;try{if(promise===value)throw new TypeError("A promises callback cannot return that same promise.");if(value&&(typeof value==="function"||typeof value==="object")){var then=value.then;if(typeof then==="function"){then.call(value,function(val){if(!resolved){resolved=true;if(value!==val)resolve(promise,val);else fulfill(promise,val)}},function(reason){if(!resolved){resolved=true;reject(promise,reason)}});return true}}}catch(e){if(!resolved)reject(promise,e);return true}return false}
function resolve(promise,value){if(promise===value||!handleThenable(promise,value))fulfill(promise,value)}function fulfill(promise,value){if(promise.state_===PENDING){promise.state_=SEALED;promise.data_=value;asyncCall(publishFulfillment,promise)}}function reject(promise,reason){if(promise.state_===PENDING){promise.state_=SEALED;promise.data_=reason;asyncCall(publishRejection,promise)}}function publish(promise){var callbacks=promise.then_;promise.then_=undefined;for(var i=0;i<callbacks.length;i++)invokeCallback(callbacks[i])}
function publishFulfillment(promise){promise.state_=FULFILLED;publish(promise)}function publishRejection(promise){promise.state_=REJECTED;publish(promise)}function Promise(resolver){if(typeof resolver!=="function")throw new TypeError("Promise constructor takes a function argument");if(this instanceof Promise===false)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[];invokeResolver(resolver,this)}
Promise.prototype={constructor:Promise,state_:PENDING,then_:null,data_:undefined,then:function(onFulfillment,onRejection){var subscriber={owner:this,then:new this.constructor(NOOP),fulfilled:onFulfillment,rejected:onRejection};if(this.state_===FULFILLED||this.state_===REJECTED)asyncCall(invokeCallback,subscriber);else this.then_.push(subscriber);return subscriber.then},"catch":function(onRejection){return this.then(null,onRejection)}};Promise.all=function(promises){var Class=this;if(!isArray(promises))throw new TypeError("You must pass an array to Promise.all().");
return new Class(function(resolve,reject){var results=[];var remaining=0;function resolver(index){remaining++;return function(value){results[index]=value;if(!--remaining)resolve(results)}}for(var i=0,promise;i<promises.length;i++){promise=promises[i];if(promise&&typeof promise.then==="function")promise.then(resolver(i),reject);else results[i]=promise}if(!remaining)resolve(results)})};Promise.race=function(promises){var Class=this;if(!isArray(promises))throw new TypeError("You must pass an array to Promise.race().");
return new Class(function(resolve,reject){for(var i=0,promise;i<promises.length;i++){promise=promises[i];if(promise&&typeof promise.then==="function")promise.then(resolve,reject);else resolve(promise)}})};Promise.resolve=function(value){var Class=this;if(value&&typeof value==="object"&&value.constructor===Class)return value;return new Class(function(resolve){resolve(value)})};Promise.reject=function(reason){var Class=this;return new Class(function(resolve,reject){reject(reason)})}})(typeof window!=
"undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this);/*
 Advanced Encryption Standard (AES) Cipher-Block Chaining implementation.|This implementation is based on the public domain library 'jscrypto' which|was written by:|Emily Stark (estark@stanford.edu)|Mike Hamburg (mhamburg@stanford.edu)|Dan Boneh (dabo@cs.stanford.edu)|Parts of this code are based on the OpenSSL implementation of AES:|http://www.openssl.org|@author Dave Longley|Copyright (c) 2010-2012 Digital Bazaar, Inc.*/
(function(){if(typeof window!=="undefined"){var forge=window.forge=window.forge||{};forge.aes={}}else if(typeof module!=="undefined"&&module.exports){var forge={util:require("./util")};module.exports=forge.aes={}}else if(typeof self!=="undefined"){var forge=self.forge=self.forge||{};forge.aes={}}var init=false;var Nb=4;var sbox;var isbox;var rcon;var mix;var imix;var initialize=function(){init=true;rcon=[0,1,2,4,8,16,32,64,128,27,54];var xtime=new Array(256);for(var i=0;i<128;++i){xtime[i]=i<<1;xtime[i+
128]=i+128<<1^283}sbox=new Array(256);isbox=new Array(256);mix=new Array(4);imix=new Array(4);for(var i=0;i<4;++i){mix[i]=new Array(256);imix[i]=new Array(256)}var e=0,ei=0,e2,e4,e8,sx,sx2,me,ime;for(var i=0;i<256;++i){sx=ei^ei<<1^ei<<2^ei<<3^ei<<4;sx=sx>>8^sx&255^99;sbox[e]=sx;isbox[sx]=e;sx2=xtime[sx];e2=xtime[e];e4=xtime[e2];e8=xtime[e4];me=sx2<<24^sx<<16^sx<<8^(sx^sx2);ime=(e2^e4^e8)<<24^(e^e8)<<16^(e^e4^e8)<<8^(e^e2^e8);for(var n=0;n<4;++n){mix[n][e]=me;imix[n][sx]=ime;me=me<<24|me>>>8;ime=ime<<
24|ime>>>8}if(e===0)e=ei=1;else{e=e2^xtime[xtime[xtime[e2^e8]]];ei^=xtime[xtime[ei]]}}};var expandKey=function(key,decrypt){var w=key.slice(0);var temp,iNk=1;var Nk=w.length;var Nr1=Nk+6+1;var end=Nb*Nr1;for(var i=Nk;i<end;++i){temp=w[i-1];if(i%Nk===0){temp=sbox[temp>>>16&255]<<24^sbox[temp>>>8&255]<<16^sbox[temp&255]<<8^sbox[temp>>>24]^rcon[iNk]<<24;iNk++}else if(Nk>6&&i%Nk==4)temp=sbox[temp>>>24]<<24^sbox[temp>>>16&255]<<16^sbox[temp>>>8&255]<<8^sbox[temp&255];w[i]=w[i-Nk]^temp}if(decrypt){var tmp;
var m0=imix[0];var m1=imix[1];var m2=imix[2];var m3=imix[3];var wnew=w.slice(0);var end=w.length;for(var i=0,wi=end-Nb;i<end;i+=Nb,wi-=Nb)if(i===0||i===end-Nb){wnew[i]=w[wi];wnew[i+1]=w[wi+3];wnew[i+2]=w[wi+2];wnew[i+3]=w[wi+1]}else for(var n=0;n<Nb;++n){tmp=w[wi+n];wnew[i+(3&-n)]=m0[sbox[tmp>>>24]]^m1[sbox[tmp>>>16&255]]^m2[sbox[tmp>>>8&255]]^m3[sbox[tmp&255]]}w=wnew}return w};var _updateBlock=function(w,input,output,decrypt){var Nr=w.length/4-1;var m0,m1,m2,m3,sub;if(decrypt){m0=imix[0];m1=imix[1];
m2=imix[2];m3=imix[3];sub=isbox}else{m0=mix[0];m1=mix[1];m2=mix[2];m3=mix[3];sub=sbox}var a,b,c,d,a2,b2,c2;a=input[0]^w[0];b=input[decrypt?3:1]^w[1];c=input[2]^w[2];d=input[decrypt?1:3]^w[3];var i=3;for(var round=1;round<Nr;++round){a2=m0[a>>>24]^m1[b>>>16&255]^m2[c>>>8&255]^m3[d&255]^w[++i];b2=m0[b>>>24]^m1[c>>>16&255]^m2[d>>>8&255]^m3[a&255]^w[++i];c2=m0[c>>>24]^m1[d>>>16&255]^m2[a>>>8&255]^m3[b&255]^w[++i];d=m0[d>>>24]^m1[a>>>16&255]^m2[b>>>8&255]^m3[c&255]^w[++i];a=a2;b=b2;c=c2}output[0]=sub[a>>>
24]<<24^sub[b>>>16&255]<<16^sub[c>>>8&255]<<8^sub[d&255]^w[++i];output[decrypt?3:1]=sub[b>>>24]<<24^sub[c>>>16&255]<<16^sub[d>>>8&255]<<8^sub[a&255]^w[++i];output[2]=sub[c>>>24]<<24^sub[d>>>16&255]<<16^sub[a>>>8&255]<<8^sub[b&255]^w[++i];output[decrypt?1:3]=sub[d>>>24]<<24^sub[a>>>16&255]<<16^sub[b>>>8&255]<<8^sub[c&255]^w[++i]};var _createCipher=function(key,iv,output,decrypt){var cipher=null;if(!init)initialize();if(key.constructor==String&&(key.length==16||key.length==24||key.length==32))key=forge.util.createBuffer(key);
else if(key.constructor==Array&&(key.length==16||key.length==24||key.length==32)){var tmp=key;var key=forge.util.createBuffer();for(var i=0;i<tmp.length;++i)key.putByte(tmp[i])}if(key.constructor!=Array){var tmp=key;key=[];var len=tmp.length();if(len==16||len==24||len==32){len=len>>>2;for(var i=0;i<len;++i)key.push(tmp.getInt32())}}if(key.constructor==Array&&(key.length==4||key.length==6||key.length==8)){var _w=expandKey(key,decrypt);var _blockSize=Nb<<2;var _input;var _output;var _inBlock;var _outBlock;
var _prev;var _finish;cipher={output:null};cipher.update=function(input){if(!_finish)_input.putBuffer(input);var threshold=decrypt&&!_finish?_blockSize<<1:_blockSize;while(_input.length()>=threshold){if(decrypt)for(var i=0;i<Nb;++i)_inBlock[i]=_input.getInt32();else for(var i=0;i<Nb;++i)_inBlock[i]=_prev[i]^_input.getInt32();_updateBlock(_w,_inBlock,_outBlock,decrypt);if(decrypt){for(var i=0;i<Nb;++i)_output.putInt32(_prev[i]^_outBlock[i]);_prev=_inBlock.slice(0)}else{for(var i=0;i<Nb;++i)_output.putInt32(_outBlock[i]);
_prev=_outBlock}}};cipher.finish=function(pad){var rval=true;if(!decrypt)if(pad)rval=pad(_blockSize,_input,decrypt);else{var padding=_input.length()==_blockSize?_blockSize:_blockSize-_input.length();_input.fillWithByte(padding,padding)}if(rval){_finish=true;cipher.update()}if(decrypt){rval=_input.length()===0;if(rval)if(pad)rval=pad(_blockSize,_output,decrypt);else{var len=_output.length();var count=_output.at(len-1);if(count>Nb<<2)rval=false;else _output.truncate(count)}}return rval};cipher.start=
function(iv,output){iv=iv||_prev.slice(0);if(iv.constructor==String&&iv.length==16)iv=forge.util.createBuffer(iv);else if(iv.constructor==Array&&iv.length==16){var tmp=iv;var iv=forge.util.createBuffer();for(var i=0;i<16;++i)iv.putByte(tmp[i])}if(iv.constructor!=Array){var tmp=iv;iv=new Array(4);iv[0]=tmp.getInt32();iv[1]=tmp.getInt32();iv[2]=tmp.getInt32();iv[3]=tmp.getInt32()}_input=forge.util.createBuffer();_output=output||forge.util.createBuffer();_prev=iv.slice(0);_inBlock=new Array(Nb);_outBlock=
new Array(Nb);_finish=false;cipher.output=_output};if(iv!==null)cipher.start(iv,output)}return cipher};forge.aes.startEncrypting=function(key,iv,output){return _createCipher(key,iv,output,false)};forge.aes.createEncryptionCipher=function(key){return _createCipher(key,null,null,false)};forge.aes.startDecrypting=function(key,iv,output){return _createCipher(key,iv,output,true)};forge.aes.createDecryptionCipher=function(key){return _createCipher(key,null,null,true)};forge.aes._expandKey=function(key,
decrypt){if(!init)initialize();return expandKey(key,decrypt)};forge.aes._updateBlock=_updateBlock})();(function(){if(typeof window!=="undefined"){var forge=window.forge=window.forge||{};forge.util={}}else if(typeof module!=="undefined"&&module.exports){var forge={};module.exports=forge.util={}}else if(typeof self!=="undefined"){var forge=self.forge=self.forge||{};forge.util={}}var util=forge.util;util.ByteBuffer=function(b){this.data=b||"";this.read=0};util.ByteBuffer.prototype.length=function(){return this.data.length-this.read};util.ByteBuffer.prototype.isEmpty=function(){return this.data.length-
this.read===0};util.ByteBuffer.prototype.putByte=function(b){this.data+=String.fromCharCode(b)};util.ByteBuffer.prototype.fillWithByte=function(b,n){b=String.fromCharCode(b);var d=this.data;while(n>0){if(n&1)d+=b;n>>>=1;if(n>0)b+=b}this.data=d};util.ByteBuffer.prototype.putBytes=function(bytes){this.data+=bytes};util.ByteBuffer.prototype.putString=function(str){this.data+=util.encodeUtf8(str)};util.ByteBuffer.prototype.putInt16=function(i){this.data+=String.fromCharCode(i>>8&255)+String.fromCharCode(i&
255)};util.ByteBuffer.prototype.putInt24=function(i){this.data+=String.fromCharCode(i>>16&255)+String.fromCharCode(i>>8&255)+String.fromCharCode(i&255)};util.ByteBuffer.prototype.putInt32=function(i){this.data+=String.fromCharCode(i>>24&255)+String.fromCharCode(i>>16&255)+String.fromCharCode(i>>8&255)+String.fromCharCode(i&255)};util.ByteBuffer.prototype.putInt16Le=function(i){this.data+=String.fromCharCode(i&255)+String.fromCharCode(i>>8&255)};util.ByteBuffer.prototype.putInt24Le=function(i){this.data+=
String.fromCharCode(i&255)+String.fromCharCode(i>>8&255)+String.fromCharCode(i>>16&255)};util.ByteBuffer.prototype.putInt32Le=function(i){this.data+=String.fromCharCode(i&255)+String.fromCharCode(i>>8&255)+String.fromCharCode(i>>16&255)+String.fromCharCode(i>>24&255)};util.ByteBuffer.prototype.putInt=function(i,n){do{n-=8;this.data+=String.fromCharCode(i>>n&255)}while(n>0)};util.ByteBuffer.prototype.putBuffer=function(buffer){this.data+=buffer.getBytes()};util.ByteBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};
util.ByteBuffer.prototype.getInt16=function(){var rval=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return rval};util.ByteBuffer.prototype.getInt24=function(){var rval=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return rval};util.ByteBuffer.prototype.getInt32=function(){var rval=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<
8^this.data.charCodeAt(this.read+3);this.read+=4;return rval};util.ByteBuffer.prototype.getInt16Le=function(){var rval=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return rval};util.ByteBuffer.prototype.getInt24Le=function(){var rval=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return rval};util.ByteBuffer.prototype.getInt32Le=function(){var rval=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return rval};util.ByteBuffer.prototype.getInt=function(n){var rval=0;do{rval=(rval<<n)+this.data.charCodeAt(this.read++);n-=8}while(n>0);return rval};util.ByteBuffer.prototype.getBytes=function(count){var rval;if(count){count=Math.min(this.length(),count);rval=this.data.slice(this.read,this.read+count);this.read+=count}else if(count===0)rval="";else{rval=this.read===0?this.data:this.data.slice(this.read);
this.clear()}return rval};util.ByteBuffer.prototype.bytes=function(count){return typeof count==="undefined"?this.data.slice(this.read):this.data.slice(this.read,this.read+count)};util.ByteBuffer.prototype.at=function(i){return this.data.charCodeAt(this.read+i)};util.ByteBuffer.prototype.setAt=function(i,b){this.data=this.data.substr(0,this.read+i)+String.fromCharCode(b)+this.data.substr(this.read+i+1)};util.ByteBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};util.ByteBuffer.prototype.copy=
function(){var c=util.createBuffer(this.data);c.read=this.read;return c};util.ByteBuffer.prototype.compact=function(){if(this.read>0){this.data=this.data.slice(this.read);this.read=0}};util.ByteBuffer.prototype.clear=function(){this.data="";this.read=0};util.ByteBuffer.prototype.truncate=function(count){var len=Math.max(0,this.length()-count);this.data=this.data.substr(this.read,len);this.read=0};util.ByteBuffer.prototype.toHex=function(){var rval="";for(var i=this.read;i<this.data.length;++i){var b=
this.data.charCodeAt(i);if(b<16)rval+="0";rval+=b.toString(16)}return rval};util.ByteBuffer.prototype.toString=function(){return util.decodeUtf8(this.bytes())};util.createBuffer=function(input,encoding){encoding=encoding||"raw";if(input!==undefined&&encoding==="utf8")input=util.encodeUtf8(input);return new util.ByteBuffer(input)};util.fillString=function(c,n){var s="";while(n>0){if(n&1)s+=c;n>>>=1;if(n>0)c+=c}return s};util.xorBytes=function(s1,s2,n){var s3="";var b="";var t="";var i=0;var c=0;for(;n>
0;--n,++i){b=s1.charCodeAt(i)^s2.charCodeAt(i);if(c>=10){s3+=t;t="";c=0}t+=String.fromCharCode(b);++c}s3+=t;return s3};util.hexToBytes=function(hex){var rval="";var i=0;if(hex.length&1==1){i=1;rval+=String.fromCharCode(parseInt(hex[0],16))}for(;i<hex.length;i+=2)rval+=String.fromCharCode(parseInt(hex.substr(i,2),16));return rval};util.bytesToHex=function(bytes){return util.createBuffer(bytes).toHex()};util.int32ToBytes=function(i){return String.fromCharCode(i>>24&255)+String.fromCharCode(i>>16&255)+
String.fromCharCode(i>>8&255)+String.fromCharCode(i&255)};var _base64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var _base64Idx=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-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,-1,-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];util.encode64=function(input,maxline){var line="";var output="";var chr1,chr2,chr3;var i=0;while(i<input.length){chr1=
input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);line+=_base64.charAt(chr1>>2);line+=_base64.charAt((chr1&3)<<4|chr2>>4);if(isNaN(chr2))line+="==";else{line+=_base64.charAt((chr2&15)<<2|chr3>>6);line+=isNaN(chr3)?"=":_base64.charAt(chr3&63)}if(maxline&&line.length>maxline){output+=line.substr(0,maxline)+"\r\n";line=line.substr(maxline)}}output+=line;return output};util.decode64=function(input){input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");var output="";var enc1,enc2,enc3,
enc4;var i=0;while(i<input.length){enc1=_base64Idx[input.charCodeAt(i++)-43];enc2=_base64Idx[input.charCodeAt(i++)-43];enc3=_base64Idx[input.charCodeAt(i++)-43];enc4=_base64Idx[input.charCodeAt(i++)-43];output+=String.fromCharCode(enc1<<2|enc2>>4);if(enc3!==64){output+=String.fromCharCode((enc2&15)<<4|enc3>>2);if(enc4!==64)output+=String.fromCharCode((enc3&3)<<6|enc4)}}return output};util.encodeUtf8=function(str){return unescape(encodeURIComponent(str))};util.decodeUtf8=function(str){return decodeURIComponent(escape(str))};
util.deflate=function(api,bytes,raw){bytes=util.decode64(api.deflate(util.encode64(bytes)).rval);if(raw){var start=2;var flg=bytes.charCodeAt(1);if(flg&32)start=6;bytes=bytes.substring(start,bytes.length-4)}return bytes};util.inflate=function(api,bytes,raw){var rval=api.inflate(util.encode64(bytes)).rval;return rval===null?null:util.decode64(rval)};var _setStorageObject=function(api,id,obj){if(!api)throw{message:"WebStorage not available."};var rval;if(obj===null)rval=api.removeItem(id);else{obj=
util.encode64(JSON.stringify(obj));rval=api.setItem(id,obj)}if(typeof rval!=="undefined"&&rval.rval!==true)throw rval.error;};var _getStorageObject=function(api,id){if(!api)throw{message:"WebStorage not available."};var rval=api.getItem(id);if(api.init)if(rval.rval===null){if(rval.error)throw rval.error;rval=null}else rval=rval.rval;if(rval!==null)rval=JSON.parse(util.decode64(rval));return rval};var _setItem=function(api,id,key,data){var obj=_getStorageObject(api,id);if(obj===null)obj={};obj[key]=
data;_setStorageObject(api,id,obj)};var _getItem=function(api,id,key){var rval=_getStorageObject(api,id);if(rval!==null)rval=key in rval?rval[key]:null;return rval};var _removeItem=function(api,id,key){var obj=_getStorageObject(api,id);if(obj!==null&&key in obj){delete obj[key];var empty=true;for(var prop in tmp){empty=false;break}if(empty)obj=null;_setStorageObject(api,id,obj)}};var _clearItems=function(api,id){_setStorageObject(api,id,null)};var _callStorageFunction=function(func,args,location){var rval=
null;if(typeof location==="undefined")location=["web","flash"];var type;var done=false;var exception=null;for(var idx in location){type=location[idx];try{if(type==="flash"||type==="both")if(args[0]===null)throw{message:"Flash local storage not available."};else{rval=func.apply(this,args);done=type==="flash"}if(type==="web"||type==="both"){args[0]=localStorage;rval=func.apply(this,args);done=true}}catch(ex){exception=ex}if(done)break}if(!done)throw exception;return rval};util.setItem=function(api,
id,key,data,location){_callStorageFunction(_setItem,arguments,location)};util.getItem=function(api,id,key,location){return _callStorageFunction(_getItem,arguments,location)};util.removeItem=function(api,id,key,location){_callStorageFunction(_removeItem,arguments,location)};util.clearItems=function(api,id,location){_callStorageFunction(_clearItems,arguments,location)};util.parseUrl=function(str){var regex=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;regex.lastIndex=0;var m=regex.exec(str);var url=m===
null?null:{full:str,scheme:m[1],host:m[2],port:m[3],path:m[4]};if(url){url.fullHost=url.host;if(url.port)if(url.port!==80&&url.scheme==="http")url.fullHost+=":"+url.port;else{if(url.port!==443&&url.scheme==="https")url.fullHost+=":"+url.port}else if(url.scheme==="http")url.port=80;else if(url.scheme==="https")url.port=443;url.full=url.scheme+"://"+url.fullHost}return url};var _queryVariables=null;util.getQueryVariables=function(query){var parse=function(q){var rval={};var kvpairs=q.split("&");for(var i=
0;i<kvpairs.length;i++){var pos=kvpairs[i].indexOf("=");var key;var val;if(pos>0){key=kvpairs[i].substring(0,pos);val=kvpairs[i].substring(pos+1)}else{key=kvpairs[i];val=null}if(!(key in rval))rval[key]=[];if(val!==null)rval[key].push(unescape(val))}return rval};var rval;if(typeof query==="undefined"){if(_queryVariables===null)if(typeof window==="undefined")_queryVariables={};else _queryVariables=parse(window.location.search.substring(1));rval=_queryVariables}else rval=parse(query);return rval};util.parseFragment=
function(fragment){var fp=fragment;var fq="";var pos=fragment.indexOf("?");if(pos>0){fp=fragment.substring(0,pos);fq=fragment.substring(pos+1)}var path=fp.split("/");if(path.length>0&&path[0]=="")path.shift();var query=fq==""?{}:util.getQueryVariables(fq);return{pathString:fp,queryString:fq,path:path,query:query}};util.makeRequest=function(reqString){var frag=util.parseFragment(reqString);var req={path:frag.pathString,query:frag.queryString,getPath:function(i){return typeof i==="undefined"?frag.path:
frag.path[i]},getQuery:function(k,i){var rval;if(typeof k==="undefined")rval=frag.query;else{rval=frag.query[k];if(rval&&typeof i!=="undefined")rval=rval[i]}return rval},getQueryLast:function(k,_default){var rval;var vals=req.getQuery(k);if(vals)rval=vals[vals.length-1];else rval=_default;return rval}};return req};util.makeLink=function(path,query,fragment){path=jQuery.isArray(path)?path.join("/"):path;var qstr=jQuery.param(query||{});fragment=fragment||"";return path+(qstr.length>0?"?"+qstr:"")+
(fragment.length>0?"#"+fragment:"")};util.setPath=function(object,keys,value){if(typeof object==="object"&&object!==null){var i=0;var len=keys.length;while(i<len){var next=keys[i++];if(i==len)object[next]=value;else{var hasNext=next in object;if(!hasNext||hasNext&&typeof object[next]!=="object"||hasNext&&object[next]===null)object[next]={};object=object[next]}}}};util.getPath=function(object,keys,_default){var i=0;var len=keys.length;var hasNext=true;while(hasNext&&i<len&&typeof object==="object"&&
object!==null){var next=keys[i++];hasNext=next in object;if(hasNext)object=object[next]}return hasNext?object:_default};util.deletePath=function(object,keys){if(typeof object==="object"&&object!==null){var i=0;var len=keys.length;while(i<len){var next=keys[i++];if(i==len)delete object[next];else{if(!(next in object)||typeof object[next]!=="object"||object[next]===null)break;object=object[next]}}}};util.isEmpty=function(obj){for(var prop in obj)if(obj.hasOwnProperty(prop))return false;return true};
util.format=function(format){var re=/%./g;var match;var part;var argi=0;var parts=[];var last=0;while(match=re.exec(format)){part=format.substring(last,re.lastIndex-2);if(part.length>0)parts.push(part);last=re.lastIndex;var code=match[0][1];switch(code){case "s":case "o":if(argi<arguments.length)parts.push(arguments[argi++ +1]);else parts.push("<?>");break;case "%":parts.push("%");break;default:parts.push("<%"+code+"?>")}}parts.push(format.substring(last));return parts.join("")};util.formatNumber=
function(number,decimals,dec_point,thousands_sep){var n=number,c=isNaN(decimals=Math.abs(decimals))?2:decimals;var d=dec_point===undefined?",":dec_point;var t=thousands_sep===undefined?".":thousands_sep,s=n<0?"-":"";var i=parseInt(n=Math.abs(+n||0).toFixed(c),10)+"";var j=i.length>3?i.length%3:0;return s+(j?i.substr(0,j)+t:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+t)+(c?d+Math.abs(n-i).toFixed(c).slice(2):"")};util.formatSize=function(size){if(size>=1073741824)size=util.formatNumber(size/1073741824,
2,".","")+" GiB";else if(size>=1048576)size=util.formatNumber(size/1048576,2,".","")+" MiB";else if(size>=1024)size=util.formatNumber(size/1024,0)+" KiB";else size=util.formatNumber(size,0)+" bytes";return size}})();(function(){function getSqDist(p1,p2){var dx=p1.x-p2.x,dy=p1.y-p2.y;return dx*dx+dy*dy}function getSqSegDist(p,p1,p2){var x=p1.x,y=p1.y,dx=p2.x-x,dy=p2.y-y;if(dx!==0||dy!==0){var t=((p.x-x)*dx+(p.y-y)*dy)/(dx*dx+dy*dy);if(t>1){x=p2.x;y=p2.y}else if(t>0){x+=dx*t;y+=dy*t}}dx=p.x-x;dy=p.y-y;return dx*dx+dy*dy}function simplifyRadialDist(points,sqTolerance){var prevPoint=points[0],newPoints=[prevPoint],point;for(var i=1,len=points.length;i<len;i++){point=points[i];if(getSqDist(point,prevPoint)>sqTolerance){newPoints.push(point);
prevPoint=point}}if(prevPoint!==point)newPoints.push(point);return newPoints}function simplifyDouglasPeucker(points,sqTolerance){var len=points.length,MarkerArray=typeof Uint8Array!=="undefined"?Uint8Array:Array,markers=new MarkerArray(len),first=0,last=len-1,stack=[],newPoints=[],i,maxSqDist,sqDist,index;markers[first]=markers[last]=1;while(last){maxSqDist=0;for(i=first+1;i<last;i++){sqDist=getSqSegDist(points[i],points[first],points[last]);if(sqDist>maxSqDist){index=i;maxSqDist=sqDist}}if(maxSqDist>
sqTolerance){markers[index]=1;stack.push(first,index,index,last)}last=stack.pop();first=stack.pop()}for(i=0;i<len;i++)if(markers[i])newPoints.push(points[i]);return newPoints}function simplify(points,tolerance,highestQuality){if(points.length<=1)return points;var sqTolerance=tolerance!==undefined?tolerance*tolerance:1;points=highestQuality?points:simplifyRadialDist(points,sqTolerance);points=simplifyDouglasPeucker(points,sqTolerance);return points}window.simplify=simplify})();!function(e,t){var n,a,o,i="._tap",c="._tapActive",r="tap",u="clientX clientY screenX screenY pageX pageY".split(" "),s={count:0,event:0},g=function(e,n){var a=n.originalEvent,o=t.Event(a);o.type=e;for(var i=0,c=u.length;c>i;i++)o[u[i]]=n[u[i]];return o},p=function(e){if(e.isTrigger)return!1;var n=s.event,a=Math.abs(e.pageX-n.pageX),o=Math.abs(e.pageY-n.pageY),i=Math.max(a,o);return e.timeStamp-n.timeStamp<t.tap.TIME_DELTA&&i<t.tap.POSITION_DELTA&&(!n.touches||1===s.count)&&T.isTracking},l=function(e){if(!o)return!1;
var n=Math.abs(e.pageX-o.pageX),a=Math.abs(e.pageY-o.pageY),i=Math.max(n,a);return Math.abs(e.timeStamp-o.timeStamp)<750&&i<t.tap.POSITION_DELTA},h=function(e){if(0===e.type.indexOf("touch")){e.touches=e.originalEvent.changedTouches;for(var t=e.touches[0],n=0,a=u.length;a>n;n++)e[u[n]]=t[u[n]]}e.timeStamp=Date.now?Date.now():+new Date},T={isEnabled:!1,isTracking:!1,enable:function(){T.isEnabled||$.event.special.tap||(T.isEnabled=!0,n=t(e.body).on("touchstart"+i,T.onStart).on("mousedown"+i,T.onStart).on("click"+
i,T.onClick))},disable:function(){T.isEnabled&&(T.isEnabled=!1,n.off(i))},onStart:function(e){e.isTrigger||(h(e),(!t.tap.LEFT_BUTTON_ONLY||e.touches||1===e.which)&&(e.touches&&(s.count=e.touches.length),T.isTracking&&T.onCancel(e),(e.touches||!l(e))&&(T.isTracking=!0,s.event=e,e.touches?(o=e,n.on("touchend"+i+c,T.onEnd).on("touchcancel"+i+c,T.onCancel)):n.on("mouseup"+i+c,T.onEnd))))},onEnd:function(e){var n;e.isTrigger||(h(e),p(e)&&(n=g(r,e),a=n,t(s.event.target).trigger(n)),T.onCancel(e))},onCancel:function(e){e&&
"touchcancel"===e.type&&e.preventDefault(),T.isTracking=!1,n.off(c)},onClick:function(e){return!e.isTrigger&&a&&a.isDefaultPrevented()&&a.target===e.target&&a.pageX===e.pageX&&a.pageY===e.pageY&&e.timeStamp-a.timeStamp<750?(a=null,!1):void 0}};t(e).ready(T.enable),t.tap={POSITION_DELTA:10,TIME_DELTA:400,LEFT_BUTTON_ONLY:!0}}(document,jQuery);!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){function a(){return Dc.apply(null,arguments)}function b(a){Dc=a}function c(a){return"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function f(a,b){return Object.prototype.hasOwnProperty.call(a,
b)}function g(a,b){for(var c in b)f(b,c)&&(a[c]=b[c]);return f(b,"toString")&&(a.toString=b.toString),f(b,"valueOf")&&(a.valueOf=b.valueOf),a}function h(a,b,c,d){return za(a,b,c,d,!0).utc()}function i(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function j(a){return null==a._pf&&(a._pf=i()),a._pf}function k(a){if(null==a._isValid){var b=j(a);a._isValid=!isNaN(a._d.getTime())&&b.overflow<0&&!b.empty&&
!b.invalidMonth&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour)}return a._isValid}function l(a){var b=h(0/0);return null!=a?g(j(b),a):j(b).userInvalidated=!0,b}function m(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=
typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=j(b)),"undefined"!=typeof b._locale&&(a._locale=b._locale),Fc.length>0)for(c in Fc)d=Fc[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function n(b){m(this,b),this._d=new Date(+b._d),Gc===!1&&(Gc=!0,a.updateOffset(this),Gc=!1)}function o(a){return a instanceof n||null!=a&&null!=
a._isAMomentObject}function p(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function q(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&p(a[d])!==p(b[d]))&&g++;return g+f}function r(){}function s(a){return a?a.toLowerCase().replace("_","-"):a}function t(a){for(var b,c,d,e,f=0;f<a.length;){for(e=s(a[f]).split("-"),b=e.length,c=s(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=u(e.slice(0,b).join("-")))return d;
if(c&&c.length>=b&&q(e,c,!0)>=b-1)break;b--}f++}return null}function u(a){var b=null;if(!Hc[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=Ec._abbr,require("./locale/"+a),v(b)}catch(c){}return Hc[a]}function v(a,b){var c;return a&&(c="undefined"==typeof b?x(a):w(a,b),c&&(Ec=c)),Ec._abbr}function w(a,b){return null!==b?(b.abbr=a,Hc[a]||(Hc[a]=new r),Hc[a].set(b),v(a),Hc[a]):(delete Hc[a],null)}function x(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Ec;if(!c(a)){if(b=
u(a))return b;a=[a]}return t(a)}function y(a,b){var c=a.toLowerCase();Ic[c]=Ic[c+"s"]=Ic[b]=a}function z(a){return"string"==typeof a?Ic[a]||Ic[a.toLowerCase()]:void 0}function A(a){var b,c,d={};for(c in a)f(a,c)&&(b=z(c),b&&(d[b]=a[c]));return d}function B(b,c){return function(d){return null!=d?(D(this,b,d),a.updateOffset(this,c),this):C(this,b)}}function C(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function D(a,b,c){return a._d["set"+(a._isUTC?"UTC":"")+b](c)}function E(a,b){var c;if("object"==
typeof a)for(c in a)this.set(c,a[c]);else if(a=z(a),"function"==typeof this[a])return this[a](b);return this}function F(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function G(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Mc[a]=e),b&&(Mc[b[0]]=function(){return F(e.apply(this,arguments),b[1],b[2])}),c&&(Mc[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function H(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,
""):a.replace(/\\/g,"")}function I(a){var b,c,d=a.match(Jc);for(b=0,c=d.length;c>b;b++)Mc[d[b]]?d[b]=Mc[d[b]]:d[b]=H(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function J(a,b){return a.isValid()?(b=K(b,a.localeData()),Lc[b]||(Lc[b]=I(b)),Lc[b](a)):a.localeData().invalidDate()}function K(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Kc.lastIndex=0;d>=0&&Kc.test(a);)a=a.replace(Kc,c),Kc.lastIndex=0,d-=1;return a}function L(a,
b,c){_c[a]="function"==typeof b?b:function(a){return a&&c?c:b}}function M(a,b){return f(_c,a)?_c[a](b._strict,b._locale):new RegExp(N(a))}function N(a){return a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function O(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=p(a)}),c=0;c<a.length;c++)ad[a[c]]=d}function P(a,b){O(a,function(a,c,d,e){d._w=d._w||{},b(a,d._w,
d,e)})}function Q(a,b,c){null!=b&&f(ad,a)&&ad[a](b,c._a,c,a)}function R(a,b){return(new Date(Date.UTC(a,b+1,0))).getUTCDate()}function S(a){return this._months[a.month()]}function T(a){return this._monthsShort[a.month()]}function U(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=h([2E3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=
new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function V(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),R(a.year(),b)),a._d["set"+
(a._isUTC?"UTC":"")+"Month"](b,c),a)}function W(b){return null!=b?(V(this,b),a.updateOffset(this,!0),this):C(this,"Month")}function X(){return R(this.year(),this.month())}function Y(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[cd]<0||c[cd]>11?cd:c[dd]<1||c[dd]>R(c[bd],c[cd])?dd:c[ed]<0||c[ed]>24||24===c[ed]&&(0!==c[fd]||0!==c[gd]||0!==c[hd])?ed:c[fd]<0||c[fd]>59?fd:c[gd]<0||c[gd]>59?gd:c[hd]<0||c[hd]>999?hd:-1,j(a)._overflowDayOfYear&&(bd>b||b>dd)&&(b=dd),j(a).overflow=b),a}function Z(b){a.suppressDeprecationWarnings===
!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function $(a,b){var c=!0,d=a+"\n"+(new Error).stack;return g(function(){return c&&(Z(d),c=!1),b.apply(this,arguments)},b)}function _(a,b){kd[a]||(Z(b),kd[a]=!0)}function aa(a){var b,c,d=a._i,e=ld.exec(d);if(e){for(j(a).iso=!0,b=0,c=md.length;c>b;b++)if(md[b][1].exec(d)){a._f=md[b][0]+(e[6]||" ");break}for(b=0,c=nd.length;c>b;b++)if(nd[b][1].exec(d)){a._f+=nd[b][0];break}d.match(Yc)&&(a._f+="Z"),ta(a)}else a._isValid=
!1}function ba(b){var c=od.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(aa(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function ca(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function da(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ea(a){return fa(a)?366:365}function fa(a){return a%4===0&&a%100!==0||a%400===0}function ga(){return fa(this.year())}function ha(a,b,c){var d,
e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=Aa(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ia(a){return ha(a,this._week.dow,this._week.doy).week}function ja(){return this._week.dow}function ka(){return this._week.doy}function la(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function ma(a){var b=ha(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function na(a,b,c,d,e){var f,g,h=da(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=
c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:ea(a-1)+g}}function oa(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864E5)+1;return null==a?b:this.add(a-b,"d")}function pa(a,b,c){return null!=a?a:null!=b?b:c}function qa(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function ra(a){var b,c,d,e,f=[];if(!a._d){for(d=qa(a),a._w&&null==a._a[dd]&&null==
a._a[cd]&&sa(a),a._dayOfYear&&(e=pa(a._a[bd],d[bd]),a._dayOfYear>ea(e)&&(j(a)._overflowDayOfYear=!0),c=da(e,0,a._dayOfYear),a._a[cd]=c.getUTCMonth(),a._a[dd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[ed]&&0===a._a[fd]&&0===a._a[gd]&&0===a._a[hd]&&(a._nextDay=!0,a._a[ed]=0),a._d=(a._useUTC?da:ca).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[ed]=24)}}function sa(a){var b,
c,d,e,f,g,h;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=pa(b.GG,a._a[bd],ha(Aa(),1,4).year),d=pa(b.W,1),e=pa(b.E,1)):(f=a._locale._week.dow,g=a._locale._week.doy,c=pa(b.gg,a._a[bd],ha(Aa(),f,g).year),d=pa(b.w,1),null!=b.d?(e=b.d,f>e&&++d):e=null!=b.e?b.e+f:f),h=na(c,d,e,g,f),a._a[bd]=h.year,a._dayOfYear=h.dayOfYear}function ta(b){if(b._f===a.ISO_8601)return void aa(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=K(b._f,b._locale).match(Jc)||[],c=0;c<e.length;c++)f=e[c],
d=(h.match(M(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),Mc[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),Q(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[ed]<=12&&b._a[ed]>0&&(j(b).bigHour=void 0),b._a[ed]=ua(b._locale,b._a[ed],b._meridiem),ra(b),Y(b)}function ua(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,
c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function va(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(0/0));for(e=0;e<a._f.length;e++)f=0,b=m({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._f=a._f[e],ta(b),k(b)&&(f+=j(b).charsLeftOver,f+=10*j(b).unusedTokens.length,j(b).score=f,(null==d||d>f)&&(d=f,c=b));g(a,c||b)}function wa(a){if(!a._d){var b=A(a._i);a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],ra(a)}}function xa(a){var b,
e=a._i,f=a._f;return a._locale=a._locale||x(a._l),null===e||void 0===f&&""===e?l({nullInput:!0}):("string"==typeof e&&(a._i=e=a._locale.preparse(e)),o(e)?new n(Y(e)):(c(f)?va(a):f?ta(a):d(e)?a._d=e:ya(a),b=new n(Y(a)),b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b))}function ya(b){var f=b._i;void 0===f?b._d=new Date:d(f)?b._d=new Date(+f):"string"==typeof f?ba(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),ra(b)):"object"==typeof f?wa(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}
function za(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,xa(f)}function Aa(a,b,c,d){return za(a,b,c,d,!1)}function Ba(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Aa();for(d=b[0],e=1;e<b.length;++e)b[e][a](d)&&(d=b[e]);return d}function Ca(){var a=[].slice.call(arguments,0);return Ba("isBefore",a)}function Da(){var a=[].slice.call(arguments,0);return Ba("isAfter",a)}function Ea(a){var b=
A(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1E3*j+6E4*i+36E5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=x(),this._bubble()}function Fa(a){return a instanceof Ea}function Ga(a,b){G(a,0,0,function(){var a=this.utcOffset(),c="+";return 0>a&&(a=-a,c="-"),c+F(~~(a/60),2)+b+F(~~a%60,2)})}function Ha(a){var b=(a||"").match(Yc)||[],c=b[b.length-1]||[],d=(c+"").match(td)||["-",
0,0],e=+(60*d[1])+p(d[2]);return"+"===d[0]?e:-e}function Ia(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(o(b)||d(b)?+b:+Aa(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Aa(b).local();return c._isUTC?Aa(b).zone(c._offset||0):Aa(b).local()}function Ja(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Ka(b,c){var d,e=this._offset||0;return null!=b?("string"==typeof b&&(b=Ha(b)),Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Ja(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,
"m"),e!==b&&(!c||this._changeInProgress?$a(this,Va(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Ja(this)}function La(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Ma(a){return this.utcOffset(0,a)}function Na(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Ja(this),"m")),this}function Oa(){return this._tzm?this.utcOffset(this._tzm):
"string"==typeof this._i&&this.utcOffset(Ha(this._i)),this}function Pa(a){return a=a?Aa(a).utcOffset():0,(this.utcOffset()-a)%60===0}function Qa(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ra(){if(this._a){var a=this._isUTC?h(this._a):Aa(this._a);return this.isValid()&&q(this._a,a.toArray())>0}return!1}function Sa(){return!this._isUTC}function Ta(){return this._isUTC}function Ua(){return this._isUTC&&0===this._offset}function Va(a,
b){var c,d,e,g=a,h=null;return Fa(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=ud.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:p(h[dd])*c,h:p(h[ed])*c,m:p(h[fd])*c,s:p(h[gd])*c,ms:p(h[hd])*c}):(h=vd.exec(a))?(c="-"===h[1]?-1:1,g={y:Wa(h[2],c),M:Wa(h[3],c),d:Wa(h[4],c),h:Wa(h[5],c),m:Wa(h[6],c),s:Wa(h[7],c),w:Wa(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=Ya(Aa(g.from),Aa(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Ea(g),
Fa(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function Wa(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function Xa(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function Ya(a,b){var c;return b=Ia(b,a),a.isBefore(b)?c=Xa(a,b):(c=Xa(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function Za(a,b){return function(c,d){var e,
f;return null===d||isNaN(+d)||(_(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Va(c,d),$a(this,e,a),this}}function $a(b,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&D(b,"Date",C(b,"Date")+g*d),h&&V(b,C(b,"Month")+h*d),e&&a.updateOffset(b,g||h)}function _a(a){var b=a||Aa(),c=Ia(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>
d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,Aa(b)))}function ab(){return new n(this)}function bb(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Aa(a),+this>+a):(c=o(a)?+a:+Aa(a),c<+this.clone().startOf(b))}function cb(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Aa(a),+a>+this):(c=o(a)?+a:+Aa(a),+this.clone().endOf(b)<c)}function db(a,b,c){return this.isAfter(a,
c)&&this.isBefore(b,c)}function eb(a,b){var c;return b=z(b||"millisecond"),"millisecond"===b?(a=o(a)?a:Aa(a),+this===+a):(c=+Aa(a),+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))}function fb(a){return 0>a?Math.ceil(a):Math.floor(a)}function gb(a,b,c){var d,e,f=Ia(a,this),g=6E4*(f.utcOffset()-this.utcOffset());return b=z(b),"year"===b||"month"===b||"quarter"===b?(e=hb(this,f),"quarter"===b?e/=3:"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1E3:"minute"===b?d/6E4:"hour"===b?d/36E5:"day"===
b?(d-g)/864E5:"week"===b?(d-g)/6048E5:d),c?e:fb(e)}function hb(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function ib(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function jb(){var a=this.clone().utc();return 0<a.year()&&a.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():J(a,
"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):J(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function kb(b){var c=J(this,b||a.defaultFormat);return this.localeData().postformat(c)}function lb(a,b){return this.isValid()?Va({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function mb(a){return this.from(Aa(),a)}function nb(a,b){return this.isValid()?Va({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function ob(a){return this.to(Aa(),a)}function pb(a){var b;
return void 0===a?this._locale._abbr:(b=x(a),null!=b&&(this._locale=b),this)}function qb(){return this._locale}function rb(a){switch(a=z(a)){case "year":this.month(0);case "quarter":case "month":this.date(1);case "week":case "isoWeek":case "day":this.hours(0);case "hour":this.minutes(0);case "minute":this.seconds(0);case "second":this.milliseconds(0)}return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function sb(a){return a=
z(a),void 0===a||"millisecond"===a?this:this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")}function tb(){return+this._d-6E4*(this._offset||0)}function ub(){return Math.floor(+this/1E3)}function vb(){return this._offset?new Date(+this):this._d}function wb(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function xb(){return k(this)}function yb(){return g({},j(this))}function zb(){return j(this).overflow}function Ab(a,b){G(0,[a,a.length],0,
b)}function Bb(a,b,c){return ha(Aa([a,11,31+b-c]),b,c).week}function Cb(a){var b=ha(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")}function Db(a){var b=ha(this,1,4).year;return null==a?b:this.add(a-b,"y")}function Eb(){return Bb(this.year(),1,4)}function Fb(){var a=this.localeData()._week;return Bb(this.year(),a.dow,a.doy)}function Gb(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function Hb(a,b){if("string"==
typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function Ib(a){return this._weekdays[a.day()]}function Jb(a){return this._weekdaysShort[a.day()]}function Kb(a){return this._weekdaysMin[a.day()]}function Lb(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=Aa([2E3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",
""),"i")),this._weekdaysParse[b].test(a))return b}function Mb(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Hb(a,this.localeData()),this.add(a-b,"d")):b}function Nb(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Ob(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)}function Pb(a,b){G(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function Qb(a,b){return b._meridiemParse}
function Rb(a){return"p"===(a+"").toLowerCase().charAt(0)}function Sb(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Tb(a){G(0,[a,3],0,"millisecond")}function Ub(){return this._isUTC?"UTC":""}function Vb(){return this._isUTC?"Coordinated Universal Time":""}function Wb(a){return Aa(1E3*a)}function Xb(){return Aa.apply(null,arguments).parseZone()}function Yb(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.call(b,c):d}function Zb(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&
(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b}function $b(){return this._invalidDate}function _b(a){return this._ordinal.replace("%d",a)}function ac(a){return a}function bc(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)}function cc(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)}function dc(a){var b,c;for(c in a)b=a[c],
"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function ec(a,b,c,d){var e=x(),f=h().set(d,b);return e[c](f,a)}function fc(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return ec(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=ec(a,f,c,e);return g}function gc(a,b){return fc(a,b,"months",12,"month")}function hc(a,b){return fc(a,b,"monthsShort",12,"month")}function ic(a,b){return fc(a,b,"weekdays",7,"day")}
function jc(a,b){return fc(a,b,"weekdaysShort",7,"day")}function kc(a,b){return fc(a,b,"weekdaysMin",7,"day")}function lc(){var a=this._data;return this._milliseconds=Rd(this._milliseconds),this._days=Rd(this._days),this._months=Rd(this._months),a.milliseconds=Rd(a.milliseconds),a.seconds=Rd(a.seconds),a.minutes=Rd(a.minutes),a.hours=Rd(a.hours),a.months=Rd(a.months),a.years=Rd(a.years),this}function mc(a,b,c,d){var e=Va(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=
d*e._months,a._bubble()}function nc(a,b){return mc(this,a,b,1)}function oc(a,b){return mc(this,a,b,-1)}function pc(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;return g.milliseconds=d%1E3,a=fb(d/1E3),g.seconds=a%60,b=fb(a/60),g.minutes=b%60,c=fb(b/60),g.hours=c%24,e+=fb(c/24),h=fb(qc(e)),e-=fb(rc(h)),f+=fb(e/30),e%=30,h+=fb(f/12),f%=12,g.days=e,g.months=f,g.years=h,this}function qc(a){return 400*a/146097}function rc(a){return 146097*a/400}function sc(a){var b,c,d=
this._milliseconds;if(a=z(a),"month"===a||"year"===a)return b=this._days+d/864E5,c=this._months+12*qc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(rc(this._months/12)),a){case "week":return b/7+d/6048E5;case "day":return b+d/864E5;case "hour":return 24*b+d/36E5;case "minute":return 1440*b+d/6E4;case "second":return 86400*b+d/1E3;case "millisecond":return Math.floor(864E5*b)+d;default:throw new Error("Unknown unit "+a);}}function tc(){return this._milliseconds+864E5*this._days+this._months%
12*2592E6+31536E6*p(this._months/12)}function uc(a){return function(){return this.as(a)}}function vc(a){return a=z(a),this[a+"s"]()}function wc(a){return function(){return this._data[a]}}function xc(){return fb(this.days()/7)}function yc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function zc(a,b,c){var d=Va(a).abs(),e=fe(d.as("s")),f=fe(d.as("m")),g=fe(d.as("h")),h=fe(d.as("d")),i=fe(d.as("M")),j=fe(d.as("y")),k=e<ge.s&&["s",e]||1===f&&["m"]||f<ge.m&&["mm",f]||1===g&&["h"]||g<ge.h&&["hh",g]||
1===h&&["d"]||h<ge.d&&["dd",h]||1===i&&["M"]||i<ge.M&&["MM",i]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,yc.apply(null,k)}function Ac(a,b){return void 0===ge[a]?!1:void 0===b?ge[a]:(ge[a]=b,!0)}function Bc(a){var b=this.localeData(),c=zc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Cc(){var a=he(this.years()),b=he(this.months()),c=he(this.days()),d=he(this.hours()),e=he(this.minutes()),f=he(this.seconds()+this.milliseconds()/1E3),g=this.asSeconds();return g?
(0>g?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"}var Dc,Ec,Fc=a.momentProperties=[],Gc=!1,Hc={},Ic={},Jc=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Kc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Lc={},Mc={},Nc=/\d/,Oc=/\d\d/,Pc=/\d{3}/,Qc=/\d{4}/,Rc=/[+-]?\d{6}/,Sc=/\d\d?/,Tc=/\d{1,3}/,Uc=/\d{1,4}/,Vc=/[+-]?\d{1,6}/,
Wc=/\d+/,Xc=/[+-]?\d+/,Yc=/Z|[+-]\d\d:?\d\d/gi,Zc=/[+-]?\d+(\.\d{1,3})?/,$c=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,_c={},ad={},bd=0,cd=1,dd=2,ed=3,fd=4,gd=5,hd=6;G("M",["MM",2],"Mo",function(){return this.month()+1}),G("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),G("MMMM",0,0,function(a){return this.localeData().months(this,a)}),y("month","M"),L("M",Sc),L("MM",Sc,Oc),L("MMM",$c),L("MMMM",$c),O(["M",
"MM"],function(a,b){b[cd]=p(a)-1}),O(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[cd]=e:j(c).invalidMonth=a});var id="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),jd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),kd={};a.suppressDeprecationWarnings=!1;var ld=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
md=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],nd=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],od=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=$("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",
function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),G(0,["YY",2],0,function(){return this.year()%100}),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),y("year","y"),L("Y",Xc),L("YY",Sc,Oc),L("YYYY",Uc,Qc),L("YYYYY",Vc,Rc),L("YYYYYY",Vc,Rc),O(["YYYY","YYYYY","YYYYYY"],bd),O("YY",function(b,c){c[bd]=a.parseTwoDigitYear(b)}),a.parseTwoDigitYear=function(a){return p(a)+(p(a)>68?1900:2E3)};var pd=B("FullYear",!1);G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),
y("week","w"),y("isoWeek","W"),L("w",Sc),L("ww",Sc,Oc),L("W",Sc),L("WW",Sc,Oc),P(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=p(a)});var qd={dow:0,doy:6};G("DDD",["DDDD",3],"DDDo","dayOfYear"),y("dayOfYear","DDD"),L("DDD",Tc),L("DDDD",Pc),O(["DDD","DDDD"],function(a,b,c){c._dayOfYear=p(a)}),a.ISO_8601=function(){};var rd=$("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Aa.apply(null,arguments);return this>a?this:a}),sd=
$("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Aa.apply(null,arguments);return a>this?this:a});Ga("Z",":"),Ga("ZZ",""),L("Z",Yc),L("ZZ",Yc),O(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ha(a)});var td=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var ud=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,vd=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;
Va.fn=Ea.prototype;var wd=Za(1,"add"),xd=Za(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var yd=$("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ab("gggg","weekYear"),Ab("ggggg","weekYear"),Ab("GGGG","isoWeekYear"),
Ab("GGGGG","isoWeekYear"),y("weekYear","gg"),y("isoWeekYear","GG"),L("G",Xc),L("g",Xc),L("GG",Sc,Oc),L("gg",Sc,Oc),L("GGGG",Uc,Qc),L("gggg",Uc,Qc),L("GGGGG",Vc,Rc),L("ggggg",Vc,Rc),P(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=p(a)}),P(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),G("Q",0,0,"quarter"),y("quarter","Q"),L("Q",Nc),O("Q",function(a,b){b[cd]=3*(p(a)-1)}),G("D",["DD",2],"Do","date"),y("date","D"),L("D",Sc),L("DD",Sc,Oc),L("Do",function(a,b){return a?
b._ordinalParse:b._ordinalParseLenient}),O(["D","DD"],dd),O("Do",function(a,b){b[dd]=p(a.match(Sc)[0],10)});var zd=B("Date",!0);G("d",0,"do","day"),G("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),G("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),G("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),y("day","d"),y("weekday","e"),y("isoWeekday","E"),L("d",Sc),L("e",Sc),L("E",Sc),L("dd",$c),L("ddd",
$c),L("dddd",$c),P(["dd","ddd","dddd"],function(a,b,c){var d=c._locale.weekdaysParse(a);null!=d?b.d=d:j(c).invalidWeekday=a}),P(["d","e","E"],function(a,b,c,d){b[d]=p(a)});var Ad="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Bd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Cd="Su_Mo_Tu_We_Th_Fr_Sa".split("_");G("H",["HH",2],0,"hour"),G("h",["hh",2],0,function(){return this.hours()%12||12}),Pb("a",!0),Pb("A",!1),y("hour","h"),L("a",Qb),L("A",Qb),L("H",Sc),L("h",Sc),L("HH",Sc,Oc),
L("hh",Sc,Oc),O(["H","HH"],ed),O(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),O(["h","hh"],function(a,b,c){b[ed]=p(a),j(c).bigHour=!0});var Dd=/[ap]\.?m?\.?/i,Ed=B("Hours",!0);G("m",["mm",2],0,"minute"),y("minute","m"),L("m",Sc),L("mm",Sc,Oc),O(["m","mm"],fd);var Fd=B("Minutes",!1);G("s",["ss",2],0,"second"),y("second","s"),L("s",Sc),L("ss",Sc,Oc),O(["s","ss"],gd);var Gd=B("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/
10)}),Tb("SSS"),Tb("SSSS"),y("millisecond","ms"),L("S",Tc,Nc),L("SS",Tc,Oc),L("SSS",Tc,Pc),L("SSSS",Wc),O(["S","SS","SSS","SSSS"],function(a,b){b[hd]=p(1E3*("0."+a))});var Hd=B("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var Id=n.prototype;Id.add=wd,Id.calendar=_a,Id.clone=ab,Id.diff=gb,Id.endOf=sb,Id.format=kb,Id.from=lb,Id.fromNow=mb,Id.to=nb,Id.toNow=ob,Id.get=E,Id.invalidAt=zb,Id.isAfter=bb,Id.isBefore=cb,Id.isBetween=db,Id.isSame=eb,Id.isValid=xb,Id.lang=yd,Id.locale=pb,Id.localeData=
qb,Id.max=sd,Id.min=rd,Id.parsingFlags=yb,Id.set=E,Id.startOf=rb,Id.subtract=xd,Id.toArray=wb,Id.toDate=vb,Id.toISOString=jb,Id.toJSON=jb,Id.toString=ib,Id.unix=ub,Id.valueOf=tb,Id.year=pd,Id.isLeapYear=ga,Id.weekYear=Cb,Id.isoWeekYear=Db,Id.quarter=Id.quarters=Gb,Id.month=W,Id.daysInMonth=X,Id.week=Id.weeks=la,Id.isoWeek=Id.isoWeeks=ma,Id.weeksInYear=Fb,Id.isoWeeksInYear=Eb,Id.date=zd,Id.day=Id.days=Mb,Id.weekday=Nb,Id.isoWeekday=Ob,Id.dayOfYear=oa,Id.hour=Id.hours=Ed,Id.minute=Id.minutes=Fd,Id.second=
Id.seconds=Gd,Id.millisecond=Id.milliseconds=Hd,Id.utcOffset=Ka,Id.utc=Ma,Id.local=Na,Id.parseZone=Oa,Id.hasAlignedHourOffset=Pa,Id.isDST=Qa,Id.isDSTShifted=Ra,Id.isLocal=Sa,Id.isUtcOffset=Ta,Id.isUtc=Ua,Id.isUTC=Ua,Id.zoneAbbr=Ub,Id.zoneName=Vb,Id.dates=$("dates accessor is deprecated. Use date instead.",zd),Id.months=$("months accessor is deprecated. Use month instead",W),Id.years=$("years accessor is deprecated. Use year instead",pd),Id.zone=$("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",
La);var Jd=Id,Kd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ld={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},Md="Invalid date",Nd="%d",Od=/\d{1,2}/,Pd={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},
Qd=r.prototype;Qd._calendar=Kd,Qd.calendar=Yb,Qd._longDateFormat=Ld,Qd.longDateFormat=Zb,Qd._invalidDate=Md,Qd.invalidDate=$b,Qd._ordinal=Nd,Qd.ordinal=_b,Qd._ordinalParse=Od,Qd.preparse=ac,Qd.postformat=ac,Qd._relativeTime=Pd,Qd.relativeTime=bc,Qd.pastFuture=cc,Qd.set=dc,Qd.months=S,Qd._months=id,Qd.monthsShort=T,Qd._monthsShort=jd,Qd.monthsParse=U,Qd.week=ia,Qd._week=qd,Qd.firstDayOfYear=ka,Qd.firstDayOfWeek=ja,Qd.weekdays=Ib,Qd._weekdays=Ad,Qd.weekdaysMin=Kb,Qd._weekdaysMin=Cd,Qd.weekdaysShort=
Jb,Qd._weekdaysShort=Bd,Qd.weekdaysParse=Lb,Qd.isPM=Rb,Qd._meridiemParse=Dd,Qd.meridiem=Sb,v("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===p(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=$("moment.lang is deprecated. Use moment.locale instead.",v),a.langData=$("moment.langData is deprecated. Use moment.localeData instead.",x);var Rd=Math.abs,Sd=uc("ms"),Td=uc("s"),Ud=uc("m"),Vd=uc("h"),Wd=uc("d"),Xd=uc("w"),Yd=uc("M"),Zd=uc("y"),$d=wc("milliseconds"),
_d=wc("seconds"),ae=wc("minutes"),be=wc("hours"),ce=wc("days"),de=wc("months"),ee=wc("years"),fe=Math.round,ge={s:45,m:45,h:22,d:26,M:11},he=Math.abs,ie=Ea.prototype;ie.abs=lc,ie.add=nc,ie.subtract=oc,ie.as=sc,ie.asMilliseconds=Sd,ie.asSeconds=Td,ie.asMinutes=Ud,ie.asHours=Vd,ie.asDays=Wd,ie.asWeeks=Xd,ie.asMonths=Yd,ie.asYears=Zd,ie.valueOf=tc,ie._bubble=pc,ie.get=vc,ie.milliseconds=$d,ie.seconds=_d,ie.minutes=ae,ie.hours=be,ie.days=ce,ie.weeks=xc,ie.months=de,ie.years=ee,ie.humanize=Bc,ie.toISOString=
Cc,ie.toString=Cc,ie.toJSON=Cc,ie.locale=pb,ie.localeData=qb,ie.toIsoString=$("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Cc),ie.lang=yd,G("X",0,0,"unix"),G("x",0,0,"valueOf"),L("x",Xc),L("X",Zc),O("X",function(a,b,c){c._d=new Date(1E3*parseFloat(a,10))}),O("x",function(a,b,c){c._d=new Date(p(a))}),a.version="2.10.3",b(Aa),a.fn=Jd,a.min=Ca,a.max=Da,a.utc=h,a.unix=Wb,a.months=gc,a.isDate=d,a.locale=v,a.invalid=l,a.duration=Va,a.isMoment=o,a.weekdays=ic,a.parseZone=
Xb,a.localeData=x,a.isDuration=Fa,a.monthsShort=hc,a.weekdaysMin=kc,a.defineLocale=w,a.weekdaysShort=jc,a.normalizeUnits=z,a.relativeTimeThreshold=Ac;var je=a;return je});(function(exports){var existingPDFNet=!!exports.PDFNet;exports.PDFNet=exports.PDFNet?exports.PDFNet:{};exports.PDFNet.Convert=exports.PDFNet.Convert?exports.PDFNet.Convert:{};var finishedInitializeCapability;exports.PDFNet.initialize=function(l,pdfBackendType){if(!finishedInitializeCapability){var workerHandlers={pnaclCrashError:function(msg,genericMsg){console.log("PNaClCrashError: "+msg+", "+genericMsg)},pnaclLoadError:function(msg,genericMsg){console.log("PNaClLoadError: "+msg+", "+genericMsg)},
emsWorkerError:function(msg,genericMsg){console.log("EmsWorkerError: "+msg+", "+genericMsg)}};var useEmscriptenWhileLoading=pdfBackendType!=="pnacl"&&!exports.CoreControls.isSubzeroEnabled();finishedInitializeCapability=createPromiseCapability();var finishInit=function(pdfBackendType){exports.CoreControls.preloadPDFWorker(pdfBackendType,workerHandlers,{useEmscriptenWhileLoading:useEmscriptenWhileLoading,autoSwap:false});var workerTransportPromise=exports.CoreControls.initPDFWorkerTransports(pdfBackendType,
workerHandlers,l);workerTransportPromise.then(function(transport){exports.PDFNet.messageHandler=transport;finishedInitializeCapability.resolve()})};if(typeof readerControl!=="undefined"&&typeof readerControl.pdfType!=="undefined")pdfBackendType=readerControl.pdfType;if(!pdfBackendType||pdfBackendType==="auto"){var getBackendeallocPromise=CoreControls.getDefaultPdfBackendType();getBackendeallocPromise.then(finishInit)}else finishInit(pdfBackendType)}return finishedInitializeCapability.promise};exports.PDFNet.Convert.office2PDFBuffer=
function(input,options){return new Promise(function(resolve,reject){var partRetriever=typeof input==="string"?new CoreControls.PartRetrievers.ExternalPdfPartRetriever(input):new CoreControls.PartRetrievers.ArrayBufferPdfPartRetriever(input);var officeDoc=new CoreControls.Document(undefined,"office");var officeDocReady=function(err){if(err)reject(err);officeDoc.getFileData({"downloadType":"pdf"}).then(function(buffer){resolve(buffer)})["catch"](function(e){reject(e)})};officeDoc.loadAsync(partRetriever,
officeDocReady,{workerTransportPromise:CoreControls.initOfficeWorkerTransports(CoreControls.getCurrentPDFBackendType(),{},options["l"])})})};if(!existingPDFNet){exports.PDFNet.hasFullAPI=false;if(window.Proxy)exports.PDFNet=new window.Proxy(exports.PDFNet,{get:function(obj,prop){if(prop in obj)return obj[prop];throw new Error('Full version of PDFNetJS has not been loaded. Please pass the "fullAPI: true" option in your WebViewer constructor to use the PDFNet APIs.');}})}})(typeof window==="undefined"?
this:window);var J=self,S=J.RW;(function(){function b(a){e?e.push(a):setTimeout(a,0)}var f={version:"0.7.2.0",isUndefined:function(a){return void 0===a},isNull:function(a){return null===a},pg:function(a){return null===a||void 0===a},p_:function(a){return null!==a&&void 0!==a}},e=[];J.attachEvent&&J.attachEvent("onload",function(){if(e){var a=e;e=null;for(var d=0,c=a.length;d<c;d++)a[d]()}});S||(J.RW=S={init:b,ready:b});for(var c in f)S[c]=f[c]})();Object.nf="Object";Object.Zk=null;Object.jZ=function(b){for(var f in b)delete b[f]};
Object.jr=function(b,f){return void 0!==b[f]};Object.keys?Object.mR=function(b){return Object.keys(b).length}:(Object.keys=function(b){var f=[],e;for(e in b)f.push(e);return f},Object.mR=function(b){var f=0,e;for(e in b)f++;return f});Boolean.nf="Boolean";Boolean.parse=function(b){return"true"==b.toLowerCase()};Number.nf="Number";Number.parse=function(b){return b&&b.length?0<=b.indexOf(".")||0<=b.indexOf("e")||b.endsWith("f")||b.endsWith("F")?parseFloat(b):parseInt(b,10):0};
Number.prototype.format=function(b){return S.pg(b)||0==b.length||"i"==b?this.toString():ba(this,b,!1)};Number.prototype.xI=function(b){return S.pg(b)||0==b.length||"i"==b?this.toLocaleString():ba(this,b,!0)};
Number.Ox=function(b,f,e,c){var a=null;e=b.indexOf(e);0<e&&(a=b.substr(e),b=b.substr(0,e));(e=b.startsWith("-"))&&(b=b.substr(1));var d=0,g=f[d];if(b.length<g)return a?b+a:b;for(var k=b.length,h="",l=!1;!l;){var n=g,m=k-n;0>m&&(g+=m,n+=m,m=0,l=!0);if(!n)break;m=b.substr(m,n);h=h.length?m+c+h:m;k-=n;d<f.length-1&&(d++,g=f[d])}e&&(h="-"+h);return a?h+a:h};
function ba(b,f,e){e=e?S.vL.aY.numberFormat:S.vL.kY.numberFormat;var c="",a=-1;1<f.length&&(a=parseInt(f.substr(1)));f=f.charAt(0);switch(f){case "d":case "D":c=parseInt(Math.abs(b)).toString();-1!=a&&(c=c.length<a?String.CG(a-c.length)+c:c);0>b&&(c="-"+c);break;case "x":case "X":c=parseInt(Math.abs(b)).toString(16);"X"==f&&(c=c.toUpperCase());-1!=a&&(c=c.length<a?String.CG(a-c.length)+c:c);break;case "e":case "E":c=-1==a?b.toExponential():b.toExponential(a);"E"==f&&(c=c.toUpperCase());break;case "f":case "F":case "n":case "N":-1==
a&&(a=e.z_);c=b.toFixed(a).toString();a&&"."!=e.FI&&(a=c.indexOf("."),c=c.substr(0,a)+e.FI+c.substr(a+1));if("n"==f||"N"==f)c=Number.Ox(c,e.B_,e.FI,e.A_);break;case "c":case "C":-1==a&&(a=e.uZ);c=Math.abs(b).toFixed(a).toString();a&&"."!=e.FF&&(a=c.indexOf("."),c=c.substr(0,a)+e.FF+c.substr(a+1));c=Number.Ox(c,e.wZ,e.FF,e.vZ);c=0>b?String.format(e.xZ,c):String.format(e.yZ,c);break;case "p":case "P":-1==a&&(a=e.G_),c=(100*Math.abs(b)).toFixed(a).toString(),a&&"."!=e.aJ&&(a=c.indexOf("."),c=c.substr(0,
a)+e.aJ+c.substr(a+1)),c=Number.Ox(c,e.I_,e.aJ,e.H_),c=0>b?String.format(e.J_,c):String.format(e.K_,c)}return c}String.nf="String";String.yL="";String.compare=function(b,f,e){e&&(b&&(b=b.toUpperCase()),f&&(f=f.toUpperCase()));b=b||"";f=f||"";return b==f?0:b<f?-1:1};String.concat=function(){return 2===arguments.length?arguments[0]+arguments[1]:Array.prototype.join.call(arguments,"")};
String.prototype.endsWith=function(b){return b.length?b.length>this.length?!1:this.substr(this.length-b.length)==b:!0};String.lG=function(b,f,e){return 0==String.compare(b,f,e)};String._format=function(b,f,e){String.RD||(String.RD=/(\{[^\}^\{]+\})/g);return b.replace(String.RD,function(c,a){var d=f[parseInt(a.substr(1))+1];if(S.pg(d))return"";if(d.format){var g=null,b=a.indexOf(":");0<b&&(g=a.substring(b+1,a.length-1));return e?d.xI(g):d.format(g)}return e?d.toLocaleString():d.toString()})};
String.format=function(b){return String._format(b,arguments,!1)};String.CG=function(b){for(var f="0",e=1;e<b;e++)f+="0";return f};String.prototype.insert=function(b,f){return f?b?this.substr(0,b)+f+this.substr(b):f+this:this};String.pv=function(b){return!b||!b.length};String.xI=function(b){return String._format(b,arguments,!0)};String.prototype.remove=function(b,f){return!f||b+f>this.length?this.substr(0,b):this.substr(0,b)+this.substr(b+f)};
String.prototype.startsWith=function(b){return b.length?b.length>this.length?!1:this.substr(0,b.length)==b:!0};String.prototype.trim||(String.prototype.trim=function(){return this.replace(/\s*$/,"").replace(/^\s*/,"")});Array.nf="Array";Array.Ms=[S.us];Array.prototype.add=function(b){this.push(b)};Object.defineProperty(Array.prototype,"add",{enumerable:!1,writable:!0});Array.prototype.addRange=function(b){this.push.apply(this,b)};Object.defineProperty(Array.prototype,"addRange",{enumerable:!1,writable:!0});
Object.defineProperty(Array.prototype,"aggregate",{enumerable:!1,writable:!0});Array.prototype.clear=function(){this.length=0};Object.defineProperty(Array.prototype,"clear",{enumerable:!1,writable:!0});Array.prototype.clone=function(){return 1===this.length?[this[0]]:Array.apply(null,this)};Object.defineProperty(Array.prototype,"clone",{enumerable:!1,writable:!0});Array.prototype.contains=function(b){return 0<=this.indexOf(b)};Object.defineProperty(Array.prototype,"contains",{enumerable:!1,writable:!0});
Array.prototype.dequeue=function(){return this.shift()};Object.defineProperty(Array.prototype,"dequeue",{enumerable:!1,writable:!0});Array.prototype.enqueue=function(b){this.IN=!0;this.push(b)};Object.defineProperty(Array.prototype,"enqueue",{enumerable:!1,writable:!0});function ea(b){return b.length?b[b.IN?0:b.length-1]:null}Object.defineProperty(Array.prototype,"peek",{enumerable:!1,writable:!0});
Array.prototype.every||(Array.prototype.every=function(b,f){for(var e=this.length,c=0;c<e;c++)if(c in this&&!b.call(f,this[c],c,this))return!1;return!0},Object.defineProperty(Array.prototype,"every",{enumerable:!1,writable:!0}));Object.defineProperty(Array.prototype,"extract",{enumerable:!1,writable:!0});
Array.prototype.filter||(Array.prototype.filter=function(b,f){for(var e=this.length,c=[],a=0;a<e;a++)if(a in this){var d=this[a];b.call(f,d,a,this)&&c.push(d)}return c},Object.defineProperty(Array.prototype,"filter",{enumerable:!1,writable:!0}));Array.prototype.forEach||(Array.prototype.forEach=function(b,f){for(var e=this.length,c=0;c<e;c++)c in this&&b.call(f,this[c],c,this)},Object.defineProperty(Array.prototype,"forEach",{enumerable:!1,writable:!0}));Array.prototype.getEnumerator=function(){return new S.hs(this)};
Object.defineProperty(Array.prototype,"getEnumerator",{enumerable:!1,writable:!0});Array.prototype.groupBy=function(b,f){for(var e=this.length,c=[],a={},d=0;d<e;d++)if(d in this){var g=b.call(f,this[d],d);if(!String.pv(g)){var k=a[g];k||(k=[],k.key=g,a[g]=k,c.add(k));k.add(this[d])}}return c};Object.defineProperty(Array.prototype,"groupBy",{enumerable:!1,writable:!0});
Array.prototype.index=function(b,f){for(var e=this.length,c={},a=0;a<e;a++)if(a in this){var d=b.call(f,this[a],a);String.pv(d)||(c[d]=this[a])}return c};Object.defineProperty(Array.prototype,"index",{enumerable:!1,writable:!0});Array.prototype.indexOf||(Array.prototype.indexOf=function(b,f){var e=this.length;if(e)for(var c=f||0;c<e;c++)if(this[c]===b)return c;return-1},Object.defineProperty(Array.prototype,"indexOf",{enumerable:!1,writable:!0}));
Array.prototype.insert=function(b,f){this.splice(b,0,f)};Object.defineProperty(Array.prototype,"insert",{enumerable:!1,writable:!0});Object.defineProperty(Array.prototype,"insertRange",{enumerable:!1,writable:!0});Array.prototype.map||(Array.prototype.map=function(b,f){for(var e=this.length,c=Array(e),a=0;a<e;a++)a in this&&(c[a]=b.call(f,this[a],a,this));return c},Object.defineProperty(Array.prototype,"map",{enumerable:!1,writable:!0}));
Array.prototype.remove=function(b){b=this.indexOf(b);return 0<=b?(this.splice(b,1),!0):!1};Object.defineProperty(Array.prototype,"remove",{enumerable:!1,writable:!0});Object.defineProperty(Array.prototype,"removeAt",{enumerable:!1,writable:!0});Array.prototype.removeRange=function(b,f){return this.splice(b,f)};Object.defineProperty(Array.prototype,"removeRange",{enumerable:!1,writable:!0});
Array.prototype.some||(Array.prototype.some=function(b,f){for(var e=this.length,c=0;c<e;c++)if(c in this&&b.call(f,this[c],c,this))return!0;return!1},Object.defineProperty(Array.prototype,"some",{enumerable:!1,writable:!0}));Array.toArray=function(b){return Array.prototype.slice.call(b)};RegExp.nf="RegExp";RegExp.parse=function(b){if(b.startsWith("/")){var f=b.lastIndexOf("/");if(1<f)return new RegExp(b.substring(1,f),b.substr(f+1))}return null};Error.nf="Error";
Error.nZ=function(b,f,e){b=Error(b);if(f)for(var c in f)b[c]=f[c];e&&(b.g_=e);if(!(S.pg(b.stack)||S.pg(b.fileName)||S.pg(b.lineNumber))){f=b.stack.split("\n");e=f[0];for(c=b.fileName+":"+b.lineNumber;!S.pg(e)&&-1===e.indexOf(c);)f.shift(),e=f[0];e=f[1];isNullOrUndefined(e)||(e=e.match(/@(.*):(\d+)$/),S.pg(e)||(f.shift(),b.stack=f.join("\n"),b.fileName=e[1],b.lineNumber=parseInt(e[2])))}return b};J.tc=Function;J.tc.nf="Type";J.dD=function(b){this.nf=b};J.dD.prototype={aN:!0,getName:function(){return this.nf}};
J.tc.gw=function(b){J.Jx||(J.Jx={});J.rD||(J.rD=[]);if(!J.Jx[b]){for(var f=self,e=b.split("."),c=0;c<e.length;c++){var a=e[c],d=f[a];d||(f[a]=d=new J.dD(e.slice(0,c+1).join(".")),0==c&&J.rD.add(d));f=d}J.Jx[b]=f}};J.tc.prototype.Ma=function(b,f,e){this.prototype.constructor=this;this.nf=b;this.fD=!0;this.Zk=f||Object;f&&(this.Ls=!0);if(e){this.Ms=[];for(var c=2;c<arguments.length;c++)e=arguments[c],this.Ms.add(e)}};function fa(b,f){b.nf=f;b.lD=!0}
J.tc.prototype.bC=function(){if(this.Ls){var b=this.Zk;b.Ls&&b.bC();for(var f in b.prototype){var e=b.prototype[f];this.prototype[f]||(this.prototype[f]=e)}delete this.Ls}};J.tc.prototype.bV||(J.tc.prototype.bV=J.tc.prototype.bC);function ga(b,f){return S.pg(f)?!1:b==Object||f instanceof b?!0:ka(b,J.tc.jR(f))}
function ka(b,f){if(b==Object||b==f)return!0;if(b.fD)for(var e=f.Zk;e;){if(b==e)return!0;e=e.Zk}else if(b.lD){var c=f.Ms;if(c&&c.contains(b))return!0;for(e=f.Zk;e;){if((c=e.Ms)&&c.contains(b))return!0;e=e.Zk}}return!1}J.tc.j_=function(b){return 1==b.fD};J.tc.k_=function(b){return 1==b.ZM};J.tc.l_=function(b){return 1==b.ZM&&1==b.hD};J.tc.m_=function(b){return 1==b.lD};J.tc.n_=function(b){return 1==b.aN};J.tc.gZ=function(b,f){return ga(f,b)};J.tc.R_=function(b,f){return ga(f,b)?b:null};
J.tc.jR=function(b){var f=null;try{f=b.constructor}catch(e){}f&&f.nf||(f=Object);return f};S.ej=function(){};S.ej.Ma("Enum");S.ej.parse=function(b,f){var e=b.prototype;if(b.hD){for(var c=f.split("|"),a=0,d=!0,g=c.length-1;0<=g;g--){var k=c[g].trim(),h=!1;for(l in e)if(l===k){a|=e[l];h=!0;break}if(!h){d=!1;break}}if(d)return a}else for(var l in e)if(l===f)return e[l];throw"Invalid Enumeration Value";};
S.ej.YY=function(b){var f=this.prototype;if(this.hD&&0!==b){var e=[];for(c in f)f[c]&b&&(e.length&&e.add(" | "),e.add(c));if(!e.length)throw"Invalid Enumeration Value";return e.join("")}for(var c in f)if(f[c]===b)return c;throw"Invalid Enumeration Value";};S.pd=function(){};S.pd.Ma("Delegate");S.pd.empty=function(){};S.pd.hN=function(b,f,e){for(var c=0;c<b.length;c+=2)if(b[c]===f&&b[c+1]===e)return!0;return!1};
S.pd._create=function(b){function f(){if(2==b.length)return b[1].apply(b[0],arguments);for(var e=b.clone(),c=0;c<e.length;c+=2)S.pd.hN(b,e[c],e[c+1])&&e[c+1].apply(e[c],arguments);return null}f.Wg=b;return f};S.pd.create=function(b,f){return b?S.pd._create([b,f]):f};S.pd.kZ=function(b,f){return b?f?S.pd._create((b.Wg?b.Wg:[null,b]).concat(f.Wg?f.Wg:[null,f])):b.Wg?b:S.pd.create(null,b):f.Wg?f:S.pd.create(null,f)};
S.pd.remove=function(b,f){if(!b||b===f)return null;if(!f)return b;var e=b.Wg,c=null,a;f.Wg?(c=f.Wg[0],a=f.Wg[1]):a=f;for(var d=0;d<e.length;d+=2)if(e[d]===c&&e[d+1]===a){if(2==e.length)return null;e.splice(d,2);return S.pd._create(e)}return b};S.pd.oZ=function(b,f,e){e=e||"__"+(new Date).valueOf();self[e]=f?b:function(){try{delete self[e]}catch(c){self[e]=void 0}b.apply(null,arguments)};return e};S.pd.CZ=function(b){delete self[b]};S.pd.iZ=function(b){self[b]=S.pd.empty};S.Qe=function(){};
S.Qe.prototype={uh:null,reset:null};S.Qe.getEnumerator=function(b){return b?b.getEnumerator?b.getEnumerator():new S.hs(b):null};fa(S.Qe,"IEnumerator");S.us=function(){};S.us.prototype={getEnumerator:null};fa(S.us,"IEnumerable");S.hs=function(b){this.xD=b;this.ht=-1;this.current=null};S.hs.prototype={uh:function(){this.ht++;this.current=this.xD[this.ht];return this.ht<this.xD.length},reset:function(){this.ht=-1;this.current=null}};S.hs.Ma("ArrayEnumerator",null,S.Qe);S.JC=function(){};
S.JC.prototype={bd:null};fa(S.JC,"IDisposable");S.YC=function(b){this.Et=S.pg(b)?[]:[b];this.isEmpty=0==this.Et.length};S.YC.prototype={append:function(b){S.pg(b)||(this.Et.add(b),this.isEmpty=!1);return this},clear:function(){this.Et=[];this.isEmpty=!0},toString:function(b){return this.Et.join(b||"")}};S.YC.Ma("StringBuilder");S.rs=function(){};S.rs.Ma("EventArgs");S.rs.yL=new S.rs;J.XMLHttpRequest||(J.XMLHttpRequest=function(){for(var b=["Msxml2.XMLHTTP","Microsoft.XMLHTTP"],f=0;f<b.length;f++)try{return new ActiveXObject(b[f])}catch(e){}return null});
S.EC=function(){var b=S.EC;b.Ls&&b.bC();b.Zk.apply(this);this.cancel=!1};S.EC.Ma("CancelEventArgs",S.rs);S.OM=function(b,f){this.first=b;this.second=f};S.OM.Ma("Tuple");S.$d=function(b){this.qy=b;this.Th=null};S.$d.prototype={Va:function(){this.Th=S.$d.AD(this.Th);return this.qy},yb:function(b){this.qy!==b&&(this.qy=b,b=this.Th)&&(this.Th=null,S.$d.ZD(b))}};S.$d.jy=[];S.$d.DN={bd:function(){S.$d.jy.pop()}};S.$d.P_=function(b){S.$d.jy.push(b);return S.$d.DN};
S.$d.AD=function(b){var f=S.$d.jy,e=f.length;if(e){b=b||[];for(var c=0;c<e;c++){var a=f[c];b.contains(a)||b.push(a)}return b}return null};S.$d.ZD=function(b){for(var f=0,e=b.length;f<e;f++)b[f].i_()};S.$d.Ma("Observable");S.MC=function(b){this.yj=b||[];this.Th=null};
S.MC.prototype={add:function(b){this.yj.push(b);la(this)},clear:function(){this.yj.clear();la(this)},contains:function(b){return this.yj.contains(b)},getEnumerator:function(){this.Th=S.$d.AD(this.Th);return this.yj.getEnumerator()},indexOf:function(b){return this.yj.indexOf(b)},insert:function(b,f){this.yj.insert(b,f);la(this)},remove:function(b){return this.yj.remove(b)?(la(this),!0):!1},toArray:function(){return this.yj}};function la(b){var f=b.Th;f&&(b.Th=null,S.$d.ZD(f))}
S.MC.Ma("ObservableCollection",null,S.us);S.JL=function(){};fa(S.JL,"IApplication");S.KL=function(){};fa(S.KL,"IContainer");S.OL=function(){};fa(S.OL,"IObjectFactory");S.LL=function(){};fa(S.LL,"IEventManager");S.ML=function(){};fa(S.ML,"IInitializable");self.tc.gw("XODText");self.tc.gw("XODTextOld");XODText.cd=function(){};
XODText.tx=function(b,f){this.fE=b;this.qb=Array(8);this.qb[0]=f[0];this.qb[1]=f[1];this.qb[2]=f[2];this.qb[3]=f[3];this.qb[4]=f[4];this.qb[5]=f[5];this.qb[6]=f[6];this.qb[7]=f[7]};XODText.tx.prototype={fE:null,qb:null,Rc:function(){for(var b=Array(8),f=0;8>f;f++)b[f]=this.qb[f];return b}};XODText.pI={ff:String.fromCharCode(64256),fi:String.fromCharCode(64257),fl:String.fromCharCode(64258),ffi:String.fromCharCode(64259),ffl:String.fromCharCode(64260),ft:String.fromCharCode(64261),st:String.fromCharCode(64262)};
XODText.ZA=function(b){this.QM=this.width=b};XODText.ZA.prototype={width:0,QM:0};XODText.Iv=function(){};XODText.Iv.prototype={A:function(){},addColorStop:function(){}};XODText.Vm=function(b){this.nl=[];this.ED={};var f=new XODText.Matrix2D;f.set(1,0,0,1,0,0);this.nl.push(f);this.hn=b};
$.extend(XODText.Vm.prototype,{hn:null,oE:0,Yp:0,hy:0,canvas:{h0:0,height:0},pR:function(b){return this.ED[b]},ZY:function(b,f){var e=new XODText.Ka;e.oh(b);f.pC(e);return e.width()},jn:function(b){if(Object.jr(this.hn,b))return this.hn[b];b=b.split(" ")[1];console.assert(Object.jr(this.hn,b),"Font "+b+" file not found");return this.hn[b]},FE:function(b,f){var e=new XODText.Matrix2D,c=b.gy,a=b.gE;e.set(a/c,0,0,a/c,0,0);e.pC(f)},font:null,save:function(){var b=new XODText.Matrix2D;b.initMatrix(ea(this.nl));
this.nl.push(b)},restore:function(){this.nl.pop()},transform:function(b,f,e,c,a,d){var g=new XODText.Matrix2D;g.set(b,f,e,c,a,d);ea(this.nl).concat(g)},rotate:function(b){var f=new XODText.Matrix2D,e=Math.cos(b);b=Math.sin(b);f.set(e,b,-b,e,0,0);ea(this.nl).concat(f)},translate:function(b,f){this.Yp=b;this.hy=f},setLineDash:function(){},fillRect:function(){},fillText:function(b,f,e){var c=this.jn(this.font);this.Zs(b,f,e,c)},Zs:function(b,f,e,c){if(!this.en){this.translate(f,e);f=0;for(e=b.length;f<
e;){var a=b.charCodeAt(f),d=f;55296<=a&&55551>=a?(a=String.fromCodePoint((a-55296<<10)+(b.charCodeAt(f+1)-56320)+65536),f+=2):(a=String.fromCodePoint(a),f++);d=this.vv&&d in this.vv?this.vv[d]:a;a=c.Gz(a);this.FE(c,a);var g=a.y1;a.y1=a.y2;a.y2=g;a.x1+=this.Yp;a.x2+=this.Yp;a.y1+=this.hy;a.y2+=this.hy;this.Yp+=a.width();g=Array(8);g[0]=a.x1;g[1]=a.y1;g[2]=a.x2;g[3]=a.y1;g[4]=a.x2;g[5]=a.y2;g[6]=a.x1;g[7]=a.y2;ea(this.nl).SK(g);this.ED[this.oE]=new XODText.tx(d,g);this.oE++}this.vv=null}},measureText:function(b){var f=
this.jn(this.font);return this.kE(b,f)},kE:function(b,f){var e=0;if(!this.en)for(var c=0,a=b.length;c<a;){var d=b.charCodeAt(c);55296<=d&&55551>=d?(d=f.Gz(String.fromCodePoint((d-55296<<10)+(b.charCodeAt(c+1)-56320)+65536)),c+=2):(d=f.Gz(String.fromCodePoint(d)),c++);this.FE(f,d);e+=d.width()}return new XODText.ZA(e)},strokeRect:function(){},lineWidth:0,lineCap:null,strokeStyle:null,fillStyle:null,globalAlpha:0,createLinearGradient:function(){return new XODText.Iv},createRadialGradient:function(){return new XODText.Iv},
createPattern:function(){},addColorStop:function(){},beginPath:function(){},closePath:function(){},fill:function(){},stroke:function(){},clip:function(){},moveTo:function(){},lineTo:function(){},quadraticCurveTo:function(){},bezierCurveTo:function(){},miterLimit:0,lineJoin:null,drawImage:function(){},setTransform:function(){},getImageData:function(){return new XODText.ImageData},putImageData:function(){},scale:function(){},S:function(){this.save()},r:function(){this.restore()},t:function(b,f,e,c,
a,d){this.transform(b,f,e,c,a,d)},ro:function(b){this.rotate(b)},T:function(b,f){this.translate(b,f)},w:0,c:null,s:null,f:null,a:0,L:function(b,f,e,c){return this.createLinearGradient(b,f,e,c)},R:function(b,f,e,c,a,d){return this.createRadialGradient(b,f,e,c,a,d)},P:function(b,f){this.createPattern(b,f)},A:function(){},b:function(){this.beginPath()},z:function(){this.closePath()},F:function(){this.fill()},X:function(){this.stroke()},cr:function(){this.strokeRect()},C:function(){this.clip()},M:function(b,
f){this.moveTo(b,f)},l:function(b,f){this.lineTo(b,f)},q:function(b,f,e,c){this.quadraticCurveTo(b,f,e,c)},B:function(b,f,e,c,a,d){this.bezierCurveTo(b,f,e,c,a,d)},n:null,x:function(b,f,e){var c=this.jn(this.font);this.Zs(b,f,e,c)},m:function(b){var f=this.jn(this.font);return this.kE(b,f)},i:0,j:null,I:function(b,f,e){this.drawImage(b,f,e)},Z:function(b,f,e,c,a,d){this.setTransform(b,f,e,c,a,d)},d:function(b,f,e,c){return this.getImageData(b,f,e,c)},D:function(b,f,e){this.putImageData(b,f,e)},e:function(b,
f){this.scale(b,f)},tm:function(b){this.vv=b},fillTextCustom:function(b,f,e){var c=this.jn(this.font);this.Zs(b,f,e,c)},xc:function(b,f,e){var c=this.jn(this.font);this.Zs(b,f,e,c)},cgb:function(){console.assert(!this.en,"Custom Glyphs begin offset is incorrect");this.en=!0},cge:function(){console.assert(this.en,"Custom Glyphs end offset is incorrect");this.en=!1},xw:function(b,f,e){1<b.length&&(b=b.substr(0,b.length-1));this.x(b,f,e)},xcw:function(b,f,e){1<b.length&&(b=b.substr(0,b.length-1));this.xc(b,
f,e)},createCanvas:function(){return{getContext:function(){return new XODText.Vm(this.hn)}}},en:!1});Object.defineProperties(XODText.Vm.prototype,{n:{get:function(){return this.font},set:function(b){this.font=b}}});XODText.we=function(){this.rf=[];this.Vc=[];this.Ha=[];this.jd=!1;this.pn=null};
XODText.we.prototype={clear:function(){this.Xa="";this.Vc.clear();this.Ha.clear();this.jd=!1},Qb:function(){this.Vc=[];this.Ha=[];this.jd=!1},rO:function(b){function f(e){for(var c=e.length,a=0;a<c;a+=8){var d=b.W({x:e[a],y:e[a+1]}),g=b.W({x:e[a+2],y:e[a+3]}),f=b.W({x:e[a+4],y:e[a+5]}),h=b.W({x:e[a+6],y:e[a+7]}),l=new XODText.ab;l.zE(d.x,d.y,g.x,g.y,f.x,f.y,h.x,h.y);l=l.mh();e[a]=l.x1;e[a+1]=l.y1;e[a+2]=l.x2;e[a+3]=l.y2;e[a+4]=l.x3;e[a+5]=l.y3;e[a+6]=l.x4;e[a+7]=l.y4}}f(this.Ha);this.rf.forEach(function(e){f(e.qb);
e.Eb.forEach(function(c){f(c.qb);c.Hd.forEach(function(a){f(a)})})})},Dr:function(b){this.Ha=b.m_Quads;this.Vc=b.m_Offsets;this.Xa=b.m_Str;this.jd=b.m_Ready;this.rf=function(b,e,c){function a(a,d){return a.slice(d,d+8)}function d(){var d=new XODText.Cb;d.gc=b[l+1];d.pb=r;r++;var g=b[l+1];d.ka=c.slice(g,g+b[l+2]);d.Vp=g;for(var g=b[l],k=0;k<g;++k)d.Hd.push(a(e,8*(d.gc+k)));m&&(m.Xp=d);return m=d}function g(a){var c=d(),g=b[l],e=b[l+3],k=b[l+4],h;if(e===k){e=Math.min(a.x1,a.x2);k=Math.max(a.x1,a.x2);
h=c.Hd[0];a=c.Hd[g-1];a=[h[1],h[3],h[5],h[7],a[1],a[3],a[5],a[7]];h=Math.min.apply(null,a);a=Math.max.apply(null,a);for(var n=0;n<g;++n)for(var m=c.Hd[n],r=Math.min(m[0],m[2],m[4]),y=0;8>y;y+=2)m[y]=m[y]===r?e:k}else for(h=Math.min(a.y1,a.y2),a=Math.max(a.y1,a.y2),n=0;n<g;++n)for(m=c.Hd[n],r=Math.min(m[1],m[3],m[5]),y=1;8>y;y+=2)m[y]=m[y]===r?a:h;g=c.qb;m=c.Hd[0];n=m[2]-m[0];m=m[3]-m[1];0<n?(g[0]=e,g[1]=a,g[2]=k,g[3]=a,g[4]=k,g[5]=h,g[6]=e,g[7]=h):0>n?(g[0]=e,g[1]=h,g[2]=k,g[3]=h,g[4]=k,g[5]=a,g[6]=
e,g[7]=a):0<m?(g[0]=e,g[1]=h,g[2]=e,g[3]=a,g[4]=k,g[5]=a,g[6]=k,g[7]=h):0>m?(g[0]=k,g[1]=a,g[2]=k,g[3]=h,g[4]=e,g[5]=h,g[6]=e,g[7]=a):(g[0]=e,g[1]=a,g[2]=k,g[3]=a,g[4]=k,g[5]=h,g[6]=e,g[7]=h);l+=5;return c}function k(){var c=d();c.qb=a(b,l+3);l+=11;return c}function h(d){var c=new XODText.Sb;c.pb=d;var e=0<b[l];if(e){var h=6;d=b[l];var w=c.qb,r=b.slice(l+2,l+4),B=b.slice(l+4,l+6);w[0]=r[0];w[1]=r[1];w[2]=B[0];w[3]=r[1];w[4]=B[0];w[5]=B[1];w[6]=r[0];w[7]=B[1]}else h=10,d=-b[l],c.qb=a(b,l+2);e=e?g:
k;w=new XODText.Ka;c.sb(w);l+=h;m=null;for(h=0;h<d;++h)c.Eb.push(e(w));c.ka=c.Eb.map(function(a){return a.ka}).join(" ");c.Vp=c.Eb[0]?c.Eb[0].Vp:0;n&&(n.Wp=c);return n=c}var l=0,n=null,m=null,r=0;return function(){var a=[],d=b[l];l++;for(var c=0;c<d;++c)a.push(h(c));return a}()}(b.m_Struct,this.Ha,this.Xa)},ct:function(b){for(var f="",e=0,c,a,d;e<b.length;)c=b.charCodeAt(e),9==c?(f+=String.fromCharCode(10),e++):128>c?(f+=String.fromCharCode(c),e++):191<c&&224>c?(a=b.charCodeAt(e+1),f+=String.fromCharCode((c&
31)<<6|a&63),e+=2):(a=b.charCodeAt(e+1),d=b.charCodeAt(e+2),f+=String.fromCharCode((c&15)<<12|(a&63)<<6|d&63),e+=3);return f},qE:function(b,f){for(var e=new XODText.Cb,c=S.Qe.getEnumerator(b.split(",")),a=-1;c.uh();){var d=c.current.split(":"),g=parseInt(d[0]),k=0;1<d.length&&(k=parseInt(d[1]));a===g&&(++g,--k);for(a=g+k;g<=a;g++)d=f.pR(g),k=d.fE,1<k.length&&(k=k in XODText.pI?XODText.pI[k]:k.charAt(0)),e.Qt(k,d.Rc()),this.Vc.add(g),this.Ha.addRange(d.Rc())}return e},parse:function(b,f){var e=0,c=
0,a=0;do{for(var d;b.advance();)if(d=b.ua(),"F"===d)b.oa();else if("P"===d)b.oa();else if("L"===d){b.oa();d=new XODText.Sb;d.Zp(e++);0<this.rf.length&&this.rf[this.rf.length-1].cK(d);this.rf.add(d);for(var g=S.Qe.getEnumerator(b.current.textContent.split(" "));g.uh();){var k=g.current;if(0<d.kh()){this.Xa+=" ";this.Vc.add(-1);a++;var h=Array(8);d.ed().Rc(h);this.Ha.addRange(h)}k=this.qE(k,f);k.Zp(c++);k.CE(a);d.SE(k);this.Xa+=k.ka;a+=k.ec()}this.Xa+="\n";this.Vc.add(-2);a++;console.assert(0<d.kh(),
"No words in line");0<d.kh()&&(h=Array(8),d.ed().Rc(h),this.Ha.addRange(h))}else console.assert("XML parser has encountered a symbol it can't process.");b.Ba()}while(b.depth)},dP:function(b,f){var e=0,c=0,a=0;this.pn=[];for(var d=0;d<b.length;++d)for(var g=b[d],k=0;k<g.length;++k)for(var h=g[k],l=0;l<h.length;++l){var n=new XODText.Sb;n.Zp(e++);0<this.rf.length&&this.rf[this.rf.length-1].cK(n);this.rf.add(n);for(var m=S.Qe.getEnumerator(h[l].split(" "));m.uh();){var r=m.current;if(0<n.kh()){this.pn.push(this.Xa.length);
this.Xa+=" ";this.Vc.add(-1);a++;var p=Array(8);n.ed().Rc(p);this.Ha.addRange(p)}r=this.qE(r,f);r.Zp(c++);r.CE(a);n.SE(r);this.Xa+=r.ka;a+=r.ec()}this.pn.push(this.Xa.length);this.Xa+="\n";this.Vc.add(-2);a++;console.assert(0<n.kh(),"No words in line");0<n.kh()&&(p=Array(8),n.ed().Rc(p),this.Ha.addRange(p))}this.jd=!0},vB:function(b,f){try{var e=new window.Re(b);console.assert("TextData"===e.ua(),"XML parser has encountered a symbol it can't process.");"TextData"===e.ua()&&(e.oa(),this.parse(e,f))}catch(c){console.warn("TextSelection has encountered an error: "+
c.message);return}this.jd=!0},ready:function(){return this.jd},Nq:function(){return this.rf.length?this.rf[0]:new XODText.Sb},he:function(){return this.Ha},Xa:"",Vc:null,Ha:null,jd:!1};XODText.Sb=function(){this.Eb=[];this.pb=-1;this.uc=[];this.qb=Array(8);this.Wp=null};
XODText.Sb.prototype={Qb:function(){this.pb=this.Kc=-1;this.uc=[]},ta:function(b){return this.pb===b.pb},kh:function(){return this.Eb.length},Ob:function(){return this.Eb.length?this.Eb[0]:new XODText.Cb},ed:function(){return this.Eb.length?this.Eb[this.Eb.length-1]:new XODText.Cb},CH:function(b){return 0>b||b>=this.kh()?new XODText.Cb:this.Eb[b]},De:function(){return null==this.Wp?new XODText.Sb:this.Wp},sb:function(b){b.pm(this.qb)},Zp:function(b){this.pb=b},fh:function(){if(this.uc.length)return this.uc[0];
var b=new XODText.fa,f=new XODText.fa,e=this.Ob(),c=this.ed(),a=Array(8),d=Array(8);e.vd(0,a);b.x=(a[0]+a[2]+a[4]+a[6])/4;b.y=(a[1]+a[3]+a[5]+a[7])/4;c.vd(c.ec()-1,d);f.x=(d[0]+d[2]+d[4]+d[6])/4;f.y=(d[1]+d[3]+d[5]+d[7])/4;.01>Math.abs(b.x-f.x)&&.01>Math.abs(b.y-f.y)&&this.uc.add(0);b=Math.atan2(f.y-b.y,f.x-b.x);b*=180/3.1415926;0>b&&(b+=360);this.uc.add(b);return 0},ka:"",Ca:null,pb:0,uc:null,qb:null,Wp:null,cK:function(b){this.Wp=b},SE:function(b){0<this.Eb.length&&this.Eb[this.Eb.length-1].YV(b);
this.Eb.add(b);var f=String.pv(this.ka),e=Array(8);b.Rc(e);if(f)for(f=0;8>f;f++)this.qb[f]=e[f];else this.ka+=" ",XODText.ab.At(this.qb,e,!1,0);this.ka+=b.ka}};XODText.Cb=function(){this.Hd=[];this.pb=this.gc=-1;this.qb=Array(8);this.Xp=null};
XODText.Cb.prototype={Qb:function(){this.pb=this.gc=-1},ta:function(b){return this.pb===b.pb},ec:function(){return this.Hd.length},lg:function(){return this.ka.length},$a:function(){return this.Vp},CE:function(b){this.Vp=b},fe:function(){return null==this.Xp?new XODText.Cb:this.Xp},bo:function(b,f){if(this.Hd&&this.Hd[b]){var e=this.Hd[b][0],c=this.Hd[b][2],a=this.Hd[b][1],d=this.Hd[b][5];a<d?(f[1]=d,f[3]=d,f[5]=a,f[7]=a):(f[1]=a,f[3]=a,f[5]=d,f[7]=d);f[0]=e;f[2]=c;f[4]=c;f[6]=e}else exports.utils.warn("default",
"getGlyphQuadInWordQuadFormat: No glyph with index "+b+" found.")},vd:function(b,f){for(var e=0;8>e;e++)f[e]=this.Hd[b][e]},Rc:function(b){for(var f=0;8>f;f++)b[f]=this.qb[f]},sb:function(b){var f=new XODText.Ka;f.pm(this.qb);b[0]=f.x1;b[1]=f.y1;b[2]=f.x2;b[3]=f.y2},Zp:function(b){this.pb=this.gc=b},gc:0,ka:"",Ca:null,pb:0,Vp:0,qb:null,Xp:null,Qt:function(b,f){var e=String.pv(this.ka);this.ka+=b;for(var c=Array(8),a=0;8>a;a++)c[a]=f[a];for(a=0;a<b.length;++a)this.Hd.add(c);if(e)for(a=0;8>a;a++)this.qb[a]=
c[a];else XODText.ab.At(this.qb,c,!1,0)},YV:function(b){this.Xp=b}};XODTextOld.we=function(){};
XODTextOld.we.prototype={clear:function(){this.gb.clear();this.Xa="";this.Vc.clear();this.Ha.clear();this.jd=!1},Qb:function(){this.gb=[];this.Vc=[];this.Ha=[];this.jd=!1},ct:function(b){for(var f="",e=0,c,a,d;e<b.length;)c=b.charCodeAt(e),9==c?(f+=String.fromCharCode(10),e++):128>c?(f+=String.fromCharCode(c),e++):191<c&&224>c?(a=b.charCodeAt(e+1),f+=String.fromCharCode((c&31)<<6|a&63),e+=2):(a=b.charCodeAt(e+1),d=b.charCodeAt(e+2),f+=String.fromCharCode((c&15)<<12|(a&63)<<6|d&63),e+=3);return f},
PS:function(b){this.gb=[];this.Vc=[];this.Ha=[];this.jd=!1;try{var f=new window.Re(b);this.Xa="";f.oa();if(!f.advance())return;var e=f.current.textContent;this.Xa=e=this.ct(e);this.Vc.clear();f.advance();for(var e=f.current.textContent,c=e.split(","),a=S.Qe.getEnumerator(c);a.uh();){var d=a.current;try{var g=parseInt(d.trim());this.Vc.add(g)}catch(q){}}this.gb.clear();f.advance();for(var e=f.current.textContent,c=e.split(","),k=S.Qe.getEnumerator(c);k.uh();){d=k.current;try{g=parseFloat(d.trim()),
this.gb.add(g)}catch(q){}}this.Ha.clear();f.advance();e=f.current.textContent;c=e.split(",");b=[];for(var f=[],e=0,h=S.Qe.getEnumerator(c);h.uh();){d=h.current;switch(d){case "Q":e=1;break;case "R":e=2;break;case "S":e=3;break;default:e=0}if(e)b.add(0),f.add(e);else try{g=parseFloat(d.trim()),b.add(g),f.add(e)}catch(q){return}}for(var e=0,l=b.length,n,m,r,p,h=d=c=0;h<l;){var u=f[h];if(0<u)e=u,++h,3===e&&(c=b[h],d=b[h+1],h+=2);else if(1===e)for(g=0;8>g;++g)this.Ha.add(b[h++]);else 2===e?(n=b[h++],
m=b[h++],r=b[h++],p=b[h++],this.Ha.add(n),this.Ha.add(m),this.Ha.add(r),this.Ha.add(m),this.Ha.add(r),this.Ha.add(p),this.Ha.add(n),this.Ha.add(p)):3===e&&(n=b[h++],m=c,r=b[h++],p=d,this.Ha.add(n),this.Ha.add(m),this.Ha.add(r),this.Ha.add(m),this.Ha.add(r),this.Ha.add(p),this.Ha.add(n),this.Ha.add(p))}}catch(q){return}this.Xa.length&&this.Xa.length===this.Vc.length&&8*this.Xa.length===this.Ha.length&&(this.jd=!0)},ready:function(){return this.jd},Nq:function(){var b=new XODTextOld.Sb;if(!this.gb.length)return b.$e(this.gb,
-1,this.Xa,this.Ha,0),b;b.$e(this.gb,1,this.Xa,this.Ha,1);return b},he:function(){return this.Ha},gb:null,Xa:null,Vc:null,Ha:null,jd:!1};XODTextOld.Sb=function(){};
XODTextOld.Sb.prototype={Qb:function(){this.Kc=-1;this.pb=0;this.uc=[]},$e:function(b,f,e,c,a){this.Kc=f;this.pb=a;this.uc=[];this.Gd=b;this.ka=e;this.Ca=c},ta:function(b){return this.Kc===b.Kc},kh:function(){return Math.abs(this.Gd[this.Kc])},Di:function(){return 0<this.Gd[this.Kc]},Ob:function(){var b=new XODTextOld.Cb;b.$e(this.Gd,this.Kc+(this.Di()?6:10),this.Kc,this.ka,this.Ca,1);return b},CH:function(b){if(0>b||b>=this.kh()){var f=new XODTextOld.Cb;f.$e(this.Gd,-1,-1,this.ka,this.Ca,0)}else{var e=
this.Di()?6:10,c=this.Di()?5:11,f=new XODTextOld.Cb;f.$e(this.Gd,this.Kc+e+c*b,this.Kc,this.ka,this.Ca,1+b)}return f},De:function(){var b=this.Kc+parseInt(this.Gd[this.Kc+1]);if(b>=this.Gd.length){var f=new XODTextOld.Sb;f.$e(this.Gd,-1,this.ka,this.Ca,0)}else f=new XODTextOld.Sb,f.$e(this.Gd,b,this.ka,this.Ca,this.pb+1);return f},sb:function(b){if(this.Di())b.x1=this.Gd[this.Kc+2+0],b.y1=this.Gd[this.Kc+2+1],b.x2=this.Gd[this.Kc+2+2],b.y2=this.Gd[this.Kc+2+3];else{for(var f=1.79769E308,e=XODText.cd.hj,
c=1.79769E308,a=XODText.cd.hj,d=0;4>d;++d)var g=this.Gd[this.Kc+2+2*d],k=this.Gd[this.Kc+2+2*d+1],f=Math.min(f,g),e=Math.max(e,g),c=Math.min(c,k),a=Math.max(a,k);b.x1=f;b.y1=c;b.x2=e;b.y2=a}},fh:function(){if(this.uc.length)return this.uc[0];var b=new XODText.fa,f=new XODText.fa,e=new XODTextOld.Cb;e.Qb();var c=this.Ob(),a=new XODTextOld.Cb;a.Qb();for(var d=this.Ob();!d.ta(e);d=d.fe())a=d;e=Array(8);d=Array(8);c.vd(0,e);b.x=(e[0]+e[2]+e[4]+e[6])/4;b.y=(e[1]+e[3]+e[5]+e[7])/4;a.vd(a.ec()-1,d);f.x=
(d[0]+d[2]+d[4]+d[6])/4;f.y=(d[1]+d[3]+d[5]+d[7])/4;.01>Math.abs(b.x-f.x)&&.01>Math.abs(b.y-f.y)&&this.uc.add(0);b=Math.atan2(f.y-b.y,f.x-b.x);b*=180/3.1415926;0>b&&(b+=360);this.uc.add(b);return 0},Kc:0,Gd:null,ka:null,Ca:null,pb:0,uc:null};XODTextOld.Cb=function(){};
XODTextOld.Cb.prototype={Qb:function(){this.Qh=this.gc=-1;this.pb=0},$e:function(b,f,e,c,a,d){this.gc=f;this.Qh=e;this.gb=b;this.ka=c;this.Ca=a;this.pb=d},ta:function(b){return this.gc===b.gc},ec:function(){return parseInt(this.gb[this.gc])},lg:function(){return parseInt(this.gb[this.gc+2])},$a:function(){return parseInt(this.gb[this.gc+1])},Di:function(){return 0<this.gb[this.Qh]},IR:function(){return Math.abs(this.gb[this.Qh])},fe:function(){var b=this.Di(),f=b?5:11;this.gc>=this.Qh+(b?6:10)+(this.IR()-
1)*f?(b=new XODTextOld.Cb,b.$e(this.gb,-1,-1,this.ka,this.Ca,0)):(b=new XODTextOld.Cb,b.$e(this.gb,this.gc+f,this.Qh,this.ka,this.Ca,this.pb+1));return b},eR:function(b){var f=this.ec();return 0>b||b>=f?-1:parseInt(this.gb[this.gc+1])+b},vd:function(b,f){var e=this.eR(b);if(!(0>e)){var c=new XODTextOld.Sb;c.$e(this.gb,this.Qh,this.ka,this.Ca,0);if(c.Di()){var a=new XODText.Ka;c.sb(a);c=a.y1<a.y2?a.y1:a.y2;a=a.y1>a.y2?a.y1:a.y2;e*=8;f[0]=this.Ca[e];f[1]=c;f[2]=this.Ca[e+2];f[3]=f[1];f[4]=this.Ca[e+
4];f[5]=a;f[6]=this.Ca[e+6];f[7]=f[5]}else for(e*=8,c=0;8>c;++c)f[c]=this.Ca[e+c]}},Rc:function(b){var f=new XODTextOld.Sb;f.$e(this.gb,this.Qh,this.ka,this.Ca,0);if(f.Di()){var e=this.gb[this.gc+3],c=this.gb[this.gc+4];if(e>c){var a;a=e;e=c;c=a}a=new XODText.Ka;f.sb(a);f=a.y1<a.y2?a.y1:a.y2;a=a.y1>a.y2?a.y1:a.y2;b[0]=e;b[1]=f;b[2]=c;b[3]=f;b[4]=c;b[5]=a;b[6]=e;b[7]=a}else for(e=this.gc+3,c=0;8>c;++c)b[c]=this.gb[e+c]},sb:function(b){var f=new XODTextOld.Sb;f.$e(this.gb,this.Qh,this.ka,this.Ca,0);
if(f.Di()){var e=this.gb[this.gc+3],c=this.gb[this.gc+4];if(e>c){var a;a=e;e=c;c=a}a=new XODText.Ka;f.sb(a);f=a.y1<a.y2?a.y1:a.y2;a=a.y1>a.y2?a.y1:a.y2}else{e=1.79769E308;c=XODText.cd.hj;f=1.79769E308;a=XODText.cd.hj;for(var d=this.gc+3,g=0;4>g;++g){var k=this.gb[d+2*g],h=this.gb[d+2*g+1],e=Math.min(e,k),c=Math.max(c,k),f=Math.min(f,h);a=Math.max(a,h)}}b[0]=e;b[1]=f;b[2]=c;b[3]=a},gc:0,Qh:0,gb:null,ka:null,Ca:null,pb:0};XODText.Ka=function(){this.y2=this.x2=this.y1=this.x1=0};
XODText.Ka.prototype={Da:function(b,f,e,c){this.x1=b;this.y1=f;this.x2=e;this.y2=c},oh:function(b){this.x1=b.x1;this.y1=b.y1;this.x2=b.x2;this.y2=b.y2},normalize:function(){if(this.x1>this.x2){var b;b=this.x1;this.x1=this.x2;this.x2=b}this.y1>this.y2&&(b=this.y1,this.y1=this.y2,this.y2=b)},set:function(b,f,e,c){this.x1=b;this.y1=f;this.x2=e;this.y2=c},ur:function(b){return this.x2<b.x1||this.x1>b.x2||this.y2<b.y1||this.y1>b.y2},width:function(){var b=this.x2-this.x1;return 0>b?-b:b},height:function(){var b=
this.y2-this.y1;return 0>b?-b:b},pm:function(b){for(var f=1.79769E308,e=XODText.cd.hj,c=1.79769E308,a=XODText.cd.hj,d=0;4>d;++d)var g=b[2*d],k=b[2*d+1],f=Math.min(f,g),e=Math.max(e,g),c=Math.min(c,k),a=Math.max(a,k);this.x1=f;this.y1=c;this.x2=e;this.y2=a},kv:function(b,f){var e,c,a,d,g,k,h,l;b.x1<b.x2?(e=b.x1,c=b.x2):(e=b.x2,c=b.x1);b.y1<b.y2?(a=b.y1,d=b.y2):(a=b.y2,d=b.y1);f.x1<f.x2?(g=f.x1,k=f.x2):(g=f.x2,k=f.x1);f.y1<f.y2?(h=f.y1,l=f.y2):(h=f.y2,l=f.y1);if(c<g||k<e||d<h||l<a)return this.x1=this.x2=
this.y1=this.y2=0,!1;this.x1=e<g?g:e;this.x2=c<k?c:k;this.y1=a<h?h:a;this.y2=d<l?d:l;return this.x1===this.x2||this.y1===this.y2?(this.x1=this.x2=this.y1=this.y2=0,!1):!0},OS:function(b){this.vN(b,b)},vN:function(b,f){this.normalize();this.x1-=b;this.x2+=b;this.y1-=f;this.y2+=f},union:function(b){b.x1<this.x1&&(this.x1=b.x1);b.y1<this.y1&&(this.y1=b.y1);b.x2>this.x2&&(this.x2=b.x2);b.y2>this.y2&&(this.y2=b.y2)},contains:function(b,f){if(this.x1<this.x2){if(b<this.x1||b>this.x2)return!1}else if(b<
this.x2||b>this.x1)return!1;if(this.y1<this.y2){if(f<this.y1||f>this.y2)return!1}else if(f<this.y2||f>this.y1)return!1;return!0},x1:0,y1:0,x2:0,y2:0};XODText.fa=function(b,f){this.x=b;this.y=f};XODText.fa.ta=function(b,f){return b.x===f.x&&b.y===f.y};XODText.fa.y_=function(b,f){return b!==f};XODText.fa.WF=function(b){var f=new XODText.fa;f.x=b.x/2;f.y=b.y/2;return f};XODText.fa.multiply=function(b,f){var e=new XODText.fa;e.init(b.x*f,b.y*f);return e};
XODText.fa.tg=function(b,f){var e=new XODText.fa;e.init(b.x-f.x,b.y-f.y);return e};XODText.fa.Ho=function(b,f){var e=new XODText.fa;e.init(b.x+f.x,b.y+f.y);return e};XODText.fa.distance=function(b,f){var e=b.x-f.x,c=b.y-f.y;return Math.sqrt(e*e+c*c)};
XODText.fa.prototype={x:0,y:0,init:function(b,f){this.x=b;this.y=f},jv:function(b){this.x=b.x;this.y=b.y},add:function(b){this.x+=b.x;this.y+=b.y},sub:function(b){this.x-=b.x;this.y-=b.y},normalize:function(){var b=Math.sqrt(this.x*this.x+this.y*this.y);return b?(this.x/=b,this.y/=b,!0):!1},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},cc:function(b){return this.x*b.x+this.y*b.y}};XODText.cd.Ma("XODText.doubleData");XODText.tx.Ma("XODText.Letter");XODText.ZA.Ma("XODText.nsIDOMTextMetrics");
XODText.Iv.Ma("XODText.nsIDOMCanvasGradient");XODText.Vm.Ma("XODText.SelectionContext");XODText.we.Ma("XODText.SelectionInfo");XODText.Sb.Ma("XODText.Line");XODText.Cb.Ma("XODText.Word");XODText.Ka.Ma("XODText.SelectionRect");XODText.fa.Ma("XODText.SelectionPoint");XODText.cd.Mk=1.79769E308;XODText.cd.hj=-1.79769E308;
(function(){self.tc.gw("XODText");XODText.it=function(){};XODText.Cd=function(b,e){this.x=b;this.y=e};XODText.Cd.prototype={x:0,y:0};XODText.ab=function(){this.Cm=this.Am=this.Bm=this.zm=this.y2=this.x2=this.y1=this.x1=0};var b=RegExp("[-[\\]{}()*+?.,\\\\^$|#\\s]","g");XODText.zx=function(f,e){this.fI=e&&("r"===e||"w"===e);this.text=e&&"w"===e?f.replace(/(\*+|.)/g,function(c){return"*"===c.charAt(0)?1==c.length?".*?":"*".repeat(c.length/2|0).replace(b,"\\$&"):c.replace(b,"\\$&")}):f};XODText.ab.At=
function(b,e,c,a){var d=new XODText.fa;d.init(0,0);var g=new XODText.fa;g.init(0,0);var k=new XODText.fa;k.init(0,0);var h=new XODText.fa;h.init(0,0);for(var l=0;4>l;++l){XODText.ab.uH(d,b,l);if(!d.normalize()&&c)return!1;l?2===l?k=XODText.fa.tg(k,d):1===l?h=XODText.fa.Ho(h,d):3===l&&(h=XODText.fa.tg(h,d)):k=XODText.fa.Ho(k,d);for(var n=Array(8),m=0;1>m;++m){for(var r=0;8>r;++r)n[r]=e[8*m+r];XODText.ab.uH(g,n,l);if(!g.normalize()&&c)return!1;l?2===l?k=XODText.fa.tg(k,g):1===l?h=XODText.fa.Ho(h,g):
3===l&&(h=XODText.fa.tg(h,g)):k=XODText.fa.Ho(k,g)}if(c&&Math.abs(d.cc(g))<XODText.ab.gP)return!1}k=XODText.fa.WF(k);h=XODText.fa.WF(h);if(!k.normalize()&&c||!h.normalize()&&c||c&&!XODText.ab.RT(b,e,k,h,a,a/10))return!1;XODText.ab.inflate(b,e,1,k,h);return!0};XODText.ab.uH=function(b,e,c){var a=(c+1)%4;b.x=e[2*a]-e[2*c];b.y=e[2*a+1]-e[2*c+1]};XODText.ab.RT=function(b,e,c,a,d,g){var k=new XODText.fa;k.init(b[0],b[1]);var h=new XODText.fa;h.init(b[2],b[3]);var l=new XODText.fa;l.init(e[0],e[1]);var n=
new XODText.fa;n.init(e[2],e[3]);var m=k.cc(c),r=h.cc(c),p=l.cc(c);c=n.cc(c);if(m>r)var u=m,m=r,r=u;p>c&&(u=p,p=c,c=u);if(p-r>d||m-c>d)return!1;k.x=b[2];k.y=b[3];h.x=b[4];h.y=b[5];l.x=e[2];l.y=e[3];n.x=e[4];n.y=e[5];m=k.cc(a);r=h.cc(a);p=l.cc(a);c=n.cc(a);m>r&&(u=m,m=r,r=u);p>c&&(u=p,p=c,c=u);return Math.abs(m-p)>g||Math.abs(r-c)>g?!1:!0};XODText.ab.inflate=function(b,e,c,a,d){var g=!1;avx_=new XODText.fa;avx_.init(1,0);avy_=new XODText.fa;avy_.init(0,1);if(1E-4<=Math.abs(a.x-1)||1E-4<=Math.abs(a.y-
0)&&1E-4<=Math.abs(d.x-0)||1E-4<=Math.abs(d.y-1)){var g=!0,k=new XODText.Matrix2D;k.Da(a.x,d.x,a.y,d.y,0,0);k=k.inverse();avx_.x=k.m_a;avx_.y=k.m_b;avy_.x=k.m_c;avy_.y=k.m_d}for(var k=XODText.cd.Mk,h=XODText.cd.hj,l=XODText.cd.Mk,n=XODText.cd.hj,m,r,p=0,u=0,q=0;4>q;++q){var v=new XODText.fa;v.init(b[2*q],b[2*q+1]);g?(m=v.cc(avx_),r=v.cc(avy_)):(m=v.x,r=v.y);q?(k>m&&(k=m,p=v.x),h<m&&(h=m),l>r&&(l=r,u=v.y),n<r&&(n=r)):(k=h=m,l=n=r,p=v.x,u=v.y);for(v=0;v<c;++v){var w=new XODText.fa;w.init(e[8*v+2*q],
e[8*v+2*q+1]);g?(m=w.cc(avx_),r=w.cc(avy_)):(m=w.x,r=w.y);k>m&&(k=m,p=w.x);h<m&&(h=m);l>r&&(l=r,u=w.y);n<r&&(n=r)}}e=new XODText.fa;e.init(p,u);p=e.cc(d);c=XODText.fa.multiply(a,k-e.cc(a));p=XODText.fa.multiply(d,l-p);e.x+=c.x+p.x;e.y+=c.y+p.y;g?(g=a.x,e=d.x,a=a.y,d=d.y,b[0]=g*k+e*l,b[1]=a*k+d*l,b[2]=g*h+e*l,b[3]=a*h+d*l,b[4]=g*h+e*n,b[5]=a*h+d*n,b[6]=g*k+e*n,b[7]=a*k+d*n):(b[0]=k,b[1]=l,b[2]=h,b[3]=l,b[4]=h,b[5]=n,b[6]=k,b[7]=n)};XODText.ab.prototype={_init:function(b,e,c,a,d,g,k,h){this.x1=b;this.y1=
e;this.x2=c;this.y2=a;this.zm=d;this.Bm=g;this.Am=k;this.Cm=h},zE:function(b,e,c,a,d,g,k,h){this.x1=b;this.y1=e;this.x2=c;this.y2=a;this.zm=d;this.Bm=g;this.Am=k;this.Cm=h},mh:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2,x3:this.zm,y3:this.Bm,x4:this.Am,y4:this.Cm}},uR:function(){var b=this.mh(),e=Math.min(b.x1,b.x2,b.x3,b.x4),c=Math.max(b.x1,b.x2,b.x3,b.x4),a=Math.min(b.y1,b.y2,b.y3,b.y4),d=Math.max(b.y1,b.y2,b.y3,b.y4);b.x1=e;b.x2=c;b.x3=c;b.x4=e;b.y1=a;b.y2=a;b.y3=d;b.y4=d;return b},
x1:0,y1:0,x2:0,y2:0,zm:0,Bm:0,Am:0,Cm:0};XODText.Matrix2D=function(b,e,c,a,d,g){"undefined"!==typeof b&&(this.m_a=b,"undefined"!==typeof e&&(this.m_b=e,"undefined"!==typeof c&&(this.m_c=c,"undefined"!==typeof a&&(this.m_d=a,"undefined"!==typeof d&&(this.m_h=d,"undefined"!==typeof g&&(this.m_v=g))))))};XODText.Matrix2D.rotationMatrix=function(b){var e=Math.cos(b);b=Math.sin(b);1E-7>Math.abs(b)&&(b=0);1E-7>Math.abs(e)&&(e=0);var c=new XODText.Matrix2D;c.Da(e,-b,b,e,0,0);return c};XODText.Matrix2D.prototype=
{m_a:0,m_b:0,m_c:0,m_d:0,m_h:0,m_v:0,initMatrix:function(b){this.m_a=b.m_a;this.m_b=b.m_b;this.m_c=b.m_c;this.m_d=b.m_d;this.m_h=b.m_h;this.m_v=b.m_v},Da:function(b,e,c,a,d,g){this.m_a=b;this.m_b=e;this.m_c=c;this.m_d=a;this.m_h=d;this.m_v=g},set:function(b,e,c,a,d,g){this.m_a=b;this.m_b=e;this.m_c=c;this.m_d=a;this.m_h=d;this.m_v=g},inverse:function(){var b=new XODText.Matrix2D,e=this.m_a*this.m_d-this.m_b*this.m_c;if(!e)return b;b.m_a=this.m_d/e;b.m_c=-this.m_c/e;b.m_h=(this.m_c*this.m_v-this.m_h*
this.m_d)/e;b.m_b=-this.m_b/e;b.m_d=this.m_a/e;b.m_v=-(this.m_a*this.m_v-this.m_h*this.m_b)/e;return b},W:function(b){var e=b.x;b.x=b.x*this.m_a+b.y*this.m_c+this.m_h;b.y=e*this.m_b+b.y*this.m_d+this.m_v;return b},concat:function(b){var e=this.m_a,c=this.m_b,a=this.m_c,d=this.m_d;this.m_a=b.m_a*e+b.m_b*a;this.m_b=b.m_a*c+b.m_b*d;this.m_c=b.m_c*e+b.m_d*a;this.m_d=b.m_c*c+b.m_d*d;this.m_h=b.m_h*e+b.m_v*a+this.m_h;this.m_v=b.m_h*c+b.m_v*d+this.m_v;return this},lG:function(b){return this.m_a==b.m_a&&
this.m_b==b.m_b&&this.m_c==b.m_c&&this.m_d==b.m_d&&this.m_h==b.m_h&&this.m_v==b.m_v},SK:function(b){var e=new XODText.Cd(b[0],b[1]),c=new XODText.Cd(b[2],b[3]),a=new XODText.Cd(b[4],b[5]),d=new XODText.Cd(b[6],b[7]),e=this.W(e),c=this.W(c),a=this.W(a),d=this.W(d);b[0]=e.x;b[1]=e.y;b[2]=c.x;b[3]=c.y;b[4]=a.x;b[5]=a.y;b[6]=d.x;b[7]=d.y},pC:function(b){var e=Array(8);e[0]=b.x1;e[1]=b.y1;e[2]=b.x2;e[3]=b.y1;e[4]=b.x2;e[5]=b.y2;e[6]=b.x1;e[7]=b.y2;this.SK(e);b.pm(e)}};XODText.Rp=function(){};XODText.Rp.fN=
function(b,e){return b.$c<e.$c||b.$c===e.$c&&b._position<e._position||b.$c===e.$c&&b._position===e._position&&b.kl<e.kl?-1:b.$c===e.$c&&b._position===e._position&&b.kl===e.kl?0:1};XODText.Rp.prototype={_init:function(){this.ut=[]},_add:function(b){this.ut.add(b)},_clear:function(){this.ut.clear()},gN:function(b,e){e.clear();for(var c=[],a=S.Qe.getEnumerator(this.ut);a.uh();){var d=a.current;c.add(d)}c.sort(XODText.Rp.fN);for(var a="",g,k=[],h=[],l=XODText.it.cD,n=0;n<c.length;++n)if(d=c[n],!(0>d.$c||
d.$c>=b.length||0>d._position||0>=d.kl)){if(-1!==d.$c){k=b[d.$c].text;if(!k.ready())return!1;a=k.Xa;g=k.Vc;k=k.he();if(!a.length||a.length!==g.length||8*a.length!==k.length)continue;for(var l=XODText.it.cD,m=S.Qe.getEnumerator(g);m.uh();){var r=m.current;r>l&&(l=r)}h.clear();for(var p=0;p<l+1;++p)h.add(-1);for(p=0;p<g.length;++p)m=g[p],0<=m&&(h[m]=p)}g=Array(8);for(m=d._position;m<d._position+d.kl&&!(m>l);++m)if(r=h[m],!(0>r)){for(p=0;8>p;++p)g[p]=k[8*r+p];var u=!1;if(1<=e.length&&(p=e[e.length-1],
p.$c===d.$c)){var q=g[0]-g[2],v=g[1]-g[3];XODText.ab.At(p.cg,g,!0,Math.sqrt(q*q+v*v))&&(u=a.charAt(r),p.oy.insert(p.oy.length,u),u=!0)}u||(u=a.charAt(r),r=new XODText.Xx,r.Tp(d.$c,u,g),e.add(r))}}return 0<e.length},ut:null};XODText.Qp=function(){};XODText.Qp.prototype={Tp:function(b,e,c){this.$c=b;this._position=e;this.kl=c},$c:0,_position:0,kl:0};XODText.Xx=function(){};XODText.Xx.prototype={Tp:function(b,e,c){this.$c=b;this.oy=e;this.cg=Array(8);for(b=0;8>b;++b)this.cg[b]=c[b]},$c:0,oy:null,cg:null};
XODText.It=function(){this.sf=new XODText.Ka;this.fy=new XODText.Ka};XODText.It.prototype={sf:null,fy:null,Rh:null,Sh:null};XODText.ib=function(){};XODText.kc=function(){};XODText.xe=function(){this.sn={};this.$f=0;this.bb=this.mn=this.rt=this.Ed=-1;this.ey=this.Aj=this.wt=this.ll=!1;this.qf=[];this.Jc=[];this.ag=[];this.jb=this.Na="";this.Fd=[];this.Tg=[];this.nn=[];this.by=[];this.La={};this.La[" "]=null;this.La["\t"]=null;this.La["\n"]=null;this.La["."]=null;this.La[","]=null;this.La["?"]=null;
this.La[":"]=null;this.La[";"]=null;this.La['"']=null;this.La["'"]=null;this.La["<"]=null;this.La[">"]=null;this.La["`"]=null;this.La["~"]=null;this.La["!"]=null;this.La["@"]=null;this.La["#"]=null;this.La.$=null;this.La["%"]=null;this.La["^"]=null;this.La["&"]=null;this.La["("]=null;this.La[")"]=null;this.La["["]=null;this.La["]"]=null;this.La["{"]=null;this.La["}"]=null;this.La["|"]=null;this.La._=null;this.La["\\"]=null;this.La["-"]=null;this.La["="]=null;this.La["+"]=null;this.La["/"]=null;this.La["*"]=
null};XODText.xe.$g=function(b,e){for(var c=0,a=b.length-1,d=Math.floor((c+a)/2);b[d]!==e&&c<a;)e<b[d]?a=d-1:e>b[d]&&(c=d+1),d=Math.floor((c+a)/2);return b[d]!==e?!1:!0};XODText.xe.prototype={zO:function(b,e,c,a,d){this.wt=!1;this.Ae=b.Pb();if(0>this.Ae.length||0>e.length||0<=a&&a>d)return!1;this.$f=c;if(!this.BE(e))return!1;b=a;e=this.Ae.length;if(0>b)if(0>d)b=0,d=e-1;else return!1;else if(d<b)return!1;console.assert(0<=b&&b<=d);if(b>=e||d>=e)return!1;this.rt=b;this.mn=d;this.Ed=this.ph()?this.mn:
this.rt;++this.mn;this.jb=this.Na="";this.Tg.clear();this.nn.clear();this.qf.clear();this.Jc.clear();this.wt=!0;this.bb=-1;this.ll=!1;return!0},run:function(b){var e=-1,c=-1,a=-1,d="",g="",k=new XODText.Rp;k._init();k._clear();if(!this.wt||0>=this.ml.text.length)return new XODText.Nh(XODText.kc.Al,a,d,g,e,c);for(var h="",l=-1,n=-1;;){if(this.Ed===this.mn)return new XODText.Nh(XODText.kc.Al,a,d,g,e,c);var m=!0;if(!this.Na.length||this.bb===this.Na.length){if(!this.ph()){if(this.bb===this.Na.length){if(this.eI()&&
!this.ll)return this.ll=!0,a=this.Ed,new XODText.Nh(XODText.kc.wu,a,d,g,e,c);++this.Ed}if(this.Ed===this.mn)return new XODText.Nh(XODText.kc.Al,a,d,g,e,c)}else if(this.bb===this.Na.length){if(this.eI()&&!this.ll)return this.ll=!0,a=this.Ed,new XODText.Nh(XODText.kc.wu,a,d,g,e,c);if(this.Ed===this.rt)return new XODText.Nh(XODText.kc.Al,a,d,g,e,c);--this.Ed}(m=this.Qx(this.Ed))?this.ph()?(this.bb=this.Na.length,--this.bb):this.bb=0:this.bb=0}this.ll=!1;m&&(console.assert(this.bb!==this.Na.length),c=
this.mN(k),h=c.Vx,l=c.bt,n=c.$s,g=c.Ps,e=c.Ht,c=c.Gt);if(m&&l!==this.Na.length){console.assert(0<h.length);d=h;a=this.Ed;this.ph()?(this.bb=l)?--this.bb:this.bb=this.Na.length:this.bb=n;if(this.fr())for(b.clear(),h=[],k.gN(this.Ae,h),k=0;k<h.length;++k)l=new XODText.ab,n=h[k],l.x1=n.cg[0],l.y1=n.cg[1],l.x2=n.cg[2],l.y2=n.cg[3],l.zm=n.cg[4],l.Bm=n.cg[5],l.Am=n.cg[6],l.Cm=n.cg[7],b.add(l);return new XODText.Nh(XODText.kc.Aq,a,d,g,e,c)}this.bb=this.Na.length}},BE:function(b){if(0>=b.length)return!1;
for(var e="",c=b.length,a=!1,d=0;d<c;++d){var g=this.Dt(b.charAt(d));" "===g?a||(e+=g,a=!0):(a=!1,e+=g)}this.eE=e;this.ag.clear();b="";for(d=0;d<e.length;++d)g=e.charAt(d),this.il(g)?this.ag.add(b.length-1):b+=g;this.mv()||(b=b.toLowerCase());this.ml=this.gT()?new XODText.zx(b,"r"):this.rT()?new XODText.zx(b,"w"):new XODText.zx(b,"");d=this.Aj;this.ml.text.length?this.Aj=!1:(this.ml.text=e,this.ag.clear(),this.Aj=!0);this.Aj!==d&&0<this.Na.length&&!this.Qx(this.Ed)&&(this.bb=this.Na.length);return!0},
setMode:function(b){var e=this.fr(),c=this.mv(),a=this.ph();this.$f=b;var d=this.fr();b=this.mv();var g=this.ph(),k=!1;c!==b&&this.BE(this.eE);if(!(0>=this.Na.length)){e!==d&&d&&!k&&(console.assert(0<=this.bb&&this.bb<=this.Na.length),this.Qx(this.Ed),k=!0);if(c!==b&&!k){console.assert(this.Fd.length===this.Na.length);console.assert(this.Fd.length<=this.jb.length);e=this.Na.length;c="";for(d=0;d<e;++d)console.assert(0<=this.Fd[d]&&this.Fd[d]<this.jb.length),c+=this.Dt(this.jb.charAt(this.Fd[d]));
this.Na=c;b||(this.Na=this.Na.toLowerCase())}if(a!==g)if(console.assert(0<=this.bb&&this.bb<=this.Na.length),this.bb!==this.Na.length)if(g)for(d=0;2>d;++d)this.bb&&--this.bb;else for(d=0;2>d;++d)this.bb!==this.Na.length&&++this.bb;else g?(this.bb=this.Na.length,--this.bb):this.bb=0}},fr:function(){return 0<(this.$f&XODText.ib.eG)},YS:function(){return 0<(this.$f&XODText.ib.cG)},mv:function(){return 0<(this.$f&XODText.ib.dG)},rT:function(){return 0<(this.$f&XODText.ib.iG)},gT:function(){return 0<(this.$f&
XODText.ib.gG)},qT:function(){return 0<(this.$f&XODText.ib.hG)},ph:function(){return 0<(this.$f&XODText.ib.oz)},eI:function(){return 0<(this.$f&XODText.ib.fG)},mN:function(b){var e,c,a,d=this.YM();c=d.bt;a=d.$s;ambient=d.Ps;var g=d.Ht,k=d.Gt;if(c===this.Na.length)return d;var h,l;e=this.kN(0,0,c,a,a-c);h=e.xE;l=e.JD;for(var n="",m=h;m<l;++m)n+=this.jb.charAt(m);e=n;n="";if(this.YS()){var r=h,p=l,g=this.jb.length,u=k=0,q=m=!1,v=!1;if(r)for(--r;r;){var w=this.jb.charAt(r);m&&this.Ph(w)&&u++;m||!v||
this.Ph(w)||(m=q=!0);if(30<=k||0<u){r++;break}if(this.Tg.length>r&&-2===this.Tg[r]){var A=this.jb.charAt(r+1);if("A"<=A&&"Z">=A){++r;q=!0;break}}--r;k++;v=v||this.Ph(w)||"\n"===w}q||(r=h);m=p;for(u=0;p!==g;){this.Ph(this.jb.charAt(p))&&(m=p-1,u++);if(10<=u||70<=k){p===g-1||this.Ph(this.jb.charAt(p+1))||(p=m);break}p++}p===g&&--p;for(m=r;m<=p;++m)g=this.jb.charAt(m),n="\n"===g?n+" ":n+g;g=h-r;k=l-r}d.Ps=n;if(this.fr()){console.assert(this.jb.length===this.Tg.length);console.assert(l>=h);n=l-h;u=[];
for(m=h;m<l;++m)u.insert(u.length,this.Tg[m]);for(h=0;h<n&&0>u[h];)++h;for(m=l=h;h<n;)if(r=u[h],h===n-1)q=this.Ed,r=u[m],p=u[h],0>p&&(p=u[l]),console.assert(0<=q&&0<=r&&p>=r),v=new XODText.Qp,v.Tp(q,r,p-r+1),b._add(v),++h;else if(-1===r)console.assert(0<=u[l]),++h;else if(-2===r){console.assert(0<=u[l]);q=this.Ed;r=u[m];p=u[l];console.assert(0<=q&&0<=r&&p>=r);v=new XODText.Qp;v.Tp(q,r,p-r+1);b._add(v);for(++h;h<n&&0>u[h];)++h;m=l=h}else 0<=r&&(console.assert(0<=u[l]),l===h||this.iN(u,l,h)?(l=h,++h):
(q=this.Ed,r=u[m],p=u[l],console.assert(0<=q&&0<=r&&p>=r),v=new XODText.Qp,v.Tp(q,r,p-r+1),b._add(v),m=l=h))}d.Vx=e;d.bt=c;d.$s=a;d.Ht=g;d.Gt=k;return d},ln:null,Nb:null,MD:function(f){return f.replace(b,"\\$&")},JN:function(b,e,c){Object.jr(this.sn,b.text)?this.Nb=this.sn[b.text]:(this.Nb=b.fI?{re:new RegExp(b.text,"g"),matches:null}:{re:new RegExp(this.MD(b.text),"g"),matches:null},this.sn[b.text]=this.Nb);this.Nb.re.lastIndex=c;this.ln=this.Nb.re.exec(e);return null!=this.ln?{start:this.Nb.re.lastIndex-
this.ln[0].length,length:this.ln[0].length}:{start:-1,length:0}},KN:function(b,e,c){this.Nb=null;Object.jr(this.sn,b.text)&&(this.Nb=this.sn[b.text]);if(null===this.Nb||null==this.Nb.matches)this.Nb=b.fI?{re:new RegExp(b.text,"g"),matches:[],IB:null}:{re:new RegExp(this.MD(b.text),"g"),matches:[],IB:null},this.sn[b.text]=this.Nb;if(this.Nb.IB!==e){for(this.Nb.matches=[];null!==(this.ln=this.Nb.re.exec(e));)this.Nb.matches.push({start:this.ln.index,end:this.Nb.re.lastIndex});this.Nb.IB=e}if(0<this.Nb.matches.length)for(b=
this.Nb.matches.length-1;0<=b;b--)if(this.Nb.matches[b].end<c)return{start:this.Nb.matches[b].start,length:this.Nb.matches[b].end-this.Nb.matches[b].start};return{start:-1,length:0}},YM:function(){var b,e,c,a;c=this.bb;for(a=this.Na.length;;){var d=!1;console.assert(0<this.ml.text.length);if(this.ph()){if(c===a){b=e=a;break}e=this.KN(this.ml,this.Na,c)}else e=this.JN(this.ml,this.Na,c);b=e.start;if(0>b){b=e=a;break}e=e.start+e.length;this.ph()?(c=b,0!==c?--c:c=a):c=e;if(!this.Aj)if(0<this.ag.length)if(this.qf.length||
this.Jc.length){for(var g=this.Jc.length,k=this.qf.length,h=b-0,l=S.Qe.getEnumerator(this.ag);l.uh();){var n=l.current,n=h+n;if(!XODText.xe.$g(this.qf,n)&&!XODText.xe.$g(this.Jc,n)){d=!0;break}}if(d)continue;for(var l=b-0,m=e-0-1,r=n=this.ay(this.Jc,l);r!==g;++r){var p=this.Jc[r];if(p>=l&&p<m&&(n=p-h,!XODText.xe.$g(this.ag,n))){d=!0;break}if(p>=m)break}if(d)continue;for(r=n=this.ay(this.qf,l);r!==k;++r){p=this.qf[r];if(p>=l&&p<m&&(n=p-h,!XODText.xe.$g(this.ag,n))){d=!0;break}if(p>=m)break}if(d)continue}else continue;
else if(this.Jc.length)for(l=b-0,m=e-0-1,g=this.Jc.length,r=n=this.ay(this.Jc,l);r!==g&&(p=this.Jc[r],p>=l&&p<m||!(p>=m));++r);if(this.qT()){if(0!==b&&(p=b-0-1,!(XODText.xe.$g(this.qf,p)||XODText.xe.$g(this.Jc,p)||this.Ph(this.Na.charAt(b))||this.Ph(this.Na.charAt(b-1)))))continue;if(e!==a&&(p=e-0-1,!(XODText.xe.$g(this.qf,p)||XODText.xe.$g(this.Jc,p)||this.Ph(this.Na.charAt(e-1))||this.Ph(this.Na.charAt(e)))))continue}break}return new XODText.yx("",b,e,"",-1,-1)},Ph:function(b){return Object.jr(this.La,
b)?!0:this.ot(b)||this.zN(b)},ay:function(b,e){var c=b.indexOf(e);0>c&&(c=~c);return c},Dt:function(b){b=b.charCodeAt(0);if(39===b||8217===b)b=39;else if(34===b||8220===b||8221===b)b=34;return String.fromCharCode(b)},il:function(b){var e=b;b=b.charCodeAt(0);return"-"===e||8208===b||8209===b||65293===b||173===b},yN:function(b){var e=b;b=b.charCodeAt(0);return","===e||65292===b||65294===b},zN:function(b){var e=b;b=b.charCodeAt(0);return 32<b&&48>b||57<b&&65>b||90<b&&97>b||122<b&&127>b||this.yN(e)||
this.il(e)||173===b||1642<=b&&(1645>=b||8210<=b&&8231>=b||8240<=b&&8269>=b||8592<=b&&9215>=b||12441<=b&&12444>=b||65281<=b&&65291>=b||65295===b||65306<=b&&65312>=b||65344===b||65371<=b&&65374>=b)?!0:!1},ot:function(b){b=b.charCodeAt(0);return 32===b||1<=b&&31>=b||160===b||8192<=b&&(8207>=b||8232<=b&&8239>=b||8298<=b&&8303>=b)?!0:!1},Qx:function(b){if(0>b||b>=this.Ae.length)return!1;this.jb=this.Na="";this.Fd.clear();this.qf.clear();this.Jc.clear();var e=this.fr(),c=[],a=[];if(e){var d=this.Ae[b].text;
if(!d.ready())return!1;b=d.Xa;c=d.Vc;a=d.he();this.Tg.clear();this.ey&&this.by.clear()}else{d=this.Ae[b].text;if(!d.ready())return!1;b=d.Xa}if(0>=b.length)return!1;for(var d="",g=b.length,k=-1,h=0;h<g;++h){var l=b.charAt(h),n=-1;e&&(n=c[h]);if("\n"===l){for(l=h-1;0<=l&&" "===b.charAt(l);)--l;if(!(0>l||this.il(b.charAt(l)))){for(l=h+1;l<g&&" "===b.charAt(l);)++l;l>=g||this.il(b.charAt(l))||(d+=" ",this.Fd.add(this.jb.length),this.jb+=" ",e&&(k=k<n?n:k,this.Kx(n,a,8*h)))}}else if(" "===l)h<g-1&&("\n"===
b.charAt(h+1)||" "===b.charAt(h+1))||(d+=l,this.Fd.add(this.jb.length),this.jb+=l,e&&(k=k<n?n:k,this.Kx(n,a,8*h)));else{if(this.il(l))if(this.Aj)d+=this.Dt(l),this.Fd.add(this.jb.length);else{var m=d.length-1;h<g-1&&"\n"===b.charAt(h+1)?this.qf.add(m):this.Jc.length&&m===this.Jc[this.Jc.length-1]||this.Jc.add(m)}else d+=this.Dt(l),this.Fd.add(this.jb.length);this.jb+=l;e&&(k=k<n?n:k,this.Kx(n,a,8*h))}}console.assert(d.length===this.Fd.length);this.Na=d;if(e){g=this.Tg.length;this.nn.clear();for(h=
0;h<k+1;++h)this.nn.add(!0);for(h=0;h<g;++h)n=this.Tg[h],0<=n&&(this.nn[n]=!1)}this.mv()||(this.Na=this.Na.toLowerCase());this.qf.sort();this.Jc.sort();this.ag.sort();return!0},Kx:function(b,e,c){this.Tg.add(b);if(this.ey)for(b=c;b<c+8;++b)this.by.add(e[b])},kN:function(b,e,c,a,d){c?(b=this.Fd[c-1],++b):b=0;a<this.Fd.length?e=this.Fd[a]:(e=this.Fd[a-1],e===this.jb.length-1&&++e);console.assert(b>=c&&e>=a&&e>=b);if(!this.Aj){if(!XODText.xe.$g(this.ag,d-1))for(;0<e&&this.il(this.jb.charAt(e-1));)--e;
c=this.jb.length;if(!XODText.xe.$g(this.ag,-1))for(;b<c-1&&this.il(this.jb.charAt(b));)++b;e<b&&(console.assert(!1),e=b)}return new XODText.xx(b,e)},iN:function(b,e,c){console.assert(0<=e&&e<=c&&e<b.length&&c<b.length);e=b[e];b=b[c];if(e===b||e+1===b)return!0;for(c=!0;0<=e&&e<b-1;)if(!this.nn[++e]){c=!1;break}return c},wt:!1,Ae:null,$f:0,La:null,Ed:0,rt:0,mn:0,bb:0,ll:!1,jb:null,Na:null,Fd:null,Tg:null,nn:null,ml:null,Aj:!1,eE:null,qf:null,Jc:null,ag:null,by:null,ey:!1};XODText.mj=function(b){this.ka=
"";this.vt=-1;this.Ca=[];this.Oa="";this.Ae=b.Pb();this.Eb=new XODText.we;this.Eb.Qb();this.ob=[];this.yt=[];this.xt=[]};XODText.mj.prototype={he:function(){for(var b=this.Ca.length/8,e=[],c=0;c<b;++c){var a=new XODText.ab,d=8*c;a.zE(this.Ca[d],this.Ca[d+1],this.Ca[d+2],this.Ca[d+3],this.Ca[d+4],this.Ca[d+5],this.Ca[d+6],this.Ca[d+7]);e.add(a)}return e},ot:function(b){b=b.charCodeAt(0);return 32===b||1<=b&&31>=b||160===b||8192<=b&&(8207>=b||8232<=b&&8239>=b||8298<=b&&8303>=b)?!0:!1},yE:function(b,
e){this.Ca.clear();this.Oa="";e.normalize();var c=[],a="",d;for(d=b-1;d<b+2;d++)this.Cj(d)&&(c.push({idx:d,Nf:this.ka}),a+=this.ka);if(0===c.length||0===a.length||!this.Cj(b))return!1;var g=new XODText.Ka,k=Array(8),h,l,n=new XODText.Sb;n.Qb();var m,r=new XODText.Cb;r.Qb();var p=[],u=!1;for(l=this.Eb.Nq();!l.ta(n);l=l.De())if(l.sb(g),g.normalize(),!e.ur(g)){var q=[null,null],v=[null,null],w=-1;h=-1;for(m=l.Ob();!m.ta(r);m=m.fe())if(m.Rc(k),g.pm(k),!e.ur(g)){h=m.lg();var A=m.$a();-1===w&&(w=A);d=p.length;
if(0<h&&0<d){u&&("\n"!==p[0]&&(this.ot(p[d-1])?p[d-1]="\n":p.add("\n")),u=!1);for(d=0;d<p.length;++d)this.Oa+=p[d];p.clear()}for(d=0;d<=h;++d)A+d<this.ka.length&&(d<h?this.Oa+=this.ka.charAt(A+d):p.add(this.ka.charAt(A+d)));if(0<h){d=g.x2-g.x1;var B=g.y2-g.y1;this.Vg(k,Math.sqrt(d*d+B*B)/h*3)}h=A+h}u=!0;q[0]=w;for(d=m=0;d<c.length;d++)if(c[d].idx===b){m+=q[0];break}else c[d].idx<b&&(m+=c[d].Nf.length);v[0]=a.substring(Math.max(0,m-100),m);if(-1!==h){q[1]=h;for(d=m=0;d<c.length;d++)if(c[d].idx===b){m+=
h;break}else c[d].idx<b&&(m+=c[d].Nf.length);v[1]=a.substr(m+1,100)}null!==q[0]&&null!==q[1]&&this.xt.push(q);null!==v[0]&&null!==v[1]&&this.yt.push(v)}return 0<this.Ca.length},eN:function(){var b,e=new XODText.Sb;e.Qb();var c=Array(8),a=Array(8),d=.1,g=-100;for(b=this.Eb.Nq();!b.ta(e);b=b.De()){var k=new XODText.fa,h=new XODText.fa,l=new XODText.Cb;l.Qb();var n=b.Ob(),m=new XODText.Cb;m.Qb();for(var r=b.Ob();!r.ta(l);r=r.fe())m=r;n.vd(0,c);k.x=(c[0]+c[2]+c[4]+c[6])/4;k.y=(c[1]+c[3]+c[5]+c[7])/4;
m.vd(m.ec()-1,a);h.x=(a[0]+a[2]+a[4]+a[6])/4;h.y=(a[1]+a[3]+a[5]+a[7])/4;l=XODText.fa.distance(k,h);l>d&&(g=Math.atan2(h.y-k.y,h.x-k.x),g*=180/3.1415926,g=Math.round(g),0>g&&(g+=360),d=l)}this.uc=g;this.cy=2>Math.abs(this.uc)||2>Math.abs(this.uc-180)},SJ:function(b,e){this.Ca.clear();this.Oa="";e.normalize();var c=[],a="",d;for(d=b-1;d<b+2;d++)this.Cj(d)&&(c.push({idx:d,Nf:this.ka}),a+=this.ka);if(0===c.length||0===a.length||!this.Cj(b))return!1;var g=new XODText.Ka,k=Array(8),h,l,n,m=new XODText.Sb;
m.Qb();var r,p=new XODText.Cb;p.Qb();var u=[],q=!1;for(n=this.Eb.Nq();!n.ta(m);n=n.De())if(n.sb(g),g.normalize(),!e.ur(g)){var v=[null,null],w=[null,null],A=-1,B=!0;for(r=n.Ob();!r.ta(p);r=r.fe())if(r.Rc(k),g.pm(k),!e.ur(g)){h=r.lg();var z=r.$a(),x=u.length;if(0<h&&0<x){q&&("\n"!==u[0]&&(this.ot(u[x-1])?u[x-1]="\n":u.add("\n")),q=!1);for(d=0;d<u.length;++d)this.Oa+=u[d];u.clear()}var x=0,y=Array(8),F=Array(8),K=!1,G=!1;for(l=0;l<h;++l){var D=z+l;if(D<this.ka.length){d=Array(8);var L=new XODText.Ka;
r.vd(l,d);L.pm(d);if(e.ur(L))0===x?K=!0:G=!0;else{A=D;x++;if(1===x){if(B){v[0]=D;for(d=B=0;d<c.length;d++)if(c[d].idx===b){B+=D;break}else c[d].idx<b&&(B+=c[d].Nf.length);w[0]=a.substring(Math.max(0,B-100),B);B=!1}K&&r.vd(l,y)}r.vd(l,F);l<h?this.Oa+=this.ka.charAt(D):u.add(this.ka.charAt(D))}}}"\n"!=u[h]&&u.push(" ");0<x&&(K&&this.$k(k,y,!0),G&&this.$k(k,F,!1),g.pm(k),h=g.x2-g.x1,z=g.y2-g.y1,this.Vg(k,Math.sqrt(h*h+z*z)/x*3))}q=!0;if(-1!==A){v[1]=A;for(d=r=0;d<c.length;d++)if(c[d].idx===b){r+=A;break}else c[d].idx<
b&&(r+=c[d].Nf.length);w[1]=a.substr(r+1,100)}null!==v[0]&&null!==v[1]&&this.xt.push(v);null!==w[0]&&null!==w[1]&&this.yt.push(w)}return 0<this.Ca.length},NR:function(b,e,c){for(var a=[],d=-1,g="",k=0;k<e.length;k++){var h=this.$R(b,e[k][0],e[k][1]);if(h.status)-1!==d||void 0===h.em||null===h.em||isNaN(h.em)||(d=h.em),h.em===d&&Array.prototype.push.apply(a,h.value),g+=this.Oa;else break}-1===d&&(d=0);return 0===a.length?{status:!1}:g.replace(/( |\n)/gm,"")!==c.replace(/( |\n)/gm,"")?{status:!1}:{status:!0,
value:a,em:d}},$R:function(b,e,c,a){if(20>=e.length||20>=c.length)return{status:!1};var d=[],g="",k=[],h=!0,l=0,n,m;for(n=b-1;n<b+2;n++)if(this.Cj(n))if(d.push({idx:n,Nf:this.ka}),g+=this.ka,null!==this.Ae[n].text.pn){for(m=0;m<this.Ae[n].text.pn.length;m++)k.push(this.Ae[n].text.pn[m]+l);l+=this.ka.length}else h=!1;if(0===d.length||0===g.length)return{status:!1};l=[];n=0;h?(m=g.replace(/( |\n)/gm,""),e=e.replace(/( |\n)/gm,"")):m=g;for(;!(0===m.length||m.length<e.length||(b=m.indexOf(e),0>b));)l.push(n+
b+e.length),m=m.substr(b+1),n+=b+1;if(0===l.length)return{status:!1};e=[];n=l[0]+1;h?(m=g.replace(/( |\n)/gm,"").substring(l[0]+1),c=c.replace(/( |\n)/gm,"")):m=g.substring(l[0]+1);for(;!(0===m.length||m.length<c.length||(b=m.indexOf(c),0>b));)e.push(n+b),m=m.substr(b+1),n+=b+1;if(0===e.length)return{status:!1};c=[];for(n=0;n<l.length;n++)for(m=0;m<e.length;m++)if(l[n]+1<=e[m]&&(b=[],b.push(l[n]),b.push(e[m]),c.push(b)),1<c.length)return{status:!1};if(1!==c.length)return{status:!1};if(h){for(n=0;n<
k.length&&!(c[0][0]<k[n]);n++)c[0][0]++;for(n=0;n<k.length&&!(c[0][1]<k[n]);n++)c[0][1]++}h=[0,0];k=-1;for(n=l=0;n<d.length;n++){e=d[n].Nf;if(c[0][0]>=l&&c[0][0]<l+e.length){k=d[n].idx;h[0]=c[0][0]-l;break}l+=e.length}if(-1===k)return{status:!1};m=-1;for(n=l=0;n<d.length;n++){e=d[n].Nf;if(c[0][1]>=l&&c[0][1]<l+e.length){m=d[n].idx;h[1]=c[0][1]-l;break}l+=e.length}if(-1===m)return{status:!1};if(k===m)d=this.kA(k,h[0],h[1]-1);else{for(n=0;n<d.length&&d[n].idx!==k;n++);d=this.kA(k,h[0],d[n].Nf.length-
1);this.Oa=g.substring(c[0][0],c[0][1])}if(d.status){if(a&&this.Oa.replace(/( |\n)/gm,"")!==a.replace(/( |\n)/gm,""))return{status:!1};d.em=k;return d}return{status:!1}},OR:function(b,e,c){for(var a=[],d="",g=0;g<e.length;g++){var k=Number(e[g][0]),h=Number(e[g][1]);if(isNaN(k)||isNaN(h))return exports.utils.warn("getRectangularSelectionFromTextIndices: could not parse index-based selectors as numbers."),{status:!1};k=this.kA(b,k,h);if(k.status)Array.prototype.push.apply(a,k.value),d+=this.Oa;else return{status:!1}}return 0===
a.length?{status:!1}:d.replace(/( |\n)/gm,"")!==c.replace(/( |\n)/gm,"")?{status:!1}:{status:!0,value:a}},kA:function(b,e,c,a){if(!this.Cj(b))return{status:!1};var d=new XODText.Cb;d.Qb();b=new XODText.Sb;b.Qb();this.Oa=this.ka.substring(e,Math.min(c+1,this.ka.length));if(a&&this.Oa.replace(/( |\n)/gm,"")!==a.replace(/( |\n)/gm,""))return{status:!1};a=0;for(var g,k;;){if(a>=this.ob.length)return{status:!1};g=this.ob[a].Rh;k=this.ob[a].Sh;if(k.ed().$a()+k.ed().ec()>=e&&g.Ob().$a()<=e)break;a++}for(var h=
this.ob[a],l=h.Rh;;){if(l.ta(b))return{status:!1};if(this.Vh(l.fh())){if(l.ed().$a()+l.ed().ec()>=e&&l.Ob().$a()<=e)break;if(l.ta(h.Sh)||l.ta(b))return{status:!1};l=l.De()}}for(var n=l.Ob();;){if(n.ta(d))return{status:!1};if(n.$a()+n.ec()>=e&&n.$a()<=e)break;n=n.fe()}for(var m=0;;){if(m>=this.ob.length)return{status:!1};g=this.ob[m].Rh;k=this.ob[m].Sh;if(k.ed().$a()+k.ed().ec()>=c&&g.Ob().$a()<=c)break;m++}for(var r=this.ob[m].Rh;;){if(r.ta(b))return{status:!1};if(this.Vh(r.fh())){if(r.ed().$a()+
r.ed().ec()>=c&&r.Ob().$a()<=c)break;if(r.ta(h.Sh))return{status:!1};r=r.De()}}for(h=r.Ob();;){if(h.ta(d))return{status:!1};if(h.$a()+h.ec()>=c&&h.$a()<=c)break;h=h.fe()}for(var d=[],p=Array(4),u=a;u<=m;u++)if(g=this.ob[u].Rh,k=this.ob[u].Sh,u===a&&u!==m)for(g=l;!g.ta(b);g=g.De()){if(this.Vh(g.fh())){var q=Array(8);g.ta(l)?n.bo(Math.min(e-n.$a(),n.ec()-1),q):(g.Ob().sb(p),q[0]=p[0],q[1]=p[3],q[6]=p[0],q[7]=p[1]);g.ed().sb(p);q[2]=p[2];q[3]=p[3];q[4]=p[2];q[5]=p[1];d.push(q);if(g.ta(k))break}}else if(u!==
a&&u===m)for(;;g=g.De()){if(g.ta(b))return{status:!1};if(this.Vh(g.fh())&&(q=Array(8),g.ta(r)?h.bo(Math.min(c-h.$a(),h.ec()-1),q):(g.ed().sb(p),q[2]=p[2],q[3]=p[3],q[4]=p[2],q[5]=p[1]),g.Ob().sb(p),q[0]=p[0],q[1]=p[3],q[6]=p[0],q[7]=p[1],d.push(q),g.ta(r)))break}else if(u===a&&u===m)for(g=l;;g=g.De()){if(g.ta(b))return{status:!1};if(this.Vh(g.fh())&&(q=Array(8),g.ta(l)&&!g.ta(r)?(n.bo(Math.min(e-n.$a(),n.ec()-1),q),g.ed().sb(p),q[2]=p[2],q[3]=p[3],q[4]=p[2],q[5]=p[1]):!g.ta(l)&&g.ta(r)?(h.bo(Math.min(c-
h.$a(),h.ec()-1),q),g.Ob().sb(p),q[0]=p[0],q[1]=p[3],q[6]=p[0],q[7]=p[1]):g.ta(l)&&g.ta(r)?(n.bo(Math.min(e-n.$a(),n.ec()-1),q),p[0]=q[6],p[1]=q[7],p[2]=q[2],p[3]=q[3],h.bo(Math.min(c-h.$a(),h.ec()-1),q),q[0]=p[0],q[1]=p[3],q[6]=p[0],q[7]=p[1]):(g.Ob().sb(p),q[0]=p[0],q[1]=p[3],q[6]=p[0],q[7]=p[1],g.ed().sb(p),q[2]=p[2],q[3]=p[3],q[4]=p[2],q[5]=p[1]),d.push(q),g.ta(r)))break}else for(;!(g.ta(b)||this.Vh(g.fh())&&(q=Array(8),g.Ob().sb(p),q[0]=p[0],q[1]=p[3],q[6]=p[0],q[7]=p[1],g.ed().sb(p),q[2]=p[2],
q[3]=p[3],q[4]=p[2],q[5]=p[1],d.push(q),g.ta(k)));g=g.De());return{status:!0,value:d}},QJ:function(b,e){this.Ca.clear();this.Oa="";var c=[],a="",d;for(d=b-1;d<b+2;d++)this.Cj(d)&&(c.push({idx:d,Nf:this.ka}),a+=this.ka);if(0===c.length||0===a.length||!this.Cj(b))return!1;var g,k,h,l,n=Array(8),m=Array(8),r=new XODText.Ka,p=new XODText.Sb,u=new XODText.Sb;p.Qb();u.Qb();var q=this.cy,v=this.cy,w,A=new XODText.Sb;A.Qb();var B=new XODText.Cb;B.Qb();var z=new XODText.fa;z.init(e.x1,e.y1);var x=new XODText.fa;
x.init(e.x2,e.y2);u=this.lN(z,x,p,u);p=u.QD;u=u.bE;if(p.ta(A)||u.ta(A))return!1;x=new XODText.Cb;z=new XODText.Cb;x.Qb();z.Qb();k=g=XODText.cd.Mk;for(var y=p.Ob();!y.ta(B);y=y.fe())y.sb(n),q?(d=e.x1,w=e.y1):(w=n[0],n[0]=n[1],n[1]=w,w=n[2],n[2]=n[3],n[3]=w,d=e.y1,w=e.x1),h=(n[3]+n[1])/2,n[2]<=d?(l=n[2]-d,h-=w,h=l*l+h*h):n[0]>=d?(l=n[0]-d,h-=w,h=l*l+h*h):(h-=w,h*=h),h<g&&(g=h,x=y);for(y=u.Ob();!y.ta(B);y=y.fe())y.sb(n),v?(d=e.x2,w=e.y2):(w=n[0],n[0]=n[1],n[1]=w,w=n[2],n[2]=n[3],n[3]=w,d=e.y2,w=e.x2),
h=(n[3]+n[1])/2,n[2]<=d?(l=n[2]-d,h-=w,h=l*l+h*h):n[0]>=d?(l=n[0]-d,h-=w,h=l*l+h*h):(h-=w,h*=h),h<k&&(k=h,z=y);if(x.ta(B)||z.ta(B))return!1;w=y=0;k=g=XODText.cd.Mk;var F=x.ec();for(d=0;d<F;++d)x.vd(d,n),l=(n[0]+n[2]+n[4]+n[6])/4,h=(n[1]+n[3]+n[5]+n[7])/4,l-=e.x1,h-=e.y1,h=l*l+h*h,h<g&&(g=h,y=d);F=z.ec();for(d=0;d<F;++d)z.vd(d,n),l=(n[0]+n[2]+n[4]+n[6])/4,h=(n[1]+n[3]+n[5]+n[7])/4,l-=e.x2,h-=e.y2,h=l*l+h*h,h<k&&(k=h,w=d);g=y+x.$a();k=w+z.$a();k<g&&(d=g,g=k,k=d);this.xt.push([g,k]);h=[null,null];for(d=
l=0;d<c.length;d++)if(c[d].idx===b){l+=g;break}else c[d].idx<b&&(l+=c[d].Nf.length);h[0]=a.substring(Math.max(0,l-100),l);for(d=g=0;d<c.length;d++)if(c[d].idx===b){g+=k;break}else c[d].idx<b&&(g+=c[d].Nf.length);h[1]=a.substr(g+1,100);null!==h[0]&&null!==h[1]&&this.yt.push(h);k=p.pb;d=u.pb;c=x.pb;a=z.pb;if(k===d){c>a&&(k=x,x=z,z=k,k=y,y=w,w=k);p.sb(r);if(c===a&&y===w&&(k=new XODText.Ka,!k.kv(r,e)))return!1;c===a?(w<y&&(k=y,y=w,w=k),k=w):k=x.lg();x.vd(y,n);console.assert(q===v);q=x.$a();console.assert(y<=
k);for(v=y;v<=k;++v)q+v<this.ka.length&&(this.Oa+=this.ka.charAt(q+v));0<=k&&(x.Rc(m),q=m[0]-m[2],v=m[1]-m[3],q=Math.sqrt(q*q+v*v),q=q/(k+1)*3,this.$k(m,n,!0),c===a&&(r=Array(8),z.vd(w,r),this.$k(m,r,!1)),this.Vg(m,q));for(y=x=x.fe();!y.ta(B)&&y.pb<z.pb;y=y.fe()){k=y.lg();q=y.$a();for(v=0;v<=k;++v)q+v<this.ka.length&&(this.Oa+=this.ka.charAt(q+v));0<k&&(y.Rc(m),q=m[0]-m[2],v=m[1]-m[3],q=Math.sqrt(q*q+v*v),q=q/k*3,this.Vg(m,q))}z.vd(w,n);k=z.lg();if(c!==a){q=z.$a();console.assert(w<=k);for(v=0;v<=
w;++v)q+v<this.ka.length&&(this.Oa+=this.ka.charAt(q+v));0<k&&(z.Rc(m),q=m[0]-m[2],v=m[1]-m[3],q=Math.sqrt(q*q+v*v),q=q/k*3,this.$k(m,n,!1),this.Vg(m,q))}}else{k>d&&(q=p,p=u,u=q,k=x,x=z,z=k,k=y,y=w,w=k);p.sb(r);k=new XODText.Ka;k.kv(r,e)||(x=p.Ob(),y=0);x.vd(y,n);k=x.lg();q=x.$a();console.assert(y<=k);for(v=y;v<=k;++v)q+v<this.ka.length&&(this.Oa+=this.ka.charAt(q+v));0<k&&(x.Rc(m),q=m[0]-m[2],v=m[1]-m[3],q=Math.sqrt(q*q+v*v),q=q/k*3,this.$k(m,n,!0),this.Vg(m,q));for(y=x=x.fe();!y.ta(B);y=y.fe()){k=
y.lg();q=y.$a();for(v=0;v<=k;++v)q+v<this.ka.length&&(this.Oa+=this.ka.charAt(q+v));0<k&&(y.Rc(m),q=m[0]-m[2],v=m[1]-m[3],q=Math.sqrt(q*q+v*v),q=q/k*3,this.Vg(m,q))}for(p=p.De();!p.ta(u)&&!p.ta(A);p=p.De())if(this.Vh(p.fh()))for(p.sb(r),y=p.Ob();!y.ta(B);y=y.fe()){k=y.lg();q=y.$a();for(v=0;v<=k;++v)q+v<this.ka.length&&(this.Oa+=this.ka.charAt(q+v));0<k&&(y.Rc(m),q=m[0]-m[2],v=m[1]-m[3],q=Math.sqrt(q*q+v*v),q=q/k*3,this.Vg(m,q))}u.sb(r);k=new XODText.Ka;k.kv(r,e)||(z=u.CH(u.kh()-1),w=z.ec()-1);for(y=
u.Ob();!y.ta(B)&&!y.ta(z);y=y.fe()){k=y.lg();q=y.$a();for(v=0;v<=k;++v)q+v<this.ka.length&&(this.Oa+=this.ka.charAt(q+v));0<k&&(y.Rc(m),q=m[0]-m[2],v=m[1]-m[3],q=Math.sqrt(q*q+v*v),q=q/k*3,this.Vg(m,q))}z.vd(w,n);k=z.lg();q=z.$a();console.assert(w<=k);for(v=0;v<=w;++v)q+v<this.ka.length&&(this.Oa+=this.ka.charAt(q+v));0<k&&(z.Rc(m),q=m[0]-m[2],v=m[1]-m[3],q=Math.sqrt(q*q+v*v),q=q/k*3,this.$k(m,n,!1),this.Vg(m,q))}return 0<this.Ca.length},Cj:function(b){if(0>b||b>=this.Ae.length)return!1;if(0>=this.vt||
this.vt!==b){var e=this.Ae[b].text;if(null==e||!e.ready())return!1;this.Eb=e;this.ka=this.Eb.Xa;this.eN();this.dN();this.vt=b}return!0},Vg:function(b,e){var c=this.Ca.length/8;if(c){for(var a=Array(8),c=8*(c-1),d=0;8>d;++d)a[d]=this.Ca[c+d];if(XODText.ab.At(a,b,!0,e))for(d=0;8>d;++d)this.Ca[c+d]=a[d];else for(d=0;8>d;++d)this.Ca.add(b[d])}else for(var d=0;8>d;++d)this.Ca.add(b[d])},$k:function(b,e,c){var a=new XODText.fa;a.init(b[0],b[1]);var d=new XODText.fa;d.init(b[2],b[3]);var g=XODText.fa.tg(d,
a);g.normalize()&&(c?(d=new XODText.fa,d.init(e[0],e[1]),e=XODText.fa.tg(d,a).cc(g),g=XODText.fa.multiply(g,e),b[0]+=g.x,b[1]+=g.y,b[6]+=g.x,b[7]+=g.y):(a=new XODText.fa,a.init(e[2],e[3]),e=XODText.fa.tg(a,d).cc(g),g=XODText.fa.multiply(g,e),b[2]+=g.x,b[3]+=g.y,b[4]+=g.x,b[5]+=g.y))},WD:function(b){var e=XODText.Matrix2D.rotationMatrix(0),c=XODText.Matrix2D.rotationMatrix(1.570796325),a=XODText.Matrix2D.rotationMatrix(3.14159265),d=XODText.Matrix2D.rotationMatrix(3.14159265*1.5);switch(parseInt(b/
90+.1)){case 0:return e;case 1:return c;case 2:return a;case 3:return d;case 4:return e;default:return e}},Vh:function(){return!0},GE:function(b,e){var c=this.WD(e),a=new XODText.Cd(b.x1,b.y1),a=c.W(a);b.x1=a.x;b.y1=a.y;a=new XODText.Cd(b.x2,b.y2);a=c.W(a);b.x2=a.x;b.y2=a.y;b.normalize()},dN:function(){this.ob.clear();var b,e=new XODText.Sb;e.Qb();var c=new XODText.Ka,a=new XODText.It,d=!1;for(b=this.Eb.Nq();!b.ta(e);b=b.De())if(this.Vh(b.fh())){b.sb(c);c.normalize();var g=new XODText.Ka;g.oh(c);
this.GE(c,this.uc);d?(this.ob.add(a),a=new XODText.It,a.fy.oh(g),a.sf.oh(c),a.Rh=b,a.Sh=b):(a.fy.oh(g),a.sf.oh(c),a.Rh=b,a.Sh=b,d=!0)}d&&this.ob.add(a)},ND:function(b,e){for(var c=XODText.cd.Mk,a=new XODText.Ka,d=b.Rh,g=b.Rh;;g=g.De()){if(!this.Vh(g.fh()))if(g.ta(b.Sh))break;else continue;g.sb(a);this.GE(a,this.uc);var k=(a.y1+a.y2)/2;Math.abs(k-e.y)<c&&(d=g,c=Math.abs(k-e.y));if(g.ta(b.Sh))break}return d},qs:function(b,e,c){var a=XODText.fa.tg(e,b),d=XODText.fa.tg(c,b),g=d.cc(a);if(0>=g)return d.cc(d);
d=a.cc(a);if(d<=g)return c=XODText.fa.tg(c,e),c.cc(c);b=XODText.fa.Ho(b,XODText.fa.multiply(a,g/d));c=XODText.fa.tg(c,b);return c.cc(c)},jx:function(b,e){var c=this.qs(new XODText.fa(e.x1,e.y1),new XODText.fa(e.x2,e.y1),b),a=this.qs(new XODText.fa(e.x2,e.y1),new XODText.fa(e.x2,e.y2),b),d=this.qs(new XODText.fa(e.x2,e.y2),new XODText.fa(e.x1,e.y2),b),g=this.qs(new XODText.fa(e.x1,e.y2),new XODText.fa(e.x1,e.y1),b);return Math.min(c,a,d,g)},lN:function(b,e,c,a){var d=-1,g=-1,k=!1,h=!1,l=this.WD(this.uc),
n=new XODText.fa,m=new XODText.fa;n.jv(b);m.jv(e);b=new XODText.Cd(n.x,n.y);b=l.W(b);n.x=b.x;n.y=b.y;b=new XODText.Cd(m.x,m.y);b=l.W(b);m.x=b.x;m.y=b.y;e=0;for(var r=this.ob.length;e<r;++e)l=this.ob[e],0>d&&l.sf.contains(n.x,n.y)&&(d=e,h=!0),0>g&&l.sf.contains(m.x,m.y)&&(g=e,k=!0);if(!h||!k){b=[];for(l=0;l<this.ob.length;++l)b.add(0);var l=Math.max(d,g),p=new XODText.Ka;p.Da(n.x,n.y,m.x,m.y);p.OS(.1);0<=l&&p.union(this.ob[l].sf);var u=new XODText.Ka;e=0;for(r=this.ob.length;e<r;++e){var q=new XODText.Ka;
q.oh(this.ob[e].sf);u.kv(q,p)&&(b[e]=1)}e=b.indexOf(1);for(p=r=b.indexOf(1);-1!==r;){p=r;r++;if(r>=b.length)break;r=b.indexOf(1,r)}r=p;if(0>e)return new XODText.Fs(c,a);0>l?(d=e,g=r,h=new XODText.Ka,h.oh(this.ob[d].sf),k=(n.x-h.x1)*(n.x-h.x2),k=0<k?Math.min(Math.abs(n.x-h.x1),Math.abs(n.x-h.x2)):0,l=(n.y-h.y1)*(n.y-h.y2),l=0<l?Math.min(Math.abs(n.y-h.y1),Math.abs(n.y-h.y2)):0,b=(m.x-h.x1)*(m.x-h.x2),b=0<b?Math.min(Math.abs(m.x-h.x1),Math.abs(m.x-h.x2)):0,e=(m.y-h.y1)*(m.y-h.y2),e=0<e?Math.min(Math.abs(m.y-
h.y1),Math.abs(m.y-h.y2)):0,k*k+l*l>b*b+e*e&&(h=d,d=g,g=h)):(p=new XODText.Ka,p.oh(this.ob[l].sf),b=new XODText.fa,h?b.jv(m):b.jv(n),console.assert(!(h&&k)&&!(!h&&!k)),console.assert(!p.contains(b.x,b.y)),l-e>Math.max(r-l,0)?(k=Math.min(l,e),p=r):(k=Math.max(l,r),p=e),k!=l&&(e=Array(3),r=Array(3),e[0]=this.jx(b,this.ob[p].sf),e[1]=this.jx(b,this.ob[k].sf),e[2]=this.jx(b,this.ob[l].sf),r[0]=p,r[1]=k,r[2]=l,k=1,e[0]<e[1]&&(k=0),e[2]<e[k]&&(k=2),k=r[k]),h?g=k:d=k)}0<=d&&0<=g&&(c=this.ND(this.ob[d],n,
c),a=this.ND(this.ob[g],m,a));return new XODText.Fs(c,a)},Ca:null,Oa:null,Ae:null,Eb:null,vt:0,uc:0,cy:!1,ob:null};XODText.Nh=function(b,e,c,a,d,g){this.pw=b;this.kB=e;this.DB=c;this.VE=a;this.IJ=d;this.HJ=g};XODText.Nh.prototype={pw:0,kB:0,DB:null,VE:null,IJ:0,HJ:0};XODText.Fs=function(b,e){this.QD=b;this.bE=e};XODText.Fs.prototype={QD:null,bE:null};XODText.xx=function(b,e){this.xE=b;this.JD=e};XODText.xx.prototype={xE:0,JD:0};XODText.yx=function(b,e,c,a,d,g){this.Vx=b;this.bt=e;this.$s=c;this.Ps=
a;this.Ht=d;this.Gt=g};XODText.yx.prototype={Vx:null,bt:0,$s:0,Ps:null,Ht:0,Gt:0};XODText.it.Ma("XODText._intData");XODText.Cd.Ma("XODText.Point2D");XODText.ab.Ma("XODText.Quad");XODText.Matrix2D.Ma("XODText.Matrix2D");XODText.Rp.Ma("XODText._highlights");XODText.Qp.Ma("XODText._highlight");XODText.Xx.Ma("XODText._highlightDocInfo");XODText.It.Ma("XODText._selectionTextBlock");XODText.ib.Ma("XODText.SearchMode");XODText.kc.Ma("XODText.ResultCode");XODText.xe.Ma("XODText.TextSearchLowlevel");XODText.mj.Ma("XODText.TextLocator");
XODText.Nh.Ma("XODText.ResultRun");XODText.Fs.Ma("XODText.ResultFindStructuralBounds");XODText.xx.Ma("XODText.ResultDetermineOriRange");XODText.yx.Ma("XODText.ResultFindTexts");XODText.it.cD=-2147483648;XODText.ab.gP=Math.cos(3.14159265/180*2);XODText.ib.dG=1;XODText.ib.hG=2;XODText.ib.oz=4;XODText.ib.fG=8;XODText.ib.eG=16;XODText.ib.cG=32;XODText.ib.gG=64;XODText.ib.iG=128;XODText.kc.Al=0;XODText.kc.wu=1;XODText.kc.Aq=2})();self.tc.gw("XODText");
XODText.Mg=function(){this.BD={};this.gy=1E3;this.gE=200};XODText.Mg.prototype={hE:0,iE:0,gy:0,gE:0,Gz:function(b){var f=new XODText.Ka,e=this.BD[b];"undefined"!=typeof e?f.oh(e):window.utils.warn("Character "+b+" does not have bounding box.");return f},Qt:function(b,f,e){var c=new XODText.Ka;c.set(f,this.hE,e,this.iE);this.BD[b]=c},To:function(b,f){this.hE=b;this.iE=f},pK:function(b){this.gy=b}};XODText.sx=function(b){this.Bz={};this.jd=!1;this.ma=b};
$.extend(XODText.sx.prototype,{jd:!1,isReady:function(){return this.jd},PZ:function(){return this.Bz},vB:function(b){try{var f=new window.Re(b);console.assert("FontInfo"===f.ua(),"Root element is incorrect.");"FontInfo"===f.ua()&&(f.oa(),this._parse(f))}catch(e){console.warn("Font Parser has encountered an error: "+e.message);return}this.jd=!0},ct:function(b){var f="",e=0,c,a,d;for(2<=b.length&&"{"===b.charAt(0)&&"}"===b.charAt(1)&&(b=b.substr(2));e<b.length;)c=b.charCodeAt(e),128>c?(f+=String.fromCharCode(c),
e++):191<c&&224>c?(a=b.charCodeAt(e+1),f+=String.fromCharCode((c&31)<<6|a&63),e+=2):(a=b.charCodeAt(e+1),d=b.charCodeAt(e+2),f+=String.fromCharCode((c&15)<<12|(a&63)<<6|d&63),e+=3);return f},GN:function(b){b=b.K("name");console.assert(42===b.length,"Font file name is incorrect.");console.assert(null!=b,"Font file name is incorrect.");return window.ef.Qz(this.ma,parseInt("0x"+b.substr(28,8)))},FN:function(b,f){console.assert(null!=f,"Font bbox file is corrupted.");var e=b.K("height");console.assert(null!=
e,"Height attribute is missing.");e=e.split(":");f.To(parseFloat(e[0]),parseFloat(e[1]))},HN:function(b,f){var e=b.K("units_per_em");null!=e&&f.pK(parseInt(e))},EN:function(b,f){console.assert(null!=f,"Font bbox file is corrupted.");var e=b.K("bbox");console.assert(null!=e,"Character width is missing.");var c=e.split(":"),e=parseFloat(c[0]),c=parseFloat(c[1]),a=this.ct(b.current.textContent);console.assert(0<a.length,"Char value is empty.");f.Qt(a,e,c)},_parse:function(b){do{for(var f=null;b.advance();){var e=
b.ua();"Font"===e?(f=new XODText.Mg,e=this.GN(b),this.FN(b,f),this.HN(b,f),this.Bz[e]=f,b.oa()):"c"===e?this.EN(b,f):console.warn("Font XML parser has encountered a tag it can't process.")}b.Ba()}while(b.depth)}});XODText.Mg.Ma("XODText.Font");XODText.sx.Ma("XODText.FontParser");
(function(b){function f(a){this.done=!1;this.worker=new Worker(b.o.Uz()+"CoreWorker.js");var c=null,e=null,h=this;this.index=a;this.worker.addEventListener("message",function(a){switch(a.data.command){case "done":h.done=!0;e=null;break;case "nextChunk":c=a.data.resources;e=a.data.dataString;break;default:throw Error("Unknown message command "+a.data.command+" from worker");}h.done?(h.gu(null,[]),h.finish()):c&&e&&(h.gu(e,c),e=c=null)},!1);this.LX()}var e=[],c=[],a="../core/";f.prototype={setData:function(a,
b,c){this.gu=b;this.done=!1;this.worker.postMessage({command:"data",dataString:a,docId:c})},cancel:function(){this.worker.postMessage({command:"cancel"})},LX:function(){this.worker.postMessage({command:"options",imageScaling:b.o.xy,specialBlendSupported:b.utils.specialBlendSupported,continueWithoutPrompt:0<b.Km})},Hv:function(){this.worker.postMessage({command:"nextChunk"})},finish:function(){this.done=!0;if(c.length){var a=c[0];c.shift();this.setData(a.data,a.gu,a.ma);a.RS(this)}}};b.oS=function(a,
b,k,h){for(var l=e.length,n,m=0;m<l;++m)e[m].done&&(n=e[m]);n||4>l&&(n=e[l]=new f(l));n?(n.setData(a,h,b),k(n)):c.push({RS:k,data:a,ma:b,gu:h})};b.o=b.o||{};b.o.xy=!1;b.o.wi=function(){return a};b.o.EW=function(d){d.lastIndexOf("/")!==d.length-1&&(d+="/");a=d}})(window);
(function(b){function f(){r.uI||(r.uI=createPromiseCapability());return r.uI}function e(a,d){var b=Error.apply(this,arguments);b.name=this.name="WorkerError";this.stack=b.stack;this.message=b.message;this.userMessage=d}function c(a){u.push(a);for(var d=0;d<q.length;++d)a(q[d])}function a(a,h,f){if(_.isUndefined(a))return null;var l,v=new Promise(function(d,g){c(function(){g(new e("The worker has encountered an error",b.utils.ie?"error.EmsWorkerErrorIE":"error.EmsWorkerError"))});var f={};k&&(f.workerHeapSize=
k);n&&(f.pdfResourcePath=n);m&&(f.pdfAsmPath=m);var v=window.location.href,u=v.lastIndexOf("/",v.lastIndexOf("#"));-1!==u&&(f.parentUrl=v.substring(0,u+1));l=new window.RM(a,h,f);l.nq=w.Kz();l.vC.then(function(){d()},function(a){g(a)})}),u=new Promise(function(a,d){if(b.utils.isJSWorker&&b.jsworker&&b.jsworker.utils)"android"!==b.jsworker.platform&&"ios"!==b.jsworker.platform||!b.jsworker.utils.getResourcesDir?b.jsworker.utils.getHTMLContentPath?b.jsworker.utils.getHTMLContentPath(function(b){b?(b.endsWith("/")||
(b+="/"),a(b+"js/html5/pdf/")):d(new e("Couldn't fetch resource file path."))}):d(new e("Some functions required for fetching resources are not defined.")):b.jsworker.utils.getResourcesDir(function(b,c){b?d(b):a(c)});else{var c=new XMLHttpRequest;c.open("GET",window.o.Xu()+"pdfnet.res",!0);c.responseType="arraybuffer";c.onload=function(){200===c.status?a(c.response):d(new e("Couldn't fetch resource file.","error.ResourceLoadError"))};c.onerror=function(){d(new e("Network error","error.ResourceLoadError"))};
c.send(null)}});return Promise.all([v,u]).then(function(a){var d=/(ENTERP|ENTCPU|WEBCPU|OEM):/;f&&!d.test(f)&&(f=void 0,console.warn("WebViewer is currently running in demo mode, please provide a commercial license key to remove demo stamps"));return b.utils.isJSWorker&&b.jsworker&&b.jsworker.utils?l.GT(a[1],f):l.FT(a[1],f)}).then(function(){"undefined"!==typeof d&&l.PB(d);"undefined"!==typeof g&&l.ww(g);return l})["catch"](function(a){a.message&&-1!==a.message.indexOf("Bad License Key")&&(a.userMessage=
"error.InvalidLicenseKey");throw a;})}var d,g,k,h;b.Gw=b.utils.chromeHasSubzero;var l,n,m,r={},p,u=[],q=[],v=_.throttle(function(a){var d=u.length;q.push(a);for(var b=0;b<d;++b)u[b](a)},100,{trailing:!1});e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,configurable:!0}});b.o=b.o||{};var w=b.o,A;w.Ou=function(){return A};w.bK=function(a){A=a};w.HR=function(){return new Promise(function(a){var d;try{d=window.parent&&window.parent.WebViewer?window.parent.WebViewer.l():void 0,
a(d)}catch(b){window.parent.postMessage("requestl","*"),$(window).on("message.l",function(d){d=d.originalEvent;"object"===typeof d.data&&"responsel"===d.data.type&&(a(d.data.value),$(window).off("message.l"))})}})};w.bH=function(a){return a?Promise.resolve(a):b._trnDebugMode?Promise.resolve():(""+location).split("").reverse().join("").match(/(moc\.nortfdp\.[^.]+\/\/|moc\.nortfdp\/\/)/)||b.jsworker?Promise.resolve(""):w.HR().then(function(a){return a?a:null})};w.ZH=function(a){return!a||50>a.length||
"demo:"!==a.slice(0,5)?!1:0<a.slice(5,a.lastIndexOf(":")).match(/^[a-zA-Z0-9.!#$%&\u2019*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/).length};var B={};w.Ew=function(a){a.pdf&&(B.Ki=a.pdf);a.office&&(B.xr=a.office)};w.Cf=function(){return B};w.PB=function(a){d=a;w.Cf().Ki&&w.Cf().Ki.then(function(d){d.PB(a)})};w.ww=function(a){g=a;w.Cf().Ki&&w.Cf().Ki.then(function(a){a.ww(g)})};w.hQ=function(a){b.utils.chromeHasSubzero&&(b.Gw=a)};w.gI=function(){return b.Gw};var z=b.PDFNet&&b.PDFNet.hasFullAPI;
w.fQ=function(a){z=a};w.Bi=function(){return z};w.cW=function(a){a.lastIndexOf("/")!==a.length-1&&(a+="/");l=a};w.xR=function(){return m||w.wi()+"pdf/"+(w.Bi()?"full/":"lean/")};w.aW=function(a){a.lastIndexOf("/")!==a.length-1&&(a+="/");m=a};w.Yz=function(){return l||w.wi()+"pdf/"+(w.Bi()?"full/":"lean/")};w.bW=function(a){a.lastIndexOf("/")!==a.length-1&&(a+="/");n=a};w.Xu=function(){return n||w.wi()+"pdf/"};w.xQ=function(a){p=a};var x;w.TV=function(a,d){d||a.lastIndexOf("/")===a.length-1||(a+="/");
x=a};w.Uz=function(){return x||w.wi()};w.EV=function(a){k=a};var y,F,K;w.MR=function(){return F};w.Lz=function(){K||(K=new Promise(function(a){if(p)a(p);else if(b.utils.isJSWorker&&b.jsworker)a("jsworker");else if(b.utils.isPdfjs)a(void 0);else if(b.utils.isChrome){var d=!0,c=$('<embed name="simple_module" id="simple_module" width=0 height=0 src="'+window.o.Xu()+'SimpleWorker.nmf" type="application/x-pnacl" style="position:absolute" />'),g=c[0];g.addEventListener("error",function(){d&&(console.log("PNaClError: PNaCl failed to load. Falling back to Emscripten."),
d=!1);a("ems")},!0);$(document.body).prepend(c);var e=!1,k=function(d){e||(a(d),clearTimeout(h),c.remove(),e=!0)};if("undefined"===typeof g.postMessage)d&&(console.log("PNaClError: PNaCl seems to be disabled. Falling back to Emscripten."),d=!1),k("ems");else{var h,f=function(){d&&(console.log("PNaClError: PNaCl Timed out. Falling back to Emscripten."),d=!1);k("ems")};g.addEventListener("progress",function(){clearTimeout(h);h=setTimeout(f,5E3)});g.addEventListener("message",function(a){clearTimeout(h);
"T"===a.data?k("pnacl"):(console.log("PNaClError: PNaCl responded incorrectly. Falling back to Emscripten."),k("ems"))});g.postMessage("T");h=setTimeout(f,5E3)}}else a("ems")}));return K};w.Kz=function(){return r.nq};w.rR=function(){return f().promise};w.gJ=function(a,d,c){w.Cf().Ki&&a===w.Kz()||(f().resolve(a),_.isUndefined(c)&&(c={}),c.workerId="pdf_pnacl_module",c.pnaclWorkerPath=window.o.Yz()+(b.Gw?"PDFWorkerSubzero.nmf":"PDFWorker.nmf"),c.emsWorkerPath=window.o.Xu()+(k||n||m?"ResizableWorker.js":
"PDFworker.js"),c.wC=r,l&&(c.pdfWorkerPath=l),y=w.hJ(a,d,c))};w.hJ=function(a,d,g){g=g||{};var k;return new Promise(function(h,f){function l(a){function d(b){"object"===typeof b.data&&"action"in b.data&&"workerLoaded"===b.data.action&&(a.workerLoadingProgress&&a.workerLoadingProgress(1),k.removeEventListener("message",d))}var k;c(function(){f(new e("The worker has encountered an error",b.utils.ie?"error.EmsWorkerErrorIE":"error.EmsWorkerError"))});k=g.emsWorkerPath.toLowerCase().startsWith("http")?
new Worker(window.o.Uz()+"CORSWorker.js#isfull="+w.Bi()+"&file="+encodeURIComponent(g.emsWorkerPath)+"&path="+encodeURIComponent(window.o.Yz().slice(0,-9))):g.pdfWorkerPath?new Worker(g.emsWorkerPath+"?isfull="+w.Bi()+"&pdfWorkerPath="+encodeURIComponent(g.pdfWorkerPath)):new Worker(g.emsWorkerPath+"?isfull="+w.Bi());k.onerror=v;F=!0;k.addEventListener("message",d,!1);var h=w.FL();w.jK(h?18E3/h:0);return k}function n(a,d){h(a);g.wC.nq=d}if("jsworker"===a)console.log("Attempting to load JSWorker"),
b.utils.isJSWorker&&(k=b.jsworker.loadWorker(),console.log("JSWorker loaded!"),k&&k.getProcessId(function(a){console.log("Loaded worker in process: "+a)})),F=!1,n(k,"jsworker");else if("pnacl"===a){_.isUndefined(g.useEmscriptenWhileLoading)&&(g.useEmscriptenWhileLoading=!w.gI());F=!1;var m=$('<embed name="'+g.workerId+'" id="'+g.workerId+'" width=0 height=0 src="'+g.pnaclWorkerPath+'" type="application/x-pnacl" style="position:absolute" />');$(document.body).prepend(m);var u=function(a){a.lengthComputable&&
(g.useEmscriptenWhileLoading?(k.removeEventListener("progress",u,!0),k.removeEventListener("loadend",q,!0),k.removeEventListener("crash",p,!0),k.removeEventListener("error",r,!0),n(l(d),"ems"),k.addEventListener("loadend",function(){F=!1;g.wC.nq="pnacl";d.pnaclComplete&&d.pnaclComplete(k)})):d.workerLoadingProgress&&d.workerLoadingProgress(a.loaded/a.total))},q=function(){d.workerLoadingProgress&&d.workerLoadingProgress(1);w.jK(1E3);n(k,"pnacl")},p=function(){f(new e("The Worker has Crashed.","error.PNaClCrashError"))},
r=function(){console.log("PNaClError: Main worker encountered an error. Falling back to Emscripten.");n(l(d),"ems")};k=m[0];k.addEventListener("progress",u,!0);k.addEventListener("loadend",q,!0);k.addEventListener("crash",p,!0);k.addEventListener("error",r,!0)}else"ems"===a&&n(l(d),"ems")})};w.$U=function(){y=null;B.Ki=null;B.xr=null};w.$H=function(){return h};w.iv=function(d,b,c){y||w.Cf().Ki||w.gJ(d,b);w.Ou()||w.bK(c);c=c||w.Ou();if(w.Cf().Ki){if(h&&c&&!w.ZH(c))throw Error("PDFNet was already initialized in demo mode. For solution see pdftron.com/kb_demo_init. Note that calling initPDFWorkerTransports or creating WebViewer object will also call PDFNet.initialize so your license key should be used in all of these calls.");
}else h=!c,d=Promise.all([w.bH(c),y]).then(function(d){h=!d[0]||w.ZH(d[0]);return a(d[1],F,d[0])}),w.Ew({pdf:d});return w.Cf().Ki};b.Yk=e;w.wO=c})(window);(function(b){b.WZ=function(){return 23}})("undefined"===typeof window?this:window);
(function(b){var f=b._trnDebugMode||b.aZ,e=b.BN?b.BN:{};b.utils=b.utils?b.utils:{};b.utils.warn=function(b,a){a||(a=b,b="default");f&&e[b]&&console.warn(b+": "+a)};b.utils.log=function(b,a){a||(a=b,b="default");f&&e[b]&&console.log(b+": "+a)};b.utils.error=function(b){f&&console.error(b);throw Error(b);};b.info=function(){};b.warn=function(c,a){b.utils.warn(c,a)};b.error=function(c){b.utils.error(c)}})("undefined"===typeof window?this:window);
(function(b){function f(a,d,b,g,k,h){this.Ik=16;this.XL=288;this.status=0;this.root=null;this.m=0;var f=Array(this.Ik+1),l,A,B,z,x,y,F,K=Array(this.Ik+1),G,D,L,I=new e,O=Array(this.Ik);z=Array(this.XL);var N,H=Array(this.Ik+1),M,E,C;C=this.root=null;for(x=0;x<f.length;x++)f[x]=0;for(x=0;x<K.length;x++)K[x]=0;for(x=0;x<O.length;x++)O[x]=null;for(x=0;x<z.length;x++)z[x]=0;for(x=0;x<H.length;x++)H[x]=0;l=256<d?a[256]:this.Ik;G=a;D=0;x=d;do f[G[D]]++,D++;while(0<--x);if(f[0]==d)this.root=null,this.status=
this.m=0;else{for(y=1;y<=this.Ik&&0==f[y];y++);F=y;h<y&&(h=y);for(x=this.Ik;0!=x&&0==f[x];x--);B=x;h>x&&(h=x);for(M=1<<y;y<x;y++,M<<=1)if(0>(M-=f[y])){this.status=2;this.m=h;return}if(0>(M-=f[x]))this.status=2,this.m=h;else{f[x]+=M;H[1]=y=0;G=f;D=1;for(L=2;0<--x;)H[L++]=y+=G[D++];G=a;x=D=0;do 0!=(y=G[D++])&&(z[H[y]++]=x);while(++x<d);d=H[B];H[0]=x=0;G=z;D=0;z=-1;N=K[0]=0;L=null;for(E=0;F<=B;F++)for(a=f[F];0<a--;){for(;F>N+K[1+z];){N+=K[1+z];z++;E=(E=B-N)>h?h:E;if((A=1<<(y=F-N))>a+1)for(A-=a+1,L=F;++y<
E&&!((A<<=1)<=f[++L]);)A-=f[L];N+y>l&&N<l&&(y=l-N);E=1<<y;K[1+z]=y;L=Array(E);for(A=0;A<E;A++)L[A]=new e;C=null==C?this.root=new c:C.next=new c;C.next=null;C.list=L;O[z]=L;0<z&&(H[z]=x,I.b=K[z],I.e=16+y,I.t=L,y=(x&(1<<N)-1)>>N-K[z],O[z-1][y].e=I.e,O[z-1][y].b=I.b,O[z-1][y].n=I.n,O[z-1][y].t=I.t)}I.b=F-N;D>=d?I.e=99:G[D]<b?(I.e=256>G[D]?16:15,I.n=G[D++]):(I.e=k[G[D]-b],I.n=g[G[D++]-b]);A=1<<F-N;for(y=x>>N;y<E;y+=A)L[y].e=I.e,L[y].b=I.b,L[y].n=I.n,L[y].t=I.t;for(y=1<<F-1;0!=(x&y);y>>=1)x^=y;for(x^=
y;(x&(1<<N)-1)!=H[z];)N-=K[z],z--}this.m=K[1];this.status=0!=M&&1!=B?1:0}}}function e(){this.n=this.b=this.e=0;this.t=null}function c(){this.list=this.next=null}var a=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,99,99],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,
16385,24577],h=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];b.Tm||(b.Tm={});b.Tm.WC=function(a){this.VX();this.Vw=a;this.Ww=0};b.Tm.WC.prototype={getBytes:function(a){for(var d,b=Array(1024),c=[],g=0;g<a&&0<(d=this.UX(b,0,b.length));)c[c.length]=String.fromCharCode.apply(null,b.slice(0,d)),g+=d;return g?(this.Vw=this.Vw.slice(this.Ww),this.Ww=0,c.join("")):""},QX:function(){return this.Vw.length==this.Ww?-1:this.Vw.charCodeAt(this.Ww++)&
255},Ec:function(a){for(;this.Dm<a;)this.kp|=this.QX()<<this.Dm,this.Dm+=8},Zc:function(d){return this.kp&a[d]},pc:function(a){this.kp>>=a;this.Dm-=a},Uw:function(a,d,b){var c,g,e;if(0==b)return 0;for(e=0;;){this.Ec(this.Hg);g=this.Fk.list[this.Zc(this.Hg)];for(c=g.e;16<c;){if(99==c)return-1;this.pc(g.b);c-=16;this.Ec(c);g=g.t[this.Zc(c)];c=g.e}this.pc(g.b);if(16==c)this.Zd&=32767,a[d+e++]=this.Ek[this.Zd++]=g.n;else{if(15==c)break;this.Ec(c);this.Oe=g.n+this.Zc(c);this.pc(c);this.Ec(this.jp);g=this.nL.list[this.Zc(this.jp)];
for(c=g.e;16<c;){if(99==c)return-1;this.pc(g.b);c-=16;this.Ec(c);g=g.t[this.Zc(c)];c=g.e}this.pc(g.b);this.Ec(c);this.Em=this.Zd-g.n-this.Zc(c);for(this.pc(c);0<this.Oe&&e<b;)this.Oe--,this.Em&=32767,this.Zd&=32767,a[d+e++]=this.Ek[this.Zd++]=this.Ek[this.Em++]}if(e==b)return b}this.Dk=-1;return e},WX:function(a,d,b){var c;c=this.Dm&7;this.pc(c);this.Ec(16);c=this.Zc(16);this.pc(16);this.Ec(16);if(c!=(~this.kp&65535))return-1;this.pc(16);this.Oe=c;for(c=0;0<this.Oe&&c<b;)this.Oe--,this.Zd&=32767,
this.Ec(8),a[d+c++]=this.Ek[this.Zd++]=this.Zc(8),this.pc(8);0==this.Oe&&(this.Dk=-1);return c},TX:function(a,b,c){if(null==this.Tw){var e,l=Array(288);for(e=0;144>e;e++)l[e]=8;for(;256>e;e++)l[e]=9;for(;280>e;e++)l[e]=7;for(;288>e;e++)l[e]=8;this.AC=7;e=new f(l,288,257,d,g,this.AC);if(0!=e.status)return alert("HufBuild error: "+e.status),-1;this.Tw=e.root;this.AC=e.m;for(e=0;30>e;e++)l[e]=5;this.zC=5;e=new f(l,30,0,k,h,this.zC);if(1<e.status)return this.Tw=null,alert("HufBuild error: "+e.status),
-1;this.RX=e.root;this.zC=e.m}this.Fk=this.Tw;this.nL=this.RX;this.Hg=this.AC;this.jp=this.zC;return this.Uw(a,b,c)},SX:function(a,b,c){var e,u,q,v,w,A,B,z=Array(316);for(e=0;e<z.length;e++)z[e]=0;this.Ec(5);A=257+this.Zc(5);this.pc(5);this.Ec(5);B=1+this.Zc(5);this.pc(5);this.Ec(4);e=4+this.Zc(4);this.pc(4);if(286<A||30<B)return-1;for(u=0;u<e;u++)this.Ec(3),z[l[u]]=this.Zc(3),this.pc(3);for(;19>u;u++)z[l[u]]=0;this.Hg=7;u=new f(z,19,19,null,null,this.Hg);if(0!=u.status)return-1;this.Fk=u.root;this.Hg=
u.m;v=A+B;for(e=q=0;e<v;)if(this.Ec(this.Hg),w=this.Fk.list[this.Zc(this.Hg)],u=w.b,this.pc(u),u=w.n,16>u)z[e++]=q=u;else if(16==u){this.Ec(2);u=3+this.Zc(2);this.pc(2);if(e+u>v)return-1;for(;0<u--;)z[e++]=q}else{17==u?(this.Ec(3),u=3+this.Zc(3),this.pc(3)):(this.Ec(7),u=11+this.Zc(7),this.pc(7));if(e+u>v)return-1;for(;0<u--;)z[e++]=0;q=0}this.Hg=9;u=new f(z,A,257,d,g,this.Hg);0==this.Hg&&(u.status=1);if(0!=u.status)return-1;this.Fk=u.root;this.Hg=u.m;for(e=0;e<B;e++)z[e]=z[e+A];this.jp=6;u=new f(z,
B,0,k,h,this.jp);this.nL=u.root;this.jp=u.m;return 0==this.jp&&257<A||0!=u.status?-1:this.Uw(a,b,c)},VX:function(){null==this.Ek&&(this.Ek=Array(65536));this.Dm=this.kp=this.Zd=0;this.Dk=-1;this.Sw=!1;this.Oe=this.Em=0;this.Tw=this.Fk=null},UX:function(a,d,b){var c,g;for(c=0;c<b&&(!this.Sw||-1!=this.Dk);){if(0<this.Oe){if(0!=this.Dk)for(;0<this.Oe&&c<b;)this.Oe--,this.Em&=32767,this.Zd&=32767,a[d+c++]=this.Ek[this.Zd++]=this.Ek[this.Em++];else{for(;0<this.Oe&&c<b;)this.Oe--,this.Zd&=32767,this.Ec(8),
a[d+c++]=this.Ek[this.Zd++]=this.Zc(8),this.pc(8);0==this.Oe&&(this.Dk=-1)}if(c==b)break}if(-1==this.Dk){if(this.Sw)break;this.Ec(1);0!=this.Zc(1)&&(this.Sw=!0);this.pc(1);this.Ec(2);this.Dk=this.Zc(2);this.pc(2);this.Fk=null;this.Oe=0}switch(this.Dk){case 0:g=this.WX(a,d+c,b-c);break;case 1:g=null!=this.Fk?this.Uw(a,d+c,b-c):this.TX(a,d+c,b-c);break;case 2:g=null!=this.Fk?this.Uw(a,d+c,b-c):this.SX(a,d+c,b-c);break;default:g=-1}if(-1==g)return this.Sw?0:-1;c+=g}return c}};b.Tm.inflate=function(a){return(new b.Tm.WC(a)).getBytes(4E9)}})(self);
!function(b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).nU=b()}(function(){return function f(e,c,a){function d(k,l){if(!c[k]){if(!e[k]){var n="function"==typeof require&&require;if(!l&&n)return n(k,!0);if(g)return g(k,!0);n=Error("Cannot find module '"+k+"'");throw n.code="MODULE_NOT_FOUND",n;}n=c[k]={exports:{}};e[k][0].call(n.exports,
function(a){var c=e[k][1][a];return d(c?c:a)},n,n.exports,f,e,c,a)}return c[k].exports}for(var g="function"==typeof require&&require,k=0;k<a.length;k++)d(a[k]);return d}({1:[function(f,e,c){f="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var d=Array.prototype.slice.call(arguments,1);d.length;){var c=d.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e])}}return a};
c.DK=function(a,d){return a.length===d?a:a.subarray?a.subarray(0,d):(a.length=d,a)};var a={sl:function(a,d,c,e,f){if(d.subarray&&a.subarray)return void a.set(d.subarray(c,c+e),f);for(var m=0;m<e;m++)a[f+m]=d[c+m]},wG:function(a){var d,c,e,f,m;d=e=0;for(c=a.length;d<c;d++)e+=a[d].length;m=new Uint8Array(e);d=e=0;for(c=a.length;d<c;d++)f=a[d],m.set(f,e),e+=f.length;return m}},d={sl:function(a,d,c,e,f){for(var m=0;m<e;m++)a[f+m]=d[c+m]},wG:function(a){return[].concat.apply([],a)}};c.DW=function(g){g?
(c.Jk=Uint8Array,c.np=Uint16Array,c.op=Int32Array,c.assign(c,a)):(c.Jk=Array,c.np=Array,c.op=Array,c.assign(c,d))};c.DW(f)},{}],2:[function(f,e,c){function a(a,c){if(65537>c&&(a.subarray&&k||!a.subarray&&g))return String.fromCharCode.apply(null,d.DK(a,c));for(var e="",f=0;f<c;f++)e+=String.fromCharCode(a[f]);return e}var d=f("./common"),g=!0,k=!0,h=new d.Jk(256);for(f=0;256>f;f++)h[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;h[254]=h[254]=1;c.YW=function(a){var c,g,e,k,f,h=a.length,v=0;for(k=
0;k<h;k++)g=a.charCodeAt(k),55296===(64512&g)&&k+1<h&&(e=a.charCodeAt(k+1),56320===(64512&e)&&(g=65536+(g-55296<<10)+(e-56320),k++)),v+=128>g?1:2048>g?2:65536>g?3:4;c=new d.Jk(v);for(k=f=0;f<v;k++)g=a.charCodeAt(k),55296===(64512&g)&&k+1<h&&(e=a.charCodeAt(k+1),56320===(64512&e)&&(g=65536+(g-55296<<10)+(e-56320),k++)),128>g?c[f++]=g:2048>g?(c[f++]=192|g>>>6,c[f++]=128|63&g):65536>g?(c[f++]=224|g>>>12,c[f++]=128|g>>>6&63,c[f++]=128|63&g):(c[f++]=240|g>>>18,c[f++]=128|g>>>12&63,c[f++]=128|g>>>6&63,
c[f++]=128|63&g);return c};c.eZ=function(d){return a(d,d.length)};c.BO=function(a){for(var c=new d.Jk(a.length),g=0,e=c.length;g<e;g++)c[g]=a.charCodeAt(g);return c};c.DO=function(d,c){var g,e,k,f,q=c||d.length,v=Array(2*q);for(g=e=0;g<q;)if(k=d[g++],128>k)v[e++]=k;else if(f=h[k],4<f)v[e++]=65533,g+=f-1;else{for(k&=2===f?31:3===f?15:7;1<f&&g<q;)k=k<<6|63&d[g++],f--;1<f?v[e++]=65533:65536>k?v[e++]=k:(k-=65536,v[e++]=55296|k>>10&1023,v[e++]=56320|1023&k)}return a(v,e)};c.DX=function(a,d){var c;d=d||
a.length;d>a.length&&(d=a.length);for(c=d-1;0<=c&&128===(192&a[c]);)c--;return 0>c?d:0===c?d:c+h[a[c]]>d?c:d}},{"./common":1}],3:[function(f,e){e.exports=function(c,a,d,g){var e=65535&c|0;c=c>>>16&65535|0;for(var f;0!==d;){f=2E3<d?2E3:d;d-=f;do e=e+a[g++]|0,c=c+e|0;while(--f);e%=65521;c%=65521}return e|c<<16|0}},{}],4:[function(f,e){e.exports={aD:0,RY:1,bD:2,OY:3,Js:4,GY:5,VY:6,$m:0,Ks:1,XM:2,LY:-1,TY:-2,HY:-3,WM:-5,QY:0,EY:1,DY:9,IY:-1,MY:1,PY:2,SY:3,NY:4,JY:0,FY:0,UY:1,WY:2,KY:8}},{}],5:[function(f,
e){var c=function(){for(var a,d=[],c=0;256>c;c++){a=c;for(var e=0;8>e;e++)a=1&a?3988292384^a>>>1:a>>>1;d[c]=a}return d}();e.exports=function(a,d,g,e){g=e+g;for(a^=-1;e<g;e++)a=a>>>8^c[255&(a^d[e])];return a^-1}},{}],6:[function(f,e){e.exports=function(){this.kU=this.OX=this.time=this.text=0;this.Oc=null;this.sz=0;this.Ry=this.name="";this.BS=0;this.done=!1}},{}],7:[function(f,e){e.exports=function(c,a){var d,g,e,f,l,n,m,r,p,u,q,v,w,A,B,z,x,y,F,K,G,D,L,I;d=c.state;g=c.mk;L=c.input;e=g+(c.Ue-5);f=c.Vd;
I=c.output;l=f-(a-c.Mc);n=f+(c.Mc-257);m=d.su;r=d.Ne;p=d.aj;u=d.Me;q=d.window;v=d.ek;w=d.wc;A=d.Ei;B=d.zl;z=(1<<d.qh)-1;x=(1<<d.Rn)-1;a:do b:for(15>w&&(v+=L[g++]<<w,w+=8,v+=L[g++]<<w,w+=8),y=A[v&z];;){if(F=y>>>24,v>>>=F,w-=F,F=y>>>16&255,0===F)I[f++]=65535&y;else{if(!(16&F)){if(0===(64&F)){y=A[(65535&y)+(v&(1<<F)-1)];continue b}if(32&F){d.mode=12;break a}c.eb="invalid literal/length code";d.mode=30;break a}K=65535&y;(F&=15)&&(w<F&&(v+=L[g++]<<w,w+=8),K+=v&(1<<F)-1,v>>>=F,w-=F);15>w&&(v+=L[g++]<<w,
w+=8,v+=L[g++]<<w,w+=8);y=B[v&x];c:for(;;){if(F=y>>>24,v>>>=F,w-=F,F=y>>>16&255,!(16&F)){if(0===(64&F)){y=B[(65535&y)+(v&(1<<F)-1)];continue c}c.eb="invalid distance code";d.mode=30;break a}if(G=65535&y,F&=15,w<F&&(v+=L[g++]<<w,w+=8,w<F&&(v+=L[g++]<<w,w+=8)),G+=v&(1<<F)-1,G>m){c.eb="invalid distance too far back";d.mode=30;break a}if(v>>>=F,w-=F,F=f-l,G>F){if(F=G-F,F>p&&d.EB){c.eb="invalid distance too far back";d.mode=30;break a}if(y=0,D=q,0===u){if(y+=r-F,F<K){K-=F;do I[f++]=q[y++];while(--F);y=
f-G;D=I}}else if(u<F){if(y+=r+u-F,F-=u,F<K){K-=F;do I[f++]=q[y++];while(--F);if(y=0,u<K){F=u;K-=F;do I[f++]=q[y++];while(--F);y=f-G;D=I}}}else if(y+=u-F,F<K){K-=F;do I[f++]=q[y++];while(--F);y=f-G;D=I}for(;2<K;)I[f++]=D[y++],I[f++]=D[y++],I[f++]=D[y++],K-=3;K&&(I[f++]=D[y++],1<K&&(I[f++]=D[y++]))}else{y=f-G;do I[f++]=I[y++],I[f++]=I[y++],I[f++]=I[y++],K-=3;while(2<K);K&&(I[f++]=I[y++],1<K&&(I[f++]=I[y++]))}break}}break}while(g<e&&f<n);K=w>>3;g-=K;w-=K<<3;c.mk=g;c.Vd=f;c.Ue=g<e?5+(e-g):5-(g-e);c.Mc=
f<n?257+(n-f):257-(f-n);d.ek=v&(1<<w)-1;d.wc=w}},{}],8:[function(f,e,c){function a(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function d(){this.mode=0;this.last=!1;this.wrap=0;this.xA=!1;this.total=this.check=this.su=this.dc=0;this.head=null;this.Me=this.aj=this.Ne=this.hp=0;this.window=null;this.Oc=this.offset=this.length=this.wc=this.ek=0;this.zl=this.Ei=null;this.Ef=this.sr=this.Ao=this.AI=this.Rn=this.qh=0;this.next=null;this.Td=new p.np(320);this.es=new p.np(288);this.VF=
this.oI=null;this.HX=this.back=this.EB=0}function g(a){var d;return a&&a.state?(d=a.state,a.oC=a.Yr=d.total=0,a.eb="",d.wrap&&(a.rl=1&d.wrap),d.mode=z,d.last=0,d.xA=0,d.su=32768,d.head=null,d.ek=0,d.wc=0,d.Ei=d.oI=new p.op(x),d.zl=d.VF=new p.op(y),d.EB=1,d.back=-1,A):B}function k(a){var d;return a&&a.state?(d=a.state,d.Ne=0,d.aj=0,d.Me=0,g(a)):B}function h(a,d){var c,g;return a&&a.state?(g=a.state,0>d?(c=0,d=-d):(c=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15<d)?B:(null!==g.window&&g.hp!==d&&(g.window=null),
g.wrap=c,g.hp=d,k(a))):B}function l(a,c){var g,e;return a?(e=new d,a.state=e,e.window=null,g=h(a,c),g!==A&&(a.state=null),g):B}function n(a,d,c,g){var e;a=a.state;return null===a.window&&(a.Ne=1<<a.hp,a.Me=0,a.aj=0,a.window=new p.Jk(a.Ne)),g>=a.Ne?(p.sl(a.window,d,c-a.Ne,a.Ne,0),a.Me=0,a.aj=a.Ne):(e=a.Ne-a.Me,e>g&&(e=g),p.sl(a.window,d,c-g,e,a.Me),g-=e,g?(p.sl(a.window,d,c-g,g,0),a.Me=g,a.aj=a.Ne):(a.Me+=e,a.Me===a.Ne&&(a.Me=0),a.aj<a.Ne&&(a.aj+=e))),0}var m,r,p=f("../utils/common"),u=f("./adler32"),
q=f("./crc32"),v=f("./inffast"),w=f("./inftrees"),A=0,B=-2,z=1,x=852,y=592,F=!0;c.d_=k;c.e_=h;c.f_=g;c.b_=function(a){return l(a,15)};c.MS=l;c.inflate=function(d,c){var g,e,k,f,h,l,y,x,C,Q,T,P,ha,R,U,V,Z,ia,ja,W,aa,da,X=0,Y=new p.Jk(4),ma=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||!d.output||!d.input&&0!==d.Ue)return B;g=d.state;12===g.mode&&(g.mode=13);h=d.Vd;k=d.output;y=d.Mc;f=d.mk;e=d.input;l=d.Ue;x=g.ek;C=g.wc;Q=l;T=y;aa=A;a:for(;;)switch(g.mode){case z:if(0===g.wrap){g.mode=
13;break}for(;16>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}if(2&g.wrap&&35615===x){g.check=0;Y[0]=255&x;Y[1]=x>>>8&255;g.check=q(g.check,Y,2,0);C=x=0;g.mode=2;break}if(g.dc=0,g.head&&(g.head.done=!1),!(1&g.wrap)||(((255&x)<<8)+(x>>8))%31){d.eb="incorrect header check";g.mode=30;break}if(8!==(15&x)){d.eb="unknown compression method";g.mode=30;break}if(x>>>=4,C-=4,W=(15&x)+8,0===g.hp)g.hp=W;else if(W>g.hp){d.eb="invalid window size";g.mode=30;break}g.su=1<<W;d.rl=g.check=1;g.mode=512&x?10:12;C=x=0;
break;case 2:for(;16>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}if(g.dc=x,8!==(255&g.dc)){d.eb="unknown compression method";g.mode=30;break}if(57344&g.dc){d.eb="unknown header flags set";g.mode=30;break}g.head&&(g.head.text=x>>8&1);512&g.dc&&(Y[0]=255&x,Y[1]=x>>>8&255,g.check=q(g.check,Y,2,0));C=x=0;g.mode=3;case 3:for(;32>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}g.head&&(g.head.time=x);512&g.dc&&(Y[0]=255&x,Y[1]=x>>>8&255,Y[2]=x>>>16&255,Y[3]=x>>>24&255,g.check=q(g.check,Y,4,0));C=x=0;g.mode=4;
case 4:for(;16>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}g.head&&(g.head.OX=255&x,g.head.kU=x>>8);512&g.dc&&(Y[0]=255&x,Y[1]=x>>>8&255,g.check=q(g.check,Y,2,0));C=x=0;g.mode=5;case 5:if(1024&g.dc){for(;16>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}g.length=x;g.head&&(g.head.sz=x);512&g.dc&&(Y[0]=255&x,Y[1]=x>>>8&255,g.check=q(g.check,Y,2,0));C=x=0}else g.head&&(g.head.Oc=null);g.mode=6;case 6:if(1024&g.dc&&(P=g.length,P>l&&(P=l),P&&(g.head&&(W=g.head.sz-g.length,g.head.Oc||(g.head.Oc=Array(g.head.sz)),
p.sl(g.head.Oc,e,f,P,W)),512&g.dc&&(g.check=q(g.check,e,P,f)),l-=P,f+=P,g.length-=P),g.length))break a;g.length=0;g.mode=7;case 7:if(2048&g.dc){if(0===l)break a;P=0;do W=e[f+P++],g.head&&W&&65536>g.length&&(g.head.name+=String.fromCharCode(W));while(W&&P<l);if(512&g.dc&&(g.check=q(g.check,e,P,f)),l-=P,f+=P,W)break a}else g.head&&(g.head.name=null);g.length=0;g.mode=8;case 8:if(4096&g.dc){if(0===l)break a;P=0;do W=e[f+P++],g.head&&W&&65536>g.length&&(g.head.Ry+=String.fromCharCode(W));while(W&&P<l);
if(512&g.dc&&(g.check=q(g.check,e,P,f)),l-=P,f+=P,W)break a}else g.head&&(g.head.Ry=null);g.mode=9;case 9:if(512&g.dc){for(;16>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}if(x!==(65535&g.check)){d.eb="header crc mismatch";g.mode=30;break}C=x=0}g.head&&(g.head.BS=g.dc>>9&1,g.head.done=!0);d.rl=g.check=0;g.mode=12;break;case 10:for(;32>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}d.rl=g.check=a(x);C=x=0;g.mode=11;case 11:if(0===g.xA)return d.Vd=h,d.Mc=y,d.mk=f,d.Ue=l,g.ek=x,g.wc=C,2;d.rl=g.check=1;g.mode=
12;case 12:if(5===c||6===c)break a;case 13:if(g.last){x>>>=7&C;C-=7&C;g.mode=27;break}for(;3>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}switch(g.last=1&x,x>>>=1,--C,3&x){case 0:g.mode=14;break;case 1:R=g;if(F){m=new p.op(512);r=new p.op(32);for(V=0;144>V;)R.Td[V++]=8;for(;256>V;)R.Td[V++]=9;for(;280>V;)R.Td[V++]=7;for(;288>V;)R.Td[V++]=8;w(1,R.Td,0,288,m,0,R.es,{wc:9});for(V=0;32>V;)R.Td[V++]=5;w(2,R.Td,0,32,r,0,R.es,{wc:5});F=!1}R.Ei=m;R.qh=9;R.zl=r;R.Rn=5;if(g.mode=20,6===c){x>>>=2;C-=2;break a}break;
case 2:g.mode=17;break;case 3:d.eb="invalid block type",g.mode=30}x>>>=2;C-=2;break;case 14:x>>>=7&C;for(C-=7&C;32>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}if((65535&x)!==(x>>>16^65535)){d.eb="invalid stored block lengths";g.mode=30;break}if(g.length=65535&x,x=0,C=0,g.mode=15,6===c)break a;case 15:g.mode=16;case 16:if(P=g.length){if(P>l&&(P=l),P>y&&(P=y),0===P)break a;p.sl(k,e,f,P,h);l-=P;f+=P;y-=P;h+=P;g.length-=P;break}g.mode=12;break;case 17:for(;14>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}if(g.Ao=
(31&x)+257,x>>>=5,C-=5,g.sr=(31&x)+1,x>>>=5,C-=5,g.AI=(15&x)+4,x>>>=4,C-=4,286<g.Ao||30<g.sr){d.eb="too many length or distance symbols";g.mode=30;break}g.Ef=0;g.mode=18;case 18:for(;g.Ef<g.AI;){for(;3>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}g.Td[ma[g.Ef++]]=7&x;x>>>=3;C-=3}for(;19>g.Ef;)g.Td[ma[g.Ef++]]=0;if(g.Ei=g.oI,g.qh=7,da={wc:g.qh},aa=w(0,g.Td,0,19,g.Ei,0,g.es,da),g.qh=da.wc,aa){d.eb="invalid code lengths set";g.mode=30;break}g.Ef=0;g.mode=19;case 19:for(;g.Ef<g.Ao+g.sr;){for(;X=g.Ei[x&
(1<<g.qh)-1],U=X>>>24,V=65535&X,!(U<=C);){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}if(16>V)x>>>=U,C-=U,g.Td[g.Ef++]=V;else{if(16===V){for(R=U+2;C<R;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}if(x>>>=U,C-=U,0===g.Ef){d.eb="invalid bit length repeat";g.mode=30;break}W=g.Td[g.Ef-1];P=3+(3&x);x>>>=2;C-=2}else if(17===V){for(R=U+3;C<R;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}x>>>=U;C-=U;W=0;P=3+(7&x);x>>>=3;C-=3}else{for(R=U+7;C<R;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}x>>>=U;C-=U;W=0;P=11+(127&x);x>>>=
7;C-=7}if(g.Ef+P>g.Ao+g.sr){d.eb="invalid bit length repeat";g.mode=30;break}for(;P--;)g.Td[g.Ef++]=W}}if(30===g.mode)break;if(0===g.Td[256]){d.eb="invalid code -- missing end-of-block";g.mode=30;break}if(g.qh=9,da={wc:g.qh},aa=w(1,g.Td,0,g.Ao,g.Ei,0,g.es,da),g.qh=da.wc,aa){d.eb="invalid literal/lengths set";g.mode=30;break}if(g.Rn=6,g.zl=g.VF,da={wc:g.Rn},aa=w(2,g.Td,g.Ao,g.sr,g.zl,0,g.es,da),g.Rn=da.wc,aa){d.eb="invalid distances set";g.mode=30;break}if(g.mode=20,6===c)break a;case 20:g.mode=21;
case 21:if(6<=l&&258<=y){d.Vd=h;d.Mc=y;d.mk=f;d.Ue=l;g.ek=x;g.wc=C;v(d,T);h=d.Vd;k=d.output;y=d.Mc;f=d.mk;e=d.input;l=d.Ue;x=g.ek;C=g.wc;12===g.mode&&(g.back=-1);break}for(g.back=0;X=g.Ei[x&(1<<g.qh)-1],U=X>>>24,R=X>>>16&255,V=65535&X,!(U<=C);){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}if(R&&0===(240&R)){Z=U;ia=R;for(ja=V;X=g.Ei[ja+((x&(1<<Z+ia)-1)>>Z)],U=X>>>24,R=X>>>16&255,V=65535&X,!(Z+U<=C);){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}x>>>=Z;C-=Z;g.back+=Z}if(x>>>=U,C-=U,g.back+=U,g.length=V,0===R){g.mode=
26;break}if(32&R){g.back=-1;g.mode=12;break}if(64&R){d.eb="invalid literal/length code";g.mode=30;break}g.Oc=15&R;g.mode=22;case 22:if(g.Oc){for(R=g.Oc;C<R;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}g.length+=x&(1<<g.Oc)-1;x>>>=g.Oc;C-=g.Oc;g.back+=g.Oc}g.HX=g.length;g.mode=23;case 23:for(;X=g.zl[x&(1<<g.Rn)-1],U=X>>>24,R=X>>>16&255,V=65535&X,!(U<=C);){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}if(0===(240&R)){Z=U;ia=R;for(ja=V;X=g.zl[ja+((x&(1<<Z+ia)-1)>>Z)],U=X>>>24,R=X>>>16&255,V=65535&X,!(Z+U<=C);){if(0===
l)break a;l--;x+=e[f++]<<C;C+=8}x>>>=Z;C-=Z;g.back+=Z}if(x>>>=U,C-=U,g.back+=U,64&R){d.eb="invalid distance code";g.mode=30;break}g.offset=V;g.Oc=15&R;g.mode=24;case 24:if(g.Oc){for(R=g.Oc;C<R;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}g.offset+=x&(1<<g.Oc)-1;x>>>=g.Oc;C-=g.Oc;g.back+=g.Oc}if(g.offset>g.su){d.eb="invalid distance too far back";g.mode=30;break}g.mode=25;case 25:if(0===y)break a;if(P=T-y,g.offset>P){if(P=g.offset-P,P>g.aj&&g.EB){d.eb="invalid distance too far back";g.mode=30;break}P>
g.Me?(P-=g.Me,ha=g.Ne-P):ha=g.Me-P;P>g.length&&(P=g.length);R=g.window}else R=k,ha=h-g.offset,P=g.length;P>y&&(P=y);y-=P;g.length-=P;do k[h++]=R[ha++];while(--P);0===g.length&&(g.mode=21);break;case 26:if(0===y)break a;k[h++]=g.length;y--;g.mode=21;break;case 27:if(g.wrap){for(;32>C;){if(0===l)break a;l--;x|=e[f++]<<C;C+=8}if(T-=y,d.Yr+=T,g.total+=T,T&&(d.rl=g.check=g.dc?q(g.check,k,T,h-T):u(g.check,k,T,h-T)),T=y,(g.dc?x:a(x))!==g.check){d.eb="incorrect data check";g.mode=30;break}C=x=0}g.mode=28;
case 28:if(g.wrap&&g.dc){for(;32>C;){if(0===l)break a;l--;x+=e[f++]<<C;C+=8}if(x!==(4294967295&g.total)){d.eb="incorrect length check";g.mode=30;break}C=x=0}g.mode=29;case 29:aa=1;break a;case 30:aa=-3;break a;case 31:return-4;default:return B}return d.Vd=h,d.Mc=y,d.mk=f,d.Ue=l,g.ek=x,g.wc=C,(g.Ne||T!==d.Mc&&30>g.mode&&(27>g.mode||4!==c))&&n(d,d.output,d.Vd,T-d.Mc)?(g.mode=31,-4):(Q-=d.Ue,T-=d.Mc,d.oC+=Q,d.Yr+=T,g.total+=T,g.wrap&&T&&(d.rl=g.check=g.dc?q(g.check,k,T,d.Vd-T):u(g.check,k,T,d.Vd-T)),
d.uP=g.wc+(g.last?64:0)+(12===g.mode?128:0)+(20===g.mode||15===g.mode?256:0),(0===Q&&0===T||4===c)&&aa===A&&(aa=-5),aa)};c.KS=function(a){if(!a||!a.state)return B;var d=a.state;return d.window&&(d.window=null),a.state=null,A};c.LS=function(a,d){var c;a&&a.state&&(c=a.state,0===(2&c.wrap)||(c.head=d,d.done=!1))};c.NS=function(a,d){var c,g,e=d.length;return a&&a.state?(c=a.state,0!==c.wrap&&11!==c.mode?B:11===c.mode&&(g=1,g=u(g,d,e,0),g!==c.check)?-3:n(a,d,e,e)?(c.mode=31,-4):(c.xA=1,A)):B};c.a_="pako inflate (from Nodeca project)"},
{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(f,e){var c=f("../utils/common"),a=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],g=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],k=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,
26,26,27,27,28,28,29,29,64,64];e.exports=function(e,f,n,m,r,p,u,q){var v,w,A,B,z,x,y,F,K=q.wc,G,D,L,I,O,N,H=0,M,E=null,C=0,Q=new c.np(16);B=new c.np(16);var T=null,P=0;for(G=0;15>=G;G++)Q[G]=0;for(D=0;D<m;D++)Q[f[n+D]]++;I=K;for(L=15;1<=L&&0===Q[L];L--);if(I>L&&(I=L),0===L)return r[p++]=20971520,r[p++]=20971520,q.wc=1,0;for(K=1;K<L&&0===Q[K];K++);I<K&&(I=K);for(G=v=1;15>=G;G++)if(v<<=1,v-=Q[G],0>v)return-1;if(0<v&&(0===e||1!==L))return-1;B[1]=0;for(G=1;15>G;G++)B[G+1]=B[G]+Q[G];for(D=0;D<m;D++)0!==
f[n+D]&&(u[B[f[n+D]]++]=D);if(0===e?(E=T=u,z=19):1===e?(E=a,C-=257,T=d,P-=257,z=256):(E=g,T=k,z=-1),M=0,D=0,G=K,B=p,O=I,N=0,A=-1,H=1<<I,m=H-1,1===e&&852<H||2===e&&592<H)return 1;for(;;){x=G-N;u[D]<z?(y=0,F=u[D]):u[D]>z?(y=T[P+u[D]],F=E[C+u[D]]):(y=96,F=0);v=1<<G-N;K=w=1<<O;do w-=v,r[B+(M>>N)+w]=x<<24|y<<16|F|0;while(0!==w);for(v=1<<G-1;M&v;)v>>=1;if(0!==v?(M&=v-1,M+=v):M=0,D++,0===--Q[G]){if(G===L)break;G=f[n+u[D]]}if(G>I&&(M&m)!==A){0===N&&(N=I);B+=K;O=G-N;for(v=1<<O;O+N<L&&(v-=Q[O+N],!(0>=v));)O++,
v<<=1;if(H+=1<<O,1===e&&852<H||2===e&&592<H)return 1;A=M&m;r[A]=I<<24|O<<16|B-p|0}}return 0!==M&&(r[B+M]=G-N<<24|4194304),q.wc=I,0}},{"../utils/common":1}],10:[function(f,e){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(f,e){e.exports=function(){this.input=null;this.oC=this.Ue=this.mk=0;this.output=null;this.Yr=this.Mc=this.Vd=0;this.eb="";this.state=
null;this.uP=2;this.rl=0}},{}],"/lib/inflate.js":[function(f,e,c){function a(d){if(!(this instanceof a))return new a(d);var c=this.options=k.assign({PO:16384,nd:0,to:""},d||{});c.raw&&0<=c.nd&&16>c.nd&&(c.nd=-c.nd,0===c.nd&&(c.nd=-15));!(0<=c.nd&&16>c.nd)||d&&d.nd||(c.nd+=32);15<c.nd&&48>c.nd&&0===(15&c.nd)&&(c.nd|=15);this.qz=0;this.eb="";this.ended=!1;this.hu=[];this.wm=new m;this.wm.Mc=0;d=g.MS(this.wm,c.nd);if(d!==l.$m)throw Error(n[d]);this.header=new r;g.LS(this.wm,this.header)}function d(d,
c){var g=new a(c);if(g.push(d,!0),g.qz)throw g.eb||n[g.qz];return g.result}var g=f("./zlib/inflate"),k=f("./utils/common"),h=f("./utils/strings"),l=f("./zlib/constants"),n=f("./zlib/messages"),m=f("./zlib/zstream"),r=f("./zlib/gzheader"),p=Object.prototype.toString;a.prototype.push=function(a,d){var c,e,f,n,m,r,y=this.wm,F=this.options.PO,K=this.options.xq,G=!1;if(this.ended)return!1;e=d===~~d?d:!0===d?l.Js:l.aD;"string"==typeof a?y.input=h.BO(a):"[object ArrayBuffer]"===p.call(a)?y.input=new Uint8Array(a):
y.input=a;y.mk=0;y.Ue=y.input.length;do{if(0===y.Mc&&(y.output=new k.Jk(F),y.Vd=0,y.Mc=F),c=g.inflate(y,l.aD),c===l.XM&&K&&(r="string"==typeof K?h.YW(K):"[object ArrayBuffer]"===p.call(K)?new Uint8Array(K):K,c=g.NS(this.wm,r)),c===l.WM&&!0===G&&(c=l.$m,G=!1),c!==l.Ks&&c!==l.$m)return this.cB(c),this.ended=!0,!1;y.Vd&&(0!==y.Mc&&c!==l.Ks&&(0!==y.Ue||e!==l.Js&&e!==l.bD)||("string"===this.options.to?(f=h.DX(y.output,y.Vd),n=y.Vd-f,m=h.DO(y.output,f),y.Vd=n,y.Mc=F-n,n&&k.sl(y.output,y.output,f,n,0),this.HI(m)):
this.HI(k.DK(y.output,y.Vd))));0===y.Ue&&0===y.Mc&&(G=!0)}while((0<y.Ue||0===y.Mc)&&c!==l.Ks);return c===l.Ks&&(e=l.Js),e===l.Js?(c=g.KS(this.wm),this.cB(c),this.ended=!0,c===l.$m):e!==l.bD||(this.cB(l.$m),y.Mc=0,!0)};a.prototype.HI=function(a){this.hu.push(a)};a.prototype.cB=function(a){a===l.$m&&("string"===this.options.to?this.result=this.hu.join(""):this.result=k.wG(this.hu));this.hu=[];this.qz=a;this.eb=this.wm.eb};c.jY=a;c.inflate=d;c.c_=function(a,c){return c=c||{},c.raw=!0,d(a,c)};c.c0=d},
{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")});
(function(b){b.Ig={zj:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(f){for(var e="",c,a,d,g,k,h,l=0;l<f.length;)c=f.charCodeAt(l++),a=f.charCodeAt(l++),d=f.charCodeAt(l++),g=c>>2,c=(c&3)<<4|a>>4,k=(a&15)<<2|d>>6,h=d&63,isNaN(a)?k=h=64:isNaN(d)&&(h=64),e=e+b.Ig.zj.charAt(g)+b.Ig.zj.charAt(c)+b.Ig.zj.charAt(k)+b.Ig.zj.charAt(h);return e},decode:function(f){var e="",c,a,d,g,k,h=0;for(f=f.replace(/[^A-Za-z0-9\+\/\=]/g,"");h<f.length;)c=b.Ig.zj.indexOf(f.charAt(h++)),
a=b.Ig.zj.indexOf(f.charAt(h++)),g=b.Ig.zj.indexOf(f.charAt(h++)),k=b.Ig.zj.indexOf(f.charAt(h++)),c=c<<2|a>>4,a=(a&15)<<4|g>>2,d=(g&3)<<6|k,e+=String.fromCharCode(c),64!==g&&(e+=String.fromCharCode(a)),64!==k&&(e+=String.fromCharCode(d));return e}};"undefined"===typeof window.btoa&&(window.btoa=b.Ig.encode);"undefined"===typeof window.atob&&(window.atob=b.Ig.decode)})(window);
(function(b){function f(b){var c;"string"!==typeof b?b={documentElement:b}:(c=new DOMParser,b=c.parseFromString(b,"text/xml"));this.current=b.documentElement;this.next=this.current.nextSibling;this.diff=this.depth=0}f.prototype={tD:function(){for(;this.next&&this.next.nodeType!==Node.ELEMENT_NODE;)this.next=this.next.nextSibling},advance:function(){this.tD();return this.next?(this.current=this.next,this.next=this.current.nextSibling,!0):!1},ua:function(){return this.current.tagName},oa:function(){++this.depth;
this.next=this.current.firstChild;this.tD();this.next||++this.diff},Ba:function(){--this.depth;0<this.diff?--this.diff:this.current=this.current.parentNode;this.current&&(this.next=this.current.nextSibling)},K:function(b){return this.current.getAttribute(b)}};b.Re=f})(window);
(function(b){function f(b){this.depth=this.index=0;this.qe=b;this.location={start:0,tv:1,uv:1,end:b.length,empty:!0};this.pr=[this.location];this.AA=!1;"?"===this.qe.charAt(1)&&this.dH();this.location.empty=!1}b.Hs=b.Hs?b.Hs:{};b.Hs.kX=function(b){if(b)return b.replace(/&[^;]*;/g,function(c){switch(c.charAt(1)){case "q":return'"';case "a":return"&";case "l":return"<";case "g":return">";case "#":return"x"===c.charAt(2)?String.fromCharCode(parseInt(c.substring(3,c.length-1),16)):String.fromCharCode(parseInt(c.substring(2,
c.length-1),10))}return c})};f.prototype={advance:function(){this.Jj=null;this.dH();var b=this.location.start;++b;this.location.empty=!1;if("/"!==this.qe.charAt(b))return this.location.empty="/"===this.qe.charAt(this.qe.indexOf(">",b)-1),!0;this.location.end=!0;return!1},qI:function(){var b=this.location.start+1,c=this.qe.indexOf(">",b);this.location.empty&&--c;b=this.qe.substring(b,c);this.Jj={};c=b.indexOf(" ");if(-1!==c){this.jG=b.substring(0,c);for(var b=b.slice(c),b=b.split('"'),c=b.length-1,
a=0;a<c;++a){var d=b[a],g=b[++a];this.Jj[d.substring(1,d.length-1)]=g}}else this.jG=b},dH:function(){if(this.AA)this.AA=!1,this.location.start=this.qe.indexOf("<",this.location.start+1);else{var b=this.location.tv;if(!this.location.empty)for(var c=this.location.uv;0<c;)b=this.qe.indexOf("<",b),"/"===this.qe.charAt(++b)?--c:(b=this.qe.indexOf(">",b),"/"!==this.qe.charAt(b-1)&&++c);this.location.start=this.qe.indexOf("<",b)}this.location.tv=this.location.start+1;this.location.uv=1},mark:function(){this.qe.mark&&
this.qe.mark(this.location.start)},ua:function(){null!==this.Jj&&"undefined"!==typeof this.Jj||this.qI();return this.jG},oa:function(){++this.depth;this.location={start:this.location.start};this.pr[this.pr.length]=this.location;this.AA=!0},Ba:function(){--this.depth;this.Jj=null;var b=this.location.tv,c=this.location.uv,a=this.location.empty,d=this.location.end;this.pr.pop();this.location=this.pr[this.pr.length-1];this.location.tv=b;this.location.uv=d?0:a?c:c+1},K:function(e){null!==this.Jj&&"undefined"!==
typeof this.Jj||this.qI();return b.Hs.kX(this.Jj[e])}};b.CY=f})(self);
(function(b){function f(a){if(a){if(a.length!==this.Jm)throw Error("Data is wrong size for zip header!");this.Dq=a=this.FU(a);if(a.wk!==this.jQ)throw Error("Invalid XOD file, signature is wrong!");this.sT=4294967295===a.ru;this.hg={};this.names=[]}}function e(a,c,e){this.source=a;this.eu=this.Ky=!1;this.Jf={};this.Dl=function(){};this.decrypt=c;this.xl=e;this.JF=b.o.Jh&&c!==b.o.Jh.decrypt}function c(a){this.dm=a;this.started=!1;this.Qi=1}c.prototype={cancel:function(){}};b.Yj=function(a){if("string"!==
typeof a){for(var c="",b=0,e=a.length,f;b<e;)f=a.subarray(b,b+1024),b+=1024,c+=String.fromCharCode.apply(null,f);return c}return a};b.wH=function(a){if("string"===typeof a){for(var c=new Uint8Array(a.length),b=a.length,e=0;e<b;e++)c[e]=a.charCodeAt(e);return c}return a};e.prototype={Sf:"Document/FixedDocument.fdoc",Jg:"Document/DocProps/core.xml",Rf:"Document/Structure/DocStruct.struct",FV:function(a){this.Dl=a},hm:function(a){var c=this;this.yo(function(e){if(e){b.utils.warn("Error loading document: "+
e);c.Dl(e);if(a){a(e);return}throw e;}return c.request([c.Sf,c.Jg,c.Rf])})},Ui:function(){return!1},request:function(a,c){var b=this;if(!b.Ky)throw Error("Document must be loaded before requesting parts");_(a).each(function(a){b.pQ(a,function(a,d,e,f){return a?(d!==b.Rf&&0!==d.indexOf("Annot/Appearances")&&b.Dl(a),b.trigger("partReady",{ra:d,wf:!1,ad:!!a.ry,error:a})):b.trigger("partReady",{ra:d,data:e,wf:!1,ad:!1,error:null,Fb:f,EI:c})})})},om:function(a){this.xf=a},Sr:function(a){this.withCredentials=
a},Iy:function(a){var c=this;_(a).each(function(a){var d=c.Jf[a];d&&(d.Qi--,0===d.Qi&&(delete c.Jf[a],d.cancel()))})},pQ:function(a,b){if(this.Jf[a])this.Jf[a].Qi++;else return this.Jf[a]=new c(a),this.lJ(a,b)}};_(e.prototype).extend(Backbone.Events);f.prototype={SG:function(){return{start:this.Dq.ru,stop:this.Dq.ru+this.Dq.UF}},Mq:function(a){var c=this.hg[a],b=c.offset+this.zp+c.wh+c.El;return{start:b,stop:b+c.au,dm:a}},Qu:function(a){a=this.Mq(a);var c=Math.floor(a.start/102400),b=a.stop-a.start;
return Math.min(b,102400*(c+1)-a.start)>b/2?c:c+1},HT:function(a){if(a&&(this.Dq=a=this.IU(a),a.wk!==this.PX))throw Error("Invalid XOD file, signature is wrong!");},$Q:function(a){var c=this.Qu(a),b=this.names.indexOf(a),e;a=[];var f;for(f=b-1;0<=f&&this.Qu(this.names[f])===c;--f);e=f+1;var n=this.Mq(this.names[e]).start;for(f=b+1;f<this.names.length&&this.Qu(this.names[f])===c;++f);c=f-1;b=this.Mq(this.names[c]).stop;for(f=e;f<=c;++f)e=this.Mq(this.names[f]),e.start-=n,e.stop-=n,a.push(e);return{start:n,
stop:b,iJ:a}},yF:function(a){return!!this.hg[a]},YH:function(a){return 0!==this.hg[a].iu},jJ:function(a){for(var c=10,b=this.AL,e=this.Dq.RK,f=0;f<e;f++){var n=this.GU(a,c),c=c+b,m=a.substr(c,n.wh),c=c+(n.wh+n.El+n.wF+10);this.hg[m]=n;this.names[this.names.length]=m}},UM:56,VM:20,Jm:22,AL:36,zp:30,dw:function(a,c,b){for(var e="",f=0;f<c;f++)var n=a.charCodeAt(f+b).toString(16),e=1===n.length?"0"+n+e:n+e;return parseInt(e,16)},GU:function(a,c){var b={},e=this.dw;b.iu=e(a,2,c);b.au=e(a,4,c+10);b.iX=
e(a,4,c+14);b.wh=e(a,2,c+18);b.El=e(a,2,c+20);b.wF=e(a,2,c+22);b.offset=e(a,4,c+32);return b},IU:function(a){var c={},b=this.dw;c.wk=b(a,4,0);c.YZ=b(a,8,4);c.e0=b(a,2,12);c.f0=b(a,2,14);c.IP=b(a,4,16);c.NO=b(a,4,20);c.cU=b(a,8,24);c.RK=b(a,8,32);c.UF=b(a,8,40);c.ru=b(a,8,48);return c},FU:function(a){var c={},b=this.dw;c.wk=b(a,4,0);c.IP=b(a,2,4);c.NO=b(a,2,6);c.cU=b(a,2,8);c.RK=b(a,2,10);c.UF=b(a,4,12);c.ru=b(a,4,16);c.wF=b(a,2,20);return c},kJ:function(a){var c={},b=this.dw;c.wk=b(a,4,0);c.d0=b(a,
2,4);c.dc=b(a,2,6);c.iu=b(a,2,8);c.v_=b(a,2,10);c.u_=b(a,2,12);c.mZ=b(a,4,14);c.au=b(a,4,18);c.iX=b(a,4,22);c.wh=b(a,2,26);c.El=b(a,2,28);return c},jQ:101010256,PX:101075792,vI:67324752,wI:"PK\u0003\u0004"};f.inflate=function(a){return"string"===typeof a?b.Tm.inflate(a):b.nU.inflate(a,{nd:-15})};b.o=b.o||{};b.o.V=b.o.V||{};var a=b.o.V;a.lf=e;a.qj=f;a.Cy=Array(1024);b.gA=function(d,c,e,f){c=c||0;e=e||!1;var l="",n;n=!(_.isNull(d.responseBody)||_.isUndefined(d.responseBody));if(10===b.utils.ie&&n||
!b.Uint8Array&&n){n=d.responseBody;f=_.isArray(n)?n:(new b.VBArray(n)).toArray();c=f.length;d=Array(c);for(e=0;e<c;e++)d[e]=f[e]&255;e=c/1024+1;for(c=0;c<e;c++)l+=String.fromCharCode.apply(null,d.slice(1024*c,1024*c+1024))}else if(!b.Uint8Array||e||_.isUndefined(d.response))for(n=d.responseText,d=a.Cy,e=c;e<f;){for(c=0;1024>c&&e<f;++c)d[c]=n.charCodeAt(e)&255,++e;l+=String.fromCharCode.apply(null,d.slice(0,c))}else{n=d.response;f=new b.Uint8Array(n);n=f.length;e=c;if(b.utils.typedArrayApply)return f.subarray(c);
for(d=a.Cy;e<n;){c=0;for(var m=Math.min(e+1024,n);e<m;c++,e++)d[c]=f[e];l+=String.fromCharCode.apply(null,1024>c?d.slice(0,c):d)}}return l};b.o.V.dj={xs:0,DC:1,WL:2}})(window);
(function(b){function f(a,d,c){e.apply(this,arguments);if("xod"!==a.name.split(".").pop())throw Error("Not an XOD file");if(!b.FileReader||!b.File||!b.Blob)throw Error("File API is not supported in this browser");this.file=a;this.fu=[];this.Wy=0}var e=b.o.V.lf,c=b.o.V.qj;f.prototype=new e;f.prototype=_(f.prototype).extend({TA:function(a,d,c){var b=this,e=new FileReader;e.onloadend=function(a,f){if(0<b.fu.length){var m=b.fu.shift();m.JU.readAsBinaryString(m.file)}else b.Wy--;if(e.error){m=e.error;
if(m.code===m.ABORT_ERR){console.warn("Request for chunk "+d.start+"-"+d.stop+" was aborted");return}return c(m)}if(m=f||e.content||a.target.result)return c(!1,m);console.warn("No data was returned from FileReader.")};d&&(a=(a.slice||a.webkitSlice||a.mozSlice||a.vz).call(a,d.start,d.stop));0===b.fu.length&&50>b.Wy?(e.readAsBinaryString(a),b.Wy++):b.fu.push({JU:e,file:a});return function(){e.abort()}},yo:function(a){var d=this;d.eu=!0;var b=c.prototype.Jm;d.TA(d.file,{start:-b,stop:d.file.size},function(e,
f){if(e)return console.warn("Error loading end header: %s",e),a(e);if(f.length!==b)throw Error("Zip end header data is wrong size!");d.Lb=new c(f);var l=d.Lb.SG();d.TA(d.file,l,function(c,b){if(c)return console.warn("Error loading central directory: %s",c),a(c);if(b.length!==l.stop-l.start)throw Error("Zip central directory data is wrong size!");d.Lb.jJ(b);d.Ky=!0;d.eu=!1;return a(!1)})})},lJ:function(a,d){var c=this,b=c.Jf[a];if(!c.Lb.yF(a))return d(Error('File not found: "'+a+'"'),a);var e=c.Lb.Mq(a),
f=c.TA(c.file,e,function(b,k){delete c.Jf[a];if(b)return console.warn('Error loading part "%s": %s',a,b),d(b);if(k.length!==e.stop-e.start)throw Error("Part data is wrong size!");var f=c.Lb.YH(a);d(!1,a,k,f)});b.started=!0;b.cancel=f}});"FileReader"in window&&!FileReader.prototype.readAsBinaryString&&(FileReader.prototype.readAsBinaryString=function(a){var d="",c=this;c.content="";var b=new FileReader;b.onload=function(){for(var a=new Uint8Array(b.result),e=a.byteLength,f=0;f<e;f++)d+=String.fromCharCode(a[f]);
c.content+=d;$(c).trigger("onload");b.onloadend=function(){$(c).trigger("onloadend")}};b.readAsArrayBuffer(a)});b.o.V.KC=f;b.hf=b.hf||{};b.hf.dY=function(a){return{name:a.value.split(/[/\\]/).pop(),size:null,data:null,waiting:[],zA:!1,vz:function(a,c){return{JI:this,vz:this.vz,start:a,stop:c}}}};b.hf.eY=function(){return{error:!1,onloadend:function(){},result:null,readAsBinaryString:function(a){var d=a.JI||a,c=this,b=encodeURI(d.name);if(d.data)return this.tA(a);if(d.zA)return d.waiting.push(function(){c.tA(a)});
d.zA=!0;new JSIO.ZX(b,function(b){d.zA=!1;if(b)return console.error('Failed to load file "%s"',d.name),console.warn("File must be in same directory as this page for FakeFileReader to work"),c.error=Error('Failed to load file "%s"',d.name),c.onloadend(c.error);d.size=this.fileSize;d.data=this.read(this.fileSize);c.tA.call(c,a);for(b=0;b<d.waiting.length;b++)d.waiting[b]();d.waiting=[]})},tA:function(a){var d=a.JI||a,c=a.start||0;a=a.stop||d.size;null===c&&(c=d.size);null===a&&(a=d.size);0>c&&(c=d.size+
c);0>a&&(a=d.size+a);d=d.data.slice(c,a);c="";for(a=0;a<d.length/1E3;a++)c+=String.fromCharCode.apply(null,d.slice(1E3*a,1E3*a+1E3));this.result=c;this.onloadend({},c)}}}})(window);
(function(b){function f(b){this.file=b}f.prototype=$.extend({getFileData:function(b){var c=this,a=new FileReader;a.onload=function(a){c.trigger("documentLoadingProgress",[a.loaded,a.loaded]);b(new Uint8Array(a.target.result))};a.onprogress=function(a){a.lengthComputable&&c.trigger("documentLoadingProgress",[a.loaded,0<a.total?a.total:0])};a.readAsArrayBuffer(this.file)},getFile:function(){return b.utils.isJSWorker?this.file.path:this.file}},b.utils.eventHandler);b.o.V.TL=f})(window);
(function(b){function f(b){this.buffer=b}f.prototype=$.extend({getFileData:function(b){b(new Uint8Array(this.buffer))},getFile:function(){return null}},b.utils.eventHandler);b.o.V.qL=f})(window);
(function(b){function f(a,d,c){for(var b in a)this[b]=a[b];this.startOffset=d;this.endOffset=c;this.EF=function(d,c,b,g){_.isUndefined(c.stop)?(c.start+=this.endOffset,c.stop=this.endOffset):(c.start+=this.startOffset,c.stop+=this.startOffset);d=this.vq(this.url,c,this.En);return new a.Gr(d,c,b,g)}}function e(a,d,c,b){k.apply(this,[a,c,b]);this.Ti={};this.En=d;this.url=a}function c(){this.Qi=1}function a(a){var d=a.request,c=a.range;return function(g,e){if(g){if(g.code===d.Mb.Gk){b.utils.warn("Request for range "+
c.start+"-"+c.stop+" was aborted");return}return a.Ve.forEach(function(a){a("Error retrieving file: "+d.url+". Received return status "+g.status+".")})}return a.Ve.forEach(function(a){a(!1,e,d)})}}function d(a,d,c,g){this.url=a;this.range=d;this.xf=c;this.request=new XMLHttpRequest;this.request.open("GET",this.url,!0);b.Uint8Array&&(this.request.responseType="arraybuffer");g&&(this.request.withCredentials=g);e.DISABLE_RANGE_HEADER||(_.isUndefined(d.stop)?this.request.setRequestHeader("Range","bytes="+
d.start):this.request.setRequestHeader("Range",["bytes=",d.start,"-",d.stop-1].join("")));this.request.setRequestHeader("X-Requested-With","XMLHttpRequest");if(c)for(var k in c)this.request.setRequestHeader(k,c[k]);this.request.overrideMimeType?this.request.overrideMimeType("text/plain; charset=x-user-defined"):this.request.setRequestHeader("Accept-Charset","x-user-defined");this.status=this.Mb.ij}function g(a,d,c){for(var g=-1,e=0;e<c.length;e++)_.isEqual(c[e].range,d)&&_.isEqual(c[e].url,a)&&(g=
e);-1===g&&b.utils.warn(d+" not found in queue");return g}var k=b.o.V.lf,h=b.o.V.qj,l=[],n=[];d.prototype={constructor:d,start:function(a){var d=this,c=this.request;c.onreadystatechange=function(){if(d.ry)return d.status=d.Mb.Gk,a({code:d.Mb.Gk});if(this.readyState===d.SM.DONE){d.Vu();var g=0===window.document.URL.indexOf("file:///");200===c.status||206===c.status||g&&0===c.status?(g=b.gA(this),d.success(g,a)):(d.status=d.Mb.ERROR,a({code:d.status,status:this.status}))}};this.request.send(null);this.status=
this.Mb.Sk},success:function(a,d){this.status=this.Mb.xM;if(d)return d(!1,a)},abort:function(){this.Vu();this.ry=!0;this.request.abort()},Vu:function(){var d=g(this.url,this.range,n);-1!==d&&n.splice(d,1);if(0<l.length){var d=l.shift(),c=new this.constructor(d.url,d.range,this.xf,this.withCredentials);d.request=c;n.push(d);c.start(a(d))}},SM:{AY:0,DONE:4},Mb:{ij:0,Sk:1,xM:2,ERROR:3,Gk:4},extend:function(a){var d=$.extend({},this,a.prototype);d.constructor=a;return d}};b.i0=[];e.DISABLE_RANGE_HEADER=
!1;e.prototype={Gr:d,UL:3,vq:function(a,d,c){var g=-1===a.indexOf("?")?"?":"&";switch(c){case !1:case b.o.V.dj.xs:a=a+g+"_="+_.uniqueId();break;case !0:case b.o.V.dj.DC:a=a+g+"_="+d.start+","+(_.isUndefined(d.stop)?"":d.stop)}return a},EF:function(a,d,c,b){return new this.Gr(a,d,c,b)},lQ:function(a,d,c,b,g){for(var e=0;e<l.length;e++)if(_.isEqual(l[e].range,d)&&_.isEqual(l[e].url,a))return l[e].Ve.push(b),l[e].Jv++,null;for(e=0;e<n.length;e++)if(_.isEqual(n[e].range,d)&&_.isEqual(n[e].url,a))return n[e].Ve.push(b),
n[e].Jv++,null;c={url:a,range:d,En:c,Ve:[b],Jv:1,request:{}};if(0===l.length&&n.length<this.UL)return n.push(c),c.request=this.EF(a,d,g,this.withCredentials),c;l.push(c);return null},Xl:function(d,c,b){var e=this.vq(d,c,this.En);(d=this.lQ(e,c,this.En,b,this.xf))&&d.request.start(a(d));return function(){var a=g(e,c,n),d;-1!==a?(d=--n[a].Jv,0===d&&n[a].request.abort()):(a=g(e,c,l),-1!==a&&(d=--l[a].Jv,0===d&&l.splice(a,1)))}},VG:function(){return{start:-h.prototype.Jm}},pS:function(){var a=-(h.prototype.Jm+
h.prototype.VM);return{start:a-h.prototype.UM,end:a}},yo:function(a){var d=this;d.eu=!0;var c=h.prototype.Jm;d.Xl(d.url,d.VG(),function(g,e){function k(){var c=d.Lb.SG();d.Xl(d.url,c,function(g,e){if(g)return b.utils.warn("Error loading central directory: "+g),a(g);e=b.Yj(e);if(e.length!==c.stop-c.start)return a("Invalid XOD file: Zip central directory data is wrong size! Should be "+(c.stop-c.start)+" but is "+e.length);d.Lb.jJ(e);d.Ky=!0;d.eu=!1;return a(!1)})}if(g)return b.utils.warn("Error loading end header: "+
g),a(g);e=b.Yj(e);if(e.length!==c)return a("Invalid XOD file: Zip end header data is wrong size!");try{d.Lb=new h(e)}catch(f){return a(f)}d.Lb.sT?d.Xl(d.url,d.pS(),function(c,g){if(c)return b.utils.warn("Error loading zip64 header: "+c),a(c);g=b.Yj(g);d.Lb.HT(g);k()}):k()})},dA:function(a){a(Object.keys(this.Lb.hg))},lJ:function(a,d){var g=this;if(!g.Lb.yF(a))return delete g.Jf[a],d(Error('File not found: "'+a+'"'),a);var e=g.Lb.Qu(a);if(e in g.Ti){var k=g.Jf[a];k.In=g.Ti[e];k.In.Qi++;k.cancel=k.In.cancel}else{var f=
g.Lb.$Q(a),h=g.Xl(g.url,f,function(c,k){c?(b.utils.warn('Error loading part "'+a+'": '+c),g.Xl(g.url,f,function(c,b){if(c)return d(c,a);g.mJ(b,f,e,a,d)})):g.mJ(k,f,e,a,d)}),l=g.Jf[a];l&&(l.started=!0,l.cancel=function(){l.In.Qi--;0===l.In.Qi&&(h(),delete g.Ti[e])},g.Ti[e]=new c,l.In=g.Ti[e],l.In.cancel=l.cancel)}},mJ:function(a,d,c,b,g){if(a.length!==d.stop-d.start)return g(Error("Part data is wrong size!"),b);do{if(!this.Ti[c])return;b=this.Ti[c].Qi;for(var e=d.iJ.length,k=0;k<e;++k){var f=d.iJ[k];
g(!1,f.dm,a["string"===typeof a?"substring":"subarray"](f.start,f.stop),this.Lb.YH(f.dm));f.dm in this.Jf&&delete this.Jf[f.dm]}}while(b!==this.Ti[c].Qi);delete this.Ti[c]}};e.prototype=$.extend(new k,e.prototype);f.prototype=$.extend(new e,f.prototype);b.o.V.Kk=e;b.o.V.bx=d})(window);
(function(b){function f(c,a){e.apply(this,[c]);this.url=c;-1===a.indexOf("/",a.length-1)&&(a+="/");this.path=a}var e=b.o.V.lf;f.prototype=new e;f.prototype=_(f.prototype).extend({request:function(c){var a=this;_(c).each(function(d){var c=-1!==d.indexOf("Thumbs/"),k=-1!==d.indexOf("Fonts/");if(-1!==d.indexOf("Images/")||c||k)return a.trigger("partReady",{ra:d,data:d,wf:!0,ad:!1,error:null,Fb:!1});$.ajax({url:a.path+d,mimeType:"text/plain; charset=x-user-defined",xhrFields:{withCredentials:e.withCredentials},
xhr:function(){var a=$.ajaxSettings.xhr();a&&(this.VR=function(){return a.responseBody});return a},success:function(c){var g=b.utils.ie?this.VR():c;c="";var e,k,f;if(b.utils.ie){g=(new b.VBArray(g)).toArray();f=g.length;e=Array(f);for(k=0;k<f;k++)e[k]=g[k]&255;g=f/1024+1;for(k=0;k<g;k++)c+=String.fromCharCode.apply(null,e.slice(1024*k,1024*k+1024))}else for(e=b.o.V.Cy,k=0;k<g.length;){for(f=0;1024>f&&k<g.length;++f)e[f]=g.charCodeAt(k)&255,++k;c+=String.fromCharCode.apply(null,e.slice(0,f))}return a.trigger("partReady",
{ra:d,data:c,wf:!1,ad:!1,error:null,Fb:!0})},error:function(c,b,g){c=Error(b+" "+g);return a.trigger("partReady",{ra:d,wf:!1,ad:!!c.ry,error:c})}})})},yo:function(c){c()}});b.o.V.ox=f})(window);
(function(b){function f(b,c){c=c||{};this.url=b;this.filename=c.filename||b;this.xf=null;this.BX=!!c.useDownloader;this.withCredentials=!!c.withCredentials}f.prototype=$.extend({om:function(b){this.xf=b},getFileData:function(b){var c=new XMLHttpRequest,a=0===this.url.indexOf("blob:")?"blob":"arraybuffer";c.open("GET",this.url,!0);c.withCredentials=this.withCredentials;c.responseType=a;var d=this;if(this.xf)for(var g in this.xf)c.setRequestHeader(g,this.xf[g]);var k=/^https?:/i.test(this.url);c.addEventListener("load",
function(a){if(200===this.status||!k&&0===this.status)if(d.trigger("documentLoadingProgress",[a.loaded,a.loaded]),"blob"===this.responseType){a=this.response;var c=new FileReader;c.onload=function(a){b(new Uint8Array(a.target.result))};c.readAsArrayBuffer(a)}else try{c=new Uint8Array(this.response),b(c)}catch(g){d.trigger("error",["pdfLoad","Out of memory"])}else d.trigger("error",["pdfLoad",this.status+" "+a.currentTarget.statusText])},!1);c.onprogress=function(a){d.trigger("documentLoadingProgress",
[a.loaded,0<a.total?a.total:0])};c.addEventListener("error",function(){d.trigger("error",["pdfLoad","Network failure"])},!1);c.send();this.xhr=c},getFile:function(){if(b.utils.isJSWorker)return this.url;if(this.BX){var e={url:this.url};this.xf&&(e.customHeaders=this.xf);return e}return null},abort:function(){this.xhr&&this.xhr.abort()}},b.utils.eventHandler);b.o.V.ts=f})(window);
(function(b){function f(d,b,f,l){a.apply(this,[d,f,l]);this.url=d;this.stream=new c(d,b);this.Lb=new e;this.Er=createPromiseCapability();this.oJ={}}function e(){this.buffer="";this.state=0;this.vm=4;this.Uc=null;this.af=d.prototype.zp;this.hg={}}function c(a,d){var c=-1===a.indexOf("?")?"?":"&";switch(d){case !1:case b.o.V.dj.xs:this.url=a+c+"_="+_.uniqueId();break;default:this.url=a}this.request=new XMLHttpRequest;this.request.open("GET",this.url,!0);this.request.setRequestHeader("X-Requested-With",
"XMLHttpRequest");this.request.overrideMimeType?this.request.overrideMimeType("text/plain; charset=x-user-defined"):this.request.setRequestHeader("Accept-Charset","x-user-defined");this.status=this.Mb.ij}var a=b.o.V.lf,d=b.o.V.qj;c.prototype={start:function(a,d){var c=this,b=this.request,e;c.sg=0;if(a)for(var f in a)this.request.setRequestHeader(f,a[f]);d&&(this.request.withCredentials=d);this.Ni=setInterval(function(){var a=0===window.document.URL.indexOf("file:///"),a=200===b.status||a&&0===b.status;
if(4!==b.readyState||a){try{b.responseText}catch(d){return}c.sg<b.responseText.length&&(e=c.sB())&&c.trigger("data",e);0===b.readyState&&(clearInterval(c.Ni),c.trigger("done"))}else clearInterval(c.Ni),c.trigger("done","Error received return status "+b.status)},1E3);this.request.send(null);this.status=this.Mb.Sk},sB:function(){var a=this.request,d=a.responseText;if(0!==d.length)if(this.sg===d.length)clearInterval(this.Ni),this.trigger("done");else return d=Math.min(this.sg+3E6,d.length),a=b.gA(a,
this.sg,!0,d),this.sg=d,a},abort:function(){clearInterval(this.Ni);var a=this;this.request.onreadystatechange=function(){b.utils.warn("StreamingRequest aborted");a.status=a.Mb.Gk;return a.trigger("aborted")};this.request.abort()},finish:function(){var a=this;this.request.onreadystatechange=function(){a.status=a.Mb.px;return a.trigger("done")};this.request.abort()},Mb:{ij:0,Sk:1,px:2,ERROR:3,Gk:4}};_(c.prototype).extend(Backbone.Events);e.prototype=new d;e.prototype=_(e.prototype).extend({processData:function(a){var c;
for(a=this.buffer+a;a.length>=this.af;)switch(this.state){case 0:this.Uc=c=this.kJ(a.slice(0,this.af));if(c.wk!==this.vI)throw Error("Wrong signature in local header: "+c.wk);a=a.slice(this.af);this.state=1;this.af=c.au+c.wh+c.El+this.vm;this.trigger("header",c);break;case 1:if(this.Uc.name=a.slice(0,this.Uc.wh),this.hg[this.Uc.name]=this.Uc,c=this.af-this.vm,this.trigger("file",this.Uc.name,a.slice(this.Uc.wh+this.Uc.El,c),this.Uc.iu),a=a.slice(c),a.slice(0,this.vm)===this.wI)this.state=0,this.af=
d.prototype.zp;else return this.state=2,!0}this.buffer=a;return!1}});_(e.prototype).extend(Backbone.Events);f.prototype=new a;f.prototype=_(f.prototype).extend({hm:function(a){var d=this;this.request([this.Sf,this.Jg,this.Rf]);this.stream.bind("data",function(c){try{if(d.Lb.processData(c))return d.stream.finish()}catch(b){throw d.stream.abort(),d.Dl(b),a(b),b;}});this.stream.bind("done",function(c){d.tU=!0;d.Er.resolve();c&&(d.Dl(c),a(c))});this.Lb.bind("header",_(this.ew).bind(this));this.Lb.bind("file",
_(this.uB).bind(this));return this.stream.start(this.xf,this.withCredentials)},dA:function(a){var d=this;this.Er.promise.then(function(){a(Object.keys(d.Lb.hg))})},Ui:function(){return!0},request:function(a){var d=this;this.tU&&a.forEach(function(a){d.oJ[a]||d.hX(a)})},ew:function(){},abort:function(){this.stream&&this.stream.abort()},hX:function(a){this.trigger("partReady",{ra:a,error:"Requested part not found",wf:!1,ad:!1})},uB:function(a,d,c){this.oJ[a]=!0;this.trigger("partReady",{ra:a,data:d,
wf:!1,ad:!1,error:null,Fb:c})}});b.o.V.XC=f;b.o.V.vY=c})(window);
(function(b){function f(d,b,f,l){a.apply(this,[d,f,l]);this.url=d;this.stream=new c(d,b);this.Lb=new e(b,f,l,d.slice(0,d.lastIndexOf("/")+1));this.Er=createPromiseCapability();this.FP={};this.DJ=null;this.timeStamp=0}function e(a,c,b,e){this.En=a;this.decrypt=c;this.xl=b;this.buffer="";this.state=0;this.vm=4;this.Uc=null;this.af=d.prototype.zp;this.Go=[];this.ow=[];this.wr=this.$A=0;this.hg={};this.dV=e;this.Bv="";this.cw=null;this.QA="";this.AB=0;this.PT=5}function c(a,d){var c=-1===a.indexOf("?")?
"?":"&";switch(d){case !1:case b.o.V.dj.xs:this.url=a+c+"_="+_.uniqueId();break;default:this.url=a}this.request=new XMLHttpRequest;this.request.open("GET",this.url,!0);this.request.setRequestHeader("X-Requested-With","XMLHttpRequest");this.request.overrideMimeType?this.request.overrideMimeType("text/plain; charset=x-user-defined"):this.request.setRequestHeader("Accept-Charset","x-user-defined");this.status=this.Mb.ij}var a=b.o.V.lf,d=b.o.V.qj;c.prototype={start:function(a,d){var c=this,b=this.request,
e;c.sg=0;if(a)for(var f in a)this.request.setRequestHeader(f,a[f]);d&&(this.request.withCredentials=d);this.Ni=setInterval(function(){var a=0===window.document.URL.indexOf("file:///"),a=200===b.status||a&&0===b.status;if(4!==b.readyState||a){try{b.responseText}catch(d){return}c.sg<b.responseText.length&&(e=c.sB())&&c.trigger("data",e);0===b.readyState&&(clearInterval(c.Ni),c.trigger("done"))}else clearInterval(c.Ni),c.trigger("done","Error received return status "+b.status)},300);this.request.send(null);
this.status=this.Mb.Sk},sB:function(){var a=this.request,d=a.responseText;if(0!==d.length)if(this.sg===d.length)clearInterval(this.Ni),this.trigger("done");else return d=Math.min(this.sg+3E6,d.length),a=b.gA(a,this.sg,!0,d),this.sg=d,a},abort:function(){clearInterval(this.Ni);var a=this;this.request.onreadystatechange=function(){b.utils.warn("RangeStreamingRequest aborted");a.status=a.Mb.Gk;return a.trigger("aborted")};this.request.abort()},finish:function(){var a=this;this.request.onreadystatechange=
function(){a.status=a.Mb.px;return a.trigger("done")};this.request.abort()},Mb:{ij:0,Sk:1,px:2,ERROR:3,Gk:4}};_(c.prototype).extend(Backbone.Events);e.prototype=new d;e.prototype=_(e.prototype).extend({tP:function(a){a=b.utils.utf8_decode(a).split("\n");this.QA&&(a[0]=this.QA+a[0]);var d=a[a.length-1];d&&(this.QA=d,a.pop());0<a.length&&3>a[a.length-1].length&&a.pop();0<a.length&&3>a[0].length&&a.shift();return a},EU:function(a){if(!a)return!1;a=this.tP(a);for(var d=0,c=0,b,e=this.Bv,f=!1,r=0;r<a.length;++r)if(b=
a[r].trim().replace(/(^[[,]*|[\],]*$)/g,""),!(4>b.length)){b=JSON.parse(b)||{};b.url&&(this.Bv=this.dV+b.url,e!==this.Bv&&(d=0,f=!0),e=this.Bv);b.size&&(0===d&&(c=b.pos),d+=b.size,f||1048576<d||0===this.$A||a.length===r+1)&&(this.UA({start:c,stop:c+d,url:e}),d=0);if(b.end||0===b.size)return 0<d&&this.UA({start:c,stop:c+d,url:e}),!0;f=!1}return!1},UA:function(a){var d=this;if(0<this.$A&&0===this.wr)this.ow.push(a);else{var c=this.$A++;this.cw&&this.cw.url===a.url||(this.cw=new b.o.V.Kk(a.url,this.En,
this.decrypt,this.xl));var e=this.cw;++d.AB;e.Xl(a.url,a,function(b,e){--d.AB;d.fU(e,c,a)})}},uQ:function(){if(0<this.wr)for(;0<this.ow.length&&this.AB<this.PT;)this.UA(this.ow.shift())},fU:function(a,d,c){this.Go[d-this.wr]={data:a,range:c};for(a=d;this.wr===a;a++)0<this.Go.length&&this.Go[0]&&(this.processData(b.Yj(this.Go[0].data),this.Go[0].range),this.Go.shift(),++this.wr,this.uQ())},processData:function(a){var c;if(2===this.state)return!1;for(a=this.buffer+a;a.length>=this.af;)switch(this.state){case 0:this.Uc=
c=this.kJ(a.slice(0,this.af));if(c.wk!==this.vI)throw Error("Wrong signature in local header: "+c.wk);a=a.slice(this.af);this.state=1;this.af=c.au+c.wh+c.El+this.vm;this.trigger("header",c);break;case 1:if(this.Uc.name=a.slice(0,this.Uc.wh),this.hg[this.Uc.name]=this.Uc,c=this.af-this.vm,this.trigger("file",this.Uc.name,a.slice(this.Uc.wh+this.Uc.El,c),this.Uc.iu),a=a.slice(c),a.slice(0,this.vm)===this.wI)this.state=0,this.af=d.prototype.zp;else return this.state=2,!0}this.buffer=a;return!1}});_(e.prototype).extend(Backbone.Events);
f.prototype=new a;f.prototype=_(f.prototype).extend({hm:function(a){var d=this;this.request([this.Sf,this.Jg,this.Rf]);this.stream.bind("data",function(c){try{if(d.Lb.EU(c))return d.stream.finish()}catch(b){throw d.stream.abort(),d.Dl(b),a(b),b;}});this.stream.bind("done",function(c){d.Er.resolve();d.DJ={};c&&(d.Dl(c),a(c))});this.Lb.bind("header",_(this.ew).bind(this));this.Lb.bind("file",_(this.uB).bind(this));this.timeStamp=Date.now();return this.stream.start(this.xf,this.withCredentials)},dA:function(a){var d=
this;this.Er.promise.then(function(){a(Object.keys(d.Lb.hg))})},Ui:function(){return!0},request:function(){},ew:function(){},abort:function(){this.stream&&this.stream.abort()},uB:function(a,d,c){this.trigger("partReady",{ra:a,data:d,wf:!1,ad:!1,error:null,Fb:c});this.FP[a]={ra:a,data:null,Fb:c}}});b.o.V.sM=f;b.o.V.tY=c})(window);
(function(b){function f(c){e.apply(this,arguments);this.db=c}var e=b.o.V.lf;f.prototype=new e;f.prototype=_(f.prototype).extend({request:function(c){var a=this;_(c).each(function(d){a.db.get(d,function(c,b,e){return c?a.trigger("partReady",{ra:d,error:c}):a.trigger("partReady",{ra:d,data:b,wf:!1,ad:!1,error:null,Fb:e})})})},yo:function(c){c()}});b.o.V.Ip=f})(window);
(function(b){function f(a,d,b,e){c.apply(this,arguments)}function e(a,d){this.url=a;this.range=d;this.request=new XMLHttpRequest;this.request.open("GET",this.url,!0);b.Uint8Array&&(this.request.responseType="arraybuffer");this.request.setRequestHeader("X-Requested-With","XMLHttpRequest");this.status=this.Mb.ij}var c=b.o.V.Kk;e.prototype=b.o.V.bx.prototype.extend(e);f.prototype={Gr:e,vq:function(a,d){return a+"/bytes="+d.start+","+(d.stop?d.stop:"")}};f.prototype=$.extend(new c,f.prototype);b.o.V.pL=
f;b.o.V.YX=e})(window);
(function(b){b.o.CC=function(b,e,c){function a(a,c){function b(a){f().then(function(d){v&&!w?setTimeout(function(){b(a)},1):d.send(JSON.stringify(a))})}function e(a,d,c){var g=createPromiseCapability(),f=!1,h=g;p=a;u=d;q=c;m=null;try{var l=new WebSocket(A?r+"/"+A:r+"/ws");l.onopen=function(){g.resolve();f=!0;g=null;v=!1;n.resolve(l);u&&u()};l.onerror=function(a){v=w=!0;g&&g.reject(a);m&&m.reject()};l.onclose=function(){n=createPromiseCapability();v=!0;m||(m=createPromiseCapability());m.resolve();
q&&q();p&&f&&p({t:"health",data:{unhealthy:!0}})};l.onmessage=function(a){a&&a.data&&(a=JSON.parse(a.data),a.hb?b({hb:!0}):a.end?close():p(a))}}catch(D){g.reject(D),g=null}return h.promise}function f(){v&&p&&e(p);return n.promise}var n=createPromiseCapability(),m=null,r=function(a){var d=a.indexOf("://"),c="ws://";0>d?d=0:(5===d&&(c="wss://"),d+=3);var b=a.lastIndexOf("/");0>b&&(b=a.length);return c+a.slice(d,b)}(a),p=null,u=null,q=null,v=!1,w=!1,A=c;return{send:b,eC:e,pz:function(){return m?m.promise:
f().then(function(a){m=createPromiseCapability();p=null;a.close();return m.promise})}}}return window.WebSocket&&!c?a(b,e):function(a,c){function b(a){(u?u.promise:Promise.resolve(p)).then(function(d){var c=new XMLHttpRequest;d=r?m+"/"+r+"pf?id="+d:m+"/pf?id="+d;var b=new FormData;b.append("data",JSON.stringify(a));c.open("POST",d);c.withCredentials=!0;c.send(b)})}function e(){p=0;u||(u=createPromiseCapability())}function f(){n=new XMLHttpRequest;var a=m+"/pf",a=0!==p?a+("?id="+p+"&uc="+A):a+("?uc="+
A);A++;n.open("GET",a,!0);n.withCredentials=!0;n.setRequestHeader("Cache-Control","no-cache");n.setRequestHeader("X-Requested-With","XMLHttpRequest");var d=n,c=!1;n.onreadystatechange=function(){a:{var a;if(3<=d.readyState&&!c){try{a=d.responseText.length}catch(g){console.log("caught exception");break a}if(0<a)try{var n=d.responseText.split("\n");for(n[n.length-1]&&n.pop();0<n.length&&3>n[n.length-1].length;)"]"===n.pop()&&e();0<n.length&&3>n[0].length&&n.shift();for(a=0;a<n.length;++a)n[a].endsWith(",")&&
(n[a]=n[a].substr(0,n[a].length-1));0===p&&0<n.length&&(p=JSON.parse(n.shift()).id,a=u,u=null,a.resolve(p));var v;for(a=0;a<n.length;++a)(v=JSON.parse(n[a]))&&v.end?close():v&&v.hb&&v.id===p?b({hb:!0}):w(v)}catch(g){}q||(c=!0,f())}}};n.send()}var n,m=function(a){var d=a.lastIndexOf("/");0>d&&(d=a.length);return a.slice(0,d)}(a),r=c,p=0,u=createPromiseCapability(),q=!1,v=null,w=null,A=0;return{send:b,eC:function(a,d,c){w=a;v=c;q=!1;e();f();d&&d();return Promise.resolve()},pz:function(){e();w=null;
q=!0;v&&v();n.abort();return Promise.resolve()}}}(b,e)}})(window);
(function(b){function f(a,d,f){d.endsWith("/")||(d+="/");f=f||{};var l=f.disableWebsockets||!1;d.endsWith("blackbox/")||(d+="blackbox/");this.Ak=f.uploadData||null;this.as=f.uriData||null;this.gF=f.cacheKey||null;this.Uy=b.o.CC(d,null,l);this.Jw=null;this.Ie=d;this.hz=a;this.le=null;this.bm=e();this.Pj=e();this.Ty=!1;this.Te=this.Yc=this.od=this.Wd=null;this.ue=[];this.Hu=[];this.cache={};this.DJ=null;this.ow=[];this.timeStamp=0;this.Fe=[];this.If=[];this.xz=null;this.Xy=!1;this.OB=this.id=null;this.RA=
this.LH=c;this.Or=0;this.uA=!1;this.$T=1;this.xv={};this.Sr(!0)}function e(){var a={promise:null,resolve:null,reject:null,state:0,result:null,request:null,hr:function(){return 1===(a.state&1)},hT:function(){return 2===(a.state&2)},qg:function(){return!a.hT()&&!a.hr()},bT:function(){return 4===(a.state&4)},ZJ:function(){a.state|=4}};a.promise=new Promise(function(d,c){a.resolve=function(){if(0===a.state||4===a.state)a.state=1,a.result=arguments[0],d.apply(null,arguments)};a.reject=function(){if(0===
a.state||4===a.state)a.state=2,c.apply(null,arguments)}});return a}function c(){return!1}function a(a,c,b){if(!(c in d))return!0;c=d[c];for(var e=0;e<c.length;e++){var f;var m=a;f=c[e];var r=b;if(f.name in m){var p="",u=!1,m=m[f.name];switch(f.type){case "s":p="String";u=_.isString(m);break;case "a":p="Array";u=_.isArray(m);break;case "n":p="Number";u=_.isNumber(m)&&_.isFinite(m);break;case "o":p="Object",u=_.isObject(m)&&!_.isArray(m)}u||r.reject('Expected response field "'+f.name+'" to have type '+
p);f=u}else r.reject('Response missing field "'+f.name+'"'),f=!1;if(!f)return!1}return!0}var d={pages:[{name:"pages",type:"a"}],pdf:[{name:"url",type:"s"}],docmod:[{name:"url",type:"s"},{name:"rID",type:"s"}],health:[],tiles:[{name:"z",type:"n"},{name:"rID",type:"n"},{name:"tiles",type:"a"},{name:"size",type:"n"}],annots:[{name:"url",type:"s"},{name:"name",type:"s"}],image:[{name:"url",type:"s"},{name:"name",type:"s"},{name:"p",type:"n"}],text:[{name:"url",type:"s"},{name:"name",type:"s"},{name:"p",
type:"n"}]};f.prototype=_(f.prototype).extend({AP:function(){var a=createPromiseCapability();if(this.Jw){var d=!1,c=new XMLHttpRequest;c.open("GET",this.Ie+"ck?c="+this.Jw);c.withCredentials=this.oo();c.onreadystatechange=function(){3<=c.readyState&&!d&&(d=!0,200===c.status?a.resolve():a.reject())};c.send()}else a.resolve();return a.promise},RV:function(a,d){this.LH=a||c;this.RA=d||c},uF:function(){var a=this;a.Pj=e();a.bm=e();return this.Uy.pz().then(function(){function d(){a.Ty=!1;a.id=null;a.Xy=
!1;return Promise.resolve()}return a.AP().then(d,d)})},FJ:function(){this.LH();this.BA();this.Wd&&(this.Wd.qg()?this.He(this.Wd.request):this.Wd.hr()&&this.RA(this.Wd.result.url,"pdf")&&(this.Wd=null,this.EJ()));this.Te&&this.Te.qg()&&this.He(this.Te.request);this.od&&this.od.qg()?this.He(this.od.request):this.Yc&&this.Yc.qg()&&this.DH(this.Yc.request);var a;for(a=0;a<this.Fe.length;a++)this.Fe[a]&&this.Fe[a]&&(this.Fe[a].qg()?this.He(this.Fe[a].request):this.Fe[a].hr()&&this.RA(this.Fe[a].result.url,
"image")&&(this.Fe[a]=null,this.mw(a)));for(a=0;a<this.If.length;a++)this.If[a]&&this.If[a]&&this.If[a].qg()&&!this.If[a].bT()&&this.He(this.If[a].request);for(a=0;a<this.ue.length;a++)this.ue[a]&&this.ue[a].qg()&&this.He(this.ue[a].request)},BA:function(){var a=this;this.Ty||(this.timeStamp=Date.now(),this.Uy.eC(function(d){a.gU(d)}).then(function(){},function(d){console.log("Connection Failed: "+d);a.Xy=!0;a.Or=0;a.OB=0;a.Pj.resolve({unhealthy:!0,id:0,serverID:"0",hasPDF:!0,hasXOD:!1});a.bm.resolve()}),
this.Ty=!0)},zX:function(){var a,d,c,e,f=this,m=createPromiseCapability(),r=!1,p=!1;if(this.Ak)a=new FormData,a.append("file",this.Ak.fileHandle,this.Ak.fileHandle.name),d=this.Ak.loadCallback,e="upload",c=this.Ak.extension;else if(this.as)a={uri:this.as.uri,share:this.as.shareId},r=!0,p=void 0,d=this.as.loadCallback,e="url",c=this.as.extension;else return Promise.resolve();$.ajax({type:"POST",url:b.joinPaths(f.Ie,"AuxUpload?ext="+c+"&type="+e),contentType:p,xhrFields:{withCredentials:this.oo()},
data:a,processData:r,dataType:"json",success:function(a){f.hz=a.uri;d(a);m.resolve(a)},error:function(a){console.log(a);m.reject(a)},xhr:function(){var a=$.ajaxSettings.xhr();f.Ak&&null!=f.Ak.onProgress&&(a.upload.onprogress=function(a){f.Ak.onProgress(a)});return a}});return m.promise},hm:function(a){this.xz=a||null;this.bm.hr()||(this.BA(),this.He({t:"pages"}));return this.bm.promise},xF:function(a){a=$.extend(a,{uri:encodeURIComponent(this.hz)});this.xz&&(a.ext=this.xz);this.le&&(a.c=this.le);
this.gF&&(a.cacheKey=this.gF);return a},He:function(a){a=this.xF(a);this.Uy.send(a)},ei:function(a){return a},gU:function(d){var c=this,b,f=d.data,n=d.err,m=d.t;switch(m){case "upload":n?c.AX.reject(n):c.AX.resolve("Success");break;case "pages":n?c.bm.reject(n):a(f,m,c.bm)&&c.bm.resolve(f);break;case "config":n?c.Pj.reject(n):a(f,m,c.Pj)&&(f.id&&(c.id=f.id),f.sCookieName&&(c.Jw=f.sCookieName),f.serverID?(c.Or=f.serverID===c.OB&&c.uA?c.Or+1:0,c.OB=f.serverID):c.Or=0,c.uA=!1,c.Pj.resolve(f));break;
case "health":n?c.Pj.reject(n):a(f,m,c.Pj)&&!c.GZ&&f.unhealthy&&c.Jw&&1>=c.Or&&(c.uA=!0,c.uF().then(function(){c.FJ()},function(){c.FJ()}));break;case "pdf":f.url=c.Ie+"../"+encodeURI(f.url);n?c.Wd.reject(n):a(f,m,c.Wd)&&c.Wd.resolve(f);break;case "docmod":f.url=c.Ie+"../"+encodeURI(f.url);n?c.xv[f.rID].reject(n):a(f,m,c.Wd)&&c.xv[f.rID].resolve(f);break;case "xod":if(n)this.od&&this.od.qg()&&this.od.reject(n),this.Yc&&this.Yc.qg()&&this.Yc.reject(n);else if(f.notFound)f.noCreate||this.od&&this.od.qg()&&
this.od.resolve(f),this.Yc&&this.Yc.qg()&&this.Yc.resolve(f);else{f.url&&(f.url=c.Ie+"../"+encodeURI(f.url));if(!this.Yc||this.Yc.hr())this.Yc=e(),this.Yc.request={t:"xod",noCreate:!0};this.od||(this.od=e(),this.od.request={t:"xod"});this.Yc.resolve(f);this.od.resolve(f)}break;case "annots":n?c.Te.reject(n):a(f,m,c.Te)&&(c.Te.ZJ(),$.ajax({dataType:"text",url:c.Ie+"../"+encodeURI(f.url),xhrFields:{withCredentials:this.oo()},success:function(a){c.Te.resolve(a)},error:function(a,d,b){c.Te.reject(d+(b?
": "+JSON.stringify(b):""))}}));break;case "image":b=this.Fe[f.p];n?b.promise.reject(n):a(f,m,b)&&(b.result=f,b.result.url=c.Ie+"../"+encodeURI(b.result.url),b.resolve(b.result));break;case "tiles":b=f.rID;d=this.ue[b];this.ue[b]=null;this.Hu.push(b);if(n)d.reject(n);else if(a(f,m,d)){for(n=0;n<f.tiles.length;n++)f.tiles[n]=c.Ie+"../"+encodeURI(f.tiles[n]);d.resolve(f)}break;case "text":b=this.If[f.p];n?b.reject(n):a(f,m,b)&&(b.ZJ(),$.ajax({dataType:"json",xhrFields:{withCredentials:this.oo()},url:c.Ie+
"../"+encodeURI(f.url),success:function(a){b.result=a;b.resolve(b.result)},error:function(a,d,c){b.reject(d+(c?": "+JSON.stringify(c):""))}}));break;case "progress":"loading"===f.t&&c.trigger("documentLoadingProgress",[f.bytes,f.total])}},PG:function(){this.BA();return this.Pj.promise},HG:function(){this.Te||(this.Te=e(),this.Te.request={t:"annots"},this.He(this.Te.request));return this.Te.promise},mw:function(a){this.Fe[a]||(this.Fe[a]=e(),this.Fe[a].request={t:"image",p:a},this.He(this.Fe[a].request));
return this.Fe[a].promise},VU:function(a){this.If[a]||(this.If[a]=e(),this.If[a].request={t:"text",p:a},this.He(this.If[a].request));return this.If[a].promise},WU:function(a,d,c,b){var f=this.ue.length;this.Hu.length&&(f=this.Hu.pop());this.ue[f]=e();this.ue[f].request={t:"tiles",p:a,z:d,r:c,size:b,rID:f};this.He(this.ue[f].request);return this.ue[f].promise},EJ:function(){this.Wd||(this.Wd=e(),this.Wd.request={t:"pdf"},this.Xy?this.Wd.resolve({url:this.hz}):this.He(this.Wd.request));return this.Wd.promise},
cH:function(a){var d=new XMLHttpRequest,c=this.Ie+"aul?id="+this.id,b=new FormData,f={};a.annots&&(f.annots="xfdf");a.watermark&&(f.watermark="png");a.redactions&&(f.redactions="redact");f={t:"docmod",reqID:this.$T++,parts:f};a.print&&(f.print=!0);f=this.xF(f);b.append("msg",JSON.stringify(f));a.annots&&b.append("annots",a.annots);a.watermark&&b.append("watermark",a.watermark);a.redactions&&b.append("redactions",a.redactions);this.xv[f.reqID]=e();d.open("POST",c);d.withCredentials=this.oo;d.send(b);
return this.xv[f.reqID].promise},DH:function(){this.Yc||(this.Yc=e(),this.Yc.request={t:"xod",noCreate:!0},this.He(this.Yc.request));return this.Yc.promise},XU:function(){this.od||(this.od=e(),this.od.request={t:"xod"},this.He(this.od.request));return this.od.promise},Ui:function(){return!0},request:function(){},ew:function(){},abort:function(){for(var a=0;a<this.ue.length;a++)this.ue[a]&&(this.ue[a].resolve(null),this.ue[a]=null,this.Hu.push(a));this.close()},om:function(a){this.le=this.le||{};this.le.headers=
a},UQ:function(){return this.le?_.omit(this.le.headers,["Cookie","cookie"]):null},Sr:function(a){this.le=this.le||{};this.le.internal=this.le.internal||{};this.le.internal.withCredentials=a},oo:function(){return this.le&&this.le.internal?this.le.internal.withCredentials:null},getFileData:function(){return Promise.reject()}},b.utils.eventHandler);b.o.V.ls=f})(window);
(function(b){function f(a,d,b,e){c.apply(this,arguments)}function e(a,d){this.url=a;this.range=d;this.status=this.Mb.ij}var c=b.o.V.Kk,a=b.o.V.bx,d={};e.prototype={start:function(a){var c=this;d[this.range.start]={success:function(d){var e=atob(d),f,h=e.length;d=new Uint8Array(h);for(f=0;f<h;++f)d[f]=e.charCodeAt(f);e=d.length;f="";var p=0;if(b.utils.typedArrayApply)for(;p<e;)h=d.subarray(p,p+1024),p+=1024,f+=String.fromCharCode.apply(null,h);else for(h=Array(1024);p<e;){for(var u=0,q=Math.min(p+
1024,e);p<q;u++,p++)h[u]=d[p];f+=String.fromCharCode.apply(null,1024>u?h.slice(0,u):h)}c.success(f,a)},fail:function(){c.status=c.Mb.ERROR;a({code:c.status})}};var e=document.createElement("IFRAME");e.setAttribute("src",this.url);document.documentElement.appendChild(e);e.parentNode.removeChild(e);e=null;this.status=this.Mb.Sk;c.Vu()}};e.prototype=a.prototype.extend(e);f.prototype={Gr:e,vq:function(a,d){return a+"#"+d.start+"&"+(d.stop?d.stop:"")}};f.prototype=$.extend(new c,f.prototype);b.o.V.xp=
f;b.o.V.hY=e;b.o.V.xp.nB=function(a,c){var b=d[c];delete d[c];b.success(a)};b.o.V.xp.mB=function(a,c){var b=d[c];delete d[c];b.fail()}})(window);
(function(b){function f(a,d,b,e){c.apply(this,arguments)}function e(a,d){this.url=a;this.range=d;this.status=this.Mb.ij}var c=b.o.V.Kk,a=b.o.V.bx,d={};e.prototype={start:function(a){function c(){e.status=e.Mb.ERROR;a({code:e.status})}function b(d){var c=atob(d),f,k=c.length;d=new Uint8Array(k);for(f=0;f<k;++f)d[f]=c.charCodeAt(f);c=d.length;f="";for(var h=0;h<c;)k=d.subarray(h,h+1024),h+=1024,f+=String.fromCharCode.apply(null,k);e.success(f,a)}var e=this;"undefined"===typeof d[this.range.start]&&
(d[this.range.start]={success:b,fail:c},window.external.notify(this.url),this.status=this.Mb.Sk);e.Vu()}};e.prototype=a.prototype.extend(e);f.prototype={Gr:e,vq:function(a,d){return a+"?"+d.start+"&"+(d.stop?d.stop:"")}};f.prototype=$.extend(new c,f.prototype);b.o.V.Jp=f;b.o.V.BY=e;b.o.V.Jp.nB=function(a,c){var b=d[c];delete d[c];b.success(a)};b.o.V.Jp.mB=function(a,c){var b=d[c];delete d[c];b.fail()}})(window);
(function(b){function f(){e.apply(this,arguments)}var e=b.o.V.Kk;f.prototype=$.extend(new e,{VG:function(){return{start:this.qG-b.o.V.qj.prototype.Jm,stop:this.qG}},yo:function(c){var a=this;this.Xl(this.url,{start:0,stop:1},function(d,b,f){if(d)return c(d);d=f.request.getResponseHeader("Content-Range");a.qG=d.split("/")[1];e.prototype.yo.call(a,c)})}});b.o.V.tL=f})(window);
(function(b){function f(a,d,e,g){this.Yd=a;this.Mv=!1;this.cache=new c(b.gx,a.Ui());a.decrypt&&a.Ui()&&(this.Cl=new c(b.gx,a.Ui()));this.J=d;this.ma=g;this.Ji={};this.Wr={};this.Zt={};this.mu={};this.Iu=[];this.Fl={};this.Ge=e;this.Pv=_.bind(this.Pv,this);a.bind("partReady",this.Pv)}function e(a){window._indexedDB=window._indexedDB||window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;window._IDBTransaction=window._IDBTransaction||window.IDBTransaction||window.webkitIDBTransaction;
window._IDBTransaction&&!window._IDBTransaction.READ_WRITE&&(window._IDBTransaction.READ_WRITE="readwrite");this.name=a;this.db=null;this.MF="1";this.uu=this.ad=!1}function c(a,d){this.QT=this.Jr=a;this.queue=[];this.yQ=d}function a(a,d){this.Hf=a;this.$I=d;this.Ve={};this.sh={};this.ad=!1;for(var c=0;c<d.length;c++)this.sh[d[c]]=!0}function d(){this.index=0;this.data={functions:[],Ve:[],done:!1};this.nc=[]}function g(a){this.data=a;this.nc=[];this.Of=[]}function k(a,d){this.Hf=a;this.Ta={};this.rb=
null;this.Ga=d}var h=b.o.V.ox;b.zz=!1;b.o.Wz=function(a,d){if(b.utils.hasObjectURL){"string"===typeof d&&(d=b.wH(d));var c;try{c=new Blob([d],{type:a})}catch(e){window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.oY||window.nY,window.BlobBuilder&&(c=new window.BlobBuilder,c.append(d),c=c.getBlob(a))}if(c)return URL.createObjectURL(c)}else return"data:"+a+";base64,"+btoa(d)};b.o.$G=function(a,d){return b.o.Wz("image/"+("jpg"===a?"jpeg":a),d)};g.prototype={init:function(a){if(this.data){var d=
this;b.oS(this.data,this.ma,function(c){d.worker=c;d.fs();d.Q_=[];d.Qw=!1;d.data=null;a()},function(a,c){a?d.Of.push(a):d.Qw=!0;d.zZ=c;var b=d.callback;d.callback=null;b&&b()})}else a()},cancel:function(){for(var a=0;a<this.nc.length;a++){for(var d=0;d<this.nc[a].saves;d++)this.nc[a].restore();this.nc[a].saves=0}this.nc=[];this.worker&&this.worker.cancel()},clone:function(){return new g(this.data)},run:function(a,d,c){if(this.Of.length){-1===this.nc.indexOf(a)&&this.nc.push(a);c=Date.now()+c;do this.fs(),
runEval(this.Of.shift(),a,d);while(this.Of.length&&c>Date.now());return!1}return!0},zr:function(){var a=this;this.worker||this.init(function(){a.fs()});return new Promise(function(d){a.Qw||a.Of.length?d():a.callback=d})},fs:function(){if(this.Qw)return!1;this.worker.Hv()},Vy:function(a){return new Function("c","t",a)},Cz:function(a){var d=this;this.init(function(){function c(){if(d.Of.length){d.fs();var b=d.Of.map(function(a){return d.Vy(a)});d.Of=[];a(b)}else a()}d.Qw||d.Of.length?c():d.callback=
c})}};d.prototype={clone:function(){var a=new d;a.data=this.data;a.index=0;return a},cancel:function(){for(var a=0;a<this.nc.length;a++){for(var d=0;d<this.nc[a].saves;d++)this.nc[a].restore();this.nc[a].saves=0}this.nc=[];this.Ju&&this.Ju.cancel()},BF:function(a){return new g(a)},Cz:function(a,d){function c(){e.Ju.Cz(function(a){a?(e.data.functions=e.data.functions.concat(a),b.setImmediate(c,0)):(e.data.done=!0,e.Ju=null,d());a=e.data.Ve.length;if(0<a){for(var g=0;g<a;++g)e.data.Ve[g]();e.data.Ve=
[]}})}this.data.done=!1;var e=this;this.Ju=this.BF(a);e.data.functions=[];c();this.index=0},zr:function(){var a=this;return new Promise(function(d){a.data.done||a.index<a.data.functions.length?d():a.data.Ve.push(d)})},run:function(a,d,c){-1===this.nc.indexOf(a)&&this.nc.push(a);if(this.index<this.data.functions.length){c=Date.now()+c;var b=this.data.functions[this.index];do++this.index,b(a,d),b=this.data.functions[this.index];while(b&&c>Date.now());return!1}return!0},iV:g.prototype.iV};a.prototype=
{$S:function(){return 0===_(this.sh).keys().length}};c.prototype={getItem:function(a){return this[a]||null},setItem:function(a,d,c){if(a in this)this.queue.splice(this.queue.indexOf(a),1),this.queue.push(a);else if(this.yQ)this[a]={data:d,Fb:c},this.queue.push(a);else if(d.length<this.QT/2){for(;this.Jr<d.length;){var b=this.queue[0];this.Jr+=this[b].data.length;delete this[b];this.queue.shift()}this.Jr-=d.length;this[a]={data:d,Fb:c};this.queue.push(a)}}};e.prototype={open:function(a,d){var c=this,
b=window._indexedDB.open(c.name);if(_.isUndefined(b))d("User declined to increase space");else{b.onsuccess=function(){c.db=b.result;if(c.db.setVersion&&c.db.version!==c.MF){var a=c.db.setVersion(c.MF);a.onsuccess=function(){c.db.objectStoreNames.contains(c.name)&&c.db.deleteObjectStore(c.name);c.db.createObjectStore(c.name,{keyPath:"partName"});a.result.oncomplete=e}}else e()};b.onupgradeneeded=function(a){c.db=a.target.result;c.db.objectStoreNames.contains(c.name)&&c.db.deleteObjectStore(c.name);
c.db.createObjectStore(c.name,{keyPath:"partName"})};b.onerror=function(){d("Error opening database for offline mode")};var e=function(){c.get("NumParts",function(b,e){if(b)c.uu=!1,a();else{var g=c.db.transaction([c.name]).objectStore(c.name).count();g.onsuccess=function(){c.uu=g.result===e;a()};g.onerror=function(){d("Error opening database for offline mode")}}})}}},HK:function(a,d,c,b){var e=this.db.transaction([this.name],window._IDBTransaction.READ_WRITE);e.oncomplete=function(){b&&b()};e.onerror=
function(){b&&b();throw Error("Error adding "+a+" to the offline database");};e.objectStore(this.name).put({partName:a,partData:d,compressed:c})},VW:function(a,d,c,b,e,g){function f(g){a.Bf(g,function(a){var c=d.indexOf(a.ra);-1<c&&delete d[c];k()||h.HK(a.ra,a.data,a.Fb,function(){k()||(A++,e(A/B),A===B&&(h.uu=!0,b()))})},!0,c)}function k(){h.ad&&!z&&(z=!0,g(d),b());return z}var h=this;h.ad=!1;b=b||function(){};e=e||function(){};g=g||function(){};var A=0,B=d.length,z=!1;h.HK("NumParts",B+1,!1,function(){for(var a=
0;a<B;a++)f(d[a])})},KO:function(){this.ad=!0},get:function(a,d){var c=this.db.transaction([this.name]).objectStore(this.name).get(a);c.onsuccess=function(){c.result?d(!1,c.result.partData,c.result.compressed):d("Part "+a+" not found in the offline database")};c.onerror=function(){d("Error getting "+a+" from offline database")}},gk:function(){return this.uu}};f.prototype={Bf:function(a,d,c,e){function g(a){a=$.extend({},a);h.Cl&&e&&(a.data=h.Cl.getItem(a.ra).data);d(a)}var f=this.cache.getItem(a);
if(!e&&null!==f){var k=f.Fb;f.Fb&&!c?(c=b.o.V.qj.inflate(f.data),k=!1):c=f.data;d({ra:a,data:c,wf:!0,ad:!1,error:null,Fb:k});return d}if(this.Cl&&e&&(k=this.Cl.getItem(a)))return d({ra:a,data:k.data,wf:!0,ad:!1,error:null,Fb:k.Fb}),d;var h=this;this.bind(a,g);this.Zt[a]=!0;this.mu[a]=!c;this.Yd.request([a],e);return g},Pv:function(a){if(a.error)console.error("Error reading part "+a.ra+": "+a.error),this.trigger(a.ra,{ra:a.ra,error:a.error}),this.unbind(a.ra);else{var d=this,c=function(c){var e=a.ra.match(/\.([a-zA-Z]+)$/)[1].toLowerCase();
"jpg"!==e&&"png"!==e&&(c=b.Yj(c));a.EI||(d.cache.setItem(a.ra,c,a.Fb),d.Cl&&d.Cl.setItem(a.ra,a.data,a.Fb));d.Zt[a.ra]&&((e=a.Fb)&&d.mu[a.ra]&&(c=b.o.V.qj.inflate(c),e=!1),delete d.Zt[a.ra],delete d.mu[a.ra],d.trigger(a.ra,{ra:a.ra,data:c,wf:!1,ad:!1,error:null,Fb:e}),d.unbind(a.ra),delete d._callbacks[a.ra])};this.Yd.decrypt&&!a.EI?this.Yd.JF?c(this.Yd.decrypt(a.data,this.Yd.xl,a.ra)):this.Yd.decrypt(a.data,this.Yd.xl,a.ra,c):c(a.data)}},nA:function(a){return this.NA?"Thumbs/"+(a+1)+".jpg":"Thumbs/"+
(a+1)+".png"},mA:function(a,d,c){var b=this,e=!1,g=this.Bf(this.nA(a),function(a){e=a.wf;b.zJ(d);c(a)});e||(this.Wr[d]={MO:g,Jb:a})},hH:function(a,d){var c=this,e=this.J[a].Nr[0];if(a in c.Fl)d(c.Fl[a].clone());else return c.Bf(e,function(e){if(e.error)return console.error("Failed to load part for page "+a+": "+e.error);c.zQ(e.data,function(e){if(b.Km){if(c.Iu.length>=b.Km){var g=c.Iu.shift();delete c.Fl[g]}c.Iu.push(a);c.Fl[a]=e}d(e.clone())})},!0)},aA:function(d,c,e){function g(a){if(a.error)return console.error("Failed to load part for page "+
d+": "+a.error);delete z.sh[A];v.Gj&&0!==v.iq.length||(v.iq=h.oU(a.ra,a.data).map(function(a){a.PageNumber=d+1;return a}));f()}function f(){if(z.$S()){if(null===F.rb)throw Error("Functions have not been generated yet");z.ad||y||(delete h.Ji[d],h.trigger(d,!1,F),e(!1,F),y=!0,h.unbind(d+""),h._callbacks&&delete h._callbacks[d+""])}}var h=this;this.Ji[d]=this.Ji[d]||{Mo:{}};var q=0<Object.keys(this.Ji[d].Mo).length;this.Ji[d].Mo[c]=null;if(q)return b.utils.warn("Duplicate request for page "+d),q=function(a,
d){var c=$.extend({},d);c.rb=d.rb.clone();c.Ta=$.extend(!0,{},c.Ta);e(a,c)},this.Ji[d].Mo[c]=q,this.bind(d,q);var v=h.J[d],w=v.Nr[2],A=v.Nr[1],B=v.Nr[0],z;z=this.Mv?new a(d,[B,A,w]):new a(d,[B,w]);this.Ji[d].request=z;var x=z.Ve,y=!1,F=new k(d,h);x[w]=h.Bf(w,function(a){if(a.error)return console.error("Failed to load part for page "+d+": "+a.error);a=h.rU(a.ra,a.data);delete z.sh[w];_(a).each(function(a){z.sh[a.slice(1)]=!0});_(a).each(function(a){a=a.slice(1);var c=-1!==a.indexOf(".odttf")||-1!==
a.indexOf(".otf"),e=-1!==a.indexOf(".png")||-1!==a.indexOf(".jpg");b.zz&&c?(delete z.sh[a],F.Ta[a]=h.ei(a)):c&&!h.Ge.nv(h.ei(a).name)?(z.$I.push(a),x[a]=h.Bf(a,function(c){if(c.error)return console.error("Failed to load part for page "+d+": "+c.error);delete z.sh[a];F.Ta[a]=h.ei(c.ra,c.data);f()})):e&&b.zz?(delete z.sh[a],setTimeout(function(){h.Bf(a,function(a){a=h.ei(a.ra,a.data);var c=new Image;c.src=a.data;$(c).css({position:"absolute","z-index":8,height:"100%",width:"100%"}).prependTo("#pageContainer"+
d)})},0)):(delete z.sh[a],F.Ta[a]=h.ei(a),f())});f()});this.Mv&&(x[A]=h.Bf(A,g));x[B]=this.hH(d,function(a){F.rb=a;delete z.sh[B];f()})},Kb:function(){var a=this;Object.keys(this.Fl).forEach(function(d){a.Fl[d].cancel()})},zQ:function(a,d){if(b.Km){var c=new b.o.sL(this.ma);c.Cz(a,function(){});d(c)}else d(new b.o.rL(this.ma,a))},qq:function(a,d){var c=this.Ji[a];if(c){this.Yd.Iy(c.request.$I);var b=c.Mo[d];b&&this.unbind(a+"",b);delete c.Mo[d];if(0===Object.keys(c.Mo).length){c.ad=!0;var c=c.Ve,
e;for(e in c)c.hasOwnProperty(e)&&this.unbind(e,c[e]);delete this._callbacks[a+""];delete this.Ji[a]}}},LO:function(a){var d=this.Wr[a];d&&(this.Yd.Iy([this.nA(d.Jb)]),this.zJ(a))},zJ:function(a){var d=this.Wr[a];d&&(this.unbind(this.nA(d.Jb),d.MO),delete this.Wr[a])},ei:function(a,d){var c,e=a,g=a.match(/\.([a-zA-Z]+)$/)[1].toLowerCase();switch(g){case "png":case "jpg":a="i"+this.ma+"-"+a.match(/Images\/(\d+)/)[1];if(d){c=h&&this.Yd instanceof h?this.Yd.path+d:b.o.$G(g,d);break}break;case "odttf":var f;
d&&(f=this.BP(a,d));a=b.ef.Qz(this.ma,parseInt(a.substr(34,8),16));d&&(c=new b.ef.FontFace(a,f,"opentype"),this.Ge.IA(a)||c.insert());g="font";break;case "otf":a=a.substr(0,a.length-4);a=b.ef.Qz(this.ma,parseInt(a.substr(6),10));if(d){if(h&&this.Yd instanceof h)g=this.Yd.path;else throw Error("Use an external part retriever for documents with external fonts");c=new b.ef.FontFace(a,null,"opentype",g+d);this.Ge.IA(a)||c.insert()}g="font";break;default:c=d}return{name:a,type:g,data:c,ra:e}},rU:function(a,
d){var c=[],e=new b.Re(d);for(e.oa();e.advance();){var g=e.K("Target");null!==g?c.push(g):b.utils.warn("Corrupt rels part: %s",a)}0<c.length&&_(c).last().match(/Thumbs/)&&c.pop();return c},oU:function(a,d){var c=[],e=new b.Re(d);for(e.oa();e.advance();){for(var g=e.ua(),f=e.K("BBox"),f=f.split(","),k=0;4>k;++k)f[k]=parseFloat(f[k]);"Hyperlink"===g?c.push(new b.Annotations.rd({actions:{U:[{name:"URI",uri:e.K("Target")}]},rect:f})):"Link"===g&&c.push(new b.Annotations.rd({actions:{U:[{name:"GoTo",dest:{page:e.K("ID"),
fit:"XYZ",top:e.K("Vpos"),left:e.K("Hpos")}}]},rect:f}))}return c},BP:function(a,d){a=a.split("/")[1].split(".")[0];for(var c=a.split("-"),b=[],e=16,g=0;g<c.length;++g)for(var f=c[g],k=0;k<f.length;k+=2)b[--e]=parseInt(f.slice(k,k+2),16);for(c=0;16>c;++c)e=b[c],b[c]=String.fromCharCode(d.charCodeAt(c)^e),b[c+16]=String.fromCharCode(d.charCodeAt(c+16)^e);return d=b.join("")+d.slice(32)}};_(f.prototype).extend(Backbone.Events);b.o.V.aM=f;b.o.eM=e;b.o.CL=g;b.o.DL=d})(window);
(function(b){function f(a){this.index=0;this.data={functions:[],Ve:[],done:!1};this.nc=[];this.rz=new c(a);this.ma=a}function e(a,d){this.data=d;this.nc=[];this.Of=[];this.rz=new c(a);this.ma=a}function c(a){this.ma=a;this.Fi=0;this.Ta=[];this.Gi=[0,0]}c.prototype={Pr:function(a,d,c){this.m_c=d;this.Cc=c;d=a.operators;a=a.data;var e=d.length;this.iC=b.asc(c);this.$W=1/this.iC;for(var f=0;f<e;++f)c=d[f],this[c].apply(this,a[f]);this.wv=null},save:function(){this.m_c.save()},restore:function(){this.m_c.restore()},
transform:function(a,d,c,b,e,f){this.m_c.transform(a,d,c,b,e,f)},translate:function(a,d){this.m_c.translate(a,d)},QV:function(a,d){this.m_c.lineWidth=Math.max(a,this.$W/d)},OV:function(a){this.m_c.lineCap=a},KG:function(a){var d=a.type;if(d)switch(d){case 1:a=this.createPattern(a);break;case 2:a=this.createLinearGradient(a);break;case 3:a=this.createRadialGradient(a);break;case 4:a=this.iP(a)}return a},vW:function(a){this.m_c.strokeStyle=this.KG(a)},IV:function(a){this.m_c.fillStyle=this.KG(a)},cV:function(a){var d=
this.UR(a);a=d.LT;for(var d=d.KT,c,b=a.length,e=0;e<b;++e)c=a[e],this[c].apply(this,d[e])},JV:function(a){this.m_c.globalAlpha=a},CF:function(a,d){for(var c=d.length,b=0;b<c;++b){var e=d[b],f=d[++b];a.addColorStop(e,f)}},lP:function(a){var d=this.m_c,c=this.Cc,b=a.operators,e=this.iC*a.scale,f=a.w*e,n=a.h*e;2>e*a.minwh&&(e=2/a.minwh,f=a.w*e,n=a.h*e);var m=this.m_c.createCanvas();m.width=f;m.height=n;var f=m.getContext("2d"),n=a.x||a.y,r={};n&&(r.x=a.x,r.y=a.y);r.s=1/e;f.scale(e,e);n&&f.translate(-a.x,
-a.y);a.strokeAdjust&&(this.m_c.lineWidth=e*a.strokeAdjust);this.Pr(b,f,this.Cc);this.m_c=d;this.Cc=c;return{canvas:m,transform:r}},createPattern:function(a){var d;this.wv&&a===this.wv.style?d=this.wv:(d=this.lP(a),d.style=a,d.pattern=this.m_c.createPattern(d.canvas,a.tm),this.wv=d);a=d.transform;a.x&&this.m_c.translate(a.x,a.y);this.m_c.scale(a.s,a.s);return d.pattern},createLinearGradient:function(a){var d=this.m_c.createLinearGradient(a.x0,a.y0,a.x1,a.y1);this.CF(d,a.stops);return d},createRadialGradient:function(a){var d=
this.m_c.createRadialGradient(a.x0,a.y0,0,a.x1,a.y1,a.r);this.CF(d,a.stops);return d},iP:function(a){return this.m_c.createPattern(b.ci[a.name],a.tm)},dO:function(a){this.Fi+=a},zW:function(a){this.Fi=a},addColorStop:function(a,d){this.s_.addColorStop(a,d)},beginPath:function(){this.m_c.beginPath()},closePath:function(){this.m_c.closePath()},fill:function(a){a?this.m_c.fill(a):this.m_c.fill()},stroke:function(){this.m_c.stroke()},clip:function(a){a?this.m_c.clip(a):this.m_c.clip()},moveTo:function(a,
d){this.m_c.moveTo(a,d)},lineTo:function(a,d){this.m_c.lineTo(a,d)},quadraticCurveTo:function(a,d,c,b){this.m_c.quadraticCurveTo(a,d,c,b)},bezierCurveTo:function(a,d,c,b,e,f){this.m_c.bezierCurveTo(a,d,c,b,e,f)},font:function(a){var d=a;1!==window.utils.canvasFontMultiplier&&(d=parseFloat(a),d/=window.utils.canvasFontMultiplier,d=a.replace(/\d+/,d));this.m_c.font=d},fillText:function(a,d,c){this.m_c.fillText(a,this.Fi+d,c)},measureText:function(a){this.Fi+=this.m_c.measureText(a).width},drawImage:function(a){window.ci[a]&&
this.m_c.drawImage(window.ci[a],0,0)},TP:function(a,d){for(var c=window.ci[a],e=Math.log(1/(this.iC*d))*b.o.xy,f=1,l=1;l<e;++l){var n=this.m_c.createCanvas();n.width=.5*c.width;n.height=.5*c.height;n.getContext("2d").drawImage(c,0,0,n.width,n.height);c=n;f*=2}this.m_c.scale(f,f);this.m_c.drawImage(c,0,0)},PV:function(a){this.m_c.lineJoin=a},KV:function(a){this.m_c.globalCompositeOperation=a},cO:function(a,d,c){this.Ta.push({LT:d,KT:c,name:a})},UR:function(a){var d=this.Ta.length-1;do{var c=this.Ta[d];
if(c.name===a)return c}while(0<=--d)},QU:function(){this.Ta.pop()},SU:function(a,d,c,e){var f=this.Cc.W({x:d.x1,y:d.y1}),l=f.x,f=f.y;d=this.Cc.W({x:d.x2,y:d.y2});var n=d.x,m=d.y;d=[];var r=this.Gi[0],p=this.Gi[1],u=r+this.m_c.canvas.width,q=p+this.m_c.canvas.height;l<n?(l<r&&(l=r),n>u&&(n=u),d[0]=Math.floor(l),d[2]=Math.ceil(n-l)):(n<r&&(n=r),l>u&&(l=u),d[2]=Math.ceil(l-n),d[0]=Math.floor(n));f<m?(f<p&&(f=p),m>q&&(m=q),d[1]=Math.floor(f),d[3]=Math.ceil(m-f)):(m<p&&(m=p),f>q&&(f=q),d[3]=Math.ceil(f-
m),d[1]=Math.floor(m));0<d[2]&&0<d[3]&&(l=this.m_c,f=this.m_c.createCanvas(),f.width=d[2],f.height=d[3],n=this.Gi,this.Gi=d,m=f.getContext("2d"),m.translate(-d[0],-d[1]),m.transform(this.Cc.m_a,this.Cc.m_b,this.Cc.m_c,this.Cc.m_d,this.Cc.m_h,this.Cc.m_v),m.transform.apply(m,a.mtx),this.Pr(a,m,this.Cc),e&&(a=this.m_c.createCanvas(),a.width=d[2],a.height=d[3],m=a.getContext("2d"),m.beginPath(),m.moveTo(0,0),m.lineTo(d[2],0),m.lineTo(d[2],d[3]),m.lineTo(0,d[3]),m.closePath(),m.translate(-d[0],-d[1]),
m.transform(this.Cc.m_a,this.Cc.m_b,this.Cc.m_c,this.Cc.m_d,this.Cc.m_h,this.Cc.m_v),m.transform.apply(m,e.mtx),this.Pr(e,m,this.Cc),m.globalCompositeOperation="source-in",m.setTransform(1,0,0,1,0,0),m.drawImage(f,0,0),f=a),this.Gi=n,"source-over"===c||b.utils.specialBlendSupported?(l.save(),l.globalCompositeOperation=c,l.setTransform(1,0,0,1,d[0]-this.Gi[0],d[1]-this.Gi[1]),l.drawImage(f,0,0),l.restore()):m.bO(l,c,{x:d[0]-this.Gi[0],y:d[1]-this.Gi[1]}),this.m_c=l)},cX:function(a){this.m_c.tm(a)},
miterLimit:function(a){this.m_c.miterLimit=a},rP:function(){this.m_c.cgb()},sP:function(){this.m_c.cge()},setTransform:function(a,d,c,b,e,f){this.m_c.setTransform(a,d,c,b,e,f)},scale:function(a,d){this.m_c.scale(a,d)},qQ:function(a,d,c){this.m_c.xw(a+" ",this.Fi+d,c)},fillRect:function(a,d,c,b){this.m_c.fillRect(a,d,c,b)},rQ:function(a,d,c){this.m_c.xcw(a+" ",this.Fi+d,c)},fillTextCustom:function(a,d,c){this.m_c.xc(a,this.Fi+d,c)}};c.prototype[0]=c.prototype.save;c.prototype[1]=c.prototype.restore;
c.prototype[2]=c.prototype.transform;c.prototype[3]=c.prototype.translate;c.prototype[4]=c.prototype.QV;c.prototype[5]=c.prototype.OV;c.prototype[6]=c.prototype.vW;c.prototype[7]=c.prototype.IV;c.prototype[8]=c.prototype.JV;c.prototype[9]=c.prototype.cO;c.prototype[10]=c.prototype.QU;c.prototype[11]=c.prototype.dO;c.prototype[12]=c.prototype.cV;c.prototype[13]=c.prototype.beginPath;c.prototype[14]=c.prototype.closePath;c.prototype[15]=c.prototype.fill;c.prototype[16]=c.prototype.stroke;c.prototype[17]=
c.prototype.clip;c.prototype[18]=c.prototype.moveTo;c.prototype[19]=c.prototype.lineTo;c.prototype[20]=c.prototype.quadraticCurveTo;c.prototype[21]=c.prototype.bezierCurveTo;c.prototype[22]=c.prototype.font;c.prototype[23]=c.prototype.fillText;c.prototype[24]=c.prototype.measureText;c.prototype[25]=c.prototype.zW;c.prototype[26]=c.prototype.miterLimit;c.prototype[27]=c.prototype.PV;c.prototype[28]=c.prototype.drawImage;c.prototype[29]=c.prototype.setTransform;c.prototype[30]=c.prototype.scale;c.prototype[31]=
c.prototype.qQ;c.prototype[32]=c.prototype.rP;c.prototype[33]=c.prototype.sP;c.prototype[34]=c.prototype.KV;c.prototype[35]=c.prototype.cX;c.prototype[36]=c.prototype.SU;c.prototype[37]=c.prototype.fillRect;c.prototype[39]=c.prototype.rQ;c.prototype[38]=c.prototype.fillTextCustom;e.prototype={clone:function(){return new e(this.ma,this.data)},run:function(a,d){return this.Of.length?(this.fs(),-1===this.nc.indexOf(a)&&this.nc.push(a),this.m_c=a,this.Cc=d,this.rz.Pr(this.Of.shift(),a,d),!1):this.yz=
!0},Vy:function(a){return a}};e.prototype=$.extend(Object.create(b.o.CL.prototype),e.prototype);f.prototype={BF:function(a){return new e(this.ma,a)},clone:function(){var a=new f(this.ma);a.data=this.data;a.index=0;return a},run:function(a,d){var c=this.data.functions[this.index];this.index++;-1===this.nc.indexOf(a)&&this.nc.push(a);return c?(this.rz.Pr(c,a,d),!1):!0}};f.prototype=$.extend(Object.create(b.o.DL.prototype),f.prototype);b.o.uV=function(a){!0===a&&(a=1.4);b.o.xy=a;c.prototype[28]=a?c.prototype.TP:
c.prototype.drawImage};b.o.rL=e;b.o.sL=f})(window);
(function(b){var f=window.o;f.Fm=function(){this.init()};f.Fm.prototype={init:function(){this.bP=!1;this.Ie=this.ai=this.Ln=null;this.Cn={};this.da=this.Ow=null},oX:function(b){for(var c=0;c<b.length;++c){var a=b[c],d;switch(a.at){case "create":this.Cn[a.author]||(this.Cn[a.author]=a.aName);d=this.da.vo(a.xfdf)[0];d["authorId "]=a.author;this.da.Wb(d);this.da.trigger("updateAnnotationPermission",[d]);break;case "modify":d=this.da.vo(a.xfdf)[0];this.da.Wb(d);break;case "delete":this.da.vo("<delete><id>"+
a.aId+"</id></delete>")}}},nS:function(b,c,a){this.ai&&this.ai(b,c,a)},AU:function(b){this.one("blackBoxAnnotationsEnabled",this.nS.bind(this,{imported:!1},b,"add"))},SS:function(e,c,a){var d=this;if(e){d.Ie=c;d.da=a.Qa();a.on("documentUnloaded",function(){d.ez()});d.IX(e);var g=new XMLHttpRequest;g.addEventListener("load",function(){if(200===g.status&&0<g.responseText.length)try{var a=JSON.parse(g.responseText);d.Ln=b.o.CC(b.joinPaths(d.Ie,"blackbox/"),"annot");d.Ow=a.id;d.Cn[a.id]=a.user_name;d.da.QB(a.id);
d.Ln.eC(function(a){a.t&&a.t.startsWith("a_")&&a.data&&d.oX(a.data)},function(){d.Ln.send({t:"a_retrieve",dId:e});d.trigger("blackBoxAnnotationsEnabled",[d.Cn[a.id],d.Ow])},function(){d.ez()})}catch(c){console.error(c.message)}});g.open("GET",b.joinPaths(this.Ie,"demo/SessionInfo.jsp"));g.withCredentials=!0;g.send();d.bP=!0;d.da.UJ(function(a){return d.Cn[a.Author]||a.Author})}else console.error("Document ID required for collaboration")},ez:function(){this.ai&&(this.da.off("annotationChanged",this.ai),
this.ai=null);this.Ln&&this.Ln.pz();this.da&&this.da.QB("Guest");this.init();this.trigger("blackBoxAnnotationsDisabled")},IX:function(b){var c=this;this.ai&&this.da.off("annotationChanged",this.ai);this.ai=function(a,d,g){if(!a.imported){a={t:"a_"+g,dId:b,annots:[]};var f=c.da.Ku(),h,l;"delete"!==g&&(h=(new DOMParser).parseFromString(f,"text/xml"),l=new XMLSerializer);for(f=0;f<d.length;f++){var n=d[f],m;if("add"===g){m=h.querySelector('[name="'+n.Id+'"]');m=l.serializeToString(m);var r=null;n.InReplyTo&&
(r=c.da.Wj(n.InReplyTo).authorId||"default");a.annots.push({at:"create",aId:n.Id,author:c.Ow,aName:c.Cn[c.Ow],parent:r,xfdf:"<add>"+m+"</add>"})}else"modify"===g?(m=h.querySelector('[name="'+n.Id+'"]'),m=l.serializeToString(m),a.annots.push({at:"modify",aId:n.Id,xfdf:"<modify>"+m+"</modify>"})):"delete"===g&&a.annots.push({at:"delete",aId:n.Id})}0<a.annots.length&&c.Ln.send(a)}}.bind(c);this.da.on("annotationChanged",this.ai)}};$.extend(f.Fm.prototype,b.utils.eventHandler)})(window);
(function(b){function f(a){return g[a]||"Unknown"}b.Annotations=b.Annotations||{};var e=b.Annotations,c;if(!(c=!Object.defineProperty)){var a;try{Object.defineProperty({},"x",{}),a=!0}catch(k){a=!1}c=!a}c&&(Object.defineProperty=function(a,d,c){if(a!==Object(a))throw new TypeError("Object.defineProperty called on non-object");Object.prototype.__defineGetter__&&"get"in c&&Object.prototype.__defineGetter__.call(a,d,c.get);Object.prototype.__defineSetter__&&"set"in c&&Object.prototype.__defineSetter__.call(a,
d,c.set);"value"in c&&(a[d]=c.value);return a});"function"!==typeof Object.defineProperties&&(Object.defineProperties=function(a,d){if(a!==Object(a))throw new TypeError("Object.defineProperties called on non-object");for(var c in d)Object.prototype.hasOwnProperty.call(d,c)&&Object.defineProperty(a,c,d[c]);return a});var d,g={arrow:"Arrow",callout:"Callout",caret:"Caret",ellipse:"Ellipse",freehand:"Free Hand",freetext:"FreeText",highlight:"Highlight",line:"Line",polygon:"Polygon",polyline:"Polyline",
rectangle:"Rectangle",redact:"Redaction",signature:"Signature",squiggly:"Squiggly",stamp:"Stamp",stickyNote:"Comment",strikeout:"Strikeout",underline:"Underline",custom:"Custom"};b.$C=function(a){this.xu=[a]};b.$C.prototype={writeStartElement:function(a){a=document.createElementNS("",a);this.xu.push(a)},writeAttributeString:function(a,d){this.top().setAttribute(a,d)},writeEndElement:function(){var a=this.xu.pop();this.top().appendChild(a)},top:function(){return this.xu[this.xu.length-1]}};e.ja={Lk:1,
extraSelectorsEnabled:!1,zc:function(a){return f(a)},zV:function(a){f=a},TF:function(a,d){for(var c=[],b=Math.min(a+1,d-1),e=Math.max(0,a-1);e<=b;++e)c.push(e);return c},LF:function(a){return null===a?"":0<a.length?a.replace(/&[^;]*;/g,function(a){switch(a.charAt(1)){case "q":return'"';case "a":return"&";case "l":return"<";case "g":return">";case "#":return"x"===a.charAt(2)?String.fromCharCode(parseInt(a.substring(3,a.length-1),16)):String.fromCharCode(parseInt(a.substring(2,a.length-1),10))}return a}):
""},DP:function(a,d,c){var g=c.u.getDocument(),f=d.getAttribute("page"),f=parseInt(f,10),r=[],p=[];if(d.hasAttribute("selidxs"))var u=d.getAttribute("selidxs"),r=e.ba.EP(u);else b.utils.warn("annot_extra_selectors","deserializeExtraSelectors: No index-based selector in XFDF.");if(d.hasAttribute("surrtxts_0_0"))for(u=0;;){if(d.hasAttribute("surrtxts_"+u+"_0")&&d.hasAttribute("surrtxts_"+u+"_1")){var q=d.getAttribute("surrtxts_"+u+"_0");if(null===q)break;var v=d.getAttribute("surrtxts_"+u+"_1");if(null===
v)break;var w=[];w.push(e.ja.LF(q));w.push(e.ja.LF(v));p.push(w)}else break;u++}else b.utils.warn("annot_extra_selectors","deserializeExtraSelectors: No surrounding-text-based selector in XFDF.");if(0>=r.length&&0>=p.length)b.utils.warn("annot_extra_selectors","deserializeExtraSelectors: No extra selector data deserialized."),a.Xf=!1;else{a.Xf=!0;a.Sg=null;a.uf=null;a.sE=!1;a.Op=!1;a.Ct=!0;var A=function(){var d=c.u.getDocument();if(d!==g)a.Xf=!1;else{var d=new XODText.mj(d),b;0<r.length&&(b=d.OR(f,
r,a.eh()),b.status&&(a.Sg=b.value));0<p.length&&(b=d.NR(f,p,a.eh()),b.status&&(a.uf=b.value,a.PageNumber=b.em+1));a.trigger("quadsCalculatedFromExtraSelectors");a.sE=!0}},B=function(){var d=c.u.getDocument();if(d!==g)a.Xf=!1;else{var b=d.vb()-1,e=[];0===f&&1<=b?(e.push(f+1),e.push(f),a.Ct=!1,d.or(e).then(A)):0<f&&b>=f+1&&(e.push(f+1),e.push(f-1),e.push(f),a.Ct=!1,d.or(e).then(A))}};0===p.length?(a.Ct=!1,g.or(f).then(A)):(a.pE||(c.u.off("layoutChanged",B),c.u.on("layoutChanged",B),c.u.one("documentUnloaded",
function(){c.u.off("layoutChanged",B)}),a.pE=!0),g.bc().then(function(){c.u.off("layoutChanged",B);a.pE=!1;var d=c.u.getDocument();if(d===g&&a.Ct){var b=e.ja.TF(f,d.vb());d.or(b).then(A)}else c.u.off("layoutChanged",B),a.Xf=!1}))}},HV:function(a){this.extraSelectorsEnabled=a},RG:function(a){return!a||a instanceof Date?a:new Date(a)},qS:function(){function a(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()},measureText:function(a,
d,c,b){var e=document.getElementById("text-width-tester");"number"===typeof d&&(d+="px");a=a.split("\n").join("<br>&nbsp;").split(" ").join("&nbsp;");if(e)e.style.fontFamily=c,e.style.fontSize=d,e.style.fontWeight=b,e.innerHTML=a;else{var g="display:none;";_.isString(c)&&(g+="font-family:"+c+";");_.isUndefined(d)||(g+="font-size:"+d+";");_.isUndefined(b)||(g+="font-weight:"+b+";");e=document.createElement("span");e.id="text-width-tester";e.cssText=g;e.innerHTML=a;document.getElementsByTagName("body")[0].appendChild(e)}a=
$(e);a.show();d={width:a.width(),height:a.height()};a.hide();return d},eS:function(a,c){var b=(d||(d=document.createElement("canvas"))).getContext("2d");b.font=c;return b.measureText(a).width},Vz:function(a,d){if(!Array.isArray(d)||!d.length)return console.warn("Number format array for measurement should have at least one number format dictionary in it"),"";var c=Array(d.length),b=c.length;c[0]=a;for(var e=1;e<b;e++){var g=c[e-1],f=g%1;c[e-1]=Math.trunc(g);c[e]=f*d[e].factor}var u=this;return c.map(function(a,
c){var e=d[c],g=e.unit;return c===b-1?u.VT(a,e)+" "+g:u.RE(a.toString(),e.thousandsSymbol)+" "+g}).join(" ")},VT:function(a,d){var c,b,e=d.display;"D"===e?(b=d.precision,0!==b%10&&console.warn("precision for decimal display must be a multiple of 10"),b=a.toFixed((b/10).toString().length).split("."),c=b[0],b=d.decimalSymbol+b[1]):"F"===e?(c=Math.trunc(a).toString(),b=d.precision,b=" "+Math.round(a%1*b)+"/"+b):"R"===e?(c=Math.round(a).toString(),b=""):"T"===e&&(c=Math.trunc(a).toString(),b="");return this.RE(c,
d.thousandsSymbol)+b},RE:function(a,d){for(var c=a.length-3;0<c;c-=3)a=a.slice(0,c)+d+a.slice(c);return a},mK:function(a,d,c){var b=e.ja.Uu(a);a=b.bw;if((b=b.xq)&&a)if(Array.isArray(d)&&Array.isArray(c)){var g={mm:.1,cm:1,m:100,km:1E5,mi:160394,yd:91.44,ft:30.48,"in":2.54,pt:.0352778},f=b[a],p=d[0],u=d[1],q=c[0],v=c[1];b.scale=d.join(" ")+" = "+c.join(" ");f[f.length-1].unit="area"===a?"sq "+v:v;b.axis[0].factor=q/p*(g.pt/g[u])}else console.warn("Both arguments for setting scale must be array");else console.warn("Unable to set scale to an annotation or a tool which has incorrect IT or no measure dictionary")},
iK:function(a,d){var c=e.ja.Uu(a),b=c.bw;(c=c.xq)&&b?"number"!==typeof d?console.warn("The argument for setting precision must be a number"):c[b].forEach(function(a){a.precision&&(a.precision=1/d)}):console.warn("Unable to set precision to an annotation or a tool which has incorrect IT or no measure dictionary")},sH:function(a){var d=e.ja.Uu(a);a=d.xq;d=d.bw;if(a&&d){var c=a.scale.match(/(\d*(?:.\d+)?\s\w+)\s=\s(\d*(?:.\d+)?\s\w+)/);if(c){var d=c[1],c=c[2],b;d&&c?(b=[d.split(" "),c.split(" ")],b[0][0]=
Number(b[0][0]),b[1][0]=Number(b[1][0])):console.warn("Unable to convert scale from: ",a.scale," to format [[value, unit], [value, unit]]");return b}console.warn("Invalid scale: ",a.scale)}},lH:function(a){var d=e.ja.Uu(a);a=d.bw;if((d=d.xq)&&a)return a=d[a],(a=a[a.length-1].precision)?a=1/a:console.warn("Unable to get precision from: ",a),a},Uu:function(a){var d=a.IT,c;if("LineDimension"===d||"PolyLineDimension"===d)c="distance";"PolygonDimension"===d&&(c="area");return{bw:c,xq:a.Measure}},vG:function(a,
d,c,b){if(d){d.style.fontSize=c+"px";a=0;for(var e;a<=c;)e=Math.floor((a+c)/2),d.style.overflow="hidden",d.offsetHeight,d.style.fontSize=e+"px",b&&(d.style.lineHeight=b(e)),d.style.overflow="auto",d.scrollHeight>Math.ceil($(d).outerHeight())?c=e-1:a=e+1;d.scrollHeight>Math.ceil($(d).outerHeight())&&(d.style.fontSize=parseFloat(d.style.fontSize)-1+"px");return parseFloat(d.style.fontSize)}return c/2},eQ:function(a,d){if(b.utils.disableFormCharacterProcessing)$(a).on("change",function(){d({change:this.value,
bI:!0})});else $(a).on("input",function(a){a.change=this.value;d(a)})},RP:function(a,d,c,e){a.save();a.translate(d.x,d.y);a.rotate(b.ae.Math.CQ(d,c));a.moveTo(0,0);c=5*e+2;d=Math.cos(.2*Math.PI)*c;c*=Math.sin(.2*Math.PI);a.moveTo(d,-c);a.lineTo(0,0);a.lineTo(d,c);a.stroke();a.restore()},lq:function(a,d){var c=a.W({x:0,y:0}),b=a.W({x:Number(d),y:0}),e=c.x-b.x,c=c.y-b.y;return Math.sqrt(e*e+c*c)},ZF:function(a,d,c){d.beginPath();var g=b.ae.Math.aP(c);b.ae.Math.cJ(c)&&(g[g.length]={x:g[0].x,y:g[0].y});
if(!(2>=g.length)){var f=a.Intensity;f||(f=2);var r=1/8092,p=b.ae.Math.LR(g);a=1!==Math.round(p);c=0;for(var u=6.5*f,q=g[0],v=u,w=u,A={x:g[1].x-g[0].x,y:g[1].y-g[0].y},B={x:g[0].x-g[g.length-2].x,y:g[0].y-g[g.length-2].y},f=!0,z=!1,x=0,y,F,K,G=0;G<g.length-1;++G){var D=g[G],L=g[G+1],L={x:L.x-D.x,y:L.y-D.y},I=Math.sqrt(L.x*L.x+L.y*L.y);if(!(I<=r)){var O={x:L.x/I,y:L.y/I},N=Math.max(Math.floor(I/u),1),I=I/N;c=b.ae.Math.DQ(O.x,O.y);if(0===G&&3>=g.length){var H=Math.sqrt(A.x*A.x+A.y*A.y);if(H<u){d.arc(g[0].x,
g[0].y,H,0,2*Math.PI);return}if(H<2*I){y=H/2;d.arc(g[0].x,g[0].y,y,0,2*Math.PI);d.moveTo(g[1].x+y,g[1].y);d.arc(g[1].x,g[1].y,y,0,2*Math.PI);d.moveTo(g[0].x+y,g[0].y);return}d.arc(g[0].x,g[0].y,I/2,0,2*Math.PI);d.moveTo(g[1].x+I/2,g[1].y);d.arc(g[1].x,g[1].y,I/2,0,2*Math.PI);d.moveTo(g[0].x+I/2,g[0].y)}0===G&&(x=I,y={x:O.x,y:O.y});D.x-=O.x*I*.5;D.y-=O.y*I*.5;B=b.ae.Math.pP(B,L);H=0;z||(++H,w=I,f=0>B*p,D.x+=O.x*I,D.y+=O.y*I,q=D,d.moveTo(q.x,q.y),F=q.x,K=q.y,z=!0);for(v=.25*(v+I);H<N;++H)D.x+=O.x*I,
D.y+=O.y*I,K=e.ja.arcTo(F,K,d,v,v,c,0===H&&0>B*p,a,D.x,D.y),F=K.TW,K=K.UW;B=L;v=I}}z||(d.moveTo(q.x,q.y),F=q.x,K=q.y);y&&(r=.25*(w+v),e.ja.arcTo(F,K,d,r,r,c,f,a,g[g.length-1].x+.5*x*y.x,g[g.length-1].y+.5*x*y.y))}},arcTo:function(a,d,c,e,g,f,p,u,q,v){var w=[],A=[];b.ae.Math.tO(a,d,w,A,e,g,f,p,u,q,v);for(g=e=0;g<A.length;++g)"c"===A[g]?(c.bezierCurveTo(w[e],w[e+1],w[e+2],w[e+3],w[e+4],w[e+5]),a=w[e+4],d=w[e+5],e+=6):(c.lineTo(w[e],w[e+1]),a=w[e],d=w[e+1],e+=2);return{TW:a,UW:d}}}})(window);
(function(b){b.Annotations=b.Annotations||{};var f=b.Annotations;f.Rg={FG:function(b,c){var a=c.Qa(),d=c.getDocument(),g=[];if(!b||d&&d.rg())g=a.Pc().filter(function(a){return a instanceof f.Dd});else if(_.isArray(b))g=b.filter(function(a){return a instanceof f.Dd});else if(b instanceof f.Dd)g=[b];else{console.warn("The selected annotation can`t be redacted");return}0===g.length&&console.warn("No redaction annotations selected");return g},XR:function(b,c){var a=c.Qa(),d=a.Pc().filter(function(a){return!(a instanceof
f.Dd)});return{redactions:f.Rg.QR(b,c),annots:a.Cu({annotList:d})}},QR:function(b,c){var a=c.Qa(),d=[];f.Rg.FG(b,c).forEach(function(a){1===a.Uq().length?d.push(a):a.Uq().forEach(function(c){var b=_.extend(new f.Dd,a);b.Quads=[{x1:c.x1,x2:c.x2,x3:c.x2,x4:c.x1,y1:c.y2,y2:c.y2,y3:c.y1,y4:c.y1}];d.push(b)})});return a.Cu({annotList:d})},By:function(e,c){var a=c.getDocument();if(!c.Qa().FA())return console.warn("Applying redactions is not enabled"),Promise.reject("Applying Redaction is not enabled");
if(a.rg())return a.Ur(e,c);var d=f.Rg.FG(e,c),g=null;return b.PDFNet.initialize().then(function(){return a.kg()}).then(function(a){g=a;return f.Rg.YU(a,d)}).then(function(){return b.PDFNet.runWithCleanup(function(){return Promise.all(d.map(function(a){return f.Rg.LU(g,c,a)}))})})},YU:function(b,c){var a=[];c.forEach(function(d){d=d.Hb();-1===a.indexOf(d)&&a.push(d)});return Promise.all(a.map(function(a){return b.requirePage(a)}))},LU:function(e,c,a){b.PDFNet.startDeallocateStack();e.lock();var d=
c.Qa(),g=f.Rg.PR(a),k=f.Rg.EQ(a,c);return Promise.all([k,g]).then(function(g){return b.PDFNet.Redactor.redact(e,g[0],g[1]).then(function(){try{var e=a.Hb();a.Uq().forEach(function(c){f.Rg.yP(c,d,a)});d.eg(a,null,!0);c.qJ(e);c.zk();c.getDocument().tJ()}finally{b.PDFNet.endDeallocateStack()}})})["catch"](function(a){b.PDFNet.endDeallocateStack();console.error(a)})},PR:function(e){var c=e.FillColor;return new Promise(function(a){b.PDFNet.ColorPt.init(c.R/255,c.G/255,c.B/255,c.A).then(function(d){a({text_color:d,
positive_overlay_color:d,border:!1})})})},EQ:function(e,c){var a=[],d=e.Uq(),g=c.v,f=e.Hb();d.forEach(function(d){var c=g.Ll(f-1,d.x1,d.y1);d=g.Ll(f-1,d.x2,d.y2);c=b.PDFNet.Rect.init(c.x,c.y,d.x,d.y).then(function(a){return b.PDFNet.Redactor.redactionCreate(f,a,!1,"").then(function(a){return a})});a.push(c)});return Promise.all(a).then(function(a){return a})},yP:function(b,c,a){var d=c.Pc();a=a.Hb();for(var g=d.length-1;0<=g;g--){var k=d[g],h=k.X,l=k.Y,l=b.y1>k.Y+k.Height||b.y2<l,h=b.x1>k.X+k.Width||
b.x2<h,n=a!==k.PageNumber;k instanceof f.Dd||n||l||h||c.eg(k,null,!0)}}}})(window);
(function(b){function f(){this.fonts=[]}function e(a,d,c,b){this.url=_.isUndefined(b)?["data:",this.TT[c],";base64,",btoa(d)].join(""):"'"+b+"'";this.url=["url(",this.url,")"].join("");this.hV=["@font-face { font-family:'",a,"';src:",this.url,"}"].join("");this.name=a}document.head||(document.head=document.getElementsByTagName("head")[0]);b.Ng={};var c=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent),a=c&&14<=c[1],d=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");
e.prototype={fC:null,styleSheet:null,TT:{woff:"application/x-font-woff",opentype:"font/opentype",sfnt:"application/font-sfnt"},insert:function(){if(!b.Ng[this.name]){if(!this.styleSheet){var a=document.createElement("style");document.head.appendChild(a);e.prototype.styleSheet=a.sheet;e.prototype.fC=a}a=this.styleSheet.cssRules.length;this.styleSheet.insertRule(this.hV,a);b.Ng[this.name]=this.styleSheet.cssRules[a]}},remove:function(){if(!b.utils.ie){var a=b.Ng[this.name];if(!a)throw Error("CSS @font-face rule is not in use");
var d,c=this.styleSheet.cssRules.length,e=this.styleSheet.cssRules;for(d=0;d<c;d++)if(e[d]===a){this.styleSheet.deleteRule(d);delete b.Ng[this.name];return}throw Error("CSS @font-face stylesheet has been altered externally");}}};if("undefined"!==typeof document&&document.fonts)try{var g=new e("lt"+Date.now()+"0",d,"opentype");"error"===(new window.FontFace(g.name,g.url,{})).status?b.Hq=!1:b.Hq=!0}catch(h){b.Hq=!1}else b.Hq=!1;f.prototype={aX:1,XN:function(a){this.fonts.push(a)},uS:function(){return 0!==
this.fonts.length},sI:function(c){function e(a,d){return a.charCodeAt(d)<<24|a.charCodeAt(d+1)<<16|a.charCodeAt(d+2)<<8|a.charCodeAt(d+3)&255}function g(a,d){q++;30<q?(console.warn("Load test font never loaded."),d()):(u.font="30px "+a,u.fillText(".",0,20),0<u.getImageData(0,0,1,1).data[3]?d():setTimeout(_.bind(g,null,a,d)))}var f=this,k;if(_.isEmpty(b.Ng)||a){for(k=0;k<f.fonts.length;k++)setTimeout(c,0,f.fonts[k].name);f.fonts=[]}else{var p;k=document.createElement("canvas");k.width=1;k.height=1;
var u=k.getContext("2d"),q=0,v="lt"+Date.now()+this.aX++,w=d,w=w.substr(0,976)+v+w.substr(976+v.length),A=e(w,16);k=0;for(p=v.length-3;k<p;k+=4)A=A-1482184792+e(v,k)|0;k<v.length&&(A=A-1482184792+e(v+"XXX",k)|0);var w=w.substr(0,16)+(String.fromCharCode(A>>24&255)+String.fromCharCode(A>>16&255)+String.fromCharCode(A>>8&255)+String.fromCharCode(A&255))+w.substr(20),B=new b.ef.FontFace(v,w,"opentype");B.insert();w=[];k=0;for(p=this.fonts.length;k<p;k++)w.push(this.fonts[k].name);w.push(v);var z=document.createElement("div");
z.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;");k=0;for(p=w.length;k<p;++k)A=document.createElement("span"),A.textContent="Hi",A.style.fontFamily=w[k],z.appendChild(A);document.body.appendChild(z);g(v,function(){document.body.removeChild(z);B.remove();for(var a=0;a<f.fonts.length;a++)if(c(f.fonts[a].name),!f.fonts[a].url.startsWith("url(data")){var d=f.fonts[a].url;if(d.startsWith("url('")){if(8>d.length){console.warn("Invalid font ObjectURL.");
return}d=d.substring(5,d.length-2)}URL.revokeObjectURL(d);f.fonts[a].url=null}f.fonts=[]})}},CT:function(a,d,c){var b=document.createElement("div");b.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;");b.innerHTML=""+('<span style="font-family:'+a+'">" + testString +"</span>');document.body.appendChild(b);$.get(d,function(){setTimeout(function(){c();document.body.removeChild(b)},300)})}};if(b.Hq){var k=e,e=function(){k.apply(this,arguments);
this.Az=new window.FontFace(this.name,this.url,{})};e.prototype=k.prototype;$.extend(e.prototype,{insert:function(){document.fonts.add(this.Az);b.Ng[this.name]=this},remove:function(){document.fonts["delete"](this.Az)}});$.extend(f.prototype,{sI:function(a){this.fonts.forEach(function(d){d.Az.load().then(function(){a(d.name);if(!d.url.startsWith("url(data")){var c=d.url;if(c.startsWith("url('")){if(8>c.length){console.warn("Invalid font ObjectURL.");return}c=c.substring(5,c.length-2)}URL.revokeObjectURL(c);
d.url=null}})["catch"](function(c){a(d.name);console.warn("loadFonts: font failed to load: "+d.name);c&&console.warn("loadFonts: exception is: "+c.message)})})}})}b.ef={FontFace:e,BL:f,Qz:function(a,d){return"f"+a+"-"+d}}})(window);
(function(b){function f(c,a,d){this.page=c;this.tb=a;this.Ge=d;this.oG=a.Ga.Yd?a.Ga.Yd.path:void 0;this.Zl=this.paused=!1}var e={ki:0,Xe:1,zq:2,fg:3};b.asc=function(c){var a=.707106781*c.m_a+.707106781*c.m_b;c=.707106781*c.m_c+.707106781*c.m_d;return Math.sqrt(a*a+c*c)};f.prototype={pause:function(){this.paused=!0;this.Ny()},Ny:function(){this.zv=!1;b.clearImmediate(this.tI)},aG:function(c,a,d,e,f){function h(){A=!0;m&&m.zr().then(function(){if(l.abort){if(w)return n&&(n=!1,e(q)),m=l.resume=null,
l.Ny(),l.abort&&l.abort(),d(q);l.abort&&((r=5<++u)&&p&&n&&f&&(n=!1,e(q)),w=m.run(c,a,50),!w&&m.IS&&e(q),A=!1,l.zv=!1,l.paused||l.zw())}})}var l=this,n=void 0!==e;d=d||function(){};var m=this.tb.rb,r=!1,p=!1,u=0,q=c.canvas,v=setTimeout(function(){p=!0;r&&n&&f&&(n=!1,e(q))},3E3);l.abort=function(){A=!1;l.Ny();l.tI=null;l.resume=null;m&&(m.cancel(),m=null);l.tb.rb=null;clearTimeout(v);l.zw=null;_(l.tb.Ta).each(function(a){switch(a.type){case "png":case "jpg":a&&a.data&&!a.data.startsWith("url(data")&&
(URL.revokeObjectURL(a.data),a.data=null);break;case "font":if(a&&a.data&&a.data.url&&!a.data.url.startsWith("url(data")){var d=a.data.url;if(d.startsWith("url('")){if(8>d.length){console.warn("Invalid font ObjectURL.");break}d=d.substring(5,d.length-2)}URL.revokeObjectURL(d);a.data.url=null}}});l.abort=null};var w=!1;l.resume=function(){!1!==A||l.zv||l.zw();l.paused=!1};l.zw=function(){l.zv=!0;l.tI=b.setImmediate(h,0)};var A=!1;l.zv=!1;l.paused||l.zw()},cP:function(c,a,d,g,f,h,l,n,m){a=a||e.ki;f&&
0<f&&(f=Math.round(f));c=b.o.Aa.Wo(this.page,c||1,a,h,f,l,m);this.aG(c.ctx,c.t,d,g,n)},pH:function(c){var a=[];if(c){for(var d=0;d<c.length;++d)a[d]=this.tb.Ga.ei(c[d]);return a}_(this.tb.Ta).each(function(d){a.push(d)});return a},VA:function(c,a,d){function e(a){var d=l.Ge.nv(a.name);f(a);switch(a.type){case "png":case "jpg":if(b.ci[a.name]){a.data.startsWith("data")||URL.revokeObjectURL(a.data);if(d){h(a.name);break}b.ci[a.name].rq.push(function(){h(a.name)});break}var c=new Image;c.setAttribute("crossOrigin",
"use-credentials");c.onload=function(){c.src.startsWith("data")||URL.revokeObjectURL(c.src);for(var a=0;a<this.rq.length;++a)this.rq[a]();c.rq=[];c=c.onload=c.onerror=null};c.onerror=function(){b.utils.warn("img error "+a.name);"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAMSURBVBhXY6ivrwcAAv4BfhD/txkAAAAASUVORK5CYII="!==c.src&&(c.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAMSURBVBhXY6ivrwcAAv4BfhD/txkAAAAASUVORK5CYII=")};
c.hres=a.hres;c.vres=a.vres;b.ci[a.name]=c;c.rq=[];c.rq[0]=function(){h(a.name)};c.Jb=l.tb.Hf;c.src=a.data;break;case "font":_.isUndefined(l.oG)?m.XN(a.data):m.CT(a.name,l.oG+a.ra,function(){h(a.name)});break;default:b.utils.warn("unknown resource type: "+a.type),h(a.name)}}function f(a){d&&l.Ge.QN(a.name)}function h(d){l.Ge.loaded(d);if(l.Zl&&1>--n)return l.Zl=!1,c(a[0])}if(this.Zl)throw Error("Multiple calls to loadResource");var l=this;a=this.pH(a);var n=a.length;this.Zl=!0;var m=new b.ef.BL,r=
!0;_(a).each(function(a){r=!1;l.Ge.nv(a.name)?(f(a),h(a.name)):a.data?e(a):l.tb.Ga.Bf(a.ra,function(d){l.Ge.nv(a.name)?(f(a),h(a.name)):e(l.tb.Ga.ei(d.ra,d.data))})});m.uS()&&m.sI(_(h).bind(this));r&&(c(),this.Zl=!1)},jF:function(){this.Zl&&(this.Zl=!1)},Kb:function(c){var a=this;a.jF();c=this.pH(c);_(c).each(function(d){if("font"!==d.type&&a.Ge.release(d.name))switch(d.type){case "png":case "jpg":delete b.ci[d.name];break;case "font":d.data&&d.data.remove()}})}};b.hf=b.hf||{};b.hf.vM=f;b.hf.Es=function(){var c=
{};return{QN:function(a){a in c?c[a].c++:c[a]={c:1,l:!1}},loaded:function(a){a in c&&(c[a].l=!0)},IA:function(a){return a in c?!0:!1},nv:function(a){return a in c?c[a].l:!1},release:function(a){if(!(a in c))return!1;--c[a].c;return c[a].c?!1:(delete c[a],!0)}}};b.o.Sa=e;b.Bd=function(c,a,d,g,f,h){g=g||{x:0,y:0};d.width?(d.x1=0,d.y1=0,d.x2=d.width,d.y2=d.height):(d.width=d.x2-d.x1,d.height=d.y2-d.y1);var l=new XODText.Matrix2D;_.isUndefined(f)&&(f=!0);f&&(f=h||b.utils.getCanvasMultiplier(),c*=f,g.x*=
f,g.y*=f);l.Da(c,0,0,c,g.x,g.y);c=new XODText.Matrix2D;a===e.ki?c.Da(1,0,0,1,-d.x1,-d.y1):a===e.Xe?c.Da(1,0,0,1,d.y2,-d.x1):a===e.zq?c.Da(1,0,0,1,d.x2,d.y2):a===e.fg&&c.Da(1,0,0,1,-d.y1,d.x2);l.concat(c);l.concat(XODText.Matrix2D.rotationMatrix(Math.PI/2*(4-a)));return l}})(window);
(function(b){b.Actions||(b.Actions={});var f=b.Actions;f.Action=function(c){_.isObject(c)&&_.isString(c.name)&&(this.vc=c.name)};f.Action.prototype={elementName:null,onTriggered:function(){},serialize:function(){return document.createElementNS("",this.elementName)},deserialize:function(){}};Object.defineProperties(f.Action.prototype,{name:{get:function(){return this.elementName}}});f.gf=function(c){f.Action.call(this,c);this.Wf=new f.gf.sp;_.isObject(c)&&this.Wf.set(c.dest)};f.gf.prototype={elementName:"GoTo",
onTriggered:function(c,a,d){f.Action.prototype.onTriggered.call(this,c,a,d);this.Wf.cF(d)},serialize:function(c){var a=f.Action.prototype.serialize.call(this,c);$(a).append(this.Wf.serialize(c));return a},deserialize:function(c,a,d){f.Action.prototype.deserialize(c,a);this.Wf.deserialize(c,a,d)}};f.gf.prototype=$.extend(Object.create(f.Action.prototype),f.gf.prototype);Object.defineProperties(f.gf.prototype,{dest:{get:function(){return this.Wf}}});f.Mm=function(c){f.Action.call(this,c);this.Wf=new f.gf.sp;
_.isObject(c)&&(this.Wf.set(c.dest),this.Xs=c.filename,this.iy=c.newWindow)};f.Mm.prototype={elementName:"GoToR",onTriggered:function(c,a,d){f.Action.prototype.onTriggered.call(this,c,a,d);this.Wf.cF(d)},serialize:function(c){var a=f.Action.prototype.serialize.call(this,c);this.iy||a.setAttribute("NewWindow","false");var d=document.createElementNS("","File");this.Xs&&d.setAttribute("OriginalName",this.Xs);var b=$(a);b.append(d);b.append(this.Wf.serialize(c));return a},deserialize:function(c,a,d){f.Action.prototype.deserialize(c,
a);this.Wf.deserialize(c,a,d,!0);c=c.getElementsByTagName("GoToR")[0];this.iy="false"!==c.getAttribute("NewWindow");c=c.getElementsByTagName("File");1===c.length&&(this.Xs=c[0].getAttribute("OriginalName"))}};f.Mm.prototype=$.extend(Object.create(f.Action.prototype),f.Mm.prototype);Object.defineProperties(f.Mm.prototype,{dest:{get:function(){return this.Wf}},filename:{get:function(){return this.Xs}},newWindow:{get:function(){return this.iy}}});f.gf.sp=function(c){this.rn=1;this.Pp="Fit";this.vc=this.Ej=
this.Vf=this.dg=this.Ce=this.ze=null;this.set(c)};f.gf.sp.prototype={set:function(c){if(_.isObject(c)){_.isUndefined(c.page)||(this.rn=Number(c.page));var a=c.fit;_.isString(a)&&(this.Pp=a);switch(a){case "XYZ":_.isUndefined(c.left)||(this.ze=Number(c.left));_.isUndefined(c.top)||(this.Ce=Number(c.top));_.isUndefined(c.zoom)||(this.Ej=Number(c.zoom));break;case "FitBH":case "FitH":_.isUndefined(c.top)||(this.Ce=Number(c.top));break;case "FitBV":case "FitV":_.isUndefined(c.left)||(this.ze=Number(c.left));
break;case "FitR":_.isUndefined(c.left)||(this.ze=Number(c.left));_.isUndefined(c.top)||(this.Ce=Number(c.top));_.isUndefined(c.right)||(this.dg=Number(c.right));_.isUndefined(c.bottom)||(this.Vf=Number(c.bottom));var a=_.min([this.ze,this.dg]),d=_.min([this.Ce,this.Vf]),b=_.max([this.ze,this.dg]),e=_.max([this.Ce,this.Vf]);this.Ce=d;this.ze=a;this.Vf=e;this.dg=b}c=c.name;_.isString(c)&&(this.vc=c,this.rn=null)}},serialize:function(c){var a=document.createElementNS("","Dest"),d=document.createElementNS("",
this.Pp||"Named"),b=this.Ce||0,e=this.ze||0,f=this.Vf||0,l=this.dg||0;c=c.inverse();e=c.W({x:e,y:b});f=c.W({x:l,y:f});b=_.isNull(this.Ce)?null:e.y;e=_.isNull(this.ze)?null:e.x;l=_.isNull(this.dg)?null:f.x;f=_.isNull(this.Vf)?null:f.y;_.isNull(this.rn)||d.setAttribute("Page",this.rn);_.isNull(this.Ej)||d.setAttribute("Zoom",this.Ej);b&&d.setAttribute("Top",b);e&&d.setAttribute("Left",e);l&&d.setAttribute("Right",l);f&&d.setAttribute("Bottom",f);switch(this.Pp){case "XYZ":_.isNull(e)&&d.setAttribute("Left",
"");_.isNull(b)&&d.setAttribute("Top","");_.isNull(this.Ej)&&d.setAttribute("Zoom","");break;case "FitBH":case "FitH":_.isNull(b)&&d.setAttribute("Top","");break;case "FitBV":case "FitV":_.isNull(e)&&d.setAttribute("Left","");break;case "FitR":_.isNull(e)&&d.setAttribute("Left",""),_.isNull(b)&&d.setAttribute("Top",""),_.isNull(l)&&d.setAttribute("Right",""),_.isNull(f)&&d.setAttribute("Bottom","")}this.vc&&d.setAttribute("Name",this.vc);$(a).append(d);return a},deserialize:function(c,a,d,b){var e=
Annotations.ba;a=e.getAttribute(c,"PageNum");var f,l,n,m,r,p,u;l=e.getAttribute(c,"Hpos");f=e.getAttribute(c,"Vpos");c=c.getElementsByTagName("Dest");if(!a||0<c.length)if(c=c[0],c=e.Pz(c))a=e.getAttribute(c,"Page"),p=e.Su(c),f=e.getAttribute(c,"Top"),l=e.getAttribute(c,"Left"),n=e.getAttribute(c,"Right"),m=e.getAttribute(c,"Bottom"),r=e.getAttribute(c,"Zoom"),"Named"===e.Su(c)&&(u=e.getAttribute(c,"Name"));u||b?b&&(f=_.isNull(f)?void 0:f,l=_.isNull(l)?void 0:l,n=_.isNull(n)?void 0:n,m=_.isNull(m)?
void 0:m):(b=d.u.Bc(a-1),d=b.W({x:l||0,y:f||0}),b=b.W({x:n||0,y:m||0}),f=_.isNull(f)?void 0:d.y,l=_.isNull(l)?void 0:d.x,n=_.isNull(n)?void 0:b.x,m=_.isNull(m)?void 0:b.y);this.set({page:_.isNull(a)?void 0:a,fit:_.isNull(p)?void 0:p,top:f,left:l,right:n,bottom:m,zoom:_.isNull(r)?void 0:r,name:u})},cF:function(c){var a=this.Ce||0,d=this.ze||0,b=this.rn||1;switch(this.Pp){case "XYZ":this.Ej&&c.Xw(this.Ej);c.Pn(b,d,a);break;case "Fit":case "FitB":case "FitV":case "FitBV":c.Je(b);c.RB(c.Lg.rx);break;
case "FitH":case "FitBH":c.Je(b);c.RB(c.Lg.IC);c.Pn(b,0,a);break;case "FitR":var e=_.isUndefined(this.dg)||_.isNull(this.dg)||_.isUndefined(this.ze)||_.isNull(this.ze)?null:Math.abs(this.dg-this.ze),f=_.isUndefined(this.Vf)||_.isNull(this.Vf)||_.isUndefined(this.Ce)||_.isNull(this.Ce)?null:Math.abs(this.Vf-this.Ce),e=e?c.xb().innerWidth()/e:Infinity,f=f?c.xb().innerHeight()/f:Infinity,f=Math.min(e,f);Infinity!==f&&c.Xw(f);c.Pn(b,d,a);break;default:c.Je(b)}}};Object.defineProperties(f.gf.sp.prototype,
{page:{get:function(){return this.rn},set:function(c){this.set({page:c})}},fit:{get:function(){return this.Pp}},top:{get:function(){return _.isNull(this.Ce)?void 0:this.Ce}},left:{get:function(){return _.isNull(this.ze)?void 0:this.ze}},bottom:{get:function(){return _.isNull(this.Vf)?void 0:this.Vf}},right:{get:function(){return _.isNull(this.dg)?void 0:this.dg}},zoom:{get:function(){return _.isNull(this.Ej)?void 0:this.Ej}},name:{get:function(){return this.vc}}});f.oj=function(c){f.Action.call(this,
c);this.aq="";_.isObject(c)&&_.isString(c.uri)&&(this.aq=c.uri)};f.oj.prototype={elementName:"URI",onTriggered:function(c,a,d){f.Action.prototype.onTriggered.call(this,c,a,d);c=this.aq;0!==c.indexOf("http://")&&0!==c.indexOf("https://")&&0!==c.indexOf("ftp://")&&0!==c.indexOf("mailto:")&&0!==c.indexOf("tel:")&&-1===c.indexOf("://")&&(c=-1!==c.indexOf("@")?"mailto:"+c:"http://"+c);window.open(c)},deserialize:function(c,a){f.Action.prototype.deserialize.call(this,c,a);var d=Annotations.ba,b=d.getAttribute(c,
"Target");_.isNull(b)&&(b=d.Pz(c),b=d.getAttribute(b,"Name"));this.aq=b},serialize:function(c){c=f.Action.prototype.serialize.call(this,c);c.setAttribute("Name",this.aq);return c}};f.oj.prototype=$.extend(Object.create(f.Action.prototype),f.oj.prototype);Object.defineProperties(f.oj.prototype,{uri:{get:function(){return this.aq}}});f.Qm=function(c){f.Action.call(this,c);this.bn="";_.isObject(c)&&_.isString(c.action)&&(this.bn=c.action)};f.Qm.prototype={elementName:"Named",onTriggered:function(c,a,
d){f.Action.prototype.onTriggered.call(this,c,a,d);switch(this.bn){case "NextPage":d.Je(c.Hb()+1);break;case "PrevPage":d.Je(c.Hb()-1);break;case "FirstPage":d.Je(1);break;case "LastPage":d.Je(d.vb());break;default:console.warn("Invalid named action name: "+this.bn)}},deserialize:function(c,a){f.Action.prototype.deserialize.call(this,c,a);var d=Annotations.ba,b=d.getAttribute(c,"N");_.isNull(b)&&0<c.getElementsByTagName("Named").length&&(b=d.getAttribute(c.getElementsByTagName("Named")[0],"Name"));
this.bn=b},serialize:function(c){c=f.Action.prototype.serialize.call(this,c);c.setAttribute("Name",this.bn);return c}};f.Qm.prototype=$.extend(Object.create(f.Action.prototype),f.Qm.prototype);Object.defineProperties(f.Qm.prototype,{action:{get:function(){return this.bn}}});f.Om=function(c){f.Action.call(this,c);this.Px=this.qt=null;this.set(c)};f.Om.prototype={elementName:"JavaScript",set:function(c){_.isObject(c)&&_.isString(c.javascript)&&(this.qt=c.javascript)},onTriggered:function(c,a,d){f.Action.prototype.onTriggered.call(this,
c,a,d);c=d.getDocument().Up;this.Px||(this.Px=c.Kn(this.qt,d));c.No(this.Px,a,d)},deserialize:function(c,a){f.Action.prototype.deserialize.call(this,c,a);var d=Annotations.ba.getAttribute(c,"JavaScript");d||(d=c.getElementsByTagName("JavaScript")[0].textContent);this.set({javascript:d})},serialize:function(c){c=f.Action.prototype.serialize.call(this,c);$(c).text(this.qt);return c}};f.Om.prototype=$.extend(!0,new f.Action,f.Om.prototype);Object.defineProperties(f.Om.prototype,{javascript:{get:function(){return this.qt||
""}}});f.Rk=function(c){f.Action.call(this,c);this.vj=!1;this.nb=null;_.isObject(c)&&(_.isArray(c.fields)&&(this.nb=c.fields.slice()),_.isUndefined(c.exclude)||(this.vj=!!c.exclude))};f.Rk.prototype={elementName:"ResetForm",onTriggered:function(c,a,d){f.Action.prototype.onTriggered.call(this,c,a,d);var b=this,e=d.Qa().ee();c=e.Yo;e.Yo=!1;this.vj||_.isNull(this.nb)?e.cs({Ar:function(a,d,c){b.nb&&-1!==b.nb.indexOf(a)||c.GJ()}}):this.nb.forEach(function(a){var d=e.Gb(a);d?d.GJ():console.warn("Missing field during reset:",
a)});e.Yo=c;e.oq(null,0)},deserialize:function(c,a){f.Action.prototype.deserialize.call(this,c,a);var d=Annotations.ba,b=[],e=!0;_.isNull(d.getAttribute(c,"ResetFields"))?_.isNull(d.getAttribute(c,"ResetExcludedFields"))?0<c.getElementsByTagName("ResetForm").length&&(c=c.getElementsByTagName("ResetForm")[0],(b=d.getAttribute(c,"Fields"))&&(b=b.split(",")),d=parseInt(d.getAttribute(c,"Flags"),10),_.isNull(b)||_.isUndefined(b)?(b=[],e=!0):e=1===d?!0:!1):(b=d.getAttribute(c,"ResetExcludedFields").split(","),
e=!0):(b=d.getAttribute(c,"ResetFields").split(","),e=!1);this.nb=b;this.vj=!!e},serialize:function(c){c=f.Action.prototype.serialize.call(this,c);this.nb&&c.setAttribute("Fields",this.nb.join(","));c.setAttribute("Flags",this.vj?1:0);return c}};f.Rk.prototype=$.extend(Object.create(f.Action.prototype),f.Rk.prototype);Object.defineProperties(f.Rk.prototype,{fields:{get:function(){return this.nb}},exclude:{get:function(){return this.vj}}});f.Vk=function(c){f.Action.call(this,c);this.Nt="";this.nb=
[];this._format="xfdf";this.et=!1;this._method="POST";this.vj=!1;this.lc=new b.Annotations.pj({mask:"IncludeNoValueFields IncludeAppendSaves IncludeAnnotations CanonicalFormat WxclNonUserAnnots ExclFKey EmbedForm".split(" ")});this.set(c)};f.Vk.prototype={elementName:"SubmitForm",set:function(c){_.isObject(c)&&(c.url&&(this.Nt=String(c.url)),_.isArray(c.fields)&&(this.nb=c.fields.slice()),c.format&&(this._format=c.format.toLowerCase()),c.includeEmpty&&(this.et=!!c.includeEmpty),c.flags&&this.lc.set(c.flags),
c.method&&(this._method=String(c.method)),c.exclude&&(this.vj=!!c.exclude))},onTriggered:function(c,a,d){f.Action.prototype.onTriggered.call(this,c,a,d);var b=this,e=[],h=d.Qa(),l=h.ee();0<this.nb.length?this.nb.forEach(function(a){e.push(l.Gb(a))}):l.Zn(function(a){_.isNull(a.value)&&!b.et||e.push(a)});c="";"xfdf"===this._format?c=h.ql.FM(e):("fdf"===this._format&&console.warn("FDF Export is not supported. Defaulting to export as HTML Forms"),c=h.ql.GM(e));$.ajax({type:"POST",url:this.Nt,data:c,
success:function(a){if(h.JK)h.JK(a);else{var d=window.open();_.isNull(d)||_.isUndefined(d)?console.warn("Form popup blocked"):d.document.write(a)}},error:function(){console.warn("Failed to submit form data to server.")}})},deserialize:function(c,a){f.Action.prototype.deserialize.call(this,c,a);var d=Annotations.ba,b=c.getElementsByTagName("SubmitForm"),e="SubmitURL",h="SubmitFields",l="SubmitFlag";0<b.length&&(c=b[0],e="URL",h="Fields",l="Flags");b=d.getAttribute(c,e);e=null;_.isNull(d.getAttribute(c,
h))||(e=d.getAttribute(c,h).split(","));h=0;_.isNull(d.getAttribute(c,l))||(h=parseInt(d.getAttribute(c,l),10));d="fdf";h&4&&(d="html");h&32&&(d="xfdf");this.set({url:b,fields:e||void 0,format:d,flags:0!==(h&2)?["IncludeNoValueFields"]:[]})},serialize:function(c){c=f.Action.prototype.serialize.call(this,c);c.setAttribute("Fields",this.nb.join(","));c.setAttribute("Flags",("xfdf"===this._format?32:0)|("html"===this._format?4:0)|(this.et?2:0));c.setAttribute("URL",this.Nt);return c}};f.Vk.prototype=
$.extend(Object.create(f.Action.prototype),f.Vk.prototype);Object.defineProperties(f.Vk.prototype,{url:{get:function(){return this.Nt}},fields:{get:function(){return this.nb}},format:{get:function(){return this._format}},includeEmpty:{get:function(){return this.et}},flags:{get:function(){return this.lc},set:function(c){this.lc.set(c)}},method:{get:function(){return this._method}},exclude:{get:function(){return this.vj}}});f.Nm=function(c){f.Action.call(this,c);this.nb=[];this._hide=!0;this.set(c)};
f.Nm.prototype={elementName:"Hide",set:function(c){_.isObject(c)&&(_.isArray(c.fields)&&(this.nb=c.fields.slice()),_.isUndefined(c.hide)||(this._hide=!!c.hide))},onTriggered:function(c,a,d){f.Action.prototype.onTriggered.call(this,c,a,d);var b=d.Qa().ee(),e=this;this.nb.forEach(function(a){b.Gb(a).Lf(!e.hide)})},deserialize:function(c,a){f.Action.prototype.deserialize.call(this,c,a);var d=Annotations.ba,b=!0,e;_.isNull(d.getAttribute(c,"HideField"))?0<c.getElementsByTagName("Hide").length?(c=c.getElementsByTagName("Hide")[0],
e=d.getAttribute(c,"Fields").split(","),b="false"!==d.getAttribute(c,"Hide")):(e=[d.getAttribute(c,"ShowField")],b=!1):e=[d.getAttribute(c,"HideField")];this._hide=b;this.nb=e},serialize:function(c){c=f.Action.prototype.serialize.call(this,c);c.setAttribute("Fields",this.JZ.join(","));c.setAttribute("Hide",this.hide?"true":"false");return c}};f.Nm.prototype=$.extend(Object.create(f.Action.prototype),f.Nm.prototype);Object.defineProperties(f.Nm.prototype,{fields:{get:function(){return this.nb}},hide:{get:function(){return this._hide}}});
f.HC=function(){this.tE={GoTo:f.gf,GoToR:f.Mm,URI:f.oj,Named:f.Qm,JavaScript:f.Om,ResetForm:f.Rk,SubmitForm:f.Vk,Hide:f.Nm}};f.HC.prototype={CA:function(c){if(_.isObject(c)){var a=this.tE[c.name];return a?new a(c):null}},US:function(c,a,d){var b=Annotations.ba.BQ(c);return(b=this.tE[b])?(b=new b,b.deserialize(c,a,d),b):null}};var e=new f.HC;f.OZ=function(){return e};f.Ih=function(c){this.tj={};this.Ux=null;_.isObject(c)&&_.isObject(c.actions)&&this.Pt(c.actions)};f.Ih.prototype={Pt:function(c,a){a&&
(this.tj={});if(_.isObject(c))for(var d in c)if(c.hasOwnProperty(d))for(var b=c[d].length,e=0;e<b;++e)this.Fj(d,c[d][e])},Fj:function(c,a){var d=this.tj[c]||[];if(a instanceof f.Action)-1===d.indexOf(a)&&d.push(a);else if(_.isObject(a)){var b=e.CA(a);b&&d.push(b)}this.tj[c]=d},Vj:function(){return this.tj},Le:function(c,a){var d=this.tj[c];if(d)for(var b=d.length,e=0;e<b;++e)d[e].onTriggered(this,a,this.Ux)},xg:function(c){this.Ux=c},gh:function(){return this.Ux},jV:function(c,a,d){function b(d,c){c.forEach(function(c){var b=
document.createElementNS("","Action");b.setAttribute("Trigger",d);var g=$(b);if(c=c.serialize(a))g.append(c),f=!0;$(e).append(b)})}var e;e=d?d:document.createElementNS("","OnActivation");var f=!1,l;for(l in this.tj)this.tj.hasOwnProperty(l)&&b(l,this.tj[l]);f&&!d&&$(c).append(e)},JE:function(c,a,d){var b=Annotations.ba;c=b.AQ(c);for(var f=c.length,h=0;h<f;++h){var l=c[h],n=b.getAttribute(l,"Trigger")||"U";(l=e.US(l,a,d))&&this.Fj(n,l)}}}})(window);
(function(b){function f(a,d){return a-d}function e(a){a=new Blob([a]);a.name="AP.xod";var d=new k.V.KC(a),c=new k.Se;return new Promise(function(a,b){c.loadAsync(d,function(d){d?b(d):a(c)})})}function c(a,d){b.Actions.Ih.call(this);this.width=a;this.height=d;this.text=null;this.Nr=[];this.links=[];this.cb=null}function a(a,d,c,e,g,f){var k={getZoom:function(){return 1},getPageRotation:function(){return b.o.Sa.ki},finishedLoading:function(){return!0},acquireResources:function(){return!0},resourcesLoaded:function(){return!0},
getPageTransform:function(){},drawProgressive:function(){},drawComplete:function(){},onError:function(){}};_.isObject(a)?(k=$.extend(k,a),k.zoom&&(k.getZoom=function(){return k.zoom}),k.pageRotation&&(k.getPageRotation=function(){return k.pageRotation})):k=$.extend(k,{pageIndex:a,getZoom:function(){return d},getPageRotation:function(){return c},drawProgressive:g,drawComplete:e,canvasNum:f});return k}function d(){}function g(a){a in this.yi?(clearImmediate(this.yi[a]),delete this.yi[a]):this.za.cu(a)}
var k=window.o,h=b.o.V.qj,l=b.o.V.ox;b.ci=b.ci||{};var n={};b.o.Ap={YL:0,$L:1,qM:2,wM:10};b.o.Tk={NL:1,rM:2,IL:4,ZL:8,SL:16,uL:32};c.prototype=$.extend({aK:function(a){this.height=a.height;this.width=a.width;this.cb=a.matrix;this.rotation=a.rotation;this.id=a.id;this.Ra=a.pageNum}},Object.create(b.Actions.Ih.prototype));var m=null,r=null;b.o.mW=function(a){m=a};b.o.jK=function(a){r=a};b.o.mH=function(){return m||r};var p=6;b.o.FL=function(){return p};b.o.Ax=function(a){p=a;b.Gm=524288*a*a;b.gx=524288*
a*a;b.Km=3*a;b.wL=50+30*a;b.o.Aa&&b.o.Aa.VJ(a);switch(a){case 0:b.Km=0;b.Gm=0;b.gx=0;break;case 1:b.Km=0,b.Gm=0}};b.o.UC=function(a){b.Cv=1+2*(a-1);b.Dv=a-1;0>b.Cv&&(b.Cv=0);0>b.Dv&&(b.Dv=0)};b.o.Ax(6);b.o.UC(5);k.df=function(a,d,c,b,e,g,f){this.children=a;this.name=d;this.Hf=c;this.parent=b;this.gp=e||0;this.so=g||0;this.url=f};k.df.prototype={OG:function(){return this.children},getName:function(){return this.name},Hb:function(){return this.Hf},kS:function(){return this.url},getParent:function(){return this.parent},
lS:function(){return this.gp},fR:function(){return this.so},isValid:function(){return!!this.url||_.isNumber(this.Hf)}};k.lx=function(a,d){this.NT=a;this.OT=d;this.UT=2;this.yq={};this.Sn=[];this.wl=0;this.xB=!1};k.lx.prototype={fF:function(a,d){var c=this;c.yq[a]=d;var b=c.Sn.indexOf(a);0<=b&&c.Sn.splice(b,1);c.Sn.push(a);c.yB();d.then(function(a){a=a.J.length;c.wl+=a;d.numPages=a;c.yB()})["catch"](function(a){console.warn(a)})},vJ:function(){var a=this,d=a.Sn.shift(),c=a.yq[d];delete a.yq[d];(d=
c.numPages)?a.wl-=d:(a.xB=!0,c=c.then(function(d){a.wl-=d.J.length;a.xB=!1;a.yB()}));c.then(function(a){a.Kb()});return!!d},yB:function(){if(!this.xB){for(;this.Sn.length>this.NT;)if(!this.vJ())return;for(;this.wl>this.OT&&!(this.Sn.length<=this.UT)&&this.vJ(););}},LQ:function(a){return this.yq[a]},Kb:function(){this.yq.forEach(function(a){a.Kb()})}};k.Document=function(a,d){b.Actions.Ih.call(this);this.Up=b.Annotations.O.ub.jP();this.v=k.Document.XQ(d)(a);var c=this;this.v.GV(function(a){c.trigger(a.type,
[a.data])});this.type=d||"xod";this.KM=20;this.Do=[];this.Kw={}};var u=Object.create({});k.Document.XQ=function(a){_.isUndefined(a)&&(a="xod");if(!u.hasOwnProperty(a))throw Error('Document type "'+a+'" is not registered with CoreControls.Document');return function(d){return new u[a](d)}};k.Document.Ir=function(a,d){if(_.isUndefined(a)||_.isUndefined(d))return!1;u[a]=d;return!0};k.Document.lX=function(a){return u.hasOwnProperty(a)?(delete u[a],!0):!1};k.Document.prototype={oA:function(){return this.type},
rg:function(){return"blackbox"!==this.type?!1:this.v.rg.apply(this.v,arguments)},Lj:function(a){return this.v.Lj.apply(this.v,arguments)},eU:function(a){this.Up.FX(a)},$h:function(a){return this.v.$h.apply(this.v,arguments)},cp:function(a){return this.v.cp.apply(this.v,arguments)},Gn:function(){return this.v.Gn.apply(this.v,arguments)},IG:function(){return this.v.getBookmarks.apply(this.v,arguments)},eo:function(a){this.v.eo.apply(this.v,arguments)},fo:function(){return this.v.fo.apply(this.v,arguments)},
vb:function(){return this.v.vb.apply(this.v,arguments)},fc:function(){return this.v.fc.apply(this.v,arguments)},Ll:function(a,d,c){return this.v.Ll.apply(this.v,arguments)},cS:function(a,d,c,b){return c<=d?console.error("End index must be greater than start index"):this.rh(a,function(a){a=a.he();var e=8*d,g=8*c;if(e>a.length||g>a.length)return console.error("Index out of bounds");for(var f=[];e<g;e+=8)f.push({x1:a[e],y1:a[e+1],x2:a[e+2],y2:a[e+3],x3:a[e+4],y3:a[e+5],x4:a[e+6],y4:a[e+7]});b(f)})},
gv:function(a,d,c){return this.v.gv.apply(this.v,arguments)},fv:function(a,d,c){return this.v.fv.apply(this.v,arguments)},getMetadata:function(){return{title:this.v.ke.title,creator:this.v.ke.creator,subject:this.v.ke.subject,keywords:this.v.ke.keywords,created:this.v.ke.created,modified:this.v.ke.modified,description:this.v.ke.description,producer:this.v.ke.producer}},fk:function(){return this.v.fk.apply(this.v,arguments)},Ol:function(a){return this.v.Ol.apply(this.v,arguments)},gk:function(){return this.v.gk()},
Vn:function(){return this.v.Vn.apply(this.v,arguments)},mr:function(a,d,c){var b=this;return this.v.loadAsync.call(this.v,a,function(a){if(!a)for(var c=b.Pb(),e=c.length,g=b.gh(),f=0;f<e;++f)c[f].xg(g);d(a);return b},c)},yv:function(a,d,c,b,e,g){return this.v.loadCanvasAsync.apply(this.v,arguments)},ET:function(a,d){this.rh(a,function(a){d(a.Xa)})},uz:function(a){return this.v.extractXFDF.apply(this.v,arguments)},rr:function(a){return this.v.rr.apply(this.v,arguments)},WA:function(a,d){return this.v.loadThumbnailAsync.apply(this.v,
arguments)},Yv:function(a){return this.v.Yv.apply(this.v,arguments)},qw:function(a){return this.v.qw.apply(this.v,arguments)},kg:function(){return this.v.kg.apply(this.v,arguments)},Vo:function(a){return this.v.Vo.apply(this.v,arguments)},ap:function(a,d){return this.v.ap.apply(this.v,arguments)},Kb:function(){this.Up.bd();this.Bn in this.v&&this.Bn.Kb();return this.v.Kb.apply(this.v,arguments)},zo:function(a,d){return this.v.zo.apply(this.v,arguments)},nr:function(a,d){return this.v.nr.apply(this.v,
arguments)},Tl:function(){return this.v.Tl.apply(this.v,arguments)},Mj:function(a){return this.v.Mj.apply(this.v,arguments)},wJ:function(){var a=this.Do.shift();this.v.J[a].text=null;delete this.Kw[a]},tJ:function(){for(var a=this.Do.length-1;0<=a;--a)this.wJ()},rh:function(a,d){this.Kw[a]?this.Do.splice(this.Do.indexOf(a),1):(this.Do.length===this.KM&&this.wJ(),this.Kw[a]=!0);this.Do.push(a);var c=this;return this.v.loadTextData.call(this.v,a,function(b){d(b);c.Kw[a]||(c.v.J[a].text=null)})},or:function(a){function d(a,
c){return new Promise(function(d){a.loadTextData(c,function(){d()})})}var c=this;a=a.map(function(a){return d(c,a)});return Promise.all(a)},getFileData:function(a){return this.v.getFileData.apply(this.v,arguments)},ko:function(){return this.v.ko?this.v.ko.apply(this.v):null},Ur:function(a,d){return this.v.Ur?this.v.Ur.apply(this.v,arguments):null},Kq:function(a){return this.v.Kq?this.v.Kq.apply(this.v,arguments):null},Ai:function(a,d,c){return this.v.Ai.apply(this.v,arguments)},jk:function(a,d){return this.v.jk.apply(this.v,
arguments)},Ri:function(a){return this.v.Ri.apply(this.v,arguments)},li:function(){return this.v.li.apply(this.v,arguments)},Vi:function(a,d){return this.v.Vi.apply(this.v,arguments)},bh:function(a,d){return this.v.bh.apply(this.v,arguments)},gi:function(a,d,c,b,e){return this.v.gi.apply(this.v,arguments)},pi:function(){return this.v.pi.apply(this.v,arguments)},qm:function(a){return this.v.qm.apply(this.v,arguments)},Aw:function(a){return this.v.Aw.apply(this.v,arguments)},im:function(){return this.v.im.apply(this,
arguments)},get numPages(){return this.v.J.length},gd:function(a){return this.v.J[a].width},fd:function(a){return this.v.J[a].height},Bc:function(a){return a>=this.vb()?(console.warn("Attempting to get page matrix for page "+(a+1)+" that doesn't exist."),null):this.v.J[a].cb},Sq:function(a){return this.v.Sq.apply(this.v,arguments)},io:function(){return this.v.io.apply(this.v,arguments)},Tq:function(a){return this.v.J[a].rotation},bA:function(a){return this.v.J[a].text},gW:function(a,d){this.v.J[a].text=
d},yR:function(a){return this.v.J[a].iq},jH:function(a){return this.v.J[a].links},Pb:function(){var a=this;this.v.J.forEach(function(d){d.xg(a.gh())});return this.v.J},bc:function(){return this.v.bc},ar:function(a,d,c){return this.v.ar.apply(this.v,arguments)},nm:function(a){this.v.nm.apply(this.v,arguments)},nh:function(){return this.v.nh},um:function(a){this.v.um.apply(this.v,arguments)},xk:function(){return this.v.xk.apply(this.v,arguments)},yu:function(a){return this.v.yu.apply(this.v,arguments)},
Nu:function(){return this.v.Nu.apply(this.v,arguments)},zu:function(a,d){return this.v.zu.apply(this.v,arguments)},Gl:function(a,d){return 0===a.length?[]:this.v.Gl.apply(this.v,arguments)},Zo:function(){return this.v.Zo()}};$.extend(k.Document.prototype,Object.create(b.Actions.Ih.prototype),b.utils.eventHandler);k.cj=function(){throw Error("Cannot initialize BaseDocument");};k.cj.prototype={rg:d,yu:d,Nu:d,zu:d,Lj:d,$h:d,cp:d,Gn:d,IG:d,eo:d,fo:d,vb:d,fc:function(a){var d={};d.width=this.J[a].width;
d.height=this.J[a].height;return d},Zo:function(){return!0},xk:function(){return!1},GV:function(a){this.Bu=a},Uj:function(a){this.Bu&&this.Bu(a)},Ll:function(a,d,c){d={x:d,y:c};return this.J[a].cb.inverse().W(d)},gv:d,fv:function(a,d,c){return this.J[a].cb.W({x:d,y:c})},fk:d,Ol:d,gk:d,mr:d,yv:d,uz:d,rr:d,WA:d,Yv:d,qw:d,Vo:d,ap:d,Kb:d,zo:d,nr:d,Mj:d,Tl:function(){return!1},correctQuadsForPageRotation:function(a,d){var c=this.J[a],e=(4-c.rotation/90)%4;0!==e&&(c=b.Bd(1,e,c,{x:0,y:0},!1),d.rO(c))},rh:d,
ko:function(){return null},getFileData:d,Ai:d,Ri:d,Vi:d,li:d,Rr:d,bh:d,gi:d,nm:function(){},print:function(){},Sq:function(a){return String(a)},io:function(){return _.range(0,this.J.length).map(String)},kg:d,pi:d,qm:d,Aw:d,pq:function(){for(var a=1,d=this.J.length,c=b.utils.getCanvasMultiplier(),c=c*c,e=0;e<d;++e)var g=this.J[e],a=Math.max(a,g.width*g.height*c);return Math.sqrt(43E5/a)},Kj:function(a){return 0===a.m_b&&0===a.m_c?0<a.m_a?0:180:0>a.m_b?270:90},Fn:function(a,d){var c=this.Kj(a),b=d.w,
e=d.Df;if(90===c||270===c)var g=b,b=e,e=g;switch(c){case 0:return c=-a.m_h,g=a.m_v,{x1:c,y1:g-e,x2:g-e,y2:g};case 90:return g=-a.m_h,c=-a.m_v,{x1:c,y1:g,x2:c+b,y2:g+e};case 180:return c=a.m_h,g=-a.m_v,{x1:c-b,y1:g,x2:c,y2:g+e};case 270:return g=a.m_h,c=a.m_v,{x1:c-b,y1:g-e,x2:c,y2:g}}return null},um:function(a){this.Pa=a},Vn:function(a,d,c,b){if(this.Pa&&this.Pa.shouldDrawOverAnnotations===c){var e,g,f=this.J[d].width,k=this.J[d].height,h=a.getContext("2d");h.save();h.textAlign="center";h.textBaseline=
"top";a=(4-b)%4;if(c&&0!==a){switch(a){case 1:h.translate(0,f);break;case 2:h.translate(f,k);break;case 3:h.translate(k,0)}h.rotate(90*b*Math.PI/180)}b=function(a){var d=a.fontSize||20,c=a.fontFamily||"sans-serif";g=1.5*d;h.font=d+"pt "+c;h.fillStyle=a.color||"black";h.globalAlpha=(a.opacity||100)/100};c=function(a){var d=[""],c=0;a.split(" ").forEach(function(a){a.split("\n").forEach(function(a,b,e){a&&(h.measureText(d[c]+a).width>=f/3&&(d[++c]=""),d[c]+=a+" ");b<e.length-1&&(d[++c]="")})});return d};
this.Pa.diagonal&&(h.save(),b.call(this,this.Pa.diagonal),h.translate(f/2,k/2),h.rotate(-Math.atan(k/f)),this.Pa.diagonal.text&&(e=this.Pa.diagonal.text.split("\n"),e.forEach(function(a,d){h.fillText(a,0,(d-e.length/2)*g)})),h.restore());this.Pa.header&&(h.save(),b.call(this,this.Pa.header),a=function(a){a.forEach(function(a,d){h.fillText(a,0,d*g)})},h.translate(f/6,0),this.Pa.header.left&&a(c(this.Pa.header.left)),h.translate(f/3,0),this.Pa.header.center&&a(c(this.Pa.header.center)),h.translate(f/
3,0),this.Pa.header.right&&a(c(this.Pa.header.right)),h.restore());this.Pa.footer&&(h.save(),b.call(this,this.Pa.footer),b=function(a){a.forEach(function(d,c){h.fillText(d,0,(c-a.length)*g)})},h.translate(f/6,k),this.Pa.footer.left&&b(c(this.Pa.footer.left)),h.translate(f/3,0),this.Pa.footer.center&&b(c(this.Pa.footer.center)),h.translate(f/3,0),this.Pa.footer.right&&b(c(this.Pa.footer.right)),h.restore());this.Pa.custom&&(h.save(),this.Pa.custom(h,d,f,k),h.restore());h.restore()}},zH:function(a){a=
a||0;var d=this.fc(a),c=document.createElement("canvas");c.width=d.width;c.height=d.height;var b=c.getContext("2d");b.rect(0,0,d.width,d.height);b.fillStyle="rgba(255, 255, 255, 0.0)";b.fill();this.Vn(c,a);return c},im:function(){return Promise.resolve()},Gl:function(d,c){for(var e=this,g=d.length,f=[],k=Promise.resolve(this.Bn.LQ(this.Lu(c))||this.Mu(d,c)),h=0;h<g;++h){var n=d[h],m=n.objnum+"-"+n.gennum;n.lO&&(m+="_"+n.lO);n.oO&&(m+="-"+n.oO);f.push(Promise.all([m,n.blendMode,k]).then(function(d){var g=
d[0],f=d[1],k=d[2];if(g in k.yA){var h=k.yA[g];return new Promise(function(d,g){var v=e.J[c-1],n=a(h,1,0,function(){}),m=_.uniqueId(),l={};l[m]={Gf:null,paused:!1,Jb:n.pageIndex};k.nr(n.pageIndex,m,function(a,c){a&&g(Error("Error loading page "+n.pageIndex+": "+a));_.isUndefined(l[m])||(l[m].Gf=c,l[m].paused&&c.pause(),n.finishedLoading(a,c)&&c.VA(function(){d({draw:function(a,d){var c=this;return new Promise(function(e){var g=a.getTransform(),k=new XODText.Matrix2D,h=b.asc(v.cb)/1.33333;k.Da(h,0,
0,h,d.x,d.y);g.concat(k);a.translate(d.x,d.y);a.scale(h,h);"multiply"===f&&(a.globalAlpha=.5);c.Gf.aG(a,g,e)})},Gf:c})},void 0,!0))})})}throw Error("No matching annotation in appearance document.");}))}return f},ZN:function(a){this.J||(this.J=[]);this.J.push(a)},ho:function(a){return this.J[a]}};var q=0;k.Se=function(a){this.cn=this.Wa=null;this.tn=new b.hf.Es;this.id=a;this.Kv=!1;this.bf=null;this.Ld={};this.bB=_.bind(this.bB,this);this.Fu=null;this.Pf=1;this.te={};this.Pa=null;this.bc=Promise.resolve();
this.yA={};this.Bn=new k.lx(10,400);this.ma=(++q).toString(16)};k.Se.prototype=Object.create(k.cj.prototype);k.Se.prototype.constructor=k.Se;k.Document.Ir("xod",k.Se);$.extend(k.Se.prototype,{Sf:"Document/FixedDocument.fdoc",Jg:"Document/DocProps/core.xml",Rf:"Document/Structure/DocStruct.struct",zL:"Struct/font.xml",NM:"Struct/",LM:"Text/",loadAsync:function(a,d){this.Wa=a;this.vf=[];this.ke={};this.J=[];this.wd={};this.wd[this.Sf]=0;this.wd[this.Jg]=0;this.wd[this.Rf]=0;this.Wa.Ui()&&(this.sk={});
var c=this;a.bind("partReady",this.bB);this.bind("documentReady",function(a){1.5>c.Pf&&c.AN();d(a)});a instanceof b.o.V.Ip?(this.Kv=!0,this.Ol(function(){a.db=c.bf;a.hm(d)})):a.hm(d)},extractXFDF:function(a){if(1!==a.length)throw Error("XOD Document does not support extracting XFDF for multiple input pages");var d=this,c=a[0]-1;return new Promise(function(a){function e(a){var d="",c=0,b,g,f,k=-1;for(2<=a.length&&"{"===a.charAt(0)&&"}"===a.charAt(1)&&(a=a.substr(2));c<a.length;)b=a.charCodeAt(c),128>
b?(0>k&&(k=c),c++):(0<=k&&(d+=a.substring(k,c),k=-1),191<b&&224>b?(g=a.charCodeAt(c+1),d+=String.fromCharCode((b&31)<<6|g&63),c+=2):(g=a.charCodeAt(c+1),f=a.charCodeAt(c+2),d+=String.fromCharCode((b&15)<<12|(g&63)<<6|f&63),c+=3));0===k?d=a:0<=k&&(d+=a.substring(k,c));return d}if(1.5<=d.Pf){var g=d.J[c].kL;d.Ga.Bf("Annot/Annots"+(g.index?g.index:"")+".xfdf",function(c){c=e(c.data);d.J[0].iq=c;a({xfdfString:c,pages:_.range(g.start,g.end)})})}else d.Ga.Bf("Annots.xfdf",function(c){c=e(c.data);d.J[0].iq=
c;var g=b.Annotations.ba.Yq(c);d.dE(g);a({xfdfString:c,parsedData:g,pages:_.range(1,d.J.length+1)})})})},nr:function(a,d,c){var e=this;if(!this.Ga)throw Error("Document is not initialized!");1.2===this.Pf&&(this.Ga.Mv=!0);this.Ga.aA(a,d,function(d,g){var f=e.J[a],k=null;g&&(k=new b.hf.vM(f,g,e.tn));c(d,k)})},zo:function(a,d){if(!this.Ga)throw Error("Document is not initialized!");return this.Ga.Bf(a,d)},DT:function(a){var d=this;null===d.Fu?d.zo(d.zL,function(c){if(c.error)throw Error("SELECT: Error getting part "+
c.ra+": "+c.error);var b=new XODText.sx(d.ma);b.vB(c.data);d.Fu=b.Bz;a(d.Fu)}):a(d.Fu)},loadTextData:function(a,d){var c=this;null!==c.J[a].text?d(c.J[a].text):a in c.te?c.te[a].push(d):(c.te[a]=[d],1.4>c.Pf?c.zo(c.LM+(a+1)+".xml",function(d){if(d.error)throw Error("SELECT: Error getting part "+d.ra+": "+d.error);var b=new XODTextOld.we;b.PS(d.data);d=new XODText.we;d.Dr({m_Struct:b.gb,m_Str:b.Xa,m_Offsets:b.Vc,m_Quads:b.Ha,m_Ready:b.jd});c.correctQuadsForPageRotation(a,d);c.J[a].text=d;c.te[a].forEach(function(a){a(b)});
delete c.te[a]}):c.DT(function(d){c.zo(c.NM+(a+1)+".xml",function(b){var e=new XODText.we,g=new XODText.Matrix2D;g.Da(1,0,0,1,0,0);var f=new XODText.Vm(d);c.Ga.hH(a,function(d){function k(){return d.zr().then(function(){if(!d.run(f,g))return k()})}k().then(function(){e.vB(b.data,f);c.correctQuadsForPageRotation(a,e);c.J[a].text=e;c.te[a].forEach(function(a){a(e)});delete c.te[a]})["catch"](function(a){console.warn("Custom Canvas has encountered an error: "+a.message)})})})}))},Tl:function(){return 1.2>=
this.Pf},fk:function(){return this.po||0<this.vr},loadCanvasAsync:function(d,c,b,e,g,f){var k=this,h=a(d,c,b,e,g,f),n=_.uniqueId();k.Ld[n]={Gf:null,paused:!1,Jb:h.pageIndex};k.nr(h.pageIndex,n,function(a,d){if(a)throw Error("Error loading page "+h.pageIndex+": "+a);_.isUndefined(k.Ld[n])||(k.Ld[n].Gf=d,k.Ld[n].paused&&d.pause(),h.finishedLoading(a,d)&&d.VA(function(){h.resourcesLoaded()&&d.cP(h.getZoom(),h.getPageRotation(),function(a){h.drawComplete(a,h.pageIndex)},function(a){k.Vn(a,h.pageIndex);
h.drawProgressive(a,h.pageIndex)},h.canvasNum,h.getPageTransform(),h.renderRect,h.useProgress,h.pageCanvas)},void 0,h.acquireResources()))});return n},Yv:function(a){if(a=this.Ld[a])a.paused=!0,a.Gf&&a.Gf.pause()},qw:function(a){if(a=this.Ld[a])a.paused=!1,a.Gf&&a.Gf.resume&&a.Gf.resume()},cp:function(a){this.$h(a)},$h:function(a){var d=this.Ld[a];d&&(this.cu(d.Jb,a),d=d.Gf)&&(d.Kb(),d.abort&&d.abort());this.Mj(a)},Mj:function(a){delete this.Ld[a]},DF:function(){return"t"+_.uniqueId()},oT:function(a){return _.isString(a)&&
0<a.length&&"t"===a[0]},loadThumbnailAsync:function(a,d){if(!this.Ga)throw Error("Document is not initialized!");var c=this,e;if(this.po||this.vr>a)e=c.DF(),this.Ga.mA(a,e,function(a){var e=new Image,g;g=a.data;l&&c.Wa instanceof l?g=c.Wa.path+g:(a=a.ra.match(/\.([a-zA-Z]+)$/)[1].toLowerCase(),g=b.o.$G(a,g));e.onload=function(){e.src.startsWith("data")||URL.revokeObjectURL(e.src);d(e);e=e.onload=null};e.src=g},name);else{var g=this.J[a];e=this.loadCanvasAsync({pageIndex:a,zoom:g.width>g.height?150/
g.width:150/g.height,drawComplete:function(a){a.style.backgroundColor="white";c.cp(e);d(a)},pageCanvas:!0})}return e},Ol:function(a){if(null===this.bf){if(_.isUndefined(this.id)||_.isNull(this.id)){this.id=b.top.location.href;for(var d=b.top.location.hash.substring(1).split("&"),c=0;c<d.length;c++){var e=d[c].split("=");if("d"===e[0]){this.id=e[1];break}}}var g=this;this.bf=new b.o.eM(this.id);this.bf.open(a,function(a){g.bf=null;console.error(a)})}else console.warn("Offline DB is already initialized!"),
a()},ap:function(a,d){function c(a){e.Wa.Iy(a)}if(!this.Ga)throw a(),Error("Document is not initialized!");if(!this.bf)throw a(),Error("Offline DB is not initialized!");if(this.Wa instanceof b.o.V.Ip)throw a(),Error("Can't download file while in offline mode!");var e=this;e.Wa.dA(function(b){e.bf.VW(e.Ga,b,!!e.Wa.decrypt,a,d,c)})},gk:function(){if(!this.bf)throw Error("Offline DB is not initialized!");return this.bf.gk()},Gn:function(){if(!this.bf)throw Error("Offline DB is not initialized!");this.bf.KO()},
fo:function(){return this.Kv},Vo:function(a){if(!this.bf)throw Error("Offline DB is not initialized!");this.Kv!==a&&(!(this.Kv=a)||this.cn instanceof b.o.V.Ip||(this.cn=new b.o.V.Ip(this.bf,this.Wa.decrypt,this.Wa.xl),this.cn.bind("partReady",this.Ga.Pv)),this.gC())},gC:function(){if(null!==this.cn){var a=this.cn;this.cn=this.Wa;this.Wa=a;this.Ga.Yd=this.Wa}},cu:function(a,d){if(!this.Ga)throw Error("Document is not initialized!");this.Ga.qq(a,d)},Lj:function(a){this.oT(a)?this.Ga.LO(a):this.$h(a)},
bB:function(a){if(a.error)return this.wd[a.ra]=3,this.CD();var d;d=this.Wa.decrypt?this.Wa.JF?this.Wa.decrypt(a.data,this.Wa.xl,a.ra):b.o.Jh.OF(a.data,this.Wa.xl,a.ra):a.data;d=b.Yj(d);this.Wa.Ui()&&(this.sk[a.ra]={data:d,Fb:a.Fb},this.Wa.decrypt&&(this.sk[a.ra].iQ=a.data));a.Fb&&(d=h.inflate(d));switch(a.ra){case this.Sf:d=new b.Re(d);d.oa();d.advance();a=d.K("JPGThumbs");this.NA="true"===a;a=d.K("IncludesThumbs");this.po=null===a||"false"!==a;!this.po&&(a=d.K("NumLeadingThumbs"))&&(a=parseInt(a,
10),a=isNaN(a)?0:a,this.vr=Math.max(a,0));a=d.K("Version");this.Pf=parseFloat(a);if(1.2>this.Pf)throw this.wd[this.Sf]=null,Error("The XOD version is out of date. Please re-convert the file with the most recent version of PDFNet or the command line converter.");if(1.5<this.Pf)throw Error("The XOD file version is too new for this client. Please update the WebViewer client version.");a=1.5<=this.Pf;var c,e;a&&(e=d.K("DefaultMatrix").split(","),c=new XODText.Matrix2D,c.Da(parseFloat(e[0]),parseFloat(e[1]),
parseFloat(e[2]),parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5])),e=this.Kj(c));this.wd[this.Sf]=1;for(var g={index:0,start:1},f=1;d.advance();){var k=d.ua();if("PageContent"===k){k=new b.Nk(parseFloat(d.K("Width")),parseFloat(d.K("Height")));k.Nr=["Pages/"+f+".xaml","Annot/"+f+".xml","Pages/_rels/"+f+".xaml.rels"];k.kL=g;var n=d.K("trn:Id");n&&(k.offsetX=parseFloat(d.K("trn:X")),k.offsetY=parseFloat(d.K("trn:Y")),this.yA[n]=this.J.length);this.J.push(k);if(a){(k=d.K("trn:Matrix"))?(n=k.split(","),
k=new XODText.Matrix2D,k.Da(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2]),parseFloat(n[3]),parseFloat(n[4]),parseFloat(n[5])),n=this.Kj(k)):(k=c,n=e);var m=f-1,l=this.Fn(k,{w:this.J[m].width,Df:this.J[m].height});k.Da(4/3,0,0,-4/3,-l.x1,l.y2);this.J[m].cb=k;this.J[m].rotation=n}++f}else if("trn:AnnotRef"===k)g.end=f,g={index:g.index+1,start:f};else throw Error("Unsupported XOD document element type: "+k);}g.end=f;this.po&&(this.vr=this.J.length);this.qr=this.pq();break;case this.Jg:this.wd[this.Jg]=
1;d=new b.Re(d);d.oa();for(this.ke={};d.advance();)c=d.ua().split(":"),this.ke[1===c.length?c[0]:c[1]]=d.current.textContent;break;case this.Rf:this.wd[this.Rf]=1;this.vf=[];d=new b.Re(d);d.oa();d.advance();d.oa();d.advance();d.oa();g=0;for(f=null;d.advance();){c=parseInt(d.K("OutlineLevel"),10);e=new b.CoreControls.Bookmark;e.children=[];e.name=a.Fb?b.utils.utf8_decode(d.K("Description")):d.K("Description");if(g<c)e.parent=f;else for(e.parent=f.parent;g>c;)e.parent=e.parent.parent,--g;e.gp=d.K("trn:Vpos");
e.gp=null===e.gp?0:parseFloat(e.gp);e.so=d.K("trn:Hpos");e.so=null===e.so?0:parseFloat(e.so);g=d.K("OutlineTarget").split("#");1===g.length||0===g[1].length?e.url=g[0]:e.Hf=parseInt(g[1],10);null!==e.parent?e.parent.children[e.parent.children.length]=e:this.vf[this.vf.length]=e;g=c;f=e}break;default:if(this.wd[this.Sf])return this.wd[this.Jg]=this.wd[this.Jg]||2,this.wd[this.Rf]=this.wd[this.Rf]||2,this.HD(a)}this.CD()},getBookmarks:function(){return Promise.resolve(this.vf)},eo:function(a){return 1.2===
this.Pf?this.J[a].iq:this.J[a].links},vb:function(){return this.J.length},Ll:function(a,d,c){d={x:d,y:c};return this.J[a].cb.inverse().W(d)},gv:function(a,d,c){return this.J[a].cb.W({x:d,y:c})},Kb:function(){var a="i"+this.ma+"-",d="f"+this.ma+"-";if(document.fonts)for(var c in b.Ng)c.startsWith(d)&&(b.Ng[c].remove(),delete b.Ng[c]);for(var e in b.ci)e.startsWith(a)&&delete b.ci[e];_.isEmpty(b.Ng)&&(a=b.ef.FontFace.prototype.fC,null!==a&&(document.head.removeChild(a),b.ef.FontFace.prototype.styleSheet=
null,b.ef.FontFace.prototype.fC=null));this.tn=new b.hf.Es;this.Wa instanceof b.o.V.XC&&this.Wa.abort();this.Us()},Us:function(){this.Wa.unbind("partReady");this.Ga&&this.Ga.Kb();this.Ga=new b.o.V.aM(this.Wa,this.J,this.tn,this.ma);this.Ga.NA=this.NA},CD:function(){this.wd[this.Sf]&&this.wd[this.Jg]&&this.wd[this.Rf]&&this.HD()},HD:function(a){this.Us();if(this.Wa.Ui()){for(var d in this.sk)this.Ga.cache.setItem(d,this.sk[d].data,this.sk[d].Fb),this.Wa.decrypt&&this.Ga.Cl.setItem(d,this.sk[d].iQ,
this.sk[d].Fb);delete this.sk}this.trigger("documentReady",3===this.wd[this.Sf]);a&&this.Wa.trigger("partReady",a)},AN:function(){var a=new XODText.Matrix2D;a.Da(4/3,0,0,-4/3,0,this.J[0].height);for(var d=this.J.length,c=0;c<d;++c)this.J[c].cb=a,this.J[c].rotation=0},dE:function(a){for(var d=this.J.length,c=0;c<d;++c)this.J[c].cb=null;if(a&&a.querySelector("xfdf > pages")){a=a.querySelector("xfdf > pages");for(var b,e,g,c=0;c<a.childNodes.length;++c){var f=a.childNodes[c].localName;if(f&&(g=a.childNodes[c],
"defmtx"===f&&(e=g.getAttribute("matrix").split(","),b=new XODText.Matrix2D,b.Da(parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5])),e=this.Kj(b)),"pgmtx"===f)){f=parseInt(g.getAttribute("page"),10);g=g.getAttribute("matrix").split(",");var k=new XODText.Matrix2D;k.Da(parseFloat(g[0]),parseFloat(g[1]),parseFloat(g[2]),parseFloat(g[3]),parseFloat(g[4]),parseFloat(g[5]));var h=this.Kj(k);g=this.Fn(k,{w:this.J[f].width,Df:this.J[f].height});this.J[f].rotation=
h;k.Da(4/3,0,0,-4/3,-g.x1,g.y2);this.J[f].cb=k}}for(c=0;c<d;++c)null===this.J[c].cb&&(a=new XODText.Matrix2D,g=this.Fn(b,{w:this.J[c].width,Df:this.J[c].height}),a.Da(4/3,0,0,-4/3,-g.x1,g.y2),this.J[c].cb=a,this.J[c].rotation=e)}},Lu:function(a){return this.J[a-1].kL.index},Mu:function(a,d){if(1.5>this.Pf)return Promise.reject("getAppearanceReferences: XOD with version less than 1.5 has no appearances");var c=this,g=this.Lu(d);new k.Se;var f="Annot/Appearances"+(g||"")+".xod",h;h=new Promise(function(a,
d){b.FileReader||d("This browser does not support FileReader");c.Ga.Bf(f,function(c){c.error?d(c.error):a(e(b.wH(c.data)))})});this.Bn.fF(g,h);return h},Zo:function(){return!this.Tl()}});k.Lh=function(){this.vf=[];this.ke={};this.J=[];this.Vv={};this.po=!1;this.vr=0;this.yi={};this.te={};this.ma=null;this.QI=2;this.TJ=!1;this.me=[];this.Pa=null;this.Bn=new k.lx(10,400)};k.Lh.prototype=Object.create(k.cj.prototype);k.Lh.prototype.constructor=k.Lh;k.Document.Ir("pdf",k.Lh);$.extend(k.Lh.prototype,{ex:function(a){var d=
new b.Nk(a.width,a.height);d.cb=new XODText.Matrix2D;a=a.matrix;d.cb.Da(a[0],a[1],a[2],a[3],a[4],a[5]);a=this.Kj(d.cb);d.cb=this.FB({w:d.width,Df:d.height});d.rotation=a;return d},FB:function(a,d){var c=new XODText.Matrix2D;c.Da.apply(c,a);var b=this.Fn(c,d);c.Da(1,0,0,-1,-b.x1,b.y2);return c},tG:function(a,d){var c=this;c.mU||c.bF({pageDimensions:a});c.bc=new Promise(function(a){c.bind("documentComplete",function(){c.unbind("documentComplete");a()})});c.qr=c.pq();c.nh||c.trigger("documentComplete");
d();setTimeout(this.xO.bind(this),0)},xO:function(){var a=this;a.za.addEventListener(a.ma,function(d){a.qB(d)})},qR:function(a,d){var c=createPromiseCapability(),b=new XMLHttpRequest;b.open("GET",a.url);b.withCredentials=d;var e=a.customHeaders;if(e)for(var g in e)b.setRequestHeader(g,e[g]);b.setRequestHeader("Range","bytes=1-150");b.responseType="arraybuffer";b.onreadystatechange=function(){if(this.readyState===this.DONE)if(b.response){var a=b.response.byteLength;206!==b.status&&200!==b.status?c.reject({message:"Received http error code "+
b.status}):150!==a&&c.reject({message:"Byte ranges are not supported by the server.",data:new Uint8Array(b.response)});var a=new Uint8Array(b.response),d=[76,105,110,101,97,114,105,122,101,100],e=b.getResponseHeader("Content-Range")||b.getResponseHeader("content-range");if(e){var e=e.split("/")[1],g=0;do{a:{for(var f=a.length;g<f;++g)if(a[g]===d[0])break a;g=-1}g+=1;if(!g)break;for(f=1;10>f;++f)if(a[g]===d[f])++g;else break;if(10===f){c.resolve(parseInt(e,10));return}}while(0!==g);c.reject({message:"The file is not linearized."})}else c.reject({message:"Could not retrieve Content-Range header."})}else c.reject({message:"No response data"})};
b.onerror=function(){c.reject({message:"Network or Cross Domain Access Error."})};b.send();return c.promise},loadAsync:function(a,d,c){function e(a){p.vf=[];p.ke={};p.J=[];p.po=!1;p.vr=0;p.nh=!1;p.bind("documentReady",d);var c,b;q.then(function(d){p.za=d;d="object"===typeof a&&"url"in a;var e;if(e=r){e=r;var g=Object.prototype.toString.call(e);e="object"===typeof e&&null!==e&&("[object File]"===g||"[object Blob]"===g)}e&&p.za&&"ems"===p.za.getWorkerType()?(c="file",b=r):d?(c="url",b=a,p.nh=!0):"string"===
typeof a?(c="filepath",b=a):"object"===typeof a&&null!==a&&void 0!==a.byteLength?(c="array",b=a.buffer):"object"===typeof a&&"type"in a&&"id"===a.type?(c="id",b=a.id):console.warn("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object");h({type:c,value:b,extension:m,defaultPageSize:l,pageSizes:u})})}function g(a,d){console.warn("Could not use incremental download for url "+a+". Reason: "+d)}function f(a){M=a;p.za.vX(p.ma,a).then(function(a){a.success?k(a.pageDimensions):
n(f)})}function k(c){p.nh?p.za.dT(p.ma).then(function(b){b?p.tG(c,d):(g(r.url,"Linearization data is invalid."),p.Kb(),a.getFileData(e))}):p.tG(c,d)}function h(a){p.za.oQ(a).then(function(a){p.ma=a.docId;k(a.pageDimensions)},function(a){"NeedsPassword"===a.type&&n?(p.ma=a.docId,M?f(M):n(f)):(p.bc=Promise.reject(a),d(a))})}this.Wa=a;var n=c.getPassword,m=c.extension,l=c.defaultPageSize,u=c.pageSizes,q=c.workerTransportPromise,p=this,r=a.getFile();if(b.utils.isJSWorker&&b.jsworker)r=b.jsworker.worker.getPlatformFormatFilePath(r),
e(r);else if(r&&r.url)this.qR(r,a.withCredentials).then(function(d){r.size=d;r.withCredentials=-1===r.url.indexOf(window.location.hostname)?a.withCredentials:!0;a.trigger("documentLoadingProgress",[1,1]);e(r)},function(d){g(r.url,d.message);var c;try{c=window.parent.cordova}catch(b){c=!1}d.data&&!c?e(d.data):a.getFileData(e)});else if(r){c=q.then(function(a){return a.nq});var H=b.o.rR();Promise.race([c,H]).then(function(d){"pnacl"===d?a.getFileData(e):e(r)})}else a.getFileData(e);var M=null},bF:function(a){var d=
this;d.mU=!0;a=a.pageDimensions;for(var b=Object.keys(a),e=this.J,g=Array(e.length),f=0;f<e.length;++f){var k=e[f];k.text&&(g[f]=k.text)}this.J.length=0;var h=this.Vv,n=[],m={};b.forEach(function(b){var f=a[b],k=!!f.contentChanged,f={width:f.width,height:f.height,matrix:d.FB(f.matrix,{w:f.width,Df:f.height}),rotation:90*f.rotation,id:f.id,pageNum:b,contentChanged:k};h[f.id]&&n.push({before:h[f.id],after:f});h[f.id]=new c(f.width,f.height);var l=h[f.id];l.aK(f);!k&&(k=g[b-1])&&(l.text=k);e[b-1]=l;
m[f.id]=!0});this.qr=this.pq();Object.keys(h).forEach(function(a){a in m||delete h[a]});return n},qB:function(a){switch(a.type){case "pagesUpdated":a=this.bF(a.data);this.Uj({type:"pagesDiff",data:a});this.Uj({type:"pagesUpdated",data:a.map(function(a){return a.after})});break;case "bookmarksUpdated":this.Uj({type:"bookmarksUpdated",data:a.data});break;case "documentComplete":this.trigger("documentComplete");this.Uj({type:"documentComplete",data:a.data});break;default:console.warn("Unknown event type: ",
a.type)}},getBookmarks:function(){function a(d){var c=[];d.children.forEach(function(d){c.push(a(d))});return new k.df(c,d.name,d.pageNumber,d.parent,d.verticalOffset,d.horizontalOffset,d.url)}return this.za.AT(this.ma).then(function(d){var c=[];d.bookmarks.forEach(function(d){c.push(a(d))});return c})},loadTextData:function(a,d){var c=this;null!==c.J[a].text?d(c.J[a].text):a in c.te?c.te[a].push(d):(this.im(a+1).then(function(){c.za.rh(c.ma,a).then(function(d){var b=new XODText.we;b.Dr({m_Struct:d.struct,
m_Str:d.str,m_Offsets:d.offsets,m_Quads:d.quads,m_Ready:!0});c.correctQuadsForPageRotation(a,b);c.J[a].text=b;c.te[a].forEach(function(a){a(b)});delete c.te[a]},function(a){console.warn("Text generation failed: "+(a&&a.message?a.message:a))})}),c.te[a]=[d])},extractXFDF:function(a){return this.za.yT(this.ma,a).then(function(d){d.pages=a;return d})},rr:function(a){return this.za.rr(this.ma,a)},uC:function(a){var d=this;return new Promise(function(c){var b=d.zH(a),e=new FileReader;e.onload=function(a){c(a.target.result)};
b.toBlob(function(a){e.readAsArrayBuffer(a)})})},mQ:function(a,d){if(a.byteLength!==d.byteLength)return!1;for(var c=new Int8Array(a),b=new Int8Array(d),e=0;e!==a.byteLength;e++)if(c[e]!==b[e])return!1;return!0},AH:function(a){var d=this;return new Promise(function(c,b){d.Pa||b("no watermark for this doc");var e=a.length,g=[];if(d.Pa.hasOwnProperty("custom")){for(var f=0;f<e;f++)g.push(d.uC(a[f]));Promise.all(g).then(function(a){var b={},g=a[0];b["default"]=g;for(var f=1;f<e;f++){var k=a[f];d.mQ(k,
g)||(b[f.toString()]=k)}c(b)})}else{var k=a[0],f=d.fc(k),h=f.width,n=f.height;g.push(d.uC(k));for(var m=["default"],f=1;f<e;f++){var k=a[f],l=d.fc(k);if(h!==l.width||n!==l.height)m.push(f.toString()),g.push(d.uC(k))}Promise.all(g).then(function(a){for(var d={},b=0;b<m.length;b++)d[m[b]]=a[b];c(d)})}})},getFileData:function(a){var d=this;a=a||{};"finishedWithDocument"in a||(a.finishedWithDocument=!1);"printDocument"in a||(a.printDocument=!1);a.docId=d.ma;if("filePath"in a)return d.bc.then(function(){return d.za.mV(a)});
var c=_.range(0,this.vb()),b=d.AH(c);return d.bc.then(function(){return b}).then(function(c){a.watermarks=c;return d.za.LJ(a)},function(){return d.za.LJ(a)}).then(function(a){return a.fileData})},vb:function(){return this.J.length},QH:function(a,d,c,e,g,f,k,h){var n=this,m=b.o.Hm===b.o.Hm.Is;if(m){d=b.innerWidth;c=b.innerHeight;var l=b.utils.getCanvasMultiplier(),u={x:k.x,y:k.y};b.Bd(e.Uv,e.Tv,{x1:e.page.x1,x2:e.page.x2,y1:e.page.y1,y2:e.page.y2,width:e.page.width,height:e.page.height},u,!0,l);u.x=
u?Math.round(u.x):0;u.y=u?Math.round(u.y):0;l=b.o.Aa.xh;b.o.Aa.vn(l,d,c);var q=u.x>=l.width/2;console.log("imagePathReceived for: "+a);console.log("tCanvas.width: "+l.width);console.log("translation.x: "+u.x);console.log("isRightPage: "+q);"undefined"===typeof n.kr&&(n.kr=!1);if(q&&!n.kr){n.lz=function(){var d=b.o.Aa.Wo(e.page,e.Uv,e.Tv,k,f,h).canvas,c=k?Math.round(k.x):0,n=k?Math.round(k.y):0;console.log("Drawing: "+a);var m=new Image;$(m).css("width",e.TI);$(m).css("height",e.RI);var l=a;0!==l.indexOf("file://")&&
(l="file://"+l);m.onload=function(){var a=d.getContext("2d");a.setTransform(1,0,0,1,0,0);a.drawImage(m,c,n);g||$(d).addClass("progressive");e.kz(d);g&&e.jz(d);m=null;b.utils.isJSWorker&&(console.log("[WebViewer|JSWorker]: Deleting file: "+l),b.jsworker.worker.deleteGeneratedImageRenderFile(l))};m.src=l};return}}var p=b.o.Aa.Wo(e.page,e.Uv,e.Tv,k,f,e.Xd,h).canvas,r=k?Math.round(k.x):0,H=k?Math.round(k.y):0;console.log("Drawing: "+a);var M=new Image;$(M).css("width",e.TI);$(M).css("height",e.RI);var E=
a;0!==E.indexOf("file://")&&(E="file://"+E);M.onload=function(){var a=p.getContext("2d");a.setTransform(1,0,0,1,0,0);a.drawImage(M,r,H);g||$(p).addClass("progressive");e.kz(p);g&&e.jz(p);M=null;b.utils.isJSWorker&&(console.log("[WebViewer|JSWorker]: Deleting file: "+E),b.jsworker.worker.deleteGeneratedImageRenderFile(E));m&&(q?n.kr=!1:(n.kr=!0,"function"===typeof n.lz&&(n.lz(),n.lz=void 0,n.kr=!1)))};M.src=E},kT:function(a){if("Alpha"===a.name)return!0;for(var d=0;d<this.me.length;++d)if(this.me[d].name===
a.name)return this.me[d].enabled;d=Array(3);this.PK(a.color,d);a={color:a.color,name:a.name,rgb:d,enabled:!0};this.me.push(a);this.Uj({type:"colorSeparationAdded",data:a});return!0},wa:function(a,d){var c=a*d+128;return(c>>8)+c>>8},lb:function(a,d,c){a=a*d+128;a=((a>>8)+a>>8)+c;return 255>a?a:255},PK:function(a,d){var c=a[0],b=a[1],e=a[2],g=a[3],f=c<<24|b<<16|e<<8|g,k=n[f];if(k)d[0]=k[0],d[1]=k[1],d[2]=k[2];else{var k=255-c,h=255-b,m=255-e,l=255-g,u=this.wa(this.wa(this.wa(k,h),m),l),q=u,p=u,r=u,
u=this.wa(this.wa(this.wa(k,h),m),g),q=this.lb(35,u,q),p=this.lb(31,u,p),r=this.lb(32,u,r),u=this.wa(this.wa(this.wa(k,h),e),l),q=this.lb(255,u,q),p=this.lb(242,u,p),u=this.wa(this.wa(this.wa(k,h),e),g),q=this.lb(28,u,q),p=this.lb(26,u,p),u=this.wa(this.wa(this.wa(k,b),m),l),q=this.lb(236,u,q),r=this.lb(140,u,r),u=this.wa(this.wa(this.wa(k,b),m),g),q=this.lb(36,u,q),u=this.wa(this.wa(this.wa(k,b),e),l),q=this.lb(237,u,q),p=this.lb(28,u,p),r=this.lb(36,u,r),u=this.wa(this.wa(this.wa(k,b),e),g),q=this.lb(34,
u,q),u=this.wa(this.wa(this.wa(c,h),m),l),p=this.lb(173,u,p),r=this.lb(239,u,r),u=this.wa(this.wa(this.wa(c,h),m),g),p=this.lb(15,u,p),r=this.lb(36,u,r),u=this.wa(this.wa(this.wa(c,h),e),l),p=this.lb(166,u,p),r=this.lb(80,u,r),u=this.wa(this.wa(this.wa(c,h),e),g),p=this.lb(19,u,p),u=this.wa(this.wa(this.wa(c,b),m),l),q=this.lb(46,u,q),p=this.lb(49,u,p),r=this.lb(146,u,r),u=this.wa(this.wa(this.wa(c,b),m),g),r=this.lb(2,u,r),u=this.wa(this.wa(this.wa(c,b),e),l);d[0]=this.lb(54,u,q);d[1]=this.lb(54,
u,p);d[2]=this.lb(57,u,r);n[f]=[d[0],d[1],d[2]]}},IM:function(a,d,c){a[0]=Math.min(this.wa(d[0],c)+a[0],255);a[1]=Math.min(this.wa(d[1],c)+a[1],255);a[2]=Math.min(this.wa(d[2],c)+a[2],255);a[3]=Math.min(this.wa(d[3],c)+a[3],255)},tM:function(a,d,c,b){var e=this;return new Promise(function(g){for(var f,k=[],h=[],n=new Uint8ClampedArray(d*c*4),m=0,l=0;l<a.length;++l)"Alpha"!==a[l].name?(h.push(a[l].color),k.push(new Uint8Array(a[l].data)),++m):f=new Uint8Array(a[l].data);e.Hv(0,d,c,Math.ceil(1E5/d),
[0,0,0,0],m,Array(3),h,k,n,f,b,g)})},Hv:function(a,d,c,b,e,g,f,k,h,n,m,l,u){for(var q=Math.min(a+b,c);a<q;++a)for(var p=a*d,r=4*p,M=0;M<d;++M){e[0]=0;e[1]=0;e[2]=0;for(var E=e[3]=0;E<g;++E)this.IM(e,k[E],h[E][p+M]);this.PK(e,f);E=r+4*M;n[E]=f[0];n[E+1]=f[1];n[E+2]=f[2];n[E+3]=m[p+M]}a<c?(a=setImmediate(this.Hv.bind(this,a,d,c,b,e,g,f,k,h,n,m,l,u)),l&&(this.yi[l.id]=a)):u(n)},CO:function(a,d,c,b){for(var e=a.length-1;0<=e;--e)this.kT(a[e])||a.splice(e,1);return this.tM(a,d,c,b)},lF:function(a,d,c,
e,g,f,k,h){function n(f){function k(){g||$(l).addClass("progressive");e.page&&m.Vn(l,e.page.Ra-1);e.kz(l);g&&e.jz(l,{data:a,width:d,height:c});g&&delete m.yi[e.id]}if(b.utils.supportsImageDataConstructor){var h=new b.ImageData(f,d,c);p.putImageData(h,u,q,0,0,d,c);k()}else{var r=Math.ceil(1E6/d),x=c,y=p.createImageData(d,Math.min(r,c)),T=0,P=function(){var a=Math.min(r,x),b=c-x,h=a*d*4;y.data.set(f.subarray(T,T+h));T+=h;p.putImageData(y,u,q+b,0,0,d,a);x-=a;0===x?k():(a=setImmediate(P),g&&(m.yi[e.id]=
a))};P()}}var m=this,l=e.cQ?e.cQ:b.o.Aa.Wo(e.page,e.Uv,e.Tv,k,f,e.Xd,h).canvas,u=k&&0<k.x?Math.round(k.x):0,q=k&&0<k.y?Math.round(k.y):0,p=l.getContext("2d");a.length?this.CO(a,d,c,g?e:null).then(n):n(new Uint8ClampedArray(a))},loadCanvasAsync:function(d,c,e,g,f,k){var h=this,n=a(d,c,e,g,f,k),m=n.pageIndex;d=n.getZoom();e=n.getPageRotation();c=n.renderRect;f=e===b.o.Sa.Xe||e===b.o.Sa.fg;var l=b.utils.getCanvasMultiplier(),u=n.getPageTransform();"undefined"===typeof c?(g=(f?h.J[m].height:h.J[m].width)*
d,f=(f?h.J[m].width:h.J[m].height)*d):(g=(f?c.y2-c.y1:c.x2-c.x1)*d,f=(f?c.x2-c.x1:c.y2-c.y1)*d);g=Math.round(g);f=Math.round(f);var q=Math.floor(g*l),p=Math.floor(f*l);if(!q||!p)return e=h.za.Rq(),this.yi[e]=setImmediate(function(){var a=document.createElement("canvas");a.width=q||1;a.height=p||1;n.drawComplete(a)}),e;var r,l=h.TJ?b.o.Ap.wM:h.QI;b.utils.isJSWorker&&b.jsworker.worker.useFilePathForImageRenders()?(r=b.jsworker.worker.generateImageRenderFilePath(m),r=b.jsworker.worker.getPlatformFormatFilePath(r),
console.log("imageRenderFilePath for page "+m+' is: "'+r+'".'),l=h.za.NQ(h.ma,m,q,p,e,h.PA,l,c,r)):l=h.za.MQ(h.ma,m,q,p,e,h.PA,l,c);var N=l.HO,H={kz:n.drawProgressive,jz:function(a,d){n.drawComplete(a,m,d)},TI:g,RI:f,Uv:d,Tv:e,page:h.J[m],Xd:c,id:N},M=1,E;n.useProgress&&(E=setInterval(function(){var a;b.utils.isJSWorker&&b.jsworker.worker.useFilePathForImageRenders?(a=b.jsworker.worker.generateNextImageRenderFilePath(r,M++),a=b.jsworker.worker.getPlatformFormatFilePath(a),a=h.za.MG(N,a)):a=h.za.MG(N);
a.then(function(a){"undefined"!==typeof a.filePath?h.QH(a.filePath,a.pageWidth,a.pageHeight,H,!1,k,u,n.pageCanvas):h.lF(a.pageBuf,a.pageWidth,a.pageHeight,H,!1,k,u,n.pageCanvas)},function(a){"type"in a&&"Queued"===a.type||clearInterval(E)})},b.o.mH()));l.promise.then(function(a){clearInterval(E);"undefined"!==typeof a.filePath?h.QH(a.filePath,a.pageWidth,a.pageHeight,H,!0,k,u,n.pageCanvas):h.lF(a.pageBuf,a.pageWidth,a.pageHeight,H,!0,k,u,n.pageCanvas)},function(a){clearInterval(E);n.onError(a)});
return N},Mj:function(){},Kb:function(){this.ma&&(this.za.RO(this.ma),this.za.$y(this.ma),this.ma=null);this.Wa.abort&&this.Wa.abort()},ar:function(a,d,c){if(this.nh)return Promise.reject('insertBlankPages requires downloader to be disabled. Please pass "useDownloader: false" to your WebViewer constructor https://www.pdftron.com/documentation/web/guides/usedownloader-option/#disabling-downloader');var b=this;return this.bc.then(function(){return b.za.ar(b.ma,a,d||612,c||792)})},Ai:function(a,d,c){if(this.nh)return Promise.reject('insertPages requires downloader to be disabled. Please pass "useDownloader: false" to your WebViewer constructor https://www.pdftron.com/documentation/web/guides/usedownloader-option/#disabling-downloader');
var b=this;a instanceof k.Document&&(a=a.v.ma);return this.bc.then(function(){return b.za.Ai(b.ma,a,d,c,!0)})},jk:function(a,d){var c=this;return this.bc.then(function(){return c.za.jk(c.ma,a,d)})},Ri:function(a){var d=this;a.sort(f);return this.bc.then(function(){return d.za.Ri(d.ma,a)})},li:function(){return this.za.li(this.ma,this.PA)},Vi:function(a,d){var c=this;a.sort(f);return this.bc.then(function(){return c.za.Vi(c.ma,a,d)})},bh:function(a,d){var c=this,b=a.map(function(a){return a-1}),e=
c.AH(b);return this.bc.then(function(){return e}).then(function(b){return c.za.bh(c.ma,a,d,b)},function(){return c.za.bh(c.ma,a,d)}).then(function(a){return a.fileData})},gi:function(a,d,c,b,e){var g=this;a.sort(f);return this.bc.then(function(){return g.za.gi(g.ma,a,d,c,b,e)})},Sq:function(a){return this.J[a].id},io:function(){return Object.keys(this.Vv)},kg:function(){var a=this;if(!b.o.Bi())throw Error("getPDFDoc called without PDFNet being loaded. Are you running a lean version of PDFNetJS?");
return a.za.kg(a.ma).then(function(d){d=new b.PDFNet.PDFDoc(d);d.documentCompletePromise=a.bc;return d})},pi:function(){var a=this;return this.bc.then(function(){return a.za.pi(a.ma)})},qm:function(a){this.PA=a},Aw:function(a){this.QI=a},im:function(a){if(1!==arguments.length)throw new RangeError(arguments.length+" arguments passed into function 'requirePage'. Expected 1 argument. Function Signature: requirePage(number)");if(a instanceof Promise)throw new TypeError("Received a Promise object in 1st input argument 'requirePage'. Promises require a 'yield' statement before being accessed.");
if("number"!==typeof a)throw new TypeError("1st input argument '"+a+"' in function 'requirePage' is of type '"+typeof a+"'. Expected type 'number'. Function Signature: requirePage(number).");if(0>=a)throw Error("1st input argument '"+a+"' in function 'requirePage' is invalid. Expected number between 1 and number of pages in the document.");return this.nh?this.za.im(this.ma,a):Promise.resolve()},loadThumbnailAsync:function(a,d,c){var e="page"===c;c=this.J[a];var g=b.utils.getCanvasMultiplier(),e=e?
2E3:150*g,f=c.width>c.height?e/c.width:e/c.height,f=f/g;return this.loadCanvasAsync({pageIndex:a,getZoom:function(){return f},getPageRotation:function(){return b.o.Sa.ki},drawComplete:function(a){d(a)},drawProgressive:function(){},useProgress:!1,pageCanvas:!0})},Lj:g,$h:g,fk:function(){return!1},nm:function(a){this.nh&&this.za.nm(this.ma,a)},yu:function(a){this.TJ=a},Nu:function(){return this.me},zu:function(a,d){for(var c=0;c<this.me.length;++c)if(this.me[c].name===a){this.me[c].enabled=d;break}},
Zo:function(){return!this.nh},Lu:function(a){return a},Mu:function(a,d){var c=this.Lu(d),b=this.za.Mu(this.ma,a).then(function(a){return e(a.data)});this.Bn.fF(c,b);return b}});_(k.cj.prototype).extend(Backbone.Events);b.Nk=c})(window);
(function(b){b.Annotations=b.Annotations||{};var f=b.Annotations;f.Color=function(b,c,a,d){this.A=this.B=this.G=this.R=0;b instanceof f.Color?(this.R=b.R,this.G=b.G,this.B=b.B,this.A=b.A):_.isArray(b)?1===b.length?(this.B=this.G=this.R=b=Math.round(255*(b[0]||0)),this.A=1):3===b.length?(this.R=Math.round(255*(b[0]||0)),this.G=Math.round(255*(b[1]||0)),this.B=Math.round(255*(b[2]||0)),this.A=1):4===b.length&&(c=b[1]||0,a=b[2]||0,d=b[3]||0,this.R=Math.round(255*(1-(b[0]||0))*(1-d)),this.G=Math.round(255*
(1-c)*(1-d)),this.B=Math.round(255*(1-a)*(1-d)),this.A=1):_.isString(b)&&"#"===b[0]?(b=f.ba.Rj(b),this.R=b.R,this.G=b.G,this.B=b.B,this.A=1):(_.isUndefined(b)||(this.R=Number(b)),_.isUndefined(c)||(this.G=Number(c)),_.isUndefined(a)||(this.B=Number(a)),_.isUndefined(d)?_.isUndefined(b)&&_.isUndefined(c)&&_.isUndefined(a)||(this.A=1):this.A=Number(d))};f.Color.prototype={toString:function(){var b=this.R+","+this.G+","+this.B;return"undefined"===typeof this.A?"rgb("+b+")":"rgba("+b+","+this.A+")"},
toHexString:function(){return f.ba.wg(this)},fX:function(){return f.ba.toFixed(this.R/255,3)+" "+f.ba.toFixed(this.G/255,3)+" "+f.ba.toFixed(this.B/255,3)+" rg"},Ql:function(){return 0===this.R&&0===this.G&&0===this.B&&1===this.A},iI:function(){return 0===this.A}};f.Point=function(b,c){this.x=b;this.y=c;"string"===typeof b&&(this.x=parseFloat(b));"string"===typeof c&&(this.y=parseFloat(c))};f.Point.prototype={toString:function(){return"[Point: x="+this.x+" y="+this.y+"]"}};f.ab=function(b,c,a,d,g,
f,h,l){this.x1=b;this.y1=c;this.x2=a;this.y2=d;this.x3=g;this.y3=f;this.x4=h;this.y4=l};f.ab.prototype={normalize:function(){},Fz:function(){var b=[];b.push(this.x1);b.push(this.y1);b.push(this.x2);b.push(this.y2);b.push(this.x3);b.push(this.y3);b.push(this.x4);b.push(this.y4);return b}};f.Rect=function(b,c,a,d){b instanceof f.Rect?(this.x1=b.x1,this.y1=b.y1,this.x2=b.x2,this.y2=b.y2):_.isArray(b)?(this.x1=b[0],this.y1=b[1],this.x2=b[2],this.y2=b[3]):_.isObject(b)?(this.x1=b.x1,this.y1=b.y1,this.x2=
b.x2,this.y2=b.y2):(this.x1=b,this.y1=c,this.x2=a,this.y2=d)};f.Rect.prototype={ya:function(){return this.x2-this.x1},va:function(){return this.y2-this.y1},translate:function(b,c){this.x1+=b;this.y1+=c;this.x2+=b;this.y2+=c},Eu:function(b){var c=0,a=0;if(this.ya()<=b.ya()){var d=b.x2-this.x2;0>d&&(c=d);d=b.x1-this.x1;0<d&&(c=d)}this.va()<=b.va()&&(d=b.y2-this.y2,0>d&&(a=d),b=b.y1-this.y1,0<b&&(a=b));this.translate(c,a)},normalize:function(){var b;0>this.ya()&&(b=this.x1,this.x1=this.x2,this.x2=b);
0>this.va()&&(b=this.y1,this.y1=this.y2,this.y2=b)},nG:function(){var b;this.x1>this.x2&&(b=this.x1,this.x1=this.x2,this.x2=b);this.y2>this.y1&&(b=this.y1,this.y1=this.y2,this.y2=b)},isEqual:function(b){return this.x1===b.x1&&this.y1===b.y1&&this.x2===b.x2&&this.y2===b.y2},jI:function(){return 0===this.x1&&0===this.y1&&0===this.x2&&0===this.y2}};f.Math={ST:function(b,c){return b instanceof f.Point&&c instanceof f.Point?new f.Point((b.x+c.x)/2,(b.y+c.y)/2):null},distance:function(b,c){if(!(b instanceof
f.Point&&c instanceof f.Point))return null;var a=b.x-c.x,d=b.y-c.y;return Math.sqrt(a*a+d*d)},II:function(b,c,a){return b instanceof f.Point&&c instanceof f.Point&&a instanceof f.Point?c.x<=Math.max(b.x,a.x)&&c.x>=Math.min(b.x,a.x)&&c.y<=Math.max(b.y,a.y)&&c.y>=Math.min(b.y,a.y):null},fH:function(b,c,a){if(!(b instanceof f.Point&&c instanceof f.Point&&a instanceof f.Point))return null;b=(c.y-b.y)*(a.x-c.x)-(c.x-b.x)*(a.y-c.y);return 0===b?"colinear":0<b?"clockwise":"counterClockwise"},WS:function(b,
c,a,d){if(!(b instanceof f.Point&&c instanceof f.Point&&a instanceof f.Point&&d instanceof f.Point))return null;var g=f.Math.fH,k=f.Math.II,h=g(b,c,a),l=g(b,c,d),n=g(a,d,b),g=g(a,d,c);return h!==l&&n!==g||"colinear"===h&&k(b,a,c)||"colinear"===l&&k(b,d,c)||"colinear"===n&&k(a,b,d)||"colinear"===g&&k(a,c,d)?!0:!1}};f.ControlHandle=function(b,c,a,d){this.x=b;this.y=c;this.width=a;this.height=d};f.ControlHandle.handleWidth=12;f.ControlHandle.handleHeight=12;f.ControlHandle.selectionAccuracyPadding=1;
f.ControlHandle.prototype={testSelection:function(b,c,a,d,g){b=this.getDimensions(b,c,a);c=0;1<f.ControlHandle.selectionAccuracyPadding&&(c=f.ControlHandle.selectionAccuracyPadding);return d>=b.x1-c&&d<=b.x1+b.ya()+c&&g>=b.y1-c&&g<=b.y1+b.va()+c},draw:function(b,c,a,d){"undefined"===typeof d&&(d=1);this.jc(b,d);var g=this.getDimensions(c,a,d);c=g.x1;a=g.y1;d=g.ya();g=g.va();b.beginPath();b.arc(c+d/2,a+g/2,d/2,0,2*Math.PI);b.stroke();b.fill()},jc:function(b,c){b.strokeStyle=f.SelectionModel.defaultSelectionOutlineColor.toString();
b.fillStyle="rgb(255, 255, 255)";b.lineWidth=f.SelectionModel.selectionOutlineThickness/c},move:function(){console.warn("ControlHandle move() not implemented")},getDimensions:function(){console.warn("ControlHandle getDimensions() not implemented");return new f.Rect(0,0,0,0)}};f.Pe=function(b,c,a,d){this.width=b;this.height=c;this.Ff=a;this.Dg=d};f.Pe.prototype={getDimensions:function(b,c,a){b=c.x1;var d=c.y1,g=this.width/a;a=this.height/a;this.Ff===f.pa.sc.left?b+=-(g/2):this.Ff===f.pa.sc.du?b+=(c.ya()-
g)/2:this.Ff===f.pa.sc.right?b+=c.ya()-g/2:console.warn("Invalid HorizonalAlignment");this.Dg===f.pa.Hc.top?d+=-(a/2):this.Dg===f.pa.Hc.Ev?d+=(c.va()-a)/2:this.Dg===f.pa.Hc.bottom?d+=c.va()-a/2:console.warn("Invalid VerticalAlignment");return new f.Rect(b,d,b+g,d+a)},move:function(b,c,a){var d=c||a;if(!d)return!1;var g=b.Sc();if(b.MaintainAspectRatio){var k=b.Width,h=b.Height;if(k>h){if(a=h/k*(k+c)-h,this.Ff===f.pa.sc.left&&this.Dg===f.pa.Hc.bottom||this.Ff===f.pa.sc.right&&this.Dg===f.pa.Hc.top)a*=
-1}else if(c=k/h*(h+a)-k,this.Ff===f.pa.sc.left&&this.Dg===f.pa.Hc.bottom||this.Ff===f.pa.sc.right&&this.Dg===f.pa.Hc.top)c*=-1}this.Ff===f.pa.sc.left?g.x1+=c:this.Ff===f.pa.sc.right&&(g.x2+=c);this.Dg===f.pa.Hc.top?g.y1+=a:this.Dg===f.pa.Hc.bottom&&(g.y2+=a);b.resize(g);return d}};f.Pe.prototype=$.extend(!0,new f.ControlHandle,f.Pe.prototype);f.Wk=function(b,c,a,d,g){this.x=b;this.y=c;this.width=a;this.height=d;this.Sl=g};f.Wk.prototype={getDimensions:function(b,c,a){b=this.width/a;a=this.height/
a;return this.Sl?new f.Rect(this.x-.5*b,this.y,this.x+.5*b,this.y+a):new f.Rect(this.x-.5*b,this.y-a,this.x+.5*b,this.y)},move:function(b,c,a,d,g,f){a=b.he();c=a[0];if("undefined"===typeof c)return!1;a=a[a.length-1];f=new window.ca.Gc(f);f.annotation=b;f.pageCoordinates[0]=g;d=Math.min(c.x1,c.x2,c.x3,c.x4);b=Math.max(a.x1,a.x2,a.x3,a.x4);c=Math.min(c.y1,c.y2,c.y3,c.y4);a=Math.max(a.y1,a.y2,a.y3,a.y4);this.Sl?c={x:d+1,y:c,pageIndex:g.pageIndex}:(c=g,g={x:b-1,y:a,pageIndex:g.pageIndex});if(g.y<c.y)return!1;
(c.x<g.x||c.y<g.y)&&f.select(c,g);return!0},draw:function(b,c,a,d){var g,k,h,l;this.jc(b,d);g=c.he();this.Sl?(l=g[g.length-1],g=l.x2,k=l.y2,h=l.x3,l=l.y3):(l=g[0],g=l.x1,k=l.y1,h=l.x4,l=l.y4);b.beginPath();b.moveTo(g,k);b.lineTo(h,l);b.stroke();f.ControlHandle.prototype.draw.call(this,b,c,a,d)}};f.Wk.prototype=$.extend(!0,new f.ControlHandle,f.Wk.prototype);f.Og=function(b,c,a,d,g){this.x=b;this.y=c;this.width=a;this.height=d;this.hc=g};f.Og.prototype={getDimensions:function(b,c,a){b=this.width/a;
a=this.height/a;c=this.x-.5*b;var d=this.y-.5*a;return new f.Rect(c,d,c+b,d+a)},move:function(b,c,a){var d=b.ti(this.hc);b.Kf(this.hc,d.x+c,d.y+a);return!0}};f.Og.prototype=$.extend(!0,new f.ControlHandle,f.Og.prototype);f.Bs=function(b,c,a,d,g){f.Og.apply(this,arguments)};f.Bs.prototype={move:function(b,c,a,d,g){f.Og.prototype.move.apply(this,arguments);if(0===this.hc){var k=b.ti(0);b.Kf(b.getPath().length-1,k.x,k.y)}return!0}};f.Bs.prototype=$.extend(!0,new f.Og,f.Bs.prototype);f.ms=function(b,
c,a,d,g){this.x=b;this.y=c;this.width=a;this.height=d;this.hc=g};f.ms.prototype={move:function(b,c,a,d,g,k){g=b.getPath().length-4;d=g+1;var h=d+1,l=h+1;g=b.ti(g);var n=b.ti(d),m=b.ti(h),r=b.ti(l);if(this.hc===h){if(r.y<m.y+a||r.x<m.x+c)return}else if(this.hc===l&&(r.y+a<m.y||r.x+c<m.x))return;c=f.Og.prototype.move.call(this,b,c,a);this.hc===h&&(r.y<m.y&&b.Kf(h,m.x,r.y),r.x<m.x&&b.Kf(h,r.x,m.y),b.Kf(d,m.x,m.y+.5*(r.y-m.y)),c=!0);this.hc===l&&(r.y<m.y&&b.Kf(h,r.x,m.y),r.x<m.x&&b.Kf(h,m.x,r.y),b.Kf(d,
n.x,m.y+.5*(r.y-m.y)),c=!0);k=k.Bc(b.wb());k=b.$n(k)/2;a=f.Math.ST(m,r);k=[new f.Point(a.x,m.y+k),new f.Point(a.x,r.y-k),new f.Point(m.x+k,a.y),new f.Point(r.x-k,a.y)];m=[f.Math.distance(g,k[0]),f.Math.distance(g,k[1]),f.Math.distance(g,k[2]),f.Math.distance(g,k[3])];m=m.indexOf(Math.min.apply(Math,m));if(g.x!==k[m].x||g.y!==k[m].y)b.Kf(d,k[m].x,k[m].y),c=!0;return c}};f.ms.prototype=$.extend(!0,new f.Og,f.ms.prototype);f.Pm=function(b,c,a,d,g){this.x=b;this.y=c;this.width=a;this.height=d;this.Sl=
g};f.Pm.prototype={getDimensions:function(b,c,a){b=this.width/a;a=this.height/a;c=this.x-.5*b;var d=this.y-.5*a;return new f.Rect(c,d,c+b,d+a)},move:function(b,c,a){this.Sl?(b.End.x+=c,b.End.y+=a):(b.Start.x+=c,b.Start.y+=a);b.adjustRect();return!0}};f.Pm.prototype=$.extend(!0,new f.ControlHandle,f.Pm.prototype);f.SelectionModel=function(b,c,a){this.Nc=[];this.Nx=c;this.mt=a};f.SelectionModel.selectionOutlineThickness=2;f.SelectionModel.selectionAccuracyPadding=2;f.SelectionModel.defaultSelectionOutlineColor=
new f.Color(65,140,252);f.SelectionModel.defaultNoPermissionSelectionOutlineColor=new f.Color(255,0,0);f.SelectionModel.selectionOutlineDashSize=4;f.SelectionModel.prototype={testSelection:function(b,c,a){return f.Ab.ul(b,c,a)},Vr:function(b,c,a,d){for(var g=this.Nc.length-1;0<=g;g--){var f=this.Nc[g];if(f.testSelection(b,this.getDimensions(b),c,a,d))return f}},SQ:function(){return this.Nc},getDimensions:function(b){return new f.Rect(b.X,b.Y,b.X+b.Width,b.Y+b.Height)},Kd:function(){return this.Nx},
draw:function(b,c,a,d){b.save();this.drawSelectionOutline(b,c,a,d);b.restore();for(d=0;d<this.Nc.length;d++)this.Nc[d]&&this.Nc[d].draw(b,c,this.getDimensions(c),a)},drawSelectionOutline:function(b,c,a){b.save();c=this.getDimensions(c);"undefined"===typeof a&&(a=1);b.lineWidth=f.SelectionModel.selectionOutlineThickness/a;this.Kd()?b.strokeStyle=f.SelectionModel.defaultSelectionOutlineColor.toString():b.strokeStyle=f.SelectionModel.defaultNoPermissionSelectionOutlineColor.toString();b.beginPath();
b.moveTo(c.x1,c.y1);b.lineTo(c.x2,c.y1);b.lineTo(c.x2,c.y2);b.lineTo(c.x1,c.y2);b.closePath();b.stroke();"undefined"!==typeof b.setLineDash||"undefined"!==typeof b.mozDash?(a=f.SelectionModel.selectionOutlineDashSize/a,a=[a,a],b.setLineDash?b.setLineDash(a):b.mozDash=a):b.lineWidth/=2;b.strokeStyle="rgb(255, 255, 255)";b.beginPath();b.moveTo(c.x1,c.y1);b.lineTo(c.x2,c.y1);b.lineTo(c.x2,c.y2);b.lineTo(c.x1,c.y2);b.closePath();b.stroke();b.restore()}};f.zs=function(){f.SelectionModel.call(this,0,!1,
!1)};f.zs.prototype={testSelection:function(){return!1},getDimensions:function(){return new f.Rect(0,0,0,0)},draw:function(){},drawSelectionOutline:function(){}};f.zs.prototype=$.extend(!0,new f.SelectionModel,f.zs.prototype);f.pa=function(b,c,a){f.SelectionModel.call(this,0,c,a);a=f.ControlHandle.handleWidth;var d=f.ControlHandle.handleHeight;(this.Nx=c)?(this.Nc=[new f.Pe(a,d,f.pa.sc.left,f.pa.Hc.top),new f.Pe(a,d,f.pa.sc.left,f.pa.Hc.Ev),new f.Pe(a,d,f.pa.sc.left,f.pa.Hc.bottom),new f.Pe(a,d,f.pa.sc.du,
f.pa.Hc.top),new f.Pe(a,d,f.pa.sc.du,f.pa.Hc.bottom),new f.Pe(a,d,f.pa.sc.right,f.pa.Hc.top),new f.Pe(a,d,f.pa.sc.right,f.pa.Hc.Ev),new f.Pe(a,d,f.pa.sc.right,f.pa.Hc.bottom)],b.MaintainAspectRatio&&(this.Nc.splice(3,2),this.Nc.splice(1,1),this.Nc.splice(-2,1))):this.Nc=[]};f.pa.sc={left:1,du:2,right:4};f.pa.Hc={top:16,Ev:32,bottom:64};f.pa.prototype={testSelection:function(b,c,a,d){return this.mt?f.Ab.ul(b,c,a):f.Ab.vl(b,c,a,d)},getDimensions:function(b){return new f.Rect(b.X,b.Y,b.X+b.Width,b.Y+
b.Height)}};f.pa.prototype=$.extend(!0,new f.SelectionModel,f.pa.prototype);f.Rm=function(b,c,a){f.SelectionModel.call(this,0,c,a);if(c)for(b=b.getPath(),c=0;c<b.length;c++)a=b[c],this.Nc.push(new f.Og(a.x,a.y,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,c))};f.Rm.prototype={testSelection:function(b,c,a,d){return this.mt?f.Ab.ul(b,c,a):f.Ab.vl(b,c,a,d)},draw:function(b,c,a){f.SelectionModel.prototype.draw.call(this,b,c,a)}};f.Rm.prototype=$.extend(!0,new f.SelectionModel,f.Rm.prototype);
f.Cs=function(b,c,a){f.SelectionModel.call(this,0,c,a);if(c)for(b=b.getPath(),c=0;c<b.length-1;c++)a=b[c],this.Nc.push(new f.Bs(a.x,a.y,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,c))};f.Cs.prototype={testSelection:function(b,c,a,d){return this.mt?f.Ab.TS(b,c,a,d):f.Ab.vl(b,c,a,d)}};f.Cs.prototype=$.extend(!0,new f.SelectionModel,f.Cs.prototype);f.yp=function(b,c,a){f.SelectionModel.call(this,0,c,a);this.Nc=c?[new f.Pm(b.Start.x,b.Start.y,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,
0),new f.Pm(b.End.x,b.End.y,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,1)]:[]};f.yp.prototype={testSelection:function(b,c,a,d){return f.Ab.vl(b,c,a,d)},drawSelectionOutline:function(b,c,a,d){"undefined"===typeof a&&(a=1);b.lineWidth=f.SelectionModel.selectionOutlineThickness/a;var g=Math.atan((c.End.y-c.Start.y)/(c.End.x-c.Start.x)),k=Math.max(.5*c.$n(d),1)*Math.sin(g);d=Math.max(.5*c.$n(d),1)*Math.cos(g);this.Kd()?b.strokeStyle=f.SelectionModel.defaultSelectionOutlineColor.toString():
b.strokeStyle=f.SelectionModel.defaultNoPermissionSelectionOutlineColor.toString();b.beginPath();b.moveTo(c.Start.x+k,c.Start.y-d);b.lineTo(c.End.x+k,c.End.y-d);b.stroke();b.beginPath();b.moveTo(c.Start.x-k,c.Start.y+d);b.lineTo(c.End.x-k,c.End.y+d);b.stroke();"undefined"!==typeof b.setLineDash||"undefined"!==typeof b.mozDash?(a=f.SelectionModel.selectionOutlineDashSize/a,a=[a,a],b.setLineDash?b.setLineDash(a):b.mozDash=a):b.lineWidth/=2;b.strokeStyle="rgb(255, 255, 255)";b.beginPath();b.moveTo(c.Start.x+
k,c.Start.y-d);b.lineTo(c.End.x+k,c.End.y-d);b.stroke();b.beginPath();b.moveTo(c.Start.x-k,c.Start.y+d);b.lineTo(c.End.x-k,c.End.y+d);b.stroke()}};f.yp.prototype=$.extend(!0,new f.pa,f.yp.prototype);f.wp=function(b,c,a){f.pa.apply(this,arguments)};f.wp.prototype={getDimensions:function(b){return f.SelectionModel.prototype.getDimensions.apply(this,arguments)},testSelection:function(b,c,a){return f.Ab.ul(b,c,a)}};f.wp.prototype=$.extend(!0,new f.pa,f.wp.prototype);f.ns=function(b,c,a){f.SelectionModel.call(this,
0,c,a);if(c)for(b=b.getPath(),c=0;c<b.length;c++)c!==b.length-3&&(a=b[c],this.Nc.push(new f.ms(a.x,a.y,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,c)))};f.ns.prototype={testSelection:function(b,c,a,d){if(this.mt)return f.Ab.ul(b,c,a);var g=b.getPath().slice(-2),k=g[0],g=g[1];return c<k.x||c>g.x||a<k.y||a>g.y?f.Ab.vl(b,c,a,d):!0}};f.ns.prototype=$.extend(!0,new f.SelectionModel,f.ns.prototype);f.nj=function(b,c,a,d,g){f.SelectionModel.call(this,0,c,a);this.Nx=c;if(a=b.he())_.isUndefined(d)&&
(d=!0),_.isUndefined(g)&&(g=!0),this.Nc=[],c&&!b.NoResize&&(b=a[0],c=a[a.length-1],b&&(this.Nc=[],d&&this.Nc.push(new f.Wk(b.x1,b.y3,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,!1)),g&&this.Nc.push(new f.Wk(c.x3,c.y1,f.ControlHandle.handleWidth,f.ControlHandle.handleHeight,!0))))};f.nj.prototype={testSelection:function(b,c,a){return f.Ab.jC(b,c,a)},getDimensions:function(b){var c=b.X-2,a=b.Y-2;return new f.Rect(c,a,c+(b.Width+4),a+(b.Height+4))}};f.nj.prototype=$.extend(!0,new f.SelectionModel,
f.nj.prototype);f.Ds=function(b,c,a){var d=b.IsText?f.nj:f.pa;d.apply(this,[b,c,a]);return $.extend(!0,this,d.prototype,f.Ds.prototype)};f.Ds.prototype={testSelection:function(b,c,a,d){return b.IsText?f.Ab.jC(b,c,a):f.Ab.ul(b,c,a,d)}};f.Hp=function(b,c,a){f.SelectionModel.call(this,0,c,a)};f.Hp.prototype={testSelection:function(b,c,a,d,g){d=b.NoZoom?g:1;b=new f.Rect(b.co(),b.lo(),b.co()+b.SIZE/d,b.lo()+b.SIZE/d);return c>=b.x1&&c<=b.x2&&a>=b.y1&&a<=b.y2},getDimensions:function(b){return new f.Rect(b.X,
b.Y,b.X+b.SIZE,b.Y+b.SIZE)}};f.Hp.prototype=$.extend(!0,new f.SelectionModel,f.Hp.prototype);f.Ab={ul:function(b,c,a){b=b.Sc();return c>=b.x1&&c<=b.x2&&a>=b.y1&&a<=b.y2},vl:function(b,c,a,d){var g;f.Ab.PH?g=f.Ab.PH:(g=document.createElement("canvas"),f.Ab.PH=g);var k=g.getContext("2d");g.width=4;g.height=4;k.setTransform(1,0,0,1,-(c-b.ck()),-(a-b.dk()));c=b.StrokeThickness;b.sj=c+f.Ab.canvasVisibilityPadding;k.translate(-1*b.ck(),-1*b.dk());b.draw(k,d);d=1<k.getImageData(0,0,1,1).data[3];k.setTransform(1,
0,0,1,0,0);k.clearRect(0,0,2,2);b.sj=c;return d},jC:function(b,c,a){b=b.Quads;for(var d=0;d<b.length;d++){var g=b[d],f=Math.min(g.y1,g.y2,g.y3,g.y4),h=Math.max(g.y1,g.y2,g.y3,g.y4),l=Math.max(g.x1,g.x2,g.x3,g.x4);if(c>=Math.min(g.x1,g.x2,g.x3,g.x4)&&c<=l&&a>=f&&a<=h)return!0}return!1},TS:function(b,c,a,d){if(!(b instanceof f.Mh))return!1;var g=b.getPath(),g=g.slice(0,g.length-1);if(3>g.length)return f.Ab.vl(b,c,a,d);b=new f.Point(c,a);a=new f.Point(Number.MAX_VALUE,a);for(d=c=0;d<g.length;d++){var k=
g[d],h=g[(d+1)%g.length];if(f.Math.WS(k,h,b,a)){if("colinear"===f.Math.fH(k,b,h))return f.Math.II(k,b,h);c++}}return 1===c%2}};f.Ab.canvasVisibilityPadding=5})(window);
(function(b){function f(){$("#selectionrect").css("display","none")}function e(a,d,c){var e=a[0],g=a[1],f=d[0].pageIndex;d=$("#selectionrect");0===d.length&&(d=$("<div id='selectionrect' class='ui-selectable-helper'></div>").appendTo(c.Tc()));var k=g.x-e.x;a=g.y-e.y;var h=c.xb(),n=h.scrollLeft()||0,h=h.scrollTop()||0,m=e.x-n,l=e.y-h,p=g.x-n,g=g.y-h,e=c.gd(f),r=c.fd(f),g=Math.min(g,l),m=Math.min(p,m),p=c.$j().cf({x:0,y:0},f),r=c.$j().cf({x:e,y:r},f);c=Math.min(p.x,r.x);f=Math.min(p.y,r.y);e=Math.max(p.x,
r.x);r=Math.max(p.y,r.y);c-=n;f-=h;f>g&&(a+=f-g,g=f);c>m&&(k+=c-m,m=c);k=b.ae.Math.oF(Math.abs(k),0,e-n-m);a=b.ae.Math.oF(Math.abs(a),0,r-h-g);n="inline";if(5>k||5>a)n="none";d.css({width:k,height:a,top:g,left:m,"z-index":"44",position:"absolute",border:"1px dotted black",display:n})}function c(a){Object.defineProperties(a.defaults,{Precision:{get:function(){return Annotations.ja.lH(a)},set:function(d){Annotations.ja.iK(a,d)},enumerable:!0},Scale:{get:function(){return Annotations.ja.sH(a)},set:function(d){Annotations.ja.mK(a,
d[0],d[1])},enumerable:!0}})}function a(a){return JSON.parse(JSON.stringify(a))}function d(){return"url("+b.o.Vq()+"dragginghand.cur), url("+b.o.Vq()+"dragginghand.png), pointer"}function g(){return"url("+b.o.Vq()+"hand.cur), url("+b.o.Vq()+"hand.png), pointer"}function k(a,d){n!==d&&(a.Tc().css("cursor",d),n=d)}var h=XODText,l="../core/assets/";b.o.pW=function(a){a.lastIndexOf("/")!==a.length-1&&(a+="/");l=a};b.o.Vq=function(){return l};var n;b.ca=function(){};var m=b.ca;m.rY={};m.Tool=function(a){this.Ib=
this.Ud=null;this.u=this.docViewer=a;this.pageCoordinates=[]};m.Tool.ENABLE_TEXT_SELECTION=!0;m.Tool.ENABLE_AUTO_SWITCH=!0;m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS=!0;m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE=!1;m.Tool.prototype={jg:function(a){var d={},c=this.u.xb(),b=c.scrollLeft()||0,c=c.scrollTop()||0;a.originalEvent&&a.originalEvent.touches?(a=0===a.originalEvent.touches.length?a.originalEvent.changedTouches[0]:a.originalEvent.touches[0],d.x=b+a.clientX,d.y=c+a.clientY):(d.x=b+a.pageX,d.y=c+a.pageY);return d},
mouseLeftDown:function(a){var d=this.jg(a);this.Ud=d;this.Ib={x:d.x,y:d.y};this.pageCoordinates[0]=this.ge(this.Ud);this.pageCoordinates[1]=this.pageCoordinates[0];a.data={mouseCoordinate:{x:d.x,y:d.y},pageCoordinate:this.pageCoordinates[0]};(this.$b=this.u.da.Iq(a))&&(this.$b instanceof Annotations.Bb?k(this.u,this.cursor):k(this.u,"move"))},mouseLeftUp:function(a){var d=this.jg(a);this.Ib=d;this.pageCoordinates[1]=this.ge(this.Ib);a.data={mouseCoordinate:{x:d.x,y:d.y},pageCoordinate:this.pageCoordinates[1]}},
mouseMove:function(a){var d=this.jg(a),c=this.u.da;this.Ib=d;var b=this.ge(this.Ib);b&&(this.$b=c.Iq(a),this.YK(c,b),this.XK(c,a),this.sX(c,b));if(null!==this.Ud){c=this.ge(this.Ud);if(null===c)return;var e=c.pageIndex,c=this.u.gd(e),b=this.u.fd(e),e=this.ge(this.Ib,e);m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE||(0>e.x&&(e.x=0),0>e.y&&(e.y=0),e.x>c&&(e.x=c),e.y>b&&(e.y=b));this.pageCoordinates[1]=e}else this.pageCoordinates[1]=this.ge(this.Ib);a.data={mouseCoordinate:{x:d.x,y:d.y},pageCoordinate:this.pageCoordinates[1]}},
YK:function(a,d){var c=!m.Tool.ENABLE_TEXT_SELECTION||!m.Tool.ENABLE_AUTO_SWITCH,b=this.u.dv(),b=!(b instanceof m.Hk||b instanceof m.Wm||b instanceof m.Fp),e=this.Be&&0<Object.keys(this.Be).length;c||this.Wc||b||e||0<a.Ee().length||this.u.RJ(d.pageIndex,d,function(a,d){this instanceof m.Fp?(this.cursor=0<d.length?"text":"crosshair",k(this.u,this.cursor)):0<d.length?this.u.YB(this.u.cv("TextSelect")):0===d.length&&this.u.YB(this.u.cv("AnnotationEdit"))}.bind(this))},XK:function(a){m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS&&
(this.$b&&this.$b.Listable?a.Pl(this.$b)?this.$b instanceof Annotations.Dd&&!this.$b.IsText?k(this.u,"move"):this.$b instanceof Annotations.Bb?k(this.u,this.cursor):k(this.u,"move"):k(this.u,"pointer"):k(this.u,this.cursor))},sX:function(a,d){if(m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS)for(var c=a.Ee(),b=0;b<c.length;b++){var e=c[b],g=(new e.selectionModel(e,a.Kd(e))).Vr(e,this.u.kb(e.PageNumber-1),d.x,d.y);if(!g)break;e=this.u.Pd(e.PageNumber);g instanceof Annotations.Pe?k(this.u,(g.Dg===Annotations.pa.Hc.Ev?
0===e%2?"ew":"ns":g.Ff===Annotations.pa.sc.du?0===e%2?"ns":"ew":g.Dg===Annotations.pa.Hc.top?g.Ff===Annotations.pa.sc.right?0===e%2?"nesw":"nwse":0===e%2?"nwse":"nesw":g.Ff===Annotations.pa.sc.right?0===e%2?"nwse":"nesw":0===e%2?"nesw":"nwse")+"-resize"):g instanceof Annotations.Wk?0===e%2?k(this.u,"ew-resize"):k(this.u,"ns-resize"):k(this.u,"default")}},mouseDoubleClick:function(a){a=this.jg(a);this.Ud={x:a.x,y:a.y};this.Ib={x:a.x,y:a.y};a=this.u.da;var d=this.ge(this.Ib);d&&(this.xn=d.x,this.yn=
d.y,this.$b&&!this.$b.Ci()&&this.$b.Vl()&&a.trigger("annotationDoubleClicked",this.$b))},mouseLeave:function(){},tap:function(){},keyDown:function(){},contextMenu:function(){},switchIn:function(){},switchOut:function(){k(this.u,"default");this.u.da.Nd()},gh:function(){return this.u},ge:function(a,d){var c=this.docViewer.$j().av(a,a);if("undefined"===typeof d){if(c=null===c.first?c.last:c.first,null===c)return null}else c=d;c=this.docViewer.$j().Ck(a,c);return{pageIndex:c.pageIndex,x:c.x,y:c.y}},jc:function(a){var d=
this.defaults,c=a(d);c&&(Object.keys(c).forEach(function(a){d[a]=c[a]}),this.u.trigger("toolUpdated",[this]))},XV:function(a){this.name=a;this.u.trigger("toolUpdated",[this])}};var r=m.Tool;m.AnnotationSelectTool=function(a){r.call(this,a);this.yn=this.xn=0;this.Bj={x:0,y:0};this.Nj=this.yc=null;this.state=m.AnnotationSelectTool.Tb.NONE;this.Qj=NaN;this.Wc=!1;this.cursor="default";this.overrideSelection=!1};m.AnnotationSelectTool.Tb={NONE:0,ix:1,SC:2,vs:3,hx:4};m.AnnotationSelectTool.PAGE_PADDING=
new Annotations.Rect(2,2,2,2);m.AnnotationSelectTool.prototype=$.extend(new r,{mouseLeftDown:function(a){r.prototype.mouseLeftDown.call(this,a);if(this.overrideSelection)this.state=m.AnnotationSelectTool.Tb.NONE;else{this.Wc=!0;this.state=m.AnnotationSelectTool.Tb.NONE;var d=this.u.da,c=this.ge(this.Ib);if(c){this.Qj=c.pageIndex;this.xn=c.x;this.yn=c.y;this.Bj.x=this.xn;this.Bj.y=this.yn;for(var b=d.Ee(),e=0;e<b.length;e++){var g=b[e];if("undefined"!==typeof g.selectionModel){var f=(new g.selectionModel(g,
d.Kd(g))).Vr(g,this.u.kb(g.wb()),c.x,c.y);if(f){this.yc=g;this.Nj=f;!this.yc.NoResize&&d.Kd(this.yc)?this.state=m.AnnotationSelectTool.Tb.hx:(this.state=m.AnnotationSelectTool.Tb.NONE,d.Nd());return}}else if(console.warn("no selection model for annotation"),this.Nj=d.QG(this.Qj,c)){this.yc=this.Nj.jO;!this.yc.NoResize&&d.Kd(this.yc)?this.state=m.AnnotationSelectTool.Tb.SC:(this.state=m.AnnotationSelectTool.Tb.NONE,d.Nd());return}}if(0<d.Ee().length&&(c=d.GG(a),0<c.length)){this.yc=null;for(b=0;b<
c.length;++b)if(d.Pl(c[b])){this.yc=c[b];break}this.yc||(this.yc=c[0]);c=d.Pl(this.yc);!this.yc.NoMove&&d.Kd(this.yc)&&c?this.state=m.AnnotationSelectTool.Tb.ix:a.ctrlKey?this.state=m.AnnotationSelectTool.Tb.vs:(this.state=m.AnnotationSelectTool.Tb.NONE,d.Nd());return}}d.Nd()}},mouseMove:function(a){r.prototype.mouseMove.call(this,a);!this.Wc||!this.isSelecting()&&(this instanceof m.Cp||this instanceof m.Hk)||document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof
HTMLInputElement||a.preventDefault();if(!this.overrideSelection&&this.state!==m.AnnotationSelectTool.Tb.NONE){a=this.u.da;var d=this.pageCoordinates[1];if(d&&this.Qj===d.pageIndex){var c=d.x-this.Bj.x,b=d.y-this.Bj.y;if(this.state===m.AnnotationSelectTool.Tb.ix&&this.yc){k(this.u,"move");var e=a.Ee(),g,f,h,n,l,p,G,D=!1;for(g=0;g<e.length;g++)h=e[g],a.Kd(h)&&!h.NoMove&&(f=h.Sc(),D?(f.x1<n&&(n=f.x1),f.y1<l&&(l=f.y1),f.x2>p&&(p=f.x2),f.y2>G&&(G=f.y2)):(n=f.x1,l=f.y1,p=f.x2,G=f.y2,D=!0));f=this.u.gd(this.Qj);
h=this.u.fd(this.Qj);g=new Annotations.Rect;this.u.kb(this.yc.wb());g.x1=1*m.AnnotationSelectTool.PAGE_PADDING.x1;g.y1=1*m.AnnotationSelectTool.PAGE_PADDING.y1;g.x2=f-1*m.AnnotationSelectTool.PAGE_PADDING.x2;g.y2=h-1*m.AnnotationSelectTool.PAGE_PADDING.y2;n=Math.max(0+m.AnnotationSelectTool.PAGE_PADDING.x1,n);l=Math.max(0+m.AnnotationSelectTool.PAGE_PADDING.y1,l);p=Math.min(p,f-m.AnnotationSelectTool.PAGE_PADDING.x2);G=Math.min(G,h-m.AnnotationSelectTool.PAGE_PADDING.y2);if(D){n=n+c>=g.x1||m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE?
c:g.x1-n;l=l+b>=g.y1||m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE?b:g.y1-l;p=p+c<=g.x2||m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE?c:g.x2-p;G=G+b<=g.y2||m.Tool.ALLOW_ANNOTS_OUTSIDE_PAGE?b:g.y2-G;c=0<=c?Math.min(n,p):Math.max(n,p);b=0<=b?Math.min(l,G):Math.max(l,G);this.Bj.x=d.x;this.Bj.y=d.y;d={};for(g=0;g<e.length;g++)if(h=e[g],a.Kd(h)&&!h.NoMove&&(f=h.Sc(),f.x1+=c,f.y1+=b,f.x2+=c,f.y2+=b,0!==c||0!==b))h.resize(f),h.WE=!0,d[h.Hb()]=!0;for(var L in d)this.u.da.Od(parseInt(L,10))}}else this.state===m.AnnotationSelectTool.Tb.hx&&
this.Nj&&this.yc&&(L=this.Nj.move(this.yc,c,b,this.ge(new Annotations.Point(this.Ud.x,this.Ud.y)),d,this.u),this.Bj.x=d.x,this.Bj.y=d.y,L&&this.u.da.Wb(this.yc))}}},mouseLeftUp:function(){if(!this.overrideSelection){this.Wc=!1;var a=this.u.da,d=a.Ee();if(this.state===m.AnnotationSelectTool.Tb.ix){for(var c=[],b=0;b<d.length;b++){var e=d[b];e.WE&&(e.WE=void 0,c.push(e))}0<c.length&&a.trigger("annotationChanged",[c,"modify"])}else this.state===m.AnnotationSelectTool.Tb.SC?(c=this.Nj.jO,this.Nj&&a.trigger("annotationChanged",
[[c],"modify"])):this.state===m.AnnotationSelectTool.Tb.hx&&this.yc&&a.trigger("annotationChanged",[[this.yc],"modify"]);0<d.length?k(this.u,"default"):k(this.u,this.cursor);this.state=m.AnnotationSelectTool.Tb.NONE}},BB:function(){this.u.da.eg(this.annotation);this.annotation=null},keyDown:function(a){27===a.which&&void 0!==this.annotation&&null!==this.annotation&&this.BB();46!==a.which&&8!==a.which||b.utils.isEditableElement($(a.target))||(a=this.u.Qa().Ee(),this.u.Qa().ou(a))},tap:function(a){if(!this.overrideSelection){var d=
this.u.Qa();if(this.$b=d.Iq(a)){var c=d.Pl(this.$b);a.originalEvent.ctrlKey||a.originalEvent.metaKey?c?d.On(this.$b):d.jm(this.$b):c||(d.Nd(),d.jm(this.$b));this.u.sm("none");a.preventDefault()}}},isSelecting:function(){return this.state!==m.AnnotationSelectTool.Tb.NONE}});m.Cp=function(a,d){m.AnnotationSelectTool.call(this,a);this.ny={x:0,y:0};this.kt=!1;this.cursor=g();this.name=d||"PanTool"};m.Cp.prototype=$.extend(new m.AnnotationSelectTool,{switchIn:function(){k(this.u,this.cursor)},mouseLeftDown:function(a){m.AnnotationSelectTool.prototype.mouseLeftDown.call(this,
a);this.isSelecting()||(this.ny=this.jg(a),this.kt=!0,this.cursor=d(),k(this.u,this.cursor))},mouseLeftUp:function(a){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,a);this.isSelecting()||(this.cursor=g(),k(this.u,this.cursor),this.kt=!1)},mouseMove:function(a){m.AnnotationSelectTool.prototype.mouseMove.call(this,a);if(!this.isSelecting()&&this.kt){var c=this.u.xb(),b=this.jg(a);a=this.ny.x-b.x;b=this.ny.y-b.y;this.u.scrollTo((c.scrollLeft()||0)+a,(c.scrollTop()||0)+b);k(this.u,d())}},mouseLeave:function(){this.kt=
!1;k(this.u,this.cursor)}});m.Yb=function(a){r.call(this,a);this.Wc=!1;this.cursor="text"};m.Yb.SELECTION_MODE="structural";m.Yb.prototype={switchIn:function(){this.mF(null,this.u.Pd());this.u.on("rotationUpdated.textTool",_.bind(this.mF,this))},switchOut:function(a){r.prototype.switchOut.call(this,a);this.u.off("rotationUpdated.textTool")},mF:function(a,d){this.cursor=d===b.o.Sa.Xe||d===b.o.Sa.fg?"vertical-text":"text";k(this.u,this.cursor)},mouseLeftDown:function(a){m.AnnotationSelectTool.prototype.mouseLeftDown.call(this,
a);this.isSelecting()||(a.altKey&&(m.Yb.SELECTION_MODE="rectangular"),this.Wc=!0,this.u.uq())},mouseMove:function(a){m.AnnotationSelectTool.prototype.mouseMove.call(this,a);this.isSelecting()||!0!==this.Wc||(1!==a.which&&0!==a.which?this.Wc=!1:(a.data&&(this.pageCoordinates[1]=this.ge(a.data.mouseCoordinate)),this.select(this.pageCoordinates[0],this.pageCoordinates[1])))},select:function(a,d){var c=this.u;if(a&&d){var b,e;d.pageIndex>=a.pageIndex?(b=a,e=d):(b=d,e=a);var g=b.pageIndex,f=e.pageIndex;
if(null!==g&&null!==f){var k=new h.Ka,n=c.v.fc(g);1<=f-g?k.Da(b.x,b.y,n.width,n.height):k.Da(b.x,b.y,e.x,e.y);this.u.xo="rectangular"===m.Yb.SELECTION_MODE?(new XODText.mj(this.u.getDocument())).SJ:(new XODText.mj(this.u.getDocument())).QJ;this.u.Pi=[[g,k]];this.u.Po(g,k,_.bind(this.textSelected,this));for(b=g+1;b<f;b++)this.u.Pi.unshift([b,k]),n=c.v.fc(b),k=new h.Ka,k.Da(0,0,n.width,n.height),c.Po(b,k,_.bind(this.textSelected,this));g!==f&&(k=new h.Ka,k.Da(0,0,e.x,e.y),this.u.Pi.unshift([f,k]),c.Po(f,
k,_.bind(this.textSelected,this)))}}},textSelected:function(){},mouseLeftUp:function(a){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,a);this.isSelecting()||(a.altKey&&"rectangular"===m.Yb.SELECTION_MODE&&(m.Yb.SELECTION_MODE="structural"),this.Wc=!1)}};m.Yb.prototype=$.extend(new m.AnnotationSelectTool,m.Yb.prototype);m.Wm=function(a,d){m.Yb.call(this,a);this.Be={};this.LD=this.DE=this.dn=null;this.name=d||"TextSelectTool"};m.Wm.prototype=$.extend(new m.Yb,{select:function(){this.u.sF();
this.Be={};m.Yb.prototype.select.apply(this,arguments)},mouseLeftDown:function(a){this.dn=null;var d=this.ge(this.jg(a));if(d){var c=d.pageIndex,b=this.pN(c),e=this;b.he=function(){return e.Be[c]};var g=!1,f=!1,k=this.Wx();0<k.length&&(c===k[0]&&(g=!0),c===k[k.length-1]&&(f=!0));if(d=(new Annotations.nj(b,!0,!1,g,f)).Vr(b,this.u.kb(c),d.x,d.y))this.dn=d,this.dn.Sl?this.DE=this.sN():this.LD=this.qN()}this.dn||(m.Yb.prototype.mouseLeftDown.apply(this,arguments),this.Be={});this.Wc=!0},mouseMove:function(a){a.preventDefault();
if(this.Wc&&this.dn){var d=this.ge(this.jg(a));if(d){var c;this.dn.Sl?c=this.DE:(c=d,d=this.LD);this.Be={};this.select(c,d)}}else m.Yb.prototype.mouseMove.apply(this,arguments)},mouseLeftUp:function(){m.Yb.prototype.mouseLeftUp.apply(this,arguments);0<Object.keys(this.Be).length?(k(this.u,"default"),this.py()):0===this.u.Qa().Ee().length&&k(this.u,this.cursor)},textSelected:function(a,d,c){this.u.aw(a,d,c);0<d.length&&(k(this.u,"default"),this.Be[a]=d.map(function(a){return a.mh()}));this.Wc||this.py()},
mouseDoubleClick:function(){var a=this.pageCoordinates[0];if(a){var d=this;this.u.RJ(a.pageIndex,a,function(){d.textSelected.apply(d,arguments);d.py()})}},uq:function(){this.Be={}},py:function(){var a=this.VD();a.quad&&this.trigger("selectionComplete",[a,this.Be])},Wx:function(){return Object.keys(this.Be).map(function(a){return parseInt(a,10)}).sort(function(a,d){return a-d})},VD:function(){var a=this.Wx()[0],d=this.Be[a];return{quad:d?d[0]:null,pageIndex:a}},sN:function(){var a=this.VD(),d=a.quad;
return{x:d.x1,y:(d.y1+d.y3)/2,pageIndex:a.pageIndex}},qN:function(){var a=this.Wx(),a=a[a.length-1],d=this.Be[a],d=d[d.length-1];return{x:d.x3,y:(d.y1+d.y3)/2,pageIndex:a}},pN:function(a){var d=Infinity,c=Infinity,b=0,e=0;if(a=this.Be[a])for(var g=0;g<a.length;++g)var f=a[g],d=Math.min(d,f.x1,f.x2,f.x3,f.x4),c=Math.min(c,f.y1,f.y2,f.y3,f.y4),b=Math.max(b,f.x1,f.x2,f.x3,f.x4),e=Math.max(e,f.y1,f.y2,f.y3,f.y4);return{X:d,Y:c,Width:b-d,Height:e-c}}},b.utils.eventHandler);m.GenericAnnotationCreateTool=
function(a,d,c){m.AnnotationSelectTool.call(this,a);this.annotation=null;this.Ay=d;this.eP=c;this.cursor="crosshair";this.defaults={StrokeColor:new Annotations.Color(0,0,0),FillColor:new Annotations.Color(0,0,0,0),StrokeThickness:1,Opacity:1}};m.GenericAnnotationCreateTool.prototype=$.extend(new m.AnnotationSelectTool,{switchIn:function(){k(this.u,this.cursor);this.u.oe({annotMode:!0})},switchOut:function(a){null!==this.annotation&&void 0!==this.annotation&&(this.tq&&this.tq(),this.u.da.eg(this.annotation),
this.annotation=null);m.AnnotationSelectTool.prototype.switchOut.call(this,a);this.u.oe({annotMode:!1})},mouseLeftDown:function(a){m.AnnotationSelectTool.prototype.mouseLeftDown.call(this,a);if(!this.isSelecting()&&!this.annotation&&(a=this.pageCoordinates[0])){var d=this.u.da;this.annotation=new this.Ay(this.eP);this.annotation.X=a.x;this.annotation.Y=a.y;this.annotation.PageNumber=a.pageIndex+1;this.annotation.Author=d.Il();null!==this.annotation.StrokeColor&&(a=this.defaults.StrokeColor,this.annotation.StrokeColor=
new Annotations.Color(a.R,a.G,a.B,a.A));null!==this.annotation.StrokeThickness&&(this.annotation.StrokeThickness=this.defaults.StrokeThickness);null!==this.annotation.FillColor&&(a=this.defaults.FillColor,this.annotation.FillColor=new Annotations.Color(a.R,a.G,a.B,a.A));this.annotation.Opacity=this.defaults.Opacity;this.annotation.ToolName=this.name;this.trigger("annotationCreated",[this.annotation])}},mouseLeftUp:function(a){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,a);this.isSelecting()||
this.finish()},mouseMove:function(a){m.AnnotationSelectTool.prototype.mouseMove.call(this,a);if(!this.isSelecting()&&this.annotation&&"undefined"!==typeof this.pageCoordinates){a=this.pageCoordinates[0];var d=this.pageCoordinates[1];null!==d&&null!==a&&a.pageIndex===d.pageIndex&&(a=new Annotations.Rect(a.x,a.y,d.x,d.y),a.normalize(),this.annotation.yg(a),this.u.da.Wb(this.annotation))}},finish:function(){if(this.annotation){var a=this.annotation.ya(),d=this.annotation.va(),c=2*(this.annotation.getRectPadding()+
1);a<=c&&d<=c?this.u.da.eg(this.annotation):(this.u.da.Xg(this.annotation),this.trigger("annotationAdded",[this.annotation]));this.annotation=null}}},b.utils.eventHandler);new m.GenericAnnotationCreateTool;m.Hk=function(a,d){m.AnnotationSelectTool.call(this,a);this.kk=null;this.name=d||"AnnotationEditTool"};m.Hk.prototype=$.extend(new m.AnnotationSelectTool,{switchIn:function(){k(this.u,"default");this.u.sm("auto")},switchOut:function(a){r.prototype.switchOut.call(this,a);this.u.sm("none")},pB:function(a){this.pointerType=
a.originalEvent.pointerType},mouseLeftDown:function(a){m.AnnotationSelectTool.prototype.mouseLeftDown.call(this,a);if(!this.isSelecting()){this.Wc=!0;this.state=m.AnnotationSelectTool.Tb.NONE;var d=this.u.da,c=this.ge(this.Ib);!c||(a.originalEvent.touches||this.pointerType&&"mouse"!==this.pointerType)&&this.u.$j().Vb().mode!==b.o.Ad.Qf||(this.Qj=c.pageIndex,d.Nd(),this.state=m.AnnotationSelectTool.Tb.vs)}},mouseMove:function(a){m.AnnotationSelectTool.prototype.mouseMove.call(this,a);if(this.state===
m.AnnotationSelectTool.Tb.vs&&(a=this.pageCoordinates[1])&&this.Qj===a.pageIndex){var d=a.x,c=a.y;a=0>d-this.xn?d:this.xn;var g=0>c-this.yn?c:this.yn,d=Math.abs(d-this.xn),c=Math.abs(c-this.yn);e([this.Ud,this.Ib],this.pageCoordinates,this.u);this.kk=b.ae.yI(a,g,d,c)}},mouseLeftUp:function(a){if(this.state!==m.AnnotationSelectTool.Tb.vs)m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,a);else{var d=this;this.Wc=!1;var c=function(){d.kk=null;d.state=m.AnnotationSelectTool.Tb.NONE;f()};if(!this.kk||
!this.u.Cq){c();return}if(this.kk.x1===this.kk.x2&&this.kk.y1===this.kk.y2)m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,a);else{var b=this.nN(this.Qj,this.kk);this.u.Qa().JB(b)}c()}if(c=this.pageCoordinates[1])b=this.u.da,this.YK(b,c),this.XK(b,a)},nN:function(a,d){for(var c,e=[],g=this.u.Qa().de.filter(function(d){return d.wb()===a&&d.Vl()}),f=0;f<g.length;f++){c=g[f];var k=1;!0===c.NoZoom&&(k=this.u.kb(c.wb()));b.ae.KU(d,b.ae.yI(c.co(),c.lo(),c.ya()/k,c.va()/k))&&e.push(c)}return e}});
m.Kh=function(a,d){m.GenericAnnotationCreateTool.call(this,a,b.Annotations.ve);delete this.defaults.FillColor;this.name=d||"LineCreateTool"};m.Kh.prototype=$.extend(new m.GenericAnnotationCreateTool,{mouseLeftDown:function(a){m.GenericAnnotationCreateTool.prototype.mouseLeftDown.call(this,a);this.isSelecting()||this.annotation&&(this.annotation.Start={x:this.pageCoordinates[0].x,y:this.pageCoordinates[0].y})},mouseMove:function(a){m.AnnotationSelectTool.prototype.mouseMove.call(this,a);if(!this.isSelecting()&&
this.annotation&&"undefined"!==typeof this.pageCoordinates){a=this.pageCoordinates[0];var d=this.pageCoordinates[1];null!==d&&null!==a&&a.pageIndex===d.pageIndex&&(this.annotation.End={x:d.x,y:d.y},this.annotation.adjustRect(),this.u.da.Wb(this.annotation))}}});m.$w=function(a,d){m.Kh.call(this,a);this.name=d||"ArrowCreateTool"};m.$w.prototype=$.extend(new m.Kh,{mouseLeftDown:function(a){m.Kh.prototype.mouseLeftDown.call(this,a);this.annotation&&this.annotation.So("OpenArrow")}});m.wx=function(a,
d){m.GenericAnnotationCreateTool.call(this,a,b.Annotations.Qk);this.name=d||"RectangleCreateTool"};m.wx.prototype=new m.GenericAnnotationCreateTool;m.mx=function(a,d){m.GenericAnnotationCreateTool.call(this,a,b.Annotations.Im);this.name=d||"EllipseCreateTool"};m.mx.prototype=new m.GenericAnnotationCreateTool;m.FreeHandCreateTool=function(a,d){m.GenericAnnotationCreateTool.call(this,a,b.Annotations.FreeHandAnnotation);this.hc=0;this.ku=null;this.Wc=!1;this.pointerType=null;delete this.defaults.FillColor;
this.name=d||"FreeHandCreateTool"};m.FreeHandCreateTool.prototype=$.extend(new m.GenericAnnotationCreateTool,{createDelay:1500,simplifyPen:!1,mouseLeftDown:function(a){m.AnnotationSelectTool.prototype.mouseLeftDown.call(this,a);if(!this.isSelecting()&&this.pageCoordinates[0]&&(this.type||(this.type=a.type),this.type===a.type)){this.Wc=!0;if(this.annotation)if(this.pageCoordinates[0].pageIndex===this.annotation.PageNumber-1){var d=this.pageCoordinates[0].x,c=this.pageCoordinates[0].y,b=!1,e=this.annotation.getPath(this.hc);
e&&0<e.length&&(e=e[e.length-1],e.x===d&&e.y===c&&(b=!0));b||this.annotation.Ub(d,c,this.hc)}else{var g=this;this.complete().then(function(){m.FreeHandCreateTool.prototype.mouseLeftDown.call(g,a)})}else m.GenericAnnotationCreateTool.prototype.mouseLeftDown.call(this,a),this.annotation.Ub(this.pageCoordinates[1].x,this.pageCoordinates[1].y,this.hc);clearTimeout(this.ku)}},complete:function(){var a=this;if(this.annotation&&0<this.annotation.bk().length)return this.u.da.Wb(this.annotation).then(function(){a.annotation.finish();
m.GenericAnnotationCreateTool.prototype.mouseLeftUp.call(a,null);a.ky()});a.ky();this.annotation=null;return Promise.resolve()},Fv:function(){this.complete()},switchOut:function(a){var d=this;this.complete().then(function(){m.GenericAnnotationCreateTool.prototype.switchOut.call(d,a)})},mouseLeftUp:function(){m.AnnotationSelectTool.prototype.mouseLeftUp.apply(this,arguments);if(!this.isSelecting()&&(this.Wc=!1,this.annotation)){var a=this.u.da;this.annotation.Ub(this.pageCoordinates[1].x,this.pageCoordinates[1].y,
this.hc);var d=this.annotation.getPath(this.hc);d&&(2>d.length?(this.annotation.bk().pop(),this.annotation.adjustRect(),a.Wb(this.annotation)):(("pen"!==this.pointerType||this.simplifyPen)&&this.annotation.NW(.75),a.Wb(this.annotation),this.hc++),this.ku=setTimeout(_.bind(this.complete,this),this.createDelay));0===this.annotation.bk().length&&(this.complete(),clearTimeout(this.ku))}},mouseMove:function(a){m.AnnotationSelectTool.prototype.mouseMove.call(this,a);!this.isSelecting()&&!1!==this.Wc&&this.annotation&&
null!==this.pageCoordinates&&null!==this.pageCoordinates[1]&&this.pageCoordinates[0].pageIndex===this.pageCoordinates[1].pageIndex&&(this.annotation.Ub(this.pageCoordinates[1].x,this.pageCoordinates[1].y,this.hc),this.u.da.Wb(this.annotation))},ky:function(){this.hc=0;this.Wc=!1;clearTimeout(this.ku)},BB:function(){this.ky();m.AnnotationSelectTool.prototype.BB.call(this)},contextMenu:function(a){a.preventDefault()},pB:function(a){this.pointerType=a.originalEvent.pointerType}});m.SignatureCreateTool=
function(a,d){m.Tool.call(this,a);this.kj=100;this.location=null;this.Bq=!1;this.Pw=this.hc=0;this.visible=!1;this.Zy=null;this.cursor="crosshair";this.dQ=3;var c=this;$(document).on("mouseup",function(){c.Bq&&(c.visible=!0);c.OD()});this.defaults={StrokeColor:new Annotations.Color(0,0,0),StrokeThickness:1,Opacity:1};this.name=d||"SignatureCreateTool"};m.SignatureCreateTool.XB=function(a){m.SignatureCreateTool.prototype.kn=a};m.SignatureCreateTool.prototype={switchIn:function(){k(this.u,this.cursor);
this.initAnnot()},SD:function(a){var d,c=this.canvas[0].getBoundingClientRect();a.originalEvent&&a.originalEvent.touches&&(a=0===a.originalEvent.touches.length?a.originalEvent.changedTouches[0]:a.originalEvent.touches[0]);d=a.clientX;a=a.clientY;return{x:d-c.left,y:a-c.top}},DD:function(){this.ctx.setTransform(1,0,0,1,0,0);this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height)},ZO:function(){this.DD();this.freeHandAnnot.kG();this.Pw=this.hc=0},OD:function(){this.Bq&&(this.hc++,this.visible&&
(this.Pw++,this.visible=!1));this.Bq=!1},kn:function(){return"Sign Here"},drawBackground:function(){var a=window.utils.getCanvasMultiplier();this.ctx.scale(a,a);this.ctx.save();var d=2/3*this.ctx.canvas.height/a;this.ctx.strokeStyle="#000";this.ctx.lineCap="square";this.ctx.lineWidth=1;this.ctx.beginPath();this.ctx.moveTo(10,d);this.ctx.lineTo(this.ctx.canvas.width/a-10,d);this.ctx.stroke();this.ctx.fillStyle="#000";var c=this.kn();this.ctx.textAlign="center";this.ctx.textBaseline="top";this.ctx.font=
"15px Verdana,Arial,sans-serif";this.ctx.fillText(c,this.ctx.canvas.width/a/2,d-20);this.ctx.restore()},iz:function(){this.DD();this.drawBackground();this.ctx.save();var a=this.u.Bc(0),d=this.freeHandAnnot.StrokeThickness;this.freeHandAnnot.StrokeThickness*=this.dQ;this.freeHandAnnot.draw(this.ctx,a);this.freeHandAnnot.StrokeThickness=d;this.ctx.restore()},initAnnot:function(){var a=this.u.Qa();this.freeHandAnnot=new Annotations.FreeHandAnnotation;this.freeHandAnnot.Author=a.Il();this.freeHandAnnot.StrokeColor=
this.defaults.StrokeColor;this.freeHandAnnot.StrokeThickness=this.defaults.StrokeThickness;this.freeHandAnnot.Opacity=this.defaults.Opacity;this.freeHandAnnot.Subject=Annotations.ja.zc("signature");this.freeHandAnnot.ToolName=this.name;this.freeHandAnnot.MaintainAspectRatio=!0},SH:function(a){this.Zy=a=$.extend(!0,[],a)},LN:function(a){this.SH(a);this.trigger("saveDefault",[a])},kV:function(){var a=$.extend(!0,[],this.freeHandAnnot.bk());this.trigger("saveDefault",[a,this.freeHandAnnot])},qK:function(a,
d){a=$.extend(!0,[],a);for(var c=0;c<a.length;++c){for(var b=0;b<a[c].length;++b)a[c][b]=new Annotations.Point(a[c][b].x,a[c][b].y);this.freeHandAnnot.setPath(a[c],c)}$.extend(this.freeHandAnnot,d);this.Pw=a.length},TO:function(){this.location=null},wS:function(){return!!this.location},sS:function(){return this.Zy?!0:!1},hU:function(){this.initAnnot();this.drawBackground()},UN:function(){var a=this.Zy;a&&(this.qK(a),this.QE())},YR:function(){if(this.freeHandAnnot.Width&&this.freeHandAnnot.Height){var a=
this.u.Bc(0);this.uE({pageIndex:0,x:0,y:0});var d=this.freeHandAnnot.Sc(),c=d.ya(),d=d.va(),b=document.createElement("canvas");b.width=c;b.height=d;var e=b.getContext("2d");this.freeHandAnnot.draw(e,a);a=this.u.Ze();return{imgSrc:b.toDataURL(),width:c*a,height:d*a}}},QE:function(a){if(this.aI())return!1;a&&this.LN(this.freeHandAnnot.bk());a=this.u.Qa();var d=this.location.pageIndex+1;this.freeHandAnnot.PageNumber=d;d=this.u.Pd(d);d!==b.o.Sa.ki&&this.freeHandAnnot.rotate(d*-Math.PI/2,this.location);
this.uE(this.location);a.Xg(this.freeHandAnnot);a.Wb(this.freeHandAnnot);this.trigger("annotationAdded",[this.freeHandAnnot]);this.initAnnot();this.location=null;return!0},uE:function(a){var d=this.freeHandAnnot.Width,c=this.freeHandAnnot.Height,b,e,g;d>c?(b=a.x-this.kj,e=a.y-c/d*this.kj,g=a.x+this.kj,d=a.y+c/d*this.kj):(b=a.x-d/c*this.kj,e=a.y-this.kj,g=a.x+d/c*this.kj,d=a.y+this.kj);a=this.u.getDocument().fc(a.pageIndex);b=new Annotations.Rect(b,e,g,d);b.Eu(new Annotations.Rect(0,0,a.width,a.height));
this.freeHandAnnot.resize(b)},aI:function(){return 0===this.Pw},uW:function(a){var d=this;this.canvas=a;this.canvas[0].style.touchAction="none";this.ctx=a[0].getContext("2d");this.canvas.on("mousedown touchstart",function(a){if(1===a.which||0===a.which)a=d.SD(a),d.freeHandAnnot.Ub(a.x,a.y,d.hc),d.iz(),d.Bq=!0});this.canvas.on("touchmove",function(a){a.preventDefault()});this.canvas.on("mousemove touchmove",_.throttle(function(a){d.Bq&&(a=d.SD(a),d.freeHandAnnot.Ub(a.x,a.y,d.hc),d.iz(),d.visible=!0)},
20));this.canvas.on("mouseup touchend",function(){d.OD()})},mouseLeftDown:function(a){a.preventDefault();m.Tool.prototype.mouseLeftDown.apply(this,arguments);this.u.da.Nd()},mouseLeftUp:function(a){a.preventDefault();m.Tool.prototype.mouseLeftUp.apply(this,arguments);var d=this.pageCoordinates[1];d&&(this.location=d,this.trigger("locationSelected",d))}};m.SignatureCreateTool.prototype=$.extend(new m.Tool,m.SignatureCreateTool.prototype,b.utils.eventHandler);m.Gc=function(a,d){m.Yb.call(this,a);this.text=
this.annotation=null;this.Ay=d;this.defaults={Opacity:1,StrokeColor:new Annotations.Color(255,0,0)}};m.Gc.AUTO_SET_TEXT=!0;m.Gc.prototype=$.extend(new m.Yb,{switchIn:function(a){m.Yb.prototype.switchIn.call(this,a);this.u.oe({annotMode:!0})},switchOut:function(a){m.Yb.prototype.switchOut.call(this,a);this.u.oe({annotMode:!1})},mouseLeftDown:function(a){m.Yb.prototype.mouseLeftDown.call(this,a);this.isSelecting()||this.annotation||!this.pageCoordinates||(a=this.u.da,this.annotation=new this.Ay,this.annotation.Author=
a.Il(),a=this.defaults.StrokeColor,this.annotation.StrokeColor=new Annotations.Color(a.R,a.G,a.B,a.A),this.annotation.Opacity=this.defaults.Opacity||1,this.annotation.ToolName=this.name,this.trigger("annotationCreated",[this.annotation]))},textSelected:function(a,d,c){this.annotation&&this.pageCoordinates[0].pageIndex===a&&0<d.length&&(this.annotation.Dw(d.map(function(a){return a.mh()})),this.annotation.PageNumber=a+1,this.text=c,!m.Gc.AUTO_SET_TEXT||this.annotation instanceof Annotations.Dd||this.annotation.Ch(this.text),
this.u.da.Wb(this.annotation))},mouseLeftUp:function(a){m.Yb.prototype.mouseLeftUp.call(this,a);!this.isSelecting()&&this.annotation&&(a=this.u.da,!this.text||1>this.text.length?a.eg(this.annotation):(a.Xg(this.annotation),this.trigger("annotationAdded",[this.annotation])),this.annotation=this.text=null)}},b.utils.eventHandler);m.Ex=function(a,d){m.Gc.call(this,a,b.Annotations.Oh);this.defaults.StrokeColor=new Annotations.Color(255,255,0);delete this.defaults.Opacity;this.name=d||"TextHighlightCreateTool"};
m.Ex.prototype=new m.Gc;m.Fp=function(a,d){m.Gc.call(this,a,b.Annotations.Dd);this.name=d||"RedactCreateTool";this.defaults={StrokeColor:new Annotations.Color(255,0,0),FillColor:new Annotations.Color(0,0,0,1),StrokeThickness:1.5,Opacity:1}};m.Fp.prototype=$.extend(new m.Gc,{mouseMove:function(a){"text"===this.cursor?m.Gc.prototype.mouseMove.call(this,a):m.GenericAnnotationCreateTool.prototype.mouseMove.call(this,a)},mouseLeftDown:function(a){"text"===this.cursor?(m.Gc.prototype.mouseLeftDown.call(this,
a),this.annotation&&(this.annotation.IsText=!0)):(m.GenericAnnotationCreateTool.prototype.mouseLeftDown.call(this,a),this.annotation&&(this.annotation.IsText=!1,this.annotation.NoMove=!1));this.annotation&&this.defaults&&(null!==this.defaults.StrokeColor&&(a=this.defaults.StrokeColor,this.annotation.StrokeColor=new Annotations.Color(a.R,a.G,a.B,a.A)),null!==this.defaults.StrokeThickness&&(this.annotation.StrokeThickness=this.defaults.StrokeThickness),null!==this.defaults.FillColor&&(a=this.defaults.FillColor,
this.annotation.FillColor=new Annotations.Color(a.R,a.G,a.B,a.A)))},finish:m.GenericAnnotationCreateTool.prototype.finish,mouseLeftUp:function(a){this.annotation&&this.annotation.IsText?m.Gc.prototype.mouseLeftUp.call(this,a):m.GenericAnnotationCreateTool.prototype.mouseLeftUp.call(this,a)}});m.Hx=function(a,d){m.Gc.call(this,a,b.Annotations.Zm);this.name=d||"TextUnderlineCreateTool"};m.Hx.prototype=new m.Gc;m.Gx=function(a,d){m.Gc.call(this,a,b.Annotations.Ym);this.name=d||"TextStrikeoutCreateTool"};
m.Gx.prototype=$.extend(new m.Gc,{mouseLeftUp:function(){m.Gc.prototype.mouseLeftUp.apply(this,arguments);if(!this.isSelecting()){var a=this.annotation,d=this.u.da;a&&d.xi(a)&&d.Wb(a)}}});m.Fx=function(a,d){m.Gc.call(this,a,b.Annotations.Xm);this.name=d||"TextSquigglyCreateTool"};m.Fx.prototype=new m.Gc;m.Cx=function(a,d){m.AnnotationSelectTool.call(this,a);this.annotation=null;this.defaults={StrokeColor:new Annotations.Color(255,255,0),Opacity:1};this.cursor="crosshair";this.name=d||"StickyCreateTool"};
m.Cx.prototype=$.extend(new m.AnnotationSelectTool,{switchIn:function(){k(this.u,this.cursor)},mouseLeftUp:function(a){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,a);var d=this.pageCoordinates[1];if(d&&!this.$b){var c=this.u.da;c.Nd();this.annotation=new Annotations.lj;var b=this.u.kb(d.pageIndex);this.annotation.X=d.x-this.annotation.ya()/2/b;this.annotation.Y=d.y-this.annotation.va()/2/b;this.annotation.PageNumber=d.pageIndex+1;this.annotation.Author=c.Il();d=this.defaults.StrokeColor;
this.annotation.StrokeColor=new Annotations.Color(d.R,d.G,d.B,d.A);this.annotation.Opacity=this.defaults.Opacity;this.annotation.ToolName=this.name;this.trigger("annotationCreated",[this.annotation]);c.Xg(this.annotation);this.trigger("annotationAdded",[this.annotation]);c.Wb(this.annotation);this.annotation=null;a.preventDefault()}}},b.utils.eventHandler);m.Gp=function(a,d){r.call(this,a);this.annotation=null;this.defaults={Opacity:1};this.cursor="crosshair";this.name=d||"StampCreateTool"};m.Gp.ACCEPTED_IMAGE_TYPES=
".jpg,.jpeg,.png";m.Gp.prototype=$.extend(new m.Tool,{switchIn:function(){k(this.u,this.cursor)},mouseLeftDown:function(a){if(!this.annotation){r.prototype.mouseLeftDown.call(this,a);this.u.Qa().Nd();var d=this.pageCoordinates[0];if(d){var c=this.ge(this.Ib).pageIndex,b=document.createElement("input");b.setAttribute("type","file");b.setAttribute("accept",m.Gp.ACCEPTED_IMAGE_TYPES);b.setAttribute("display","none");b.onchange=function(){if(b.files&&b.files[0])if("image/png"!==b.files[0].type&&"image/jpeg"!==
b.files[0].type)console.warn("Invalid file type. Please choose a png/jpg/jpeg file.");else{var a=new FileReader;a.onload=function(a){var b=this.u.da;this.annotation=new Annotations.Uk;this.annotation.X=d.x;this.annotation.Y=d.y;this.annotation.PageNumber=d.pageIndex+1;this.annotation.Author=b.Il();this.annotation.ImageData=a.target.result;var e=90*this.u.Pd(this.annotation.PageNumber);this.annotation.Rotation=e;var g=new Image;g.onload=function(){var a=g.width,d=g.height;if(90===e||270===e)var f=
a,a=d,d=f;var k=a/d,f=this.u.gd(c),h=this.u.fd(c),a=Math.min(a,f),d=Math.min(d,h);a/d!==k&&(d*k<a?a=d*k:d=a/k);this.annotation.Width=a;this.annotation.Height=d;this.annotation.X-=this.annotation.Width/2;this.annotation.Y-=this.annotation.Height/2;a=this.annotation.Sc();a.Eu(new Annotations.Rect(0,0,f,h));this.annotation.resize(a);this.annotation.ToolName=this.name;this.annotation.Opacity=this.defaults.Opacity;this.trigger("annotationCreated",[this.annotation]);b.Xg(this.annotation);this.trigger("annotationAdded",
[this.annotation]);b.Wb(this.annotation);this.annotation=null}.bind(this);g.src=a.target.result}.bind(this);a.readAsDataURL(b.files[0]);document.body.removeChild(b)}}.bind(this);document.body.appendChild(b);b.click()}}}},b.utils.eventHandler);m.Qg=function(a,d){m.GenericAnnotationCreateTool.call(this,a,b.Annotations.Sm);this.annotation=null;this.fm=!1;delete this.defaults.FillColor;this.name=d||"PolylineCreateTool";this.TE=!1};m.Qg.prototype=$.extend(new m.GenericAnnotationCreateTool,{mouseLeftDown:function(a){var d;
m.GenericAnnotationCreateTool.prototype.mouseLeftDown.call(this,a);d=this.annotation&&0===this.annotation.getPath().length;this.isSelecting()||this.$b&&d&&!this.TE||!this.annotation||((d=a.data.pageCoordinate,d&&d.pageIndex===this.annotation.wb())?null!==d.x&&null!==d.y&&(0===this.annotation.na.length?this.annotation.Ub(d.x,d.y):this.fm||(this.annotation.uk(),this.annotation.Ub(d.x,d.y)),this.fm=!0):this instanceof m.CalloutCreateTool?(this.tq(),this.u.da.eg(this.annotation),this.annotation=null):
this.mouseDoubleClick(a))},mouseLeftUp:function(a){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,a)},mouseMove:function(a){m.AnnotationSelectTool.prototype.mouseMove.call(this,a);if(this.annotation&&!this.isSelecting()&&a.data&&(a=a.data.pageCoordinate,null!==a&&null!==a.x&&null!==a.y&&a.pageIndex===this.annotation.wb())){this.fm||this.annotation.uk();var d=this.annotation.getPath();0===d.length?(this.annotation.Ub(a.x,a.y),this.fm=!1):0<d.length&&(d[d.length-1].x!==a.x||d[d.length-1].y!==
a.y)&&(this.annotation.Ub(a.x,a.y),this.fm=!1);this.annotation.X=this.annotation.Za.x;this.annotation.Y=this.annotation.Za.y;this.u.da.Wb(this.annotation)}},mouseDoubleClick:function(){this.annotation&&(this.annotation.finish(),this.finish())},Fv:function(a){this.annotation&&this.mouseDoubleClick(a)},contextMenu:function(a){a.preventDefault()},tap:function(a){this.annotation&&0<this.annotation.getPath().length||m.AnnotationSelectTool.prototype.tap.call(this,a)},tq:function(){for(;0<this.annotation.getPath().length;)this.annotation.uk()},
wV:function(a){this.TE=a}});m.Pg=function(a,d){m.GenericAnnotationCreateTool.call(this,a,b.Annotations.Mh);this.annotation=null;this.fm=!1;this.name=d||"PolygonCreateTool"};m.Pg.prototype={tq:function(){for(;0<this.annotation.getPath().length;)this.annotation.uk()}};m.Pg.prototype=$.extend(new m.Qg,m.Pg.prototype);m.Ep=function(a,d){m.GenericAnnotationCreateTool.call(this,a,b.Annotations.Mh);this.annotation=null;this.fm=!1;this.name=d||"PolygonCloudCreateTool"};m.Ep.prototype={mouseLeftDown:function(){m.Pg.prototype.mouseLeftDown.apply(this,
arguments);this.annotation&&(this.annotation.Style="cloudy",this.annotation.Intent="PolygonCloud")}};m.Ep.prototype=$.extend(new m.Pg,m.Ep.prototype);var p={scale:"1 in = 1 in",axis:[{factor:.0138889,unit:"in",decimalSymbol:".",thousandsSymbol:",",display:"D",precision:100,unitPrefix:"",unitSuffix:"",unitPosition:"S"}],distance:[{factor:1,unit:"in",decimalSymbol:".",thousandsSymbol:",",display:"D",precision:100,unitPrefix:"",unitSuffix:"",unitPosition:"S"}],area:[{factor:1,unit:"sq in",decimalSymbol:".",
thousandsSymbol:",",display:"D",precision:100,unitPrefix:"",unitSuffix:"",unitPosition:"S"}]};m.kx=function(d,b){m.Kh.call(this,d);c(this);this.name=b||"DistanceMeasurementCreateTool";this.IT="LineDimension";this.Measure=a(p)};m.kx.prototype=$.extend(new m.Kh,{mouseLeftDown:function(d){m.Kh.prototype.mouseLeftDown.call(this,d);this.annotation&&(this.annotation.caption="yes",this.annotation["caption-style"]="Top",this.annotation.IT=this.IT,this.annotation.Measure=a(this.Measure),this.annotation.Yi("OpenArrow"),
this.annotation.So("OpenArrow"))}});m.vx=function(d,b){m.Qg.call(this,d);c(this);this.name=b||"PerimeterMeasurementCreateTool";this.IT="PolyLineDimension";this.Measure=a(p)};m.vx.prototype=$.extend(new m.Qg,{mouseLeftDown:function(d){m.Qg.prototype.mouseLeftDown.call(this,d);this.annotation&&(this.annotation.Measure=a(this.Measure),this.annotation.IT=this.IT)}});m.Zw=function(d,b){m.Pg.call(this,d);c(this);this.name=b||"AreaMeasurementCreateTool";this.IT="PolygonDimension";this.Measure=a(p)};m.Zw.prototype=
$.extend(new m.Pg,{mouseLeftDown:function(d){m.Pg.prototype.mouseLeftDown.call(this,d);this.annotation&&(this.annotation.Measure=a(this.Measure),this.annotation.IT=this.IT)}});m.CalloutCreateTool=function(a,d){m.GenericAnnotationCreateTool.call(this,a,b.Annotations.Ia,Annotations.Ia.Fc.FreeTextCallout);this.defaults.TextColor=new Annotations.Color(255,0,0);this.defaults.FontSize="9pt";this.defaults.Width=150;this.defaults.Height=30;this.name=d||"CalloutCreateTool"};m.CalloutCreateTool.prototype=$.extend(new m.Qg,
{lineCount:2,er:function(){return this.u.Qa().Nz().Zq},mouseLeftDown:function(a){if(this.er())this.annotation=null;else if(m.Qg.prototype.mouseLeftDown.call(this,a),null!==this.annotation&&(this.annotation.CalloutLineCount=this.lineCount,this.annotation.getPath().length>=this.annotation.CalloutLineCount+1)){this.annotation.getPath().length>this.annotation.CalloutLineCount+1&&this.annotation.uk();var d=this.annotation.getPath()[this.annotation.CalloutLineCount],c=90*this.u.Pd(this.annotation.PageNumber),
b=this.defaults.Width,e=this.defaults.Height/2,g=this.u.gd(this.annotation.wb()),f=this.u.fd(this.annotation.wb());d.x+b>g&&(d.x-=b);d.y+e>f?d.y-=e:0>d.y-e&&(d.y+=e);90===c||270===c?(this.annotation.Ub(d.x-e,d.y),this.annotation.Ub(d.x+e,d.y+b)):(this.annotation.Ub(d.x,d.y-e),this.annotation.Ub(d.x+b,d.y+e));this.annotation.Rotation=c;d=this.defaults.TextColor;this.annotation.TextColor=new Annotations.Color(d.R,d.G,d.B,d.A);this.annotation.FontSize=this.defaults.FontSize;this.u.da.Wb(this.annotation);
this.finish();a.preventDefault()}},mouseDoubleClick:function(a){this.annotation||m.Tool.prototype.mouseDoubleClick.call(this,a)},Fv:function(){null!==this.annotation&&(this.tq(),this.u.da.eg(this.annotation),this.annotation=null)},contextMenu:function(a){a.preventDefault()}});m.Lm=function(a,d){m.GenericAnnotationCreateTool.call(this,a,b.Annotations.Ia);this.defaults.StrokeThickness=0;this.defaults.TextColor=new Annotations.Color(255,0,0);this.defaults.FontSize="9pt";this.name=d||"FreeTextCreateTool"};
m.Lm.XB=function(a){m.Lm.prototype.kn=a};m.Lm.prototype=$.extend(new m.GenericAnnotationCreateTool,{initialText:"Insert text here",kn:function(){return this.initialText},er:function(){var a=this.u.Qa().Nz(),d=a.currentAnnotation&&a.currentAnnotation.zb?a.currentAnnotation.zb:null,d=d&&d.length?document.contains(d[0]):!1;return a.Zq&&d},mouseLeftDown:function(a){var d=0<this.u.Qa().Ee().length;m.GenericAnnotationCreateTool.prototype.mouseLeftDown.call(this,a);this.isSelecting()||(this.er()||d?this.annotation=
null:this.annotation&&(this.annotation.StrokeThickness=this.defaults.StrokeThickness,this.annotation.FillColor=new Annotations.Color(200,220,250,.2),this.annotation.Uo(Annotations.Ia.Fc.FreeText),this.annotation.Ch(this.kn()),this.annotation.Rotation=90*this.u.Pd(this.annotation.PageNumber),a=this.defaults.TextColor,this.annotation.TextColor=new Annotations.Color(a.R,a.G,a.B,a.A),this.annotation.FontSize=this.defaults.FontSize))},mouseMove:function(a){m.AnnotationSelectTool.prototype.mouseMove.call(this,
a);if(!this.isSelecting()&&!this.er()&&this.annotation&&"undefined"!==typeof this.pageCoordinates){a=this.pageCoordinates[0];var d=this.pageCoordinates[1];null!==d&&null!==a&&a.pageIndex===d.pageIndex&&(a=new Annotations.Rect(a.x,a.y,d.x,d.y),a.normalize(),this.annotation.yg(a),this.annotation.rm(new Annotations.Rect(0,0,0,0)),this.u.da.Wb(this.annotation))}},mouseLeftUp:function(a){m.AnnotationSelectTool.prototype.mouseLeftUp.call(this,a);if(!this.isSelecting()){if(this.$b&&this.annotation){a=this.annotation.ya();
var d=this.annotation.va(),c=2*(this.annotation.getRectPadding()+1);if(a<=c||d<=c){this.annotation=null;return}}if(this.er())this.annotation=null;else if(this.annotation){a=this.annotation.ya();d=this.annotation.va();c=2*(this.annotation.getRectPadding()+1);if(a<=c||d<=c)this.annotation.aC(1),this.annotation.To(1),this.annotation.Rotation=90*this.u.Pd(this.annotation.PageNumber),this.annotation.AV(!0);a=this.defaults.FillColor;this.annotation.FillColor=new Annotations.Color(a.R,a.G,a.B,a.A);a=this.annotation.getRectPadding();
this.annotation.rm(new Annotations.Rect(a,a,a,a));this.u.da.Wb(this.annotation);this.u.da.Xg(this.annotation);this.trigger("annotationAdded",[this.annotation]);this.annotation=null}}}});m.jf=function(a,d){m.Tool.call(this,a);this.name=d||"MarqueeZoomTool";this.xj=!0};m.jf.FW=function(a){m.jf.prototype.TD=a};m.jf.VV=function(a){m.jf.prototype.zt=a};m.jf.WV=function(a){m.jf.prototype.Bt=a};m.jf.prototype=$.extend(new m.Tool,{Bt:Number.MIN_VALUE,zt:Number.MAX_VALUE,switchIn:function(){m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS=
!1;m.Tool.ENABLE_AUTO_SWITCH=!1;k(this.u,"zoom-in");this.u.sm("auto")},switchOut:function(){m.Tool.prototype.switchOut.call(this);m.Tool.ENABLE_ANNOTATION_HOVER_CURSORS=!0;m.Tool.ENABLE_AUTO_SWITCH=!0;this.u.sm("none")},keyDown:function(a){if(a.metaKey||a.ctrlKey)this.xj=!1,k(this.u,"zoom-out")},mI:function(){this.xj=!0;k(this.u,"zoom-in")},mouseLeftDown:function(a){m.Tool.prototype.mouseLeftDown.call(this,a);a=this.u.Ze();!this.pageCoordinates[0]||!this.xj&&a<=this.Bt||this.xj&&a>=this.zt||(this.KA=
!0,this.xj?k(this.u,"zoom-in"):k(this.u,"zoom-out"))},mouseMove:function(a){m.Tool.prototype.mouseMove.call(this,a);a=this.pageCoordinates;this.KA&&this.xj&&a[0].pageIndex===a[1].pageIndex&&(this.kQ=this.pageCoordinates[1],e([this.Ud,this.Ib],a,this.u))},mouseLeftUp:function(a){m.Tool.prototype.mouseLeftUp.call(this,a);if(this.KA){this.KA=!1;var d=Math.abs(this.Ib.x-this.Ud.x),c=Math.abs(this.Ib.y-this.Ud.y);a=this.u.Ze();15>d&&15>c?(d=this.TD(a),this.xj||(d-=2*(d-a)),d=Math.max(this.Bt,Math.min(this.zt,
d)),this.u.oL(d,0,0)):this.xj&&(d=a*this.tN(d,c),d=Math.max(this.Bt,Math.min(this.zt,d)),this.u.Xw(d),a=this.rN([this.pageCoordinates[0],this.kQ]),d=this.u.xb().offset(),this.u.scrollTo(a.x-d.left,a.y-d.top));f()}},TD:function(a){var d={"0.075":[Number.MIN_VALUE,.8],"0.25":[.8,1.5],1:[1.5,3.5],2:[3.5,8],4:[8,32],8:[32,64],16:[64,Number.MAX_VALUE]},c=Object.keys(d),b,e,g;for(e=0;e<c.length;e++)if(g=d[c[e]],a>=g[0]&&a<=g[1]){b=c[e];break}return a+parseFloat(b)},tN:function(a,d){var c=this.u.xb(),b=
c.width(),c=c.height();return Math.min(b/a,c/d)},rN:function(a){var d=a[1].pageIndex,c=this.u.Pd(d+1),b;0===c?b={x:Math.min(a[0].x,a[1].x),y:Math.min(a[0].y,a[1].y)}:1===c?b={x:Math.min(a[0].x,a[1].x),y:Math.max(a[0].y,a[1].y)}:2===c?b={x:Math.max(a[0].x,a[1].x),y:Math.max(a[0].y,a[1].y)}:3===c&&(b={x:Math.max(a[0].x,a[1].x),y:Math.min(a[0].y,a[1].y)});return this.u.$j().Vb().cf(b,d)}})})(window);
(function(b){function f(a,c){this.Lc=a;this.u=c;this.onAnnotationHover=function(c,b){var e=a.Iq(b),g=a.Pc().filter(function(a){return a.IsHovering});g.forEach(function(a){a.IsHovering=!1});e&&e.Listable&&e.IsHoverable&&(e.IsHovering=!0,g.push(e));a.ii(g)};this.u.on("mouseMove.hover",this.onAnnotationHover)}function e(a){var c=this;this.Lc=a;this.Zq=!1;this.onEditBoxAnnotationChanged=function(a,d,b){for(var e=0;e<d.length;++e){var f=d[e];"add"===b&&c.GH(f)&&c.Lc.Gy(f)?(c.UH(f),a.imported||(c.xG(f),
f.zb.select(),f.zb[0].setSelectionRange(0,99999))):"delete"===b&&f.zb&&(f.zb.remove(),delete f.zb)}};this.onEditBoxAnnotationDoubleClicked=function(a,d){c.Lc.Gy(d)&&c.GH(d)&&(d.zb||c.UH(d),c.Zq&&d.zb.val()!==d.eh()&&c.Lc.TB(d,d.zb.val()),c.xG(d))};this.Lc.on("annotationChanged.editbox",this.onEditBoxAnnotationChanged);this.Lc.on("annotationDoubleClicked.editbox",this.onEditBoxAnnotationDoubleClicked)}function c(a){this.Lc=a;this.lm=[]}var a=window.o;a.ia=function(a){if(!a)throw Error("AnnotationManager requires DocumentViewer to initialize");
var g=this;g.lu="";g.EA=!1;g.readOnly=!1;g.IZ=!1;g.HE=!0;g.u=a;g.Ug=new c(g);g.$Y=new f(g,a);g.KD=new e(g);g.ql=new b.o.TM(g);g.init();g.dh=new b.Annotations.O.fj(this);g.XE=function(a){return a.Author};g.oB={get:function(a,d){return this[a]&&this[a][d]},set:function(a,d,c){this[a]=this[a]||{};this[a][d]=c},"delete":function(a,d){delete this[a][d]}};g.vu={get:function(a,d){return this[a]&&this[a][d]},set:function(a,d,c){this[a]=this[a]||{};this[a][d]=c},"delete":function(a,d){delete this[a][d]}};
a.on("contentRemoved.annotManager",function(){g.de.forEach(function(a){a.trigger("contentRemoved")})});a.on("documentLoaded",function(){g.OP();a.on("annotationsLoaded",function(){var a=g.Pc().filter(function(a){return a instanceof Annotations.Tf}),d=g.Pc().filter(function(a){return a instanceof Annotations.FreeHandAnnotation});a.forEach(function(a){var c;for(c=0;c<d.length;c++)if(a.qv(d[c],{sy:!0})){a.freeHandAnnot=d[c];break}})})});g.AZ={};g.Hj={line:[Annotations.ve],circle:[Annotations.Im],square:[Annotations.Qk],
freetext:[Annotations.Ia],stamp:[Annotations.Uk],text:[Annotations.lj],ink:[Annotations.FreeHandAnnotation],polyline:[Annotations.Sm],polygon:[Annotations.Mh],strikeout:[Annotations.Ym],highlight:[Annotations.Oh],redact:[Annotations.Dd],underline:[Annotations.Zm],squiggly:[Annotations.Xm],caret:[Annotations.pp],widget:[Annotations.Xk,Annotations.Kg,Annotations.gj,Annotations.jj,Annotations.Hh,Annotations.Pk,Annotations.Tf],link:[Annotations.rd],custom:[Annotations.rp]};g.controlPointSize=8;g.controlPointHitBoxScale=
1;g.on("annotationChanged",function(a,d,c){"add"===c&&d.forEach(function(a){if(a.Listable&&!a.ToolName)switch(a.elementName){case "line":a.ToolName=a.Measure&&"LineDimension"===a.IT?"AnnotationCreateDistanceMeasurement":"None"===a.ih()&&"None"===a.Ye()?"AnnotationCreateLine":"AnnotationCreateArrow";break;case "circle":a.ToolName="AnnotationCreateEllipse";break;case "square":a.ToolName="AnnotationCreateRectangle";break;case "freetext":a.ToolName=a.jh()===Annotations.Ia.Intent.FreeTextCallout?"AnnotationCreateFreeText":
"AnnotationCreateCallout";break;case "stamp":a.ToolName="AnnotationCreateStamp";break;case "ink":a.xY===Annotations.ja.zc("signature")?a.ToolName="AnnotationCreateSignature":a.ToolName="AnnotationCreateFreeHand";break;case "polyline":a.ToolName=a.Measure&&"PolyLineDimension"===a.IT?"AnnotationCreatePerimeterMeasurement":"AnnotationCreatePolyline";break;case "polygon":a.ToolName="cloudy"===a.wY&&"PolygonCloud"===a.Fc?"AnnotationCreatePolygonCloud":a.Measure&&"PolygonDimension"===a.IT?"AnnotationCreateAreaMeasurement":
"AnnotationCreatePolygon";break;case "strikeout":a.ToolName="AnnotationCreateTextStrikeout";break;case "highlight":a.ToolName="AnnotationCreateTextHighlight";break;case "underline":a.ToolName="AnnotationCreateTextUnderline";break;case "squiggly":a.ToolName="AnnotationCreateTextSquiggly";break;case "text":a.ToolName="AnnotationCreateSticky";break;case "redact":a.ToolName="AnnotationCreateRedaction"}})});g.on("annotationChanged",function(a,d,c,b){if(!b&&!a.$Z&&Annotations.ja.extraSelectorsEnabled&&
d&&0!==d.length&&!(1<d.length)){var e=d[0],f=g.u.getDocument(),p=e.wb();if(-1!==p&&g.u.xo&&0!==g.u.Pi.length&&e.xk())if(g.u.Pi[g.u.Pi.length-1][0]!==p)g.u.xo=null,g.u.Pi=[];else{var u=g.u.Pi.pop(),q=function(){if(e&&u&&g.u.xo){var a=g.u.getDocument();a===f&&g.Wj(e.iY)&&(a=new XODText.mj(a),g.u.xo.apply(a,u),e.TextIndices=a.xt,e.SurroundingTexts=a.yt,e.mb(!0),g.trigger("annotationChanged",[[e],"modify",!0]))}};f.bc().then(function(){var a=g.u.getDocument();if(a===f){var d=Annotations.ja.TF(p,a.vb());
a.or(d).then(q)}})}}})};a.ia.prototype={init:function(){this.de=[];this.az=[];this.gq=[];this.nu={};this.Ug.Nd();this.tk=null},OP:function(){this.Qn=!1},Il:function(){return this.lu},QB:function(a){this.lu=a;this.trigger("updateAnnotationPermission")},lR:function(){return this.EA},NV:function(a){this.EA=a;this.trigger("updateAnnotationPermission")},nH:function(){return this.readOnly},nW:function(a){this.readOnly=a;this.trigger("updateAnnotationPermission")},CX:function(){return this.HE},HP:function(){this.HE=
!1;this.KD.disable()},lW:function(a){this.KF=a},iF:function(a){return(this.KF?this.KF(a.Author,a):this.EA||a.Author===this.lu||null===a.Author||"undefined"===typeof a.Author)&&!this.readOnly&&!a.ReadOnly},Kd:function(a){return this.iF(a)&&!a.Locked},Gy:function(a){return this.iF(a)&&!a.LockedContents},wW:function(a){this.JK=a},ee:function(){return this.dh},wB:function(a){a=a.map(Number);var c=[];this.de=this.de.filter(function(b){return-1!==a.indexOf(b.PageNumber)&&b.DA?(c.push(b),b.Mw(),!1):!0});
if(0<c.length){var b=this;setTimeout(function(){b.trigger("annotationChanged",[c,"delete"])},0)}},OU:function(a){var c=this;a.on("layoutChanged",function(a,d){c.wB(d.removed);c.de.forEach(function(a){var c=d.moved[a.PageNumber];c&&(a.PageNumber=c)})});a.on("pageContentChanged",function(a,d){0<d.length&&c.wB(d)});a.on("pageDiff",function(a,d){var b={};c.de.forEach(function(a){var d=a.Hb();d in b?b[d].push(a):b[d]=[a]});d.forEach(function(a){var d=a.before;a=a.after;var c=b[a.pageNum];if(c){var e=new XODText.Matrix2D;
e.initMatrix(a.matrix);e.concat(d.cb.inverse());c.forEach(function(a){var d=a.IsModified,c=a.Sc(),b=c.x1,g=c.y1,f=c.x2,k=c.y2;a.Gh(e);d||c.x1!==b||c.x2!==f||c.y1!==g||c.y2!==k||(a.IsModified=d)})}})})},wK:function(a){return(!(a instanceof Annotations.HTMLAnnotation)||a instanceof Annotations.jj)&&a.zf()},Od:function(a,c,e,f){var l=a;_.isObject(a)||(l={pageNumber:a,overrideCanvas:c,majorRedraw:e,overrideContainer:f});a=l.pageNumber;c=l.namespace||"default";l.namespace=c;f=b.o.Aa.Zj(a-1);l.Hn=f;if(!this.vu.get(f,
c))return this.JT(l);this.oB.set(f,c,{Hf:a,MT:e});return this.vu.get(f,c)},JT:function(a){var c=a.pageNumber,e=a.overrideCanvas,f=a.overrideContainer,l=a.majorRedraw,n=a.namespace,m=a.Hn,r=c-1;if(isNaN(r))throw Error("Invalid page index given");var p=this.u.kb(r);a=this.Gl(c);var u=!!e,q=e;!u&&this.u.Xj(r)&&(q=this.u.Mn(r))&&this.u.Xo(r,$(q));if(!q)return Promise.resolve();var v=q.getContext("2d"),w=this.u.Pd(r+1),A=90*w,B=this.u.Bc(c-1);u||(A=this.u.Kl(r+1),this.QO(q,r,A));for(var z=f||b.o.Aa.sA(r),
x=Promise.resolve(),y=0;y<this.de.length;y++){var F=this.de[y];F.wb()===r&&(x=x.then(this.$F.bind(this,F,v,B,A,w,a,u,e,l,z)))}this.tk&&this.tk.PageNumber===c&&(this.xi(this.tk)?this.tk=null:x=x.then(this.$F.bind(this,this.tk,v,B,A,w,a,u,e,l,z)));var K=this,c=x.then(function(){u||K.u.NH(r,q);K.vu["delete"](m,n);var a=(K.u.Qd()-w)%4;K.u.getDocument().Vn(q,r,!0,a);u||p!==K.u.kb(r)||K.u.fw(r,q);if(a=K.oB.get(m,n))return K.oB["delete"](m,n),K.Od({pageNumber:a.Hf,overrideCanvas:e,overrideContainer:f,majorRedraw:a.MT,
namespace:n})});this.vu.set(m,n,c);return c},QO:function(a,c,e){var f=this.u.ho(c);c=f.width;f=f.height;if(90===e||270===e)e=c,c=f,f=e;b.o.Aa.sq(a,c,f)},PP:function(a,c,b,e,f,n,m,r,p,u){var q=this;return new Promise(function(f){if(q.u.Cq||a.cI())if(r?a.Printable&&a.Vl():a.Vl()){if(p){var n=r?1:q.u.kb(a.PageNumber-1);q.xi(a)&&a.render(u,q,n,r)}q.QP(m,a,c,b,e).then(function(){f()})}else r||a.Mw(),f();else f()})},QP:function(a,c,b,e,f){return!this.wK(c)||c.IsHovering?(c.draw(b,e,f),Promise.resolve()):
a.pO[a.Ij.indexOf(c)].then(function(a){b.save();return a.draw(b,c.zf().offset).then(function(){b.restore()})})["catch"](function(){c.draw(b,e,f)})},$F:function(a,c,b,e,f,n,m,r,p,u){c.save();var q=this.u.kb(a.wb());this.IW(a,c,m);c.save();var v=this;return a.CB().then(function(){return v.PP(a,c,b,e,f,q,n,m,p,u)}).then(function(){c.restore();m||v.mz(a,c,b);c.restore()})},IW:function(a,c,b){var e=this.u.kb(a.wb());!0===a.NoZoom&&(c.translate(a.ck(),a.dk()),b||(c.scale(1/e,1/e),b=this.u.Qd(a.PageNumber),
0<b&&(3===b?c.translate(a.ya(),0):2===b?c.translate(a.ya(),a.va()):1===b&&c.translate(0,a.va()),c.rotate(-1*b*Math.PI/2))))},mz:function(a,c,b){if("undefined"!==typeof a.selectionModel){if(this.Pl(a)&&a.Vl()){var e=new a.selectionModel(a,this.Kd(a)),f=this.u.kb(a.wb());!0===a.NoZoom&&(c.translate(-a.ck(),-a.dk()),f=1);e.draw(c,a,f,b)}}else(a=this.Ug.VZ(a))&&a.draw(c)},Gl:function(a){var c=this,b=this.Pc().filter(function(b){return b.PageNumber===a&&c.wK(b)}),e=b.map(function(a){return a.zf()});return{pO:this.u.getDocument().Gl(e,
a),Ij:b}},Wb:function(a){this.xi(a)||(this.tk=a);return this.Od(a.PageNumber)},oW:function(d){this.Wb=_.throttle(a.ia.prototype.Wb.bind(this),d)},uT:function(a){this.u.kI(a.Hb()-1,[{x4:a.co(),y4:a.lo(),x2:a.qH(),y2:a.JG()}])},DS:function(a){this.MH([a])},MH:function(a){0!==a.length&&(a.forEach(function(a){a.Hidden=!0}),this.Nd(),this.ii(a),this.trigger("annotationHidden",[a,!0]))},LW:function(a){this.BK([a])},BK:function(a){a.forEach(function(a){a.Hidden=!1});this.ii(a);this.trigger("annotationHidden",
[a,!1])},xi:function(a){return-1<this.de.indexOf(a)},TB:function(a,c){a.Ch(c);this.trigger("annotationChanged",[[a],"modify"])},Xg:function(a,c){this.Yg([a],c)},Yg:function(a,c){if(a){for(var b=0;b<a.length;++b){var e=a[b];0>=e.PageNumber&&console.warn("Invalid annotation PageNumber: "+e.PageNumber);this.de.push(e);this.uK(e)}this.cC(a);0<a.length&&(b=$.Event("annotationChanged"),b.imported=c,this.trigger(b,[a,"add"]))}},nX:function(a){this.uK(a);if(a.Ci()){var c=this.Ml(a);this.trigger("setNoteText",
[a,c])}else this.trigger("setNoteText",a)},uK:function(a){function c(){return(65536*(1+Math.random())|0).toString(16).substring(1)}a.Id||(a.Id=c()+c()+"-"+c()+"-"+c()+"-"+c()+"-"+c()+c()+c());a.xg&&a.xg(this.u);a.hk()&&a.yb(a.Gb().value)},VN:function(a){var c=this;this.Pc().forEach(function(b){b.InReplyTo&&b.InReplyTo===a.Id&&(a.Ut(b),c.trigger("addReply",[b,a,c.Ml(a)]))})},cC:function(a){function c(a,d){return d.DateCreated-a.DateCreated}var b=[],e;for(e=0;e<a.length;++e){var f=a[e];if(f instanceof
Annotations.Annotation)if(f.Ci()){var n=this.Wj(f.InReplyTo);n&&(n.Ut(f),this.trigger("addReply",[f,n,this.Ml(n)]))}else b.push(f),this.VN(f)}for(e=0;e<b.length;++e)if(a=b[e],0!==a.Yu().length)for(f=[],f.push({Gj:a,dz:null});0<f.length;){var m=f.pop(),n=m.Gj;null!==m.dz&&this.trigger("addReply",[n,m.dz,a]);for(var m=n.Yu().sort(c),r=0;r<m.length;++r)f.push({Gj:m[r],dz:n})}},GW:function(a){if(a.Ci()){var c=this.Wj(a.InReplyTo);c&&(c.Ut(a),this.trigger("addReply",[a,c,this.Ml(a)]))}},Ml:function(a){for(;null!==
a&&a.Ci();)a=this.Wj(a.InReplyTo);return a},hP:function(a,c){var b=new Annotations.lj;b.InReplyTo=a.Id;b.X=a.X;b.Y=a.Y;b.PageNumber=a.PageNumber;b.Author=this.Il();b.Ch(c||"");a.Ut(b);this.Xg(b);this.trigger("addReply",[b,a,this.Ml(a)]);return b},WK:function(a){this.xi(a)&&this.Od(a.Hb())},By:function(a){return Annotations.Rg.By(a,this.u)},FA:function(){var d=this.u.getDocument(),d=d&&d.oA();return this.pJ&&(a.Bi()&&"pdf"===d||"blackbox"===d)},aT:function(){return this.pJ},gQ:function(a){this.pJ=
a},ZS:function(a){var c=this.u.getDocument();return a&&a instanceof Annotations.Dd&&!(c&&"blackbox"===c.oA()&&c.rg())&&this.FA()},eg:function(a,c,b){this.ou([a],c,b)},ou:function(a,c,b){var e=this,f={};if(!c&&this.nH())this.u.trigger("notify","readOnlyDelete");else{var n=[],m=!1;a=a.slice();for(var r=0;r<a.length;r++){var p=a[r];p===this.tk&&(this.tk=null);p.Mw();if(this.xi(p))if(b||c||this.Kd(p)){this.Ug.On(p);this.trigger("annotationSelected",[[p],"deselected"]);var u=this.de.splice(this.de.indexOf(p),
1);n.push(u[0]);p.IsAdded||c||this.az.push(u[0]);p.Ci()&&(p.IH&&(u=this.Ml(p),this.trigger("deleteReply",[p,u])),this.Wj(p.InReplyTo).zP(p));p.Yu().forEach(function(a){e.trigger("setNoteText",[a]);a.InReplyTo=null;e.cC([a])});f[p.Hb()]=!0}else m=!0;else f[p.Hb()]=!0}0<n.length&&(b=$.Event("annotationChanged"),b.imported=c,this.trigger(b,[n,"delete"]));m&&this.u.trigger("notify","permissionDelete");$.each(f,function(a){e.Od(parseInt(a,10))})}},qX:function(){if(!this.readOnly){this.gq=[];for(var a=
this.Ee(),c=0;c<a.length;c++)if(!(a[c]instanceof Annotations.Bb)){var b=this.Ez(a[c]);this.gq.push(b)}this.Qs=0}},uU:function(){if(!this.readOnly&&"undefined"!==typeof this.Qs){this.Qs++;for(var a=[],c=0;c<this.gq.length;c++){var b=this.Ez(this.gq[c]);a.push(b);var e=this.u.Hl(),f=this.u.v.gd(e-1),n=this.u.v.fd(e-1),f=new Annotations.Rect(0,0,f,n),n=b.Sc();b.Hb()===e?n.translate(5*this.Qs,5*this.Qs):b.fK(e);n.Eu(f);b.resize(n)}this.Yg(a);this.gq=a;this.Nd();this.JB(a)}},Ez:function(a){function c(){return(65536*
(1+Math.random())|0).toString(16).substring(1)}var b=this.RR(a);if(null===b)return null;var e=a.wb(),e=this.u.Bc(e),f=e.inverse(),n=document.createElementNS("",a.elementName),n=a.serialize(n,f);a=new b;a.deserialize(n,e,this);a.Id=c()+c()+"-"+c()+"-"+c()+"-"+c()+"-"+c()+c()+c();a.Author=this.lu;a.DateCreated=new Date;a.DateModified=new Date;a.IsAdded=!0;a.IsModified=!1;return a},FQ:function(a){return a.fY()},Pl:function(a){return this.Ug.YE(a)},jm:function(a){a.Listable&&this.xi(a)&&(this.Ug.jm(a),
this.Od(a.Hb()),this.trigger("annotationSelected",[[a],"selected"]))},JB:function(a){var c=[],b={};if(a&&$.isArray(a)){for(var e=0;e<a.length;e++){var f=a[e];f.Listable&&this.xi(f)&&(this.Ug.jm(f),b[f.Hb()]=f.Hb(),c.push(f))}var n=this;$.each(b,function(a){n.Od(parseInt(a,10))})}0<c.length&&this.trigger("annotationSelected",[c,"selected"])},Nd:function(){if(0!==this.Ee().length){this.Ug.Nd();for(var a=this.u.ea.Sd(),c=0;c<a.length;c++)this.Od(a[c]+1);this.trigger("annotationSelected",[null,"deselected"])}},
On:function(a){this.Ug.On(a);this.Od(a.Hb());this.trigger("annotationSelected",[[a],"deselected"])},Ee:function(){return this.Ug.Ee()},Pc:function(){return this.de},Wj:function(a,c){c=c||this.de;if(_.isUndefined(a)||_.isNull(a))return null;for(var b=0;b<c.length;b++)if(c[b].Id===a)return c[b];return null},EG:function(a,c,b){b=b||this.de;if(_.isUndefined(a)||_.isNull(a))return[];for(var e=[],f=0;f<b.length;f++)b[f].Id===a&&e.push(b[f]);return _.isUndefined(c)?e:e.filter(function(a){return a.PageNumber-
1===c})},Iq:function(a){a=this.GG(a);return 0<a.length?a[0]:null},GG:function(a){if(!this.u.Cq)return[];var c=new window.ca.Tool(this.u);a=c.ge({x:c.jg(a).x,y:c.jg(a).y});c=[];if(null!==a)for(var b=this.Pc(),e=new Annotations.Rect(a.x,a.y,a.x,a.y),f=b.length-1;0<=f;f--){var n=b[f];if(n.selectionModel&&n.Vl()&&n.Hb()-1===a.pageIndex){var m=Annotations.Ab.canvasVisibilityPadding,r=n.Sc();r.translate(-m,-m);r.x2+=2*m;r.y2+=2*m;if(window.utils.isRectIntersecting(r,e)||n.IsClickableOutsideRect){var m=
this.u.kb(n.wb()),r=this.u.Bc(n.wb()),p=this.Pl(n),u=new n.selectionModel(n,this.Kd(n),p);u.testSelection(n,a.x,a.y,r,m)?c.push(n):p&&u.Vr(n,m,a.x,a.y)&&c.push(n)}}}return c},QG:function(a,c){return this.Ug.QG(a,c)},Cu:function(a){this.u.$E||console.warn("exportAnnotations was called before all annotations were loaded.");return this.ql.HM(a)},Ku:function(){return this.ql.Ku()},sG:function(a){this.cC(a);this.u.oH().Oi("DocumentViewer.renderRequest",{type:"annotations",pages:_.uniq(a.map(function(a){return a.Hb()-
1}))})},JS:function(a,c){var e=b.Annotations.ba.Yq(a),e=this.ql.PL(e,c&&c.DA);this.sG(e);return e},RH:function(a,c,e){c=c||function(){};var f=this;a=b.Annotations.ba.Yq(a);e=$.extend({Rl:function(){return f.Qn},batchSize:100,batchDelay:0},e);this.ql.QL(a,function(a){f.Qn?c([]):(a=a.Ij,f.sG(a),c(a))},e)},vo:function(a){a=b.Annotations.ba.Yq(a);a=this.ql.vo(a);var c=[];a.Vt&&(c=c.concat(a.Vt),0<a.Vt.length&&this.GW(a.Vt[0]));a.QF&&(c=c.concat(a.QF));a.zI&&(c=c.concat(a.zI));return c},ii:function(a){a=
_.uniq(a.map(function(a){return a.PageNumber}));for(var c=[],b=0;b<a.length;b++)c.push(this.Od(a[b],void 0,!0));return Promise.all(c)},bd:function(){this.Pc().forEach(function(a){a.off();a.zb&&a.zb.off();a.innerElement&&a.innerElement.off();a.element&&a.element.off()});this.init();this.Qn=!0;this.dh.bd();return Promise.resolve()},NU:function(a,c){if("string"!==typeof a||!c)return!1;"undefined"===typeof this.Hj[a]&&(this.Hj[a]=[]);this.Hj[a].push(c);return!0},CP:function(a,c){if("string"!==typeof a||
!c)return!1;this.Hj[a]=$.grep(this.Hj[a],function(a){return a!==c});return!0},SR:function(){return this.Hj},RR:function(a){if(!a||!a.elementName)return null;var c=this.Hj[a.elementName];if(c&&0<c.length)for(var b=0;b<c.length;b++){var e=c[b];if(a instanceof e)return e}return null},BT:function(a){var c=this.nu[a];if(c){var b=c.length;a=this.u.Bc(a);for(var e=[],f=0;f<b;++f){var n=c[f].Gj,m=c[f].data;n.isImporting=!0;n.deserialize(m,a,this);n.isImporting=!1;n.IsAdded=!1;n.IsModified=!1;e.push(n)}this.Yg(e,
!0);this.ii(e)}},Nz:function(){return this.KD},yV:function(a,c){var b="StrokeColor TextColor FillColor FontSize Opacity StrokeThickness Precision Scale".split(" ").reduce(function(c,b){if(a[b]||0===a[b])c[b]=a[b];return c},{}),e=c(b);e&&(Object.keys(e).forEach(function(c){a[c]=e[c]}),this.WK(a),this.trigger("annotationChanged",[[a],"modify"]))},UJ:function(a){this.XE=a},VQ:function(a){return this.XE(a)}};$.extend(a.ia.prototype,b.utils.eventHandler);c.prototype={jm:function(a){this.YE(a)||this.lm.push(a)},
On:function(a){this.lm=$.grep(this.lm,function(c){return c!==a})},Nd:function(){this.lm=[]},YE:function(a){for(var c=0;c<this.lm.length;c++)if(a===this.lm[c])return!0;return!1},Ee:function(){return this.lm.slice()}};e.prototype={disable:function(){this.Lc.off("annotationChanged.editbox");this.Lc.off("annotationDoubleClicked.editbox")},GH:function(a){return a instanceof Annotations.Ia},UH:function(a){var c=this.Lc,b=this;a.zb=$('<textarea class="freetext">');this.currentAnnotation=a;a.zb.on("focus input",
function(){a.dF&&b.yO(a)});a.zb.on("blur",function(){b.Zq=!1;a.jh()!==Annotations.Ia.Intent.FreeTextCallout&&b.aV(a);a.zb.hide();c.TB(a,a.zb.val());c.ii([a]);setTimeout(function(){c.jm(a)},0)});a.zb.on("touchstart touchmove touchend mousedown mousemove mouseup",function(a){a.stopPropagation()})},yO:function(a){var c=a.wb(),b=this.Lc.u.gd(c),e=this.Lc.u.fd(c),f=this.Lc.u.kb(c),c=a.zb[0];c.style.width=0;c.style.overflow="hidden";c.style.whiteSpace="nowrap";var n=c.scrollWidth+2,m=this.tR(a,f,b,e);n>=
m&&(c.style.whiteSpace="normal",n=m);c.style.width=n+"px";c.style.height=0;n=c.scrollHeight+1;a=this.sR(a,f,b,e);n>=a&&(c.style.overflow="auto",n=a);c.style.height=n+"px"},tR:function(a,c,b,e){switch(a.Rotation){case 90:a=this.Eh*c;break;case 180:a=this.Dh*c;break;case 270:a=(e-this.Eh)*c;break;default:a=(b-this.Dh)*c}return a},sR:function(a,c,b,e){switch(a.Rotation){case 90:a=(b-this.Dh)*c;break;case 180:a=this.Eh*c;break;case 270:a=this.Dh*c;break;default:a=(e-this.Eh)*c}return a},aV:function(a){var c=
a.getRectPadding(),b=a.wb(),e=a.ck(),f=a.dk(),n=parseFloat(a.zb[0].style.width),m=parseFloat(a.zb[0].style.height),b=this.Lc.u.kb(b),n=n/b,m=m/b;switch(a.Rotation){case 90:b=n;n=m;m=b;f=this.Eh-m;break;case 180:e=this.Dh-n;f=this.Eh-m;break;case 270:b=n,n=m,m=b,e=this.Dh-n}a.sK(e);a.tK(f);a.aC(n);a.To(m);a.rm(new Annotations.Rect(c,c,c,c));this.Lc.ii([a])},xG:function(a){var c=a.wb(),e=b.o.Aa.sA(c);e.append(a.zb);a.zb.val(a.eh()||"");0<e.length&&(this.Zq=!0,a.Ch(""));var f=this.Lc.u.Bc(c),e=Annotations.ja.lq(f,
parseFloat(a.FontSize)||12),l=a.Sz(),c=this.Lc.u.kb(c),e=e*c*.75+l,f=a.$n(f)*c,l=Math.ceil(1.598*parseFloat(e)),n=a.getPath().slice(-2),m=n[0].x*c,r=Math.min(n[0].y,n[1].y)*c,p=Math.abs(n[1].x-n[0].x)*c,n=Math.abs(n[1].y-n[0].y)*c,u=360-a.Rotation;if(90===u||270===u)var q=p,p=n,n=q;var q=0,v=-l/2+.66*parseFloat(e);switch((360-u)%360){case 90:q=-1.5*c;v+=p+1.7*c;break;case 180:q+=p+.1*c;v+=n+2.7*c;break;case 270:q+=n+1.5*c,v=0}q="translate("+q+"px,"+v+"px) rotate("+u+"deg)";u=Math.abs(u%360/90);u===
b.o.Sa.ki?(m+=f,r+=f):u===b.o.Sa.Xe?(m-=f,r+=f):u===b.o.Sa.zq?(m-=f,r-=f):u===b.o.Sa.fg&&(m+=f,r-=f);u=1>a.FillColor.A?new Annotations.Color(255,255,255,0):a.FillColor;a.zb.css({top:r,left:m,width:p-2*f,height:n-2*f,font:e+" "+a.Font,color:a.TextColor.toString(),background:u.toString(),transform:q,"transform-origin":"top left","line-height":b.utils.ie?1:l+"px","padding-top":b.utils.ie?Math.max(1,1+1.5*(c-1)):0});this.Lc.ii([a]);this.Lc.On(a);this.WW(a,c);this.MW(a)},WW:function(a,c){this.Dh=a.ck();
this.Eh=a.dk();var b=parseFloat(a.zb[0].style.width)/c,e=parseFloat(a.zb[0].style.height)/c;switch(a.Rotation){case 90:this.Eh+=b;break;case 180:this.Dh+=b;this.Eh+=e;break;case 270:this.Dh+=e}},MW:function(a){a.zb.show().focus()}}})(window);
(function(b){b.ae={yI:function(b,e,c,a){return null===b||null===e||null===c||null===a?null:{x1:b,y1:e,x2:b+c,y2:e+a}},L_:function(b,e){if(!e||!b)return!1;var c,a;"undefined"!==typeof e.x1&&"undefined"!==typeof e.y1&&"undefined"!==typeof e.x2&&"undefined"!==typeof e.y2||console.warn("rect points are undefined");c=b.x>=e.x1&&b.x<=e.x2;a=b.y>=e.y1&&b.y<=e.y2;return c&&a},KU:function(b,e){return b&&e?b.x1<=e.x2&&b.x2>=e.x1&&b.y1<=e.y2&&b.y2>=e.y1?!0:!1:!1},F_:function(b,e,c,a,d){b=d.W(new XODText.Cd(b,
e));c=d.W(new XODText.Cd(c,a));return{x:Math.min(b.x,c.x),y:Math.min(b.y,c.y),w:Math.abs(b.x-c.x),Df:Math.abs(b.y-c.y)}},Math:{xT:function(b,e,c,a){function d(a,c,d){return(d.y-a.y)*(c.x-a.x)>(c.y-a.y)*(d.x-a.x)}return d(b,c,a)!==d(e,c,a)&&d(b,e,c)!==d(b,e,a)},CQ:function(b,e){var c=Math.atan(Math.abs(b.y-e.y)/Math.abs(b.x-e.x));e.x<b.x&&e.y>b.y?c=Math.PI-c:e.x<=b.x&&e.y<b.y?(c=Math.PI-c,c*=-1):e.x>=b.x&&e.y<b.y&&(c*=-1);0===c&&b.x>e.x&&(c=Math.PI);return c},gV:function(b,e,c){c=c||{x:0,y:0};var a=
b.x-c.x;b=b.y-c.y;return{x:Math.cos(e)*a-Math.sin(e)*b+c.x,y:Math.sin(e)*a+Math.cos(e)*b+c.y}},oF:function(b,e,c){c=void 0!==c?c:Infinity;e=void 0!==e?e:-Infinity;return Math.max(Math.min(b,c),e)},DQ:function(b,e){return Math.atan2(e,b)},LR:function(b){if(!(3>b.length)){for(var e=b[0],c=0,a=1;a<b.length;a++)var d=b[a],c=c+(d.x-e.x)*(d.y+e.y),e=d;return 0<=c?1:-1}},aP:function(b){for(var e=[],c=0;c<b.length;c++)e.push({x:b[c].x,y:b[c].y});return e},cJ:function(b){if(1>b.length)return!1;var e=Math.abs(b[b.length-
1].y-b[0].y);return 1.2358E-4<Math.abs(b[b.length-1].x-b[0].x)||1.2358E-4<e?!0:!1},rotationMatrix:function(b){var e=Math.cos(b);b=Math.sin(b);return{m_a:e,m_b:-b,m_c:b,m_d:e,m_h:0,m_v:0}},translate:function(b,e,c){b.m_h+=e;b.m_v+=c;return b},W:function(b,e,c){return{x:e*b.m_a+c*b.m_c+b.m_h,y:e*b.m_b+c*b.m_d+b.m_v}},tO:function(b,e,c,a,d,g,k,h,l,n,m){0>d&&(d=-d);0>g&&(g=-g);var r=(b-n)/2,p=(e-m)/2,u=Math.cos(k),q=Math.sin(k),v=u*r+q*p,r=-q*r+u*p,p=d*d,w=g*g,A=v*v,B=r*r,z=A/p+B/w;1<z&&(d*=Math.sqrt(z),
g*=Math.sqrt(z),p=d*d,w=g*g);if(z=p*B+w*A){p=(p*w-p*B-w*A)/z;h=(h===l?-1:1)*Math.sqrt(0>p?0:p);w=d*r/g*h;A=h*-(g*v/d);h=(b+n)/2+(u*w-q*A);u=(e+m)/2+(q*w+u*A);q=(v-w)/d;p=(r-A)/g;w=(-v-w)/d;r=(-r-A)/g;A=Math.sqrt(q*q+p*p);v=(0>p?-1:1)*Math.acos(q/A);A=Math.sqrt((q*q+p*p)*(w*w+r*r));p=(0>q*r-p*w?-1:1)*Math.acos(Math.max(Math.min((q*w+p*r)/A,1),-1));!l&&0<p?p-=2*Math.PI:l&&0>p&&(p+=2*Math.PI);r=[];q=!1;if(1E-9>Math.abs(p))l=4,q=!0,r[0]=d*Math.cos(v),r[1]=g*Math.sin(v),r[2]=d*Math.cos(v+p),r[3]=g*Math.sin(v+
p);else{w=0;l=2;B=!1;do{0>p?(z=w,A=.5*-Math.PI,w-=.5*Math.PI,w<=p+.01&&(A=p-z,B=!0)):(z=w,A=.5*Math.PI,w+=.5*Math.PI,w>=p-.01&&(A=p-z,B=!0));var x=Math.cos(A/2),y=Math.sin(A/2),F=4*(1-x)/3,K=y-F*x/y,z=[],G=[];z[0]=x;G[0]=-y;z[1]=x+F;G[1]=-K;z[2]=x+F;G[2]=K;z[3]=x;G[3]=y;x=Math.sin(v+A/2);y=Math.cos(v+A/2);for(F=0;4>F;F++)r[l-2+2*F]=d*(z[F]*y-G[F]*x),r[l-1+2*F]=g*(z[F]*x+G[F]*y);l+=6;v+=A}while(!B&&26>l)}d=this.rotationMatrix(-k);this.translate(d,h,u);for(g=2;g<l-2;g+=2)k=void 0===r[g]?this.W(d,0,
0):this.W(d,r[g],r[g+1]),r[g]=k.x,r[g+1]=k.y;r[0]=b;r[1]=e;2<l&&(r[l-2]=n,r[l-1]=m);if(q)a.push("l"),a.push("l"),c.push(r[0]),c.push(r[1]),c.push(r[2]),c.push(r[3]);else for(a.push("l"),c.push(r[0]),c.push(r[1]),b=2;b<l;b+=6)a.push("c"),c.push(r[b]),c.push(r[b+1]),c.push(r[b+2]),c.push(r[b+3]),c.push(r[b+4]),c.push(r[b+5])}},pP:function(b,e){return b.x*e.y-b.y*e.x},x_:function(b){return 1E4*(b+2*Math.PI)%2*Math.PI*1E4/1E4}}}})(window);
(function(b){function f(a){if(!a)throw Error("XfdfManager requires AnnotationManager to initialize");this.Zb=a;this.Hi=null}function e(a,c){this.yC=a;this.Au=c||function(){return!0}}String.prototype.trim||function(){var a=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(a,"")}}();e.prototype.Ar=function(a,b,e){a=this.yC;a.writeStartElement("field");a.writeAttributeString("name",c.escape(b));b=e.value;_.isNull(b)||(a.writeStartElement("value"),a.writeString(c.escape(b)),
a.writeEndElement());a.writeEndElement()};e.prototype.Ov=function(a,b,e){a=c.escape(b);b=this.yC;e.value&&(b.writeStartElement("field"),b.writeAttributeString("name",a),b.writeStartElement("value"),b.writeString(c.escape(e.value)),b.writeEndElement(),b.writeEndElement());b.writeStartElement("field");b.writeAttributeString("name",a)};e.prototype.dB=function(){this.yC.writeEndElement()};f.prototype={eF:function(a){return a&&0<a.getElementsByTagName("annots").length?(c.UG(a,"link"),c.UG(a,"widget"),
a.getElementsByTagName("annots")[0].childNodes):[]},Oz:function(a){return a?a.querySelector("xfdf > fields"):null},gH:function(a){return a&&(a=a.getElementsByTagName("pdf-info"),0<a.length)?a[0]:null},NE:function(a,c,e){var f=this;b.kf.parse(new b.Re(a),function(a){return f.Zb.u.Bc(a-1)},function(a){var b=f.Zb,e=b.dh,g=b.u;if(g.getDocument()){e.BV(a.calculationOrder);var r=a.fields;Object.keys(r).forEach(function(a){var c=r[a],b=e.Wu(c.name);c.Ke(b.Va(),!0);e.Rt(r[a],!0)});b.Yg(a.widgets,!0);b.Yg(a.custom,
!0);g=g.getDocument();g.Pt(a.documentActions);for(var b=a.pages,g=g.Pb(),p=0;p<b.length;++p){var u=b[p],q=Number(u.number);0<q&&q<g.length+1?g[q-1].Pt(u.actions):console.warn("Invalid page number on PDFInfo page:",q)}c(a)}},e)},PL:function(a,c){function e(){var c=f.gH(a);c&&f.NE(c,function(a){h=a.widgets;h=h.concat(a.custom)},!0)}var f=this,h=[],l=this.eF(a),n=this.Oz(a);n?this.vy(new b.Re(n),e,!0):e();return null!==l?h.concat(this.Yw(l,!0,c)):h},QL:function(a,c,e){function f(){var b=h.gH(a);b?h.NE(b,
function(a){h.LE(l,function(b){b.Ij=b.Ij.concat(a.widgets);b.Ij=b.Ij.concat(a.custom);c(b)},e)}):h.LE(l,function(){c.apply(this,arguments)},e)}var h=this,l=this.eF(a),n=this.Oz(a);n?this.vy(new b.Re(n),f,!1):f()},vo:function(a){var c={};if(a){var e=this.Oz(a);e&&this.vy(new b.Re(e),function(){},!0);var e=a.getElementsByTagName("add"),f=a.getElementsByTagName("modify");a=a.getElementsByTagName("delete");0<e.length&&(c.Vt=this.Yw(e[0].childNodes,!0));0<a.length&&(c.QF=this.xL(a[0]));0<f.length&&(c.zI=
this.VL(f[0].childNodes))}return c},xL:function(a){var c=[];a=a.getElementsByTagName("id");for(var b=0;b<a.length;++b){var e=this.Zb.Wj(a[b].textContent);e&&(c.push(e),this.Zb.eg(e,!0))}return c},VL:function(a){return this.Yw(a,!0)},Yw:function(a,c,b){var e=[];this.KE(a,e,0,a.length,c,b);return e},Xg:function(a,c,b,e,f){var l=this.Zb,n=null,m=!1,r=l.Hj[a];if(r){var p=c.getAttribute("page"),p=parseInt(p,10),u;p<l.u.vb()&&(u=l.u.Bc(p));for(var q=0;q<r.length;q++)if(r[q].prototype.Zh(c)){n=null;if(b){b=
c.getAttribute("name");var v=parseInt(c.getAttribute("page"),10),n=this.Zb.EG(b,v)[0];if(!n&&this.Zb.EG(b,v,e)[0])break}if(!n){var w;"widget"===a&&(a=c.getAttribute("title"),w=l.dh.Wu(a));n=new r[q](w);m=!0}try{if(u)n.isImporting=!0,n.deserialize(c,u,l),n.isImporting=!1;else return l.nu[p]||(l.nu[p]=[]),l.nu[p].push({data:c,Gj:n}),{Gj:null,vK:!1};n.LV(f)}catch(A){console.warn("Error parsing annotation",A);m=!1;n=null;break}m||l.nX(n);n.IsAdded=!1;n.IsModified=!1;break}}else console.warn("Unsupported annotation type.",
a);return{Gj:n,vK:m}},KE:function(a,b,e,f,h,l){for(var n=[],m=[];e<f;++e)if(a[e].nodeType===Node.ELEMENT_NODE){var r=this.Xg(c.Su(a[e]),a[e],h,b,l),p=r.Gj;p&&(b.push(p),r.vK?n.push(p):m.push(p))}0<n.length&&(this.Zb.Yg(n,!0),n.forEach(function(a){a.IsAdded=!1;a.IsModified=!1}));0<m.length&&(a=$.Event("annotationChanged"),a.imported=!0,this.Zb.trigger(a,[m,"modify"]))},vy:function(a,c,e){function f(c){var b=a.K("name");if(!b)return console.warn("Invalid field name part:",b,a.current),null;c=c?c+"."+
b:b;var b={name:c},d=[b],e=null;for(a.oa();a.advance();){var g=a.ua();switch(g){case "value":_.isNull(e)?e=a.current.textContent:(_.isArray(e)||(e=[e]),e.push(a.current.textContent));break;case "field":(g=f(c))&&0<g.length&&(d=d.concat(g));break;default:console.warn("unknown field child node: ",g)}}a.Ba();_.isNull(e)||(b.value=e);return d}var h=this.Zb.dh;a.oa();a.advance()?b.busyLoop(function(){"field"===a.ua()&&f("").forEach(function(a){h.Rt(a,!0)});var c=a.advance();c||a.Ba();return c},c,e):c()},
WI:function(a){var c=[];$(a).each(function(a,b){c.push(b.textContent.trim())});return c},LE:function(a,c,b){function e(){if(b.Rl())c({Ij:[]});else{f.KE(a,r,l,Math.min(l+m,a.length),!0,b.DA);if(l>n){n+=1E3;for(var p=f.Zb.u.$j().Sd(),u=0;u<p.length;u++)f.Zb.Od(p[u]+1)}setTimeout(function(){l+=m;l<a.length?e():c({Ij:r})},b.batchDelay)}}var f=this,l=0,n=1E3,m=2*b.batchSize,r=[];e()},Gs:function(a,c,b){var e=this.Zb.u.Bc(a.Hb()-1).inverse(),f=document.createElementNS("",a.elementName);a.serialize(f,e,
b);a=new XMLSerializer;f.pG&&this.Hi.push(f.pG);f=a.serializeToString(f);c.writeString(f)},DM:function(a){var c=this.Zb,e=c.ee(),f=c.u,h=f.getDocument(),l=[];e.cs({Ar:function(a,c,b){void 0!==b.type&&l.push(b)},Ov:function(a,c,b){void 0!==b.type&&l.push(b)}});var n=h.Pb().map(function(a,c){return{number:c+1,actions:a.Vj()}}).filter(function(a){return 0<Object.keys(a.actions).length});b.kf.write(a,{calculationOrder:e.Fy,widgets:c.Pc().filter(function(a){return a.hk()}),fields:l,documentActions:h.Vj(),
pages:n},function(a){return 1>a?(console.warn("Invalid page number:",a),a=new XODText.Matrix2D,a.initMatrix(1,0,0,1,0,0),a):f.Bc(a-1)})},HM:function(a){var b=this;a=a||{};var e=new XMLWriter("UTF-8","1.0");e.formatting="none";this.Hi=[];var f,h,l;a.annotList?(f=a.fields||!1,h=a.widgets||!1,l=a.links||!1):(f=!1!==a.fields,h=!1!==a.widgets,l=!1!==a.links);e.writeStartDocument();e.writeStartElement("xfdf");e.writeAttributeString("xmlns","http://ns.adobe.com/xfdf/");e.writeAttributeString("xml:space",
"preserve");h&&this.DM(e);f&&this.AM(e);e.writeStartElement("annots");f=this.Zb;a=a.annotList||f.Pc();for(var n=0;n<a.length;++n)f=a[n],f instanceof Annotations.rd?l&&this.Gs(f,e,!0):f instanceof Annotations.WidgetAnnotation||this.Gs(f,e,!0);e.writeEndElement();e.writeEndElement();this.EM(e);e=e.flush();n=0;this.Hi.length&&(e=e.replace(c.CJ,function(){return b.Hi[n++]}));this.Hi=null;return e},EM:function(a){var c=this.Zb;a.writeStartElement("pages");var b=c.u.getDocument().Pb();if(b){var e=c.u.Bc(0);
a.writeStartElement("defmtx");a.writeAttributeString("matrix",""+(e.m_a+","+e.m_b+","+e.m_c+","+e.m_d+","+e.m_h+","+e.m_v));a.writeEndElement();for(var f=1;f<b.length;++f){var l=c.u.Bc(f);if(!l.lG(e)){a.writeStartElement("pgmtx");var n="",n=n+(l.m_a+","+l.m_b+","+l.m_c+","+l.m_d+","+l.m_h+","+l.m_v);a.writeAttributeString("matrix",n);a.writeAttributeString("page",f.toString());a.writeEndElement()}}}a.writeEndElement()},yM:function(a){a.writeStartElement("add");for(var c=this.Zb.Pc(),b=0;b<c.length;++b){var e=
c[b];e.IsAdded&&(this.Gs(e,a),e.IsAdded=!1)}a.writeEndElement()},CM:function(a){a.writeStartElement("modify");for(var c=this.Zb,b=c.Pc(),e=0;e<b.length;++e){var f=b[e];f.IsModified&&c.Kd(f)&&(this.Gs(f,a),f.IsModified=!1)}a.writeEndElement()},zM:function(a){a.writeStartElement("delete");for(var c=this.Zb,b=this.GL(),e=0;e<b.length;++e)a.writeStartElement("id"),a.writeAttributeString("page",b[e].Jb),a.writeString(b[e].id),a.writeEndElement();c.az.length=0;a.writeEndElement()},AM:function(a){a.writeStartElement("fields");
this.Zb.dh.cs(new e(a));a.writeEndElement()},BM:function(a){a.writeStartElement("fields");var c=[];this.Zb.dh.cs(new e(a,function(a){c.push(a);return a.IsModified}));c.forEach(function(a){a.IsModified=!1});a.writeEndElement()},FM:function(a){var c=new XMLWriter("UTF-8","1.0");c.writeStartDocument();c.writeStartElement("xfdf");c.writeAttributeString("xmlns","http://ns.adobe.com/xfdf/");c.writeAttributeString("xml:space","preserve");c.writeStartElement("fields");var g=new b.Annotations.O.fj;a.forEach(function(a){g.Rt(a)});
g.cs(new e(c));c.writeEndElement();c.writeEndElement();a=c.flush();return a=a.replace(/\t/g,"")},GM:function(a){for(var c=[],b=0;b<a.length;++b){var e=a[b];_.isUndefined(e.name)||c.push(e.name+"="+encodeURIComponent(e.value))}return c.join("&")},Ku:function(){var a=this;this.Hi=[];var b=new XMLWriter("UTF-8","1.0");b.writeStartDocument();b.writeStartElement("xfdf");b.writeAttributeString("xmlns","http://ns.adobe.com/xfdf/");b.writeAttributeString("xml:space","preserve");this.BM(b);this.yM(b);this.CM(b);
this.zM(b);b.writeEndElement();var b=b.flush(),b=b.replace(/\t/g,""),e=0;this.Hi.length&&(b=b.replace(c.CJ,function(){return a.Hi[e++]}));this.Hi=null;return b},GL:function(){return _.map(this.Zb.az,function(a){return{id:a.Id,Jb:a.wb()}})}};b.o.TM=f;var c={CJ:/<replace-element-please ?\/>|<replace-element-please><\/replace-element-please>/g,TU:"replace-element-please",Yq:function(a){if("string"===typeof a){for(var c=(new DOMParser).parseFromString(a,"text/xml"),b=c.getElementsByTagName("contents-richtext"),
e=0,f=0;0<(e=a.indexOf("<contents-richtext>",e));++f)if(f<b.length){var l=a.indexOf("</contents-richtext>",e);b[f].jU=a.substring(e+19,l);e=l}else{console.warn("contents-richtext: More elements found by searching!");break}f<b.length&&console.warn("contents-richtext More elements found by getElementsByTagName!");return c}return a},nC:function(a){var c;c="D:"+a.getFullYear().toString();c+=this.be((a.getMonth()+1).toString());c+=this.be(a.getDate().toString());c+=this.be(a.getHours().toString());c+=
this.be(a.getMinutes().toString());c+=this.be(a.getSeconds().toString());a=a.getTimezoneOffset();0===a?c+="Z00'00'":(0>a?(c+="+",a*=-1):c+="-",c+=this.be(parseInt(a/60,10).toString())+"'",c+=this.be((a%60).toString())+"'");return c},toDateString:function(a){return a.getFullYear().toString()+"-"+this.be((a.getMonth()+1).toString())+"-"+this.be(a.getDate().toString())+" "+this.be(a.getHours().toString())+":"+this.be(a.getMinutes().toString())+":"+this.be(a.getSeconds().toString())},be:function(a){return 2>
a.length?"0"+a:a},escape:function(a){a&&(a=_.escape(a),a=a.replace(/(?:\r\n|\r|\n)/g,"&#xA;"));return a},toFixed:function(a,c){_.isUndefined(c)&&(c=2);return parseFloat(a.toFixed(c)).toString()},getAttribute:function(a,c){return a.getAttribute(c)||a.getAttribute(c.toLowerCase())},Su:function(a){return a.localName||a.baseName||a.nodeName},UG:function(a,c){var b=[],e=a.getElementsByTagName(c);if(0===e.length)return b;for(var f=0;f<e.length;++f){var l=e[f].outerHTML||e[f].xml;if(_.isUndefined(l)||0!==
l.indexOf("<"+c+" "))l=(new XMLSerializer).serializeToString(e[f]);0>l.indexOf("</"+c+">")&&"/"!==l.charAt(l.length-2)&&(l=l.slice(0,l.length-1)+"/"+l.slice(l.length-1));b.push(l)}return b},XZ:function(a){return c.getAttribute(a,"ActionType")?!0:0<a.getElementsByTagName("OnActivation").length},AQ:function(a){return c.getAttribute(a,"ActionType")?[a]:a.getElementsByTagName("Action")},BQ:function(a){if(!a)return null;var b=c.getAttribute(a,"ActionType");return b?b:(a=c.Pz(a))?c.Su(a):null},Pz:function(a){a=
_.filter(a.childNodes,function(a){return 1===a.nodeType});return 0<a.length?a[0]:null},ao:function(a,b,e){b=c.getAttribute(a,b);_.isNull(b)&&(b=a.getElementsByTagName(e),b=0<b.length?b[0].textContent:null);return b},dZ:function(a,c,b){b=b.W({x:_.isNull(a)?0:parseFloat(a),y:_.isNull(c)?0:parseFloat(c)});return{x:_.isNull(a)?null:b.x,y:_.isNull(c)?null:b.y}},DZ:function(a,c,b){a=a.split(";");for(var e=[],f=0;f<a.length;++f){var l=a[f].split(","),l=new XODText.Cd(l[0],l[1]),l=new Annotations.Point(l.x,
l.y);c.W(l);"function"===typeof b&&b(l);e.push(l)}return e},vw:function(a,b,e){if("undefined"===typeof e||null===e)e=",";if(!(a instanceof Annotations.Point))return null;a=new Annotations.Point(a.x,a.y);b&&b.W(a);return c.toFixed(a.x)+e+c.toFixed(a.y)},SF:function(a,c,b){if("undefined"===typeof b||null===b)b=",";if("string"!==typeof a)return null;a=a.split(b);b=null;2===a.length?(b=new Annotations.Point(parseFloat(a[0]),parseFloat(a[1])),c&&c.W(b)):console.warn("Invalid serialized string format.");
return b},Ro:function(a,b,e,f){if("undefined"===typeof f||null===f)f=";";if("undefined"===typeof e||null===e)e=",";for(var h="",l=0;l<a.length;l++){var n=new Annotations.Point(a[l].x,a[l].y);b&&b.W(n);h+=c.toFixed(n.x)+e;h+=c.toFixed(n.y)+f}return h.substring(0,h.length-1)},yl:function(a,c,b,e){var f=[];if("undefined"===typeof e||null===e)e=";";if("undefined"===typeof b||null===b)b=",";if(!a)return f;var l;a=a.split(e);if(e===b)for(e=0;e+1<a.length;e+=2)l=new Annotations.Point(a[e],a[e+1]),c&&c.W(l),
f.push(l);else for(e=0;e<a.length;++e)l=a[e].split(b),l=new Annotations.Point(l[0],l[1]),c&&c.W(l),f.push(l);return f},NB:function(a,b,e){if("undefined"===typeof e||null===e)e=",";var f=new Annotations.Point(a.x1,a.y1);a=new Annotations.Point(a.x2,a.y2);b.W(f);b.W(a);return c.toFixed(f.x,6)+e+c.toFixed(f.y,6)+e+c.toFixed(a.x,6)+e+c.toFixed(a.y,6)},qu:function(a,c,b){if("undefined"===typeof b||null===b)b=",";b=a.split(b);a=new Annotations.Point(b[0],b[1]);b=new Annotations.Point(b[2],b[3]);c&&(c.W(a),
c.W(b));return new Annotations.Rect(a.x,a.y,b.x,b.y)},LB:function(a,b,e){var f=new XODText.Matrix2D;f.initMatrix(b);f.m_d*=-1;f.m_h=0;f.m_v=0;return c.NB(a,f,e)},RF:function(a,b,e){var f=new XODText.Matrix2D;f.initMatrix(b);f.m_d*=-1;f.m_h=0;f.m_v=0;return c.qu(a,f,e)},U_:function(a,b){for(var e="",f=0;f<a.length;f++){var h=a[f],h=new Annotations.Point(h.x,h.y);b.inverse().W(h);e+=c.toFixed(h.x)+",";e+=c.toFixed(h.y)+";"}return e.substring(0,e.length-1)},EZ:function(a,c){var b=a.split(","),e=new Annotations.Point(b[0],
b[1]),b=new Annotations.Point(b[2],b[3]);"undefined"!==typeof c&&(c.W(e),c.W(b));return new Annotations.Rect(e.x,e.y,b.x,b.y)},V_:function(a,b){var e=new Annotations.Point(a.x1,a.y1),f=new Annotations.Point(a.x2,a.y2),h=b.inverse();h.W(e);h.W(f);return c.toFixed(e.x)+","+c.toFixed(e.y)+","+c.toFixed(f.x)+","+c.toFixed(f.y)},wg:function(a){if("undefined"===typeof a||null===a||!(a instanceof Annotations.Color)||0===a.A)return null;var c=a.R.toString(16).toUpperCase();2>c.length&&(c="0"+c);var b=a.G.toString(16).toUpperCase();
2>b.length&&(b="0"+b);a=a.B.toString(16).toUpperCase();2>a.length&&(a="0"+a);return"#"+c+b+a},Rj:function(a){return(new RegExp(/^#[0-9a-f]{6}$/i)).test(a)?new Annotations.Color(parseInt(a.substr(1,2),16),parseInt(a.substr(3,2),16),parseInt(a.substr(5,2),16)):null},bz:function(a){if(a){var c=new Date(Date.UTC(parseInt(a.substring(2,6),10),parseInt(a.substring(6,8),10)-1,parseInt(a.substring(8,10),10),parseInt(a.substring(10,12),10),parseInt(a.substring(12,14),10),parseInt(a.substring(14,16),10),0));
a=a.substring(16);if(7===a.length){var b=a.substring(0,1);if("Z"!==b){var b="-"===b?1:-1,e=parseInt(a.substring(4,6),10);c.setUTCHours(c.getUTCHours()+b*parseInt(a.substring(1,3),10));c.setUTCMinutes(c.getUTCMinutes()+b*e)}}return c}},LG:function(a,b,e){a="#"+c.be(a.toString(16));a+=c.be(b.toString(16));return a+=c.be(e.toString(16))},qV:function(a,c){return"/"+a+" "+c+" Tf"},pV:function(a){return"font: "+a.Font+" "+a.Rz()+"pt; text-align: "+a.TextAlign+"; color: "+c.wg(a.TextColor)},T_:function(a){return"font-family: "+
a.Font+"; font-size: "+a.Rz()+"pt; text-align: "+a.TextAlign+"; color: "+c.wg(a.TextColor)},wP:["Tf","rg"],XI:function(a){var b={qe:a};if(!_.isNull(a))for(a=a.split(" ");0<a.length;){var e=a.pop();if(-1!==c.wP.indexOf(e))switch(e){case "Tf":var e=a.pop(),f=a.pop().slice(1);b.font={size:e+"pt",name:c.Cr(f),O_:f};break;case "rg":var e=parseInt(255*a.pop(),10),f=parseInt(255*a.pop(),10),h=parseInt(255*a.pop(),10);b.color=c.LG(h,f,e)}}return b},tZ:function(a){if(4===a.length)return{r:parseInt(a.charAt(1),
16)/16,g:parseInt(a.charAt(2),16)/16,b:parseInt(a.charAt(3),16)/16};if(7===a.length)return{r:parseInt(a.slice(1,3),16)/255,g:parseInt(a.slice(3,5),16)/255,b:parseInt(a.slice(5,7),16)/255}},pU:function(a){var b={};_.isNull(a)||a.split(";").forEach(function(a){var e=a.split(":");if(!(2>e.length))switch(a=e[0].trim(),e=e[1].trim(),a){case "text-align":b.textAlign=e;break;case "color":e.startsWith("rgb")?(a=/rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)/.exec(e),null!==a&&(b.color=c.LG(parseInt(a[1],10),parseInt(a[2],
10),parseInt(a[3],10)))):b.color=e;break;case "font":a=e.split(" "),b.font={name:c.Cr(a[0]),size:a[1]}}});return b},Cr:function(a){function c(b,d){var e=a;0===e.indexOf(b)&&(e=d);return e}a=c("Arial","Arial");a=c("Courier","Courier");a=c("Helv","Arial");return a=c("Times","Times New Roman")},ZI:function(a){return 0<a.indexOf("Bold")?"bold":"normal"},YI:function(a){return 0<a.indexOf("Italic")||0<a.indexOf("Oblique")?"italic":"normal"},EP:function(a){var c=[];a=a.split(";");for(var b=0;b<a.length;++b){var e=
a[b].split(",");2===e.length&&0<e[0].length&&0<e[1].length&&c.push(e)}return c},sV:function(a){for(var c="",b=0;b<a.length;b++)c+=a[b][0]+",",c+=a[b][1]+";";return c.substring(0,c.length-1)},rV:function(a){for(var c=[],b=0;b<a.length;b++){var e=[];e.push(this.escape(a[b][0]));e.push(this.escape(a[b][1]));c.push(e)}return c},vk:function(a,c,b){_.isUndefined(b)||_.isNull(b)||(a[c]=b)},dK:function(a,c,b){_.isUndefined(b)||_.isNull(b)||(a[c]=Number(b))},Ya:function(a,c,b){_.isUndefined(b)||_.isNull(b)||
a.setAttribute(c,b)},uw:function(a){var c=this,b=document.createElementNS("","measure");this.Ya(b,"scale",a.scale);var e=document.createElementNS("","axis");a.axis.forEach(function(a){e.appendChild(c.MB(a))});var f=document.createElementNS("","distance");a.distance.forEach(function(a){f.appendChild(c.MB(a))});var l=document.createElementNS("","area");a.area.forEach(function(a){l.appendChild(c.MB(a))});b.appendChild(e);b.appendChild(f);b.appendChild(l);return b},pu:function(a){var c,b,e={};this.vk(e,
"scale",a.getAttribute("scale"));e.axis=[];c=a.querySelector("axis").querySelectorAll("numberformat");for(b=0;b<c.length;b++)e.axis.push(this.cz(c[b]));e.distance=[];c=a.querySelector("distance").querySelectorAll("numberformat");for(b=0;b<c.length;b++)e.distance.push(this.cz(c[b]));e.area=[];c=a.querySelector("area").querySelectorAll("numberformat");for(b=0;b<c.length;b++)e.area.push(this.cz(c[b]));return e},MB:function(a){var c=document.createElementNS("","numberformat");this.Ya(c,"factor",a.factor);
this.Ya(c,"unit",a.unit);this.Ya(c,"decimal-symbol",a.decimalSymbol);this.Ya(c,"thousands-symbol",a.thousandsSymbol);this.Ya(c,"display",a.display);this.Ya(c,"precision",a.precision);this.Ya(c,"unit-prefix",a.unitPrefix);this.Ya(c,"unit-suffix",a.unitSuffix);this.Ya(c,"unit-position",a.unitPosition);return c},cz:function(a){var c={};this.dK(c,"factor",a.getAttribute("factor"));this.vk(c,"unit",a.getAttribute("unit"));this.vk(c,"decimalSymbol",a.getAttribute("decimal-symbol")||".");this.vk(c,"thousandsSymbol",
a.getAttribute("thousands-symbol")||",");this.vk(c,"display",a.getAttribute("display")||"D");this.dK(c,"precision",a.getAttribute("precision")||100);this.vk(c,"unitPrefix",a.getAttribute("unit-prefix")||"");this.vk(c,"unitSuffix",a.getAttribute("unit-suffix")||"");this.vk(c,"unitPosition",a.getAttribute("unit-position")||"S");return c}};b.Annotations.ba=c})(window);
(function(b){b.o=b.o||{};var f=b.o;f.Ix=function(b){this.v=b;this.J=[];this.pk={};this.hv=f.Sa.ki;this.mg=1;if(b){this.rJ();this.sJ();var c=this;b.on("pagesDiff",function(a,b){c.trigger("pageDiff",[b]);c.trigger("pageContentChanged",[b.filter(function(a){return a.after.contentChanged}).map(function(a){return a.after.pageNum})])});b.on("pagesUpdated",function(a,b){function e(a){var c={};Object.keys(a).forEach(function(b){c[b]=a[b].Ra});return c}var f=e(c.pk);c.rJ();c.sJ();f=c.FO(f,e(c.pk));f.contentChanged=
b.filter(function(a){return a.contentChanged}).map(function(a){return a.pageNum});c.trigger("layoutChanged",[f])})}};f.Ix.prototype=$.extend({lZ:function(){return this.J.length},FO:function(b,c){var a={added:[],removed:[],moved:{}},d={};Object.keys(b).forEach(function(a){d[a]=d[a]||{};d[a].before=b[a]});Object.keys(c).forEach(function(a){d[a]=d[a]||{};d[a].after=c[a]});Object.keys(d).forEach(function(c){c=d[c];c.before&&!c.after?a.removed.push(c.before):!c.before&&c.after?a.added.push(c.after):c.before&&
c.after&&c.before!==c.after&&(a.moved[c.before]=c.after)});return a},rJ:function(){var b=this.v.io(),c={};b.forEach(function(a){c[a]=!0});var a=this.pk;Object.keys(a).forEach(function(b){b in c||delete a[b]});b.forEach(function(c){a[c]||(a[c]={rotation:null,zoom:null,Fg:null,Gg:null,Ag:null,Wi:null,Qo:null,ic:null,Ra:null,id:c})})},sJ:function(){for(var b=this.v.numPages,c=this.v,a=[],d=0;d<b;++d){var f=this.pk[c.Sq(d)];f.Ra=d+1;a.push(f)}this.J=a},SB:function(b){this.hv=b},QZ:function(){return this.hv},
Xi:function(b){this.mg=b;this.trigger("zoomChanged",[b])},RZ:function(){return this.mg},gK:function(b,c){var a=this.J[b];if(a)a.Qo=c;else throw Error("Invalid page text selected "+b);},ER:function(b){var c=this.J[b];if(c)return c.Qo;throw Error("Selected text requested for invalid page index: "+b);},FR:function(b){var c=this.J[b];if(c)return c.Ag.map(function(a){return{x1:a.x1,x2:a.x2,x3:a.zm,x4:a.Am,y1:a.y1,y2:a.y2,y3:a.Bm,y4:a.Cm}});throw Error("Selected text quads requested for invalid page index: "+
b);},Qy:function(){this.J.forEach(function(b){b.Qo=null})},bv:function(){return this.J.map(function(b){return b.Qo}).filter(function(b){return null!==b}).join("\n")},jA:function(){var b={};this.J.filter(function(c){return null!==c.Ag}).forEach(function(c){b[c.Ra-1]=c.Ag.map(function(a){return{x1:a.x1,x2:a.x2,x3:a.zm,x4:a.Am,y1:a.y1,y2:a.y2,y3:a.Bm,y4:a.Cm}})});return b},Rd:function(b){var c=this.J[b];if(c){var a=this.v.gd(b);b=this.v.fd(b);var d=_.isNull(c.rotation)?this.hv:c.rotation;if(d===f.Sa.Xe||
d===f.Sa.fg){var g=a,a=b;b=g}return{width:a,height:b,rotation:d,zoom:_.isNull(c.zoom)?this.mg:c.zoom,Fg:c.Fg,Gg:c.Gg,Ag:c.Ag,Wi:c.Wi,Qo:c.Qo,ic:c.ic,Ra:c.Ra,id:c.id}}return{width:0,height:0}},Sd:function(){for(var b=[],c=this.J.length,a=0;a<c;++a)b.push(this.Rd(a));return b},Bw:function(b,c){var a=this.J[b];if(a)a.zoom=c;else throw Error("Invalid page index zoomed "+b);},zR:function(b){var c=this.J[b];if(c)return!_.isNull(c.zoom);throw Error("Invalid page index get has individual zoom "+b);},Rr:function(b,
c){var a=this.J[b];if(a)a.rotation=c;else throw Error("Invalid page index rotated "+b);},hW:function(b,c){var a=this.J[b];if(a)a.Ag=c;else throw Error("Invalid page index set text quads "+b);},fW:function(b,c){var a=this.J[b];if(a)a.Wi=[c];else throw Error("Invalid page index set search quads "+b);},uX:function(b,c){var a=this.J[b];if(a){var d=a.Wi||[];d.push(c);a.Wi=d}else throw Error("Invalid page index update search quads "+b);},Py:function(){this.J.forEach(function(b){b.Wi=null})},rF:function(){this.J.forEach(function(b){b.Ag=
null})},AR:function(b){var c=this.J[b];if(c)return!!c.Ag||!!c.Wi;throw Error("Invalid page index get has text quads "+b);},dW:function(b,c){var a=this.J[b];if(a)a.Fg=c.Fg,a.Gg=c.Gg;else throw Error("Tried to set offsets of invalid page"+b);},hR:function(){var b={};this.J.forEach(function(c,a){_.isNull(c.rotation)||(b[a]=c.rotation)});return b},SO:function(){this.J.forEach(function(b){b.rotation=null})},zG:function(b){this.J.forEach(function(c){_.isNull(c.rotation)||b(c)})},UB:function(b,c){var a=
this.J[b];if(a)a.ic?c&&a.ic[0]===c[0]||(a.ic[0].width=0,a.ic[0].height=0,a.ic=c):a.ic=c;else throw Error("Invalid page index set preview canvas "+b);},iH:function(){var b=[];this.J.forEach(function(c,a){_.isNull(c.Ag)&&_.isNull(c.Wi)||b.push(a)});return b},CR:function(){var b=[];this.J.forEach(function(c,a){_.isNull(c.Ag)||b.push(a)});return b},UO:function(b){b=this.J[b];b.ic&&(b.ic[0].width=0,b.ic[0].height=0,b.ic=null)},VO:function(){this.J.forEach(function(b){b.width=0;b.height=0;b.ic&&(b.ic[0].width=
0,b.ic[0].height=0,b.ic=null)})},dI:function(b){return!!this.pk[b]},hd:function(b){var c=this.pk[b];if(c)return this.Rd(c.Ra-1);throw Error("Unknown page ID "+b);},Af:function(b){var c=this.J[b];if(c)return c.id;throw Error("Page index is not loaded "+b);},bd:function(){this.off()}},b.utils.eventHandler)})(window);
(function(b){function f(c,a){this.handlers=c;this.state=_.isUndefined(a)?null:a;this.bi=[];this.tB=!0}function e(){this.yG=[];this.BG=[];this.Mi={};this.ds=!1;Promise.resolve();Promise.resolve();this.Qn=!1;this.Wt=null}f.prototype={Oi:function(c){this.bi.push(c)},AK:function(){return 0<this.bi.length},xK:function(){return this.tB||0<this.bi.length},read:function(){this.state=this.handlers.read(this.state);this.tB=!1},write:function(){var c=this.bi;this.handlers.consolidateChanges&&(c=this.handlers.consolidateChanges(c));
this.bi=[];this.state=this.handlers.write(this.state,c);this.tB=!0}};e.prototype={bd:function(){this.ds=!1;window.cancelAnimationFrame(this.Wt);this.Wt=null;this.Qn=!0},uJ:function(c,a,b,e){_.isUndefined(e)&&(e=!0);if(this.Mi[c])throw Error("Tried to register pipeline "+c+" twice");this.Mi[c]=new f(a,b);e&&this.zB()},xS:function(c){return!!this.Mi[c]},KR:function(c){if(!this.Mi[c])throw Error("Tried to get non-existent pipeline "+c);return this.Mi[c]},zB:function(){var c=this;this.ds||this.Qn||(this.ds=
!0,this.Wt=window.requestAnimationFrame(function(){try{c.Wt=null;var a=Object.keys(c.Mi).map(function(a){return c.Mi[a]});a.forEach(function(a){a.xK()&&a.read()});a.forEach(function(a){a.AK()&&a.write()});var b=a.some(function(a){return a.xK()||a.AK()});c.ds=!1;b?c.zB():(c.BG.forEach(function(a){a()}),c.BG=[]);c.yG.forEach(function(a){a()});c.yG=[]}catch(e){var f=Object.keys(c.Mi);0<f.length&&c.Mi[f[0]].handlers.clearCacheIfFull();throw e;}finally{c.ds=!1}}))},Oi:function(c,a){this.KR(c).Oi(a);this.zB()}};
b.Dp=e;b.sY=f})((window.o?window.o:window.o={}).Um={});
(function(b){function f(a){this.aL=!0;this.dr=this.lw=this.zK=this.Eg=!1;this.xd=[];this.Ic={};this.cl={};this.ce=.5;this.u=a;this.v=null;this.iw=Promise.resolve();this.rv=!1;this.Ko=null;this.paused=!1;this.XA=null}function e(a){this.rotation=a.rotation;this.zoom=a.zoom;this.width=a.width;this.height=a.height;this.me=this.canvas=null;this.zh=this.Dy=this.vg=!1;this.yK=!0;this.Dc=this.Nl=this.bp=this.request=null}function c(a,c){this.Ea=a;this.qk=c;this.rB=createPromiseCapability()}c.prototype={cancel:function(){var a=
this.Ea.Qc(this.qk);try{if(a.zh){a.Dc&&(a.Dc.jF(),a.Dc.abort&&a.Dc.abort());if(a.request)try{this.Ea.v.$h(a.request)}finally{a.request=null,a.Dc=null}if(a.bp)try{this.Ea.v.Lj(a.bp)}finally{a.bp=null}if(a.Nl)try{this.Ea.v.$h(a.Nl)}finally{a.Nl=null}}}finally{a.zh=!1,a.yK=!0,this.rB.resolve("canceled")}},TK:function(){this.cancel();var a=this.Ea.Qc(this.qk);a.Dc&&(a.Dc.Kb(void 0,this.Ea.u.N.hd(this.qk).Ra-1),a.Dc=null)},render:function(a){var c=this;a.then(function(){c.rB.resolve("complete")})},eA:function(){return this.rB.promise}};
e.prototype={Qq:function(a){return(this.canvas||a?1:0)*this.width*this.height*this.zoom*this.zoom*(window.devicePixelRatio?window.devicePixelRatio*window.devicePixelRatio:1)*4},isValid:function(){return!!this.canvas||!b.o.Aa.Bk},update:function(a){if(this.rotation!==a.rotation||this.zoom!==a.zoom)this.me=this.canvas=null,this.yK=!0;this.rotation=a.rotation;this.zoom=a.zoom;this.width=a.width;this.height=a.height;this.Ra=a.Ra}};f.prototype={init:function(){this.My();this.v=this.u.getDocument()},bd:function(){this.dr=
!0;this.Tr();return this.iw},My:function(){this.Tr();Object.keys(this.Ic).forEach(this.lv.bind(this))},WO:function(){Object.keys(this.Ic).forEach(this.XH.bind(this))},tW:function(a){this.zK=!!a},WH:function(a){var c=this.Ic[a];c&&(c.canvas&&(document.body.contains(c.canvas)||(c.canvas.width=0,c.canvas.height=0),c.canvas=null),c.Dc&&(c.Dc.Kb(),c.Dc=null),c.me=null);this.$o(a)},XH:function(a){if(a=this.Ic[a])a.vg=!1},lv:function(a){this.WH(a);this.XH(a)},bu:function(a){var c=this.u,b=c.Hl()-1;a=c.N.hd(a).Ra-
1;c=c.vb();b=a-b;0>b&&(b-=.5);return c-Math.abs(b)},fA:function(a){return this.cl[a]||null},OE:function(a,b){var e=this;if(this.Qc(a).zh)return this.fA(a);var f=new c(this,a);this.$o(a);var h;h=e.zK&&b?b.then(function(){if(!e.lw)return e.AJ(a,function(){})}):this.AJ(a,function(){});f.render(h);return this.cl[a]=f},KQ:function(){var a=this;return Object.keys(this.Ic).reduce(function(c,b){return c+a.Qc(b).Qq()},0)},fO:function(a,c){for(var e=this.Qc(c),f=this,h=Object.keys(this.Ic).sort(function(a,
c){return f.bu(a)-f.bu(c)}),l=this.KQ(),n=e.Qq(a)+l,m=0;n>b.Gm&&m<h.length;)n-=this.Qc(h[m]).Qq(),++m;if(n<b.Gm){for(l=0;l<m;++l)this.WH(h[l]);e.canvas=a}else console.warn("Could not fit "+c+" with size "+e.Qq(a)+" into cache of size "+l+" with max size "+b.Gm)},Qc:function(a){if(this.u.N.dI(a)){this.Ic[a]=this.Ic[a]||new e(this.u.N.hd(a));var c=this.u.N.hd(a);this.Ic[a].update(c);return this.Ic[a]}return this.Ic[a]?this.Ic[a]:new e({})},XX:function(a){this.lv(a)},gr:function(a){return!!this.Qc(a).canvas},
pause:function(){this.paused=!0},resume:function(){this.paused=!1;var a=this.Ic;Object.keys(a).forEach(function(c){c=a[c];c.Dc&&(c.Dc.paused=!1,c.Dc.resume&&c.Dc.resume())})},fp:function(a){this.xd=a||this.u.ea.Sd()},uO:function(a){var c=this;return a.some(function(a){return-1===c.xd.indexOf(a)})||c.xd.some(function(c){return-1===a.indexOf(c)})},TR:function(){var a=this;return Object.keys(this.Ic).map(function(c){return{id:c,page:a.Ic[c]}}).filter(function(a){return a.page.vg}).map(function(c){return a.u.N.hd(c.id).Ra-
1})},XF:function(a){var c=this.u.N.Af(a),e=this.Qc(c);if(this.Eg){c=e.Xd;if(e.zh||!e.vg||!c)return!0;var e=this.u.ea,f=this.ce/2;return(a=e.no(a,e.rA(f,f)))&&!b.utils.containsRect(c,a.Xd)}return!e.zh&&!e.vg},EH:function(a){for(var c=[],b=[],e=a.length,f=0;f<e;++f){var l=a[f];this.XF(l)?b.push(l):c.push(l)}return{UI:c,lB:b}},wA:function(){var a=this;return a.dr?[]:a.u.ea.Sd(a.ce,a.ce).some(function(c){return a.XF(c)})},OO:function(){!this.Ko&&this.wA()&&this.PF()},PF:function(){var a=this;this.Ko||
(this.Ko=setTimeout(function(){this.Ko=null;var c=a.u.ea.Sd(a.ce,a.ce);a.Tr(c);a.rv||(a.iw=a.iw.then(function(){return a.BJ()})["catch"](function(c){console.error(c);a.iw=Promise.resolve()}))},80))},xU:function(a){var c=this;return Promise.resolve().then(function(){var b=c.u.N.hd(a).Ra-1,e=c.Qc(a);if(!e.canvas)throw Error("Tried to place uncached page from cache "+a);e.vg=!0;c.u.kq(e.canvas,b);c.Tj(b,e);c.u.trigger("pageComplete",[b,e.canvas])})},mA:function(a){var c=this;return new Promise(function(b){var e=
c.Qc(a),f=c.u.N.hd(a).Ra-1;e.bp||c.u.zS(f)?b():e.bp=c.v.WA(f,function(b){c.Qc(a).bp=null;c.u.aF(b,f,-1!==c.xd.indexOf(f),!1)})})},gR:function(a){var c=this;return new Promise(function(e){var f=c.Qc(a),h=c.u.N.hd(a).Ra-1;if(f.Nl||c.u.vS(h))e();else{var l=b.utils.getCanvasMultiplier(),n=f.width,m=f.height,r=n>m?2E3/n:2E3/m,r=r/l;f.Nl=c.v.yv({pageIndex:h,getZoom:function(){return r},getPageRotation:function(){return b.o.Sa.ki},drawComplete:function(a){c.v.Mj(f.Nl);f.Nl=null;c.u.aF(a,h,-1!==c.xd.indexOf(h),
!0);e()},useProgress:!1})}})},BJ:function(){var a=this;return this.dr?Promise.resolve():Promise.resolve().then(function(){var c=a.u.ea.Sd(a.ce,a.ce),e=a.EH(c);a.Tr(c);a.xJ(e.UI);a.rv=!0;a.u.trigger("beginRendering");var f=Promise.resolve();!a.v.fk()&&b.o.Aa.Bk||c.forEach(function(c){c=a.u.N.Af(c);a.mA(c)});a.lw=!1;return Promise.all(e.lB.map(function(c){c=a.u.N.Af(c);return a.gr(c)&&!a.Eg?a.xU(c):f=a.OE(c,f).eA()}))}).then(function(){a.lw=!1;a.rv=!1;var c=a.wA();a.u.trigger("finishedRendering",c);
if(!a.dr)return new Promise(function(c,b){window.requestAnimationFrame(function(){try{var d;if(a.wA())return d=a.BJ(),c(d);a.fT()&&a.zU();c()}catch(e){b(e)}})})})["catch"](function(c){a.rv=!1;console.error(c);throw c;})},fT:function(){return b.o.Aa.Bk&&(0!==b.Dv||0!==b.Cv)},EO:function(){var a=this;return _.range(a.u.vb()).map(function(c){return a.u.N.Af(c)}).sort(function(c,b){return a.bu(b)-a.bu(c)})},hF:function(){var a=this,c=_.min(a.xd),e=_.max(a.xd),f=c-b.Dv,h=e+b.Cv,c=this.EO().filter(function(c){c=
a.u.N.hd(c).Ra-1;return f<c&&h>c});if(a.Eg)return[c[0]];for(var e=[],l=c.length,n=0,m=0;m<l;++m){var r=a.Qc(c[m]),n=n+r.Qq(!0);if(n<b.Gm)e.push(c[m]);else break}return e},GO:function(){var a=this;return a.dr?[]:a.hF().filter(function(c){return!a.Qc(c).isValid()})},zU:function(){var a=this;return Promise.resolve().then(function(){return a.Eg?Promise.all(a.xd.map(function(c){c=a.u.N.Af(c);return a.gR(c)})):Promise.all(a.GO().map(function(c){return a.OE(c).eA()}))["catch"](function(a){console.error("error pre-rendering",
a);throw a;})})},AJ:function(a,c){c=c||function(){};var b=this;return new Promise(function(e){b.RU(a,function(a){!a||a.type&&"Cancelled"===a.type||console.warn(a);e()},c)})},xJ:function(a){var c=this,e=this.hF();a||(a=c.u.ea.Sd(c.ce,c.ce),a=c.EH(a).UI);a&&a.length&&(a=a.map(function(a){return c.u.N.Af(a)}),e=e.concat(a));Object.keys(this.Ic).forEach(function(a){var f=c.Qc(a);if(c.u.N.dI(a)){var l=c.u.N.hd(a).Ra-1;if(b.o.Aa.Bk)-1===e.indexOf(a)&&(c.VK(a),f.vg&&(c.u.PU(l),f.vg=!1));else{var n=-1!==
c.xd.indexOf(l);!f.vg&&!f.Dy||n||(b.o.Aa.Io(l),f.Dy=!1,f.vg=!1,c.VK(a))}}})},RU:function(a,c,e){var f=this,h=this.Qc(a);c=c||function(){};e=e||function(){};if(h.zh)b.utils.warn("renderPage: Another request for page ID",a),c("renderPage: Another request for page ID "+a);else{var l=f.u.N.hd(a),n=l.zoom,m=l.rotation;if(f.v!==f.u.getDocument())c("Document changed");else{var r=!0,p=null,u=!1,q,v=f.u.ea.jo(l.Ra-1);if(f.Eg||v&&v.viewportRender)if(v=f.u.ea,q=v.no(l.Ra-1,v.rA(f.ce,f.ce)),null===q){c("Page "+
(l.Ra-1)+" no longer visible");return}this.XA=window.setTimeout(function(){$("#pageContainer"+(l.Ra-1)).addClass("loading")},300);var w={pageIndex:this.u.N.hd(a).Ra-1,getZoom:function(){return f.u.N.hd(a).zoom},getPageRotation:function(){return f.u.N.hd(a).rotation},finishedLoading:function(b,e){if(f.v!==f.u.getDocument())return c(Error("Document changed")),!1;if(b)return console.warn("Error loading page "+a),c(Error("Error loading page "+a)),!1;r=null===h.Dc;h.Dc=e;f.paused&&h.Dc.pause();return!0},
acquireResources:function(){return r},resourcesLoaded:function(){if(f.v!==f.u.getDocument())return c(Error("Document changed")),!1;if(!1===h.zh)return!1;var b=f.u.N.hd(a);n===b.zoom&&m===b.rotation||f.Tj(b.Ra-1,h);return!0},drawComplete:function(e,g,n){f.v!==f.u.getDocument()||_.isNull(p)?c(Error("Document changed, or progress event not received")):(l=f.u.N.hd(a),h.zh=!1,h.vg=!!u,h.me=n,h.Xd=q?q.Xd:null,u?f.u.trigger("pageComplete",[g,p]):b.o.Aa.Io(g),b.o.Aa.Bk&&!f.Eg&&f.fO(p,a,l),f.v.Mj(h.request),
clearTimeout(this.XA),$("#pageContainer"+(l.Ra-1)).removeClass("loading"),e=-1!==f.xd.indexOf(g),f.v.Tl()&&e&&f.Tj(l.Ra-1,h),c())},drawProgressive:function(h){if(f.v!==f.u.getDocument())c(Error("Document changed"));else{var l=f.u.N.hd(a),r=l.Ra-1;if(n===l.zoom){if(!_.isUndefined(q)){var v=$(h);v.css("top",q.Lw.y+"px");v.css("left",q.Lw.x+"px")}v=f.v.fc(r);p=b.o.Aa.WG(h,r,n,m,w.getPageTransform(),v);u=!!f.u.kq(p,r)}else b.utils.warn("bad zoom: "+r);$("#pageContainer"+(l.Ra-1)).removeClass("loading");
f.u.trigger("pageProgressiveUpdate",[r,p]);e(r)}},getPageTransform:function(){return f.u.ea.jo(l.Ra-1)},onError:function(a){c(a)},useProgress:!f.Eg&&b.o.mH(),renderRect:_.isUndefined(q)?void 0:q.Xd};h.request=-1;h.zh=!0;h.request=f.v.yv(w);f.Tj(l.Ra-1,h)}}},Tj:function(a,c){this.u.Tj(a);c.Dy=!0},fP:function(){for(var a=[],c=0;c<this.u.vb();++c){var e=this.u.N.Af(c);a.push(e)}this.UK(a);this.Tr();b.o.Aa.Hr()},UK:function(a){var c=this;Object.keys(this.Ic).forEach(function(b){if(-1===a.indexOf(b)){var e=
c.cl[b];e&&(e.cancel(),e.TK(),delete c.cl[b]);delete c.Ic[b]}else c.Ic[b].vg=!1})},rC:function(a){this.v&&((this.Eg=this.aL&&a>this.v.v.qr)&&1<b.utils.getCanvasMultiplier()?this.ce=0:this.ce=.5)},Tr:function(a){var c=this,e={};"undefined"!==typeof a&&$.each(a,function(a,b){e[c.u.N.Af(b)]=!0});var f=[];Object.keys(this.cl).forEach(function(a){a in e&&b.o.Aa.Bk?f[a]=c.cl[a]:c.$o(a)});this.cl=f;this.lw=!0;clearTimeout(this.Ko);this.Ko=null},$o:function(a){var c=this.fA(a);clearTimeout(this.XA);$("#pageContainer"+
a).removeClass("loading");c&&(this.Qc(a).zh&&(a=this.u.N.hd(a).Ra-1,$(document.getElementById("pageContainer"+a)).find(".progressive").remove()),c.cancel(),b.o.Aa.Oy())},VK:function(a){(a=this.fA(a))&&a.TK()},$B:function(a){this.aL=!!a;this.rC()},lK:function(){}};b.o.uM=f})(window);
(function(b){function f(a,c){this.wj=!a;this.height=this.width=0;this.Bh=null;a&&(this.width=c.width,this.height=c.height,this.rotation=c.rotation,this.Jb=c.Ra-1,this.qk=a,this.zoom=c.zoom,this.ic=c.ic)}function e(a,c){this.J=c;this.index=a;this.height=c.reduce(function(a,c){return c.va()>a?c.va():a},0);this.width=c.reduce(function(a,c){return a+c.ya()},0)}function c(a){this.rows=a.rows;this.am=a.am;this.$i=a.$i;this.ld=a.ld;this.Bo=a.Bo;this.di=a.di;this.J=a.J;this.Ah=a.Ah;a=this.rows;this.width=
this.di.reduce(function(a,c){return a+c},2*this.$i*this.am);this.height=a.reduce(function(a,c){return a+c.va()},this.rows.length*this.$i*2)}function a(a,c){var b=c.zoom,d=c.rotation,e=c.width*b,b=c.height*b,f=null;d===window.o.Sa.Xe||d===window.o.Sa.fg?(f="rotate("+90*d+"deg)",f=d===window.o.Sa.Xe?" translate("+e+"px, 0)  "+f:" translate(0,"+b+"px)  "+f,a.css("height",e),a.css("width",b)):(d===window.o.Sa.zq&&(f="translate("+e+"px,"+b+"px) scale(-1,-1)"),a.css("width",e),a.css("height",b));null!==
f&&a.css({position:"absolute",transform:f,"transform-origin":"top left","ms-transform":f,"ms-transform-origin":"top left","-moz-transform":f,"-moz-transform-origin":"top left","-webkit-transform-origin":"top left","-webkit-transform":f,"-o-transform":f,"-o-transform-origin":"top left"})}function d(a,c,b){if(c)for(c=a-1;0<=c;--c)b(c);else for(c=0;c<a;++c)b(c)}function g(a,c,b){var d=document.createElement("div");d.id="pageContainer"+a.ak();2===b?0===c?d.style.marginLeft="auto":1===c&&(d.style.marginRight=
"auto"):(d.style.marginLeft="auto",d.style.marginRight="auto");d.className="pageContainer";return d}function k(a,c,b){var d=document.createElement("div");d.id="pageSection"+a.ak();d.style.cssFloat="left";d.style.position="relative";d.className="pageSection";d.appendChild(g(a,c,b));return d}function h(a,c,b){var e=document.createDocumentFragment(),f=a.Pb();d(f.length,b,function(a){e.appendChild(k(f[a],a,c))});a=document.createElement("div");a.style.clear="both";e.appendChild(a);return e}function l(c,
b){if(b.ic){var d=b.ic,e=parseFloat(d.css("width")),f=parseFloat(d.css("height")),g=parseFloat(c.style.width)/e,k=d.attr("id");if(k&&0<=k.indexOf("hrthumb")){k=b.rotation;if(k===window.o.Sa.Xe||k===window.o.Sa.fg)g=parseFloat(c.style.width)/f;a(d,b)}d.each(function(){var a=$(this);a.css({top:parseFloat(a.css("top"))*g,width:e*g,height:f*g});c.appendChild(this)})}}function n(a,c,b){var d=Math.floor(c.va())+"px";a.style.width=Math.floor(c.ya())+"px";a.style.height=d;a.style.top=Math.floor(b-c.va())/
2+"px";$(a).find("canvas").each(function(){this.height=this.width=0});$(a).children().detach();l(a,c)}function m(a,c,b,e,f,g){var k=c.Pb(),h=a;d(k.length,f,function(a){if(!h)throw Error("Tried to update non-existent page section");var d=h,f=k[a],m=c.va();d.style.width=Math.floor(b[a])+"px";d.style.height=Math.floor(m)+"px";d.style.margin=e+"px";g||n(d.firstChild,f,m);h=h.nextSibling});return h=h.nextSibling}function r(a,c,b){var e=c.Pb(),f=a;d(e.length,b,function(a){if(!f)throw Error("Tried to skip non-existent page section");
l(f.firstChild,e[a]);f=f.nextSibling});return f=f.nextSibling}function p(a,c,b){var e=c.Pb().length,f=a;u(f);c=document.createRange();d(e,b,function(){if(!f)throw Error("Tried to remove non-existent page section");f=f.nextSibling;u(f)});b=f.nextSibling;c.setStartBefore(a);c.setEndAfter(f);c.deleteContents();return b}function u(a){$(a.querySelector(".pageContainer")).children().detach()}function q(a){this.bi=[];this.state=a}f.zF=function(a,c){var b=new f(null,{});b.Jb="b"+a;b.width=0;b.height=0;b.zoom=
c.zoom;b.rotation=0;b.ic=null;b.CS=c.width;b.ZZ=c.height;return b};f.prototype={rH:function(){return this.Bh},Ze:function(){return this.zoom},Qd:function(){return this.rotation},ya:function(){return this.width*this.zoom},Tz:function(){var a=this.width;this.wj&&(a=this.CS);return a*this.zoom},va:function(){return this.height*this.zoom},ak:function(){return this.Jb},iT:function(a){return this.wj&&a.wj||this.qk===a.qk},JA:function(a){return this.wj!==a.wj||!this.wj&&(this.qk!==a.qk||this.ya()!==a.ya()||
this.va()!==a.va()||this.Ze()!==a.Ze()||this.Qd()!==a.Qd())}};e.prototype={Pb:function(){return this.J},va:function(){return this.height},ya:function(){return this.width},ak:function(){return this.index},JA:function(a){var c=a.Pb();return this.J.length!==a.Pb().length||this.J.some(function(a,b){return a.JA(c[b])})},jT:function(a){var c=a.Pb();return this.J.length===a.Pb().length&&this.J.every(function(a,b){return a.iT(c[b])})}};c.prototype={Pb:function(){return this.J},ya:function(){return this.width},
va:function(){return this.height},rH:function(a){return this.rows[a]}};q.prototype={make:function(a,c,b){this.bi.push({eB:a,Zg:{Bh:c,dU:b}})},qO:function(a){var c=this,b=a.firstChild,d=[];a.style.width=Math.ceil(this.state.ya())+"px";this.bi.forEach(function(e){switch(e.eB){case "addRow":d=d.concat(e.Zg.Bh.Pb());b=c.PE(b,e.Zg,a);break;case "updateRow":d=d.concat(e.Zg.Bh.Pb());b=c.wX(b,e.Zg,a);break;case "updateColumns":b=c.pX(b,e.Zg,a);break;case "skipRow":b=c.OW(b,e.Zg,a);break;case "replaceRow":d=
d.concat(e.Zg.Bh.Pb());b=c.UU(b,e.Zg,a);break;case "removeRow":b=c.yJ(b,e.Zg,a);break;default:console.warn("Unsupported layout change operation:",e.eB)}});if(b&&"selectionrect"!==b.id)throw Error("Nodes left after applying changes");d=d.filter(function(a){return!a.wj}).map(function(a){return a.ak()});return{lB:d}},BR:function(){var a=[];this.bi.forEach(function(c){switch(c.eB){case "updateRow":a=a.concat(c.Zg.Bh.Pb())}});return a.filter(function(a){return!a.wj}).map(function(a){return a.ak()})},PE:function(a,
c,b){c=c.Bh;var d=h(c,this.state.di.length,this.state.Ah);m(d.firstChild,c,this.state.di,this.state.$i,this.state.Ah);a?b.insertBefore(d,a):b.appendChild(d);return a},wX:function(a,c){return m(a,c.Bh,this.state.di,this.state.$i,this.state.Ah)},OW:function(a,c){return r(a,c.Bh,this.state.Ah)},UU:function(a,c,b){a=this.yJ(a,c);return this.PE(a,c,b)},yJ:function(a,c){return p(a,c.dU,this.state.Ah)},pX:function(a,c){return m(a,c.Bh,this.state.di,this.state.$i,this.state.Ah,!0)}};b.oR=function(a){var b=
a.EX,d=a.$i,g={width:0,height:0},k={width:0,height:0};b&&0<b.length&&(g={width:b[0].width,height:b[0].height,zoom:b[0].zoom},k={width:b[b.length-1].width,height:b[b.length-1].height,zoom:b[b.length-1].zoom});var h=a.QW||0,n=[],m;for(m=0;m<h;++m)n.push(f.zF(m,g));var n=n.concat(b.map(function(a){return new f(a.id,a)})),l=a.am;l>n.length&&(l=n.length);b=a.ld||0;g=Math.ceil(n.length/a.am);_.isUndefined(a.Bo)||(g=a.Bo<g?a.Bo:g);var p=Array(l),h=n.reduce(function(a,c,b){var d;0===a.length?(d=[],a.push(d)):
d=a[a.length-1];d.length===l&&(d=[],a.push(d));d.push(c);if(b===n.length-1&&(c=l-d.length,0<c))for(var e=0;e<c;++e)d.push(f.zF(b+e+1,k));return a},[]).slice(b,b+g).map(function(a,c){var b=new e(c,a);b.Pb().forEach(function(a,c){p[c]=p[c]?a.Tz()>p[c]?a.Tz():p[c]:a.Tz()});return b});return new c({rows:h,$i:d,am:l,ld:b,Bo:g,di:p,J:n,Ah:a.Ah})};b.nR=function(a,c){var b=new q(c);if(!a)return c.rows.forEach(function(a){b.make("addRow",a,null)}),b;var d=a.rows,e,f=a.di,g=c.di;e=f.length===g.length?f.every(function(a,
c){return a===g[c]}):!1;f=c.rows;f.forEach(function(a){var c=d[a.ak()];c?c.jT(a)?c.JA(a)?b.make("updateRow",a,c):e?b.make("skipRow",a,c):b.make("updateColumns",a,c):b.make("replaceRow",a,c):b.make("addRow",a,c)});if(f.length<d.length)for(f=f.length;f<d.length;++f)b.make("removeRow",null,d[f]);return b};b.Bp=f;b.uY=e;b.mY=c;b.lY=q})((window.o=window.o||{}).QC={});
(function(b){var f=XODText,e=window.o,c={VC:"Single",qp:"Continuous",GC:"Facing",qx:"FacingContinuous",os:"Cover",ps:"CoverFacing",Qf:"Custom"};e.zd=function(a,b,e){this.mode=null;this.u=a;this.Md=this.vh=this.Rb=null;this.gg=this.ld=0;this.ik=null;this.xd=[];this.ud={};a=b===c.Qf;this.Oo=_.isUndefined(e)?!a:e;_.isNull(b)||_.isUndefined(b)||(this.mode=b)};e.zd.prototype={kW:function(a,b,e,f,h){this.mode=c.Qf;this.Rb=a;this.vh=b;this.Md=e;this.ld=f;this.gg=h},DV:function(a){this.ud=a},HA:function(){return this.mode===
c.qp||this.mode===c.qx||this.mode===c.os},wb:function(a,c){if(!this.ik)return-1;var b=this.ik.rH(a-this.ik.ld);if(this.u.hA())var e=this.ik.am,b=b.Pb()[e-(c+1)];else b=b.Pb()[c];return b&&_.isNumber(b.ak())?b.ak():-1},cf:function(a,c){if(this.ud.pageToWindow)return this.ud.pageToWindow(a,c);a=this.u.iA(a,c);var b=this.u.N.Rd(c);return{x:a.x+b.Fg,y:a.y+b.Gg}},lU:function(a,c){if(this.ud.pageToWindow)return this.ud.pageToWindow(a,c);a=this.u.WR(a,c);var b=this.u.N.Rd(c);return{x:a.x+b.Fg,y:a.y+b.Gg}},
Ck:function(a,c){if(this.ud.windowToPage)return this.ud.windowToPage(a,c);var e=this.u.kb(c),k=this.u.N.Rd(c),h=new f.Cd;h.x=a.x-k.Fg;h.y=a.y-k.Gg;e=b.Bd(e,this.u.Pd(c+1),{width:this.u.gd(c),height:this.u.fd(c)},0,!1);e=e.inverse();h=e.W(h);return{pageIndex:c,x:h.x,y:h.y}},KX:function(a,c){if(this.ud.windowToPage)return this.ud.windowToPage(a,c);var e=this.u.kb(c),k=this.u.N.Rd(c),h=new f.Cd;h.x=a.x-k.Fg;h.y=a.y-k.Gg;e=b.Bd(e,this.u.Qd(c+1),this.u.v.fc(c),0,!1);e=e.inverse();h=e.W(h);return{pageIndex:c,
x:h.x,y:h.y}},av:function(a,c){if(this.ud.getSelectedPages)return this.ud.getSelectedPages(a,c);var b=null,e=null;a=_.isUndefined(a)?this.u.Ud:a;c=_.isUndefined(c)?this.u.Ib:c;a:for(var f=this.ld;f<this.gg;f++)for(var l=0;l<this.Rb;l++){var n=this.wb(f,l);if(!(0>n)){var m=this.u.N.Rd(n),r=m.Fg,p=m.Gg,u=m.Fg+m.width*this.u.zoom,m=m.Gg+m.height*this.u.zoom;null===b&&a.x<=u&&a.x>=r&&a.y<=m&&a.y>=p&&(b=n);null===e&&c.x<=u&&c.x>=r&&c.y<=m&&c.y>=p&&(e=n);if(null!==b&&null!==e)break a}}b>e&&(f=b,b=e,e=f);
return{first:b,last:e}},Sd:function(a,c){if(this.ud.getVisiblePages)return this.ud.getVisiblePages(a,c);if(0===this.u.xb().length)return[];for(var b,e=[],f=this.getVisibleRegionRect(a,c),l=this.getVisibleRegionRect(0,0),n=this.ld;n<this.gg;n++)for(var m=0;m<this.Rb;m++)if(b=this.wb(n,m),!(0>b)){var r=this.no(b,f,l);null!==r&&e.push({Jb:b,bJ:r.vU})}e.sort(function(a,c){return c.bJ-a.bJ});b=e.length;for(f=0;f<b;++f)e[f]=e[f].Jb;return e},getVisibleRegionRect:function(a,c){a=_.isUndefined(a)?.5:a;c=
_.isUndefined(c)?.5:c;var b=this.u.Zu();if(null===b)return[];var e=b.getBoundingClientRect(),f=e.width,l=e.height,n=b.scrollTop+e.top-l*a,b=b.scrollLeft+e.left-f*c;return{x1:b,y1:n,x2:b+f*(1+2*c),y2:n+l*(1+2*a)}},no:function(a,c,e){var f=this.u.v.fc(a),h=this.pageToWindowNoRotate({x:0,y:0},a),l=this.pageToWindowNoRotate({x:f.width,y:f.height},a),f=b.utils.normalizeRect(h,l);c=b.utils.getRectIntersection(f,c);if(c.x1!==c.x2){var n;e&&(e=b.utils.getRectIntersection(f,e),n=(e.x2-e.x1)*(e.y2-e.y1)/((f.x2-
f.x1)*(f.y2-f.y1)));h=this.windowToPageNoRotate({x:c.x1,y:c.y1},a);l=this.windowToPageNoRotate({x:c.x2,y:c.y2},a);return{Xd:b.utils.normalizeRect(h,l),Lw:{x:c.x1-f.x1,y:c.y1-f.y1},vU:n}}return null},jo:function(a){if(this.ud.getPageTransform)return this.ud.getPageTransform(a);a=this.u.ho(a);return{x:0,y:0,width:a.width,height:a.height}},$z:function(){return{x:0,y:0}},Nn:function(){return e.QC.oR({$i:this.u.tH(),EX:this.u.N.Sd(),am:this.Rb,ld:this.ld,Bo:this.gg-this.ld,QW:this.mode===c.os||this.mode===
c.ps?1:0,Ah:this.u.hA()})},gr:function(a){var c=this.u.N.Af(a);return this.u.Ea.gr(c)||this.u.N.Rd(a).ic},qF:function(a){var c=this;this.Gu(function(e){var f=e.id.slice(13),h=parseInt(f,10);0===f.indexOf("b")||c.gr(h)||$(e).children("canvas.canvas"+h).each(function(){this.height=this.width=0});b.o.Aa.Ly(h);a&&$(e).children().detach()})},Kr:function(a){a?this.mode===c.Qf?this.u.Tc().children().detach():this.qF(!0):(this.ik=null,this.qF(),this.u.Tc().empty(),this.u.trigger("contentRemoved"))},Cg:function(){if(this.ud.createPageSections)return this.Kr(!1),
this.ud.createPageSections(),_.range(0,this.u.vb());var a=this;if(this.mode!==c.Qf){var b=this.Nn(),f=e.QC.nR(this.ik,b);f.BR().forEach(function(c){var b=document.getElementById("pageContainer"+c),b=a.u.tC?$(b).find("#hrthumb"+c):$(b).find(".canvas"+c+":not(.progressive)");0<b.length&&a.u.N.UB(c,b)});this.ik=b;b=f.qO(this.u.Tc().get(0)).lB;this.u.wy(this.ik.va());return b}return _.range(0,this.u.vb())},Gu:function(a){var c=this.u.Tc();if(0!==c.length)for(c=c[0],c=c.firstChild;c;)b.utils.hasClass(c,
"pageSection")&&a(c.firstChild),c=c.nextSibling},Mf:function(){var a=this.u.N;this.Gu(function(c){var b=c.parentNode,e=Number(c.id.slice(13));_.isNaN(parseInt(e,10))||a.dW(e,{Fg:b.offsetLeft+c.offsetLeft,Gg:b.offsetTop+c.offsetTop})})}};e.tp=function(a){if(!a)throw Error("DisplayModeManager requires DocumentViewer to initialize");this.u=a;this.ha=new b.o.zd(this.u,c.qp)};e.tp.prototype={Vb:function(){return this.ha},YJ:function(a){this.ha.Kr();null===this.u.v?(this.ha=a,this.u.trigger("displayModeUpdated")):
(this.AE(a),this.u.N.Xi(this.u.yf()),this.u.trigger("zoomUpdated",this.u.Ze()),this.u.yh(),this.ha.HA()&&(this.Cg(),this.ha.Mf()),this.u.Je(this.u.ac+1))},AE:function(a){this.ha=a;this.TC();this.u.N.rF();this.u.trigger("displayModeUpdated")},TC:function(){var a=this.ha.mode;_.isNull(a)||(a===c.VC?(this.ha.Rb=1,this.ha.vh=Math.ceil(this.u.v.numPages/this.ha.Rb),this.ha.Md=Math.ceil(this.u.ac/this.ha.Rb),this.ha.ld=this.ha.Md,this.ha.gg=this.ha.Md+1):a===c.qp?(this.ha.Rb=1,this.ha.vh=Math.ceil(this.u.v.numPages/
this.ha.Rb),this.ha.Md=-1,this.ha.ld=0,this.ha.gg=this.ha.vh):a===c.GC?(this.ha.Rb=2,this.ha.Md=Math.floor(this.u.ac/this.ha.Rb),this.ha.vh=Math.ceil(this.u.v.numPages/this.ha.Rb),this.ha.ld=this.ha.Md,this.ha.gg=this.ha.Md+1):a===c.qx?(this.ha.Rb=2,this.ha.Md=-1,this.ha.vh=Math.ceil(this.u.v.numPages/this.ha.Rb),this.ha.ld=0,this.ha.gg=this.ha.vh):a===c.os?(this.ha.Rb=2,this.ha.Md=-1,this.ha.vh=Math.ceil((this.u.v.numPages+1)/this.ha.Rb),this.ha.ld=0,this.ha.gg=this.ha.vh):a===c.ps&&(this.ha.Rb=
2,this.ha.Md=Math.floor(this.u.ac/this.ha.Rb),this.ha.vh=Math.ceil(this.u.v.numPages/this.ha.Rb),this.ha.ld=this.ha.Md,this.ha.gg=this.ha.Md+1))},av:function(a,c){return this.ha.getSelectedPages(a,c)},Sd:function(a,c){return this.ha.getVisiblePages(a,c)},no:function(a,c,b){return this.ha.no(a,c,b)},rA:function(a,c){return this.ha.getVisibleRegionRect(a,c)},cf:function(a,c){return this.ha.pageToWindow(a,c)},Ck:function(a,c){return this.ha.windowToPage(a,c)},jo:function(a){return this.ha.getPageTransform(a)},
$z:function(a){return this.ha.getPageOffset(a)},Nn:function(){return this.ha.Nn()},Cg:function(a){return this.ha.Cg(a)},Kr:function(a){return this.ha.Kr(a)},Gu:function(a){return this.ha.Gu(a)},Mf:function(){return this.ha.Mf()}};b.o.Ad=c})(window);
(function(b){function f(){}var e=window.o,c=XODText;f.prototype=Object.create(Error.prototype);e.aa=function(){var a=this;this.select=_.bind(this.select,this);this.ib=c.ib;this.v=null;this.defaults={FitMode:this.Lg.rx,DisplayMode:new b.o.zd(this,b.o.Ad.qp),Zoom:1};this.da=new b.o.ia(this);this.ea=new b.o.tp(this);this.ni={};this.EL=3;this.WJ();this.mG=this.iO=this.Cq=!1;this.cursor="default";this.xo=null;this.Pi=[];this.SA=!1;this.VI=function(a,c,b){b(a)};b.o.Ax(5);this.OC=function(c){this.trigger("mouseLeftUp",
c);a.xa&&a.xa.mouseLeftUp&&a.xa.mouseLeftUp(c);for(var b in a.links)if(a.links.hasOwnProperty(b)){c=a.links[parseInt(b,10)];for(var e=0;e<c.length;++e)c[e].style&&(c[e].style.border="")}};this.NC=function(c){this.trigger("mouseLeftDown",c);a.xa&&a.xa.mouseLeftDown&&(a.xa.mouseLeftDown(c),a.xa.isSelecting&&a.xa.isSelecting()||!(a.xa instanceof Tools.Hk)?a.sm("none"):a.sm("auto"))};this.fM=function(a){this.trigger("click",a)};this.pM=function(c){this.trigger("tap",c);a.xa&&a.xa.tap&&a.xa.tap(c)};this.hM=
function(c){this.trigger("dblClick",c);a.xa&&a.xa.mouseDoubleClick&&a.xa.mouseDoubleClick(c)};this.iM=function(c){this.trigger("keyDown",c);a.xa&&a.xa.keyDown&&a.xa.keyDown(c)};this.jM=function(c){this.trigger("keyUp",c);a.xa&&a.xa.mI&&a.xa.mI(c)};this.gM=function(c){a.xa&&a.xa.contextMenu&&a.xa.contextMenu(c)};this.kM=function(c){this.trigger("mouseEnter",c);a.xa&&a.xa.WT&&a.xa.WT(c)};this.PC=function(c){this.trigger("mouseMove",c);a.xa&&a.xa.mouseMove&&a.xa.mouseMove(c)};this.lM=function(c){this.trigger("mouseLeave",
c);a.xa&&a.xa.mouseLeave&&a.xa.mouseLeave(c)};this.mM=function(c){this.trigger("mouseRightDown",c);a.xa&&a.xa.Fv&&a.xa.Fv(c)};this.nM=function(c){this.trigger("mouseRightUp",c);a.xa&&a.xa.XT&&a.xa.XT(c)};this.oM=function(c){a.xa&&a.xa.pB&&a.xa.pB(c)};this.QK={AnnotationCreateArrow:new b.ca.$w(this,"AnnotationCreateArrow"),AnnotationCreateCallout:new b.ca.CalloutCreateTool(this,"AnnotationCreateCallout"),AnnotationCreateEllipse:new b.ca.mx(this,"AnnotationCreateEllipse"),AnnotationCreateFreeHand:new b.ca.FreeHandCreateTool(this,
"AnnotationCreateFreeHand"),AnnotationCreateFreeText:new b.ca.Lm(this,"AnnotationCreateFreeText"),AnnotationCreateLine:new b.ca.Kh(this,"AnnotationCreateLine"),AnnotationCreatePolygon:new b.ca.Pg(this,"AnnotationCreatePolygon"),AnnotationCreatePolygonCloud:new b.ca.Ep(this,"AnnotationCreatePolygonCloud"),AnnotationCreatePolyline:new b.ca.Qg(this,"AnnotationCreatePolyline"),AnnotationCreateRectangle:new b.ca.wx(this,"AnnotationCreateRectangle"),AnnotationCreateDistanceMeasurement:new b.ca.kx(this,
"AnnotationCreateDistanceMeasurement"),AnnotationCreatePerimeterMeasurement:new b.ca.vx(this,"AnnotationCreatePerimeterMeasurement"),AnnotationCreateAreaMeasurement:new b.ca.Zw(this,"AnnotationCreateAreaMeasurement"),AnnotationCreateSignature:new b.ca.SignatureCreateTool(this,"AnnotationCreateSignature"),AnnotationCreateStamp:new b.ca.Gp(this,"AnnotationCreateStamp"),AnnotationCreateSticky:new b.ca.Cx(this,"AnnotationCreateSticky"),AnnotationCreateTextHighlight:new b.ca.Ex(this,"AnnotationCreateTextHighlight"),
AnnotationCreateTextSquiggly:new b.ca.Fx(this,"AnnotationCreateTextSquiggly"),AnnotationCreateTextStrikeout:new b.ca.Gx(this,"AnnotationCreateTextStrikeout"),AnnotationCreateTextUnderline:new b.ca.Hx(this,"AnnotationCreateTextUnderline"),AnnotationCreateRedaction:new b.ca.Fp(this,"AnnotationCreateRedaction"),AnnotationEdit:new b.ca.Hk(this,"AnnotationEdit"),Pan:new b.ca.Cp(this,"Pan"),TextSelect:new b.ca.Wm(this,"TextSelect"),MarqueeZoomTool:new b.ca.jf(this,"MarqueeZoomTool")}};e.aa.prototype={AO:function(){function a(a){h=
!0;var e=c.v.Pb()[a-1];if(e){var f,g,k=c.Qa().Pc();if(l&&l!==e){for(f=0;f<k;++f)g=k[f],g.hk()&&g.pageNumber===n&&k[f].Le("PC",new b.Annotations.O.ub.Events.Bp("Close",c,{}));l.Le("C",new b.Annotations.O.ub.Events.Bp.create("Close",c,{}))}l=e;n=a;e.Le("O",new b.Annotations.O.ub.Events.Bp.create("Open",c,{}));for(f=0;f<k;++f)g=k[f],g.hk()&&g.pageNumber===a&&k[f].Le("PO",new b.Annotations.O.ub.Events.Bp("Close",c,{}))}}var c=this;c.Tc().on("dragstart",function(a){"IMG"===a.target.nodeName&&a.preventDefault()});
c.Tc().on("touchstart",function(a){c.NC(a)});c.Tc().on("touchmove",function(a){c.Ib={x:a.originalEvent.touches[0].pageX,y:a.originalEvent.touches[0].pageY};c.PC(a)});c.Tc().on("touchend",function(a){c.OC(a);c.$x=!1});c.Tc().on("pointerdown",function(a){c.oM(a)});c.Tc().dblclick(function(a){c.hM(a)});c.Tc().click(function(a){c.fM(a)});c.Tc().on("tap",function(a){c.pM(a)});$(window).on("keydown",function(a){c.iM(a)});$(window).on("keyup",function(a){c.jM(a)});c.Tc().on("contextmenu",function(a){c.gM(a)});
c.Tc().mouseenter(function(a){c.kM(a)});var e=c.Tc(),f=c.xb();0<f.length&&(e=f);e.mousedown(function(a){if(0<f.length){var b=f[0].clientHeight;if(a.clientX>f[0].offsetLeft+f[0].clientWidth||a.clientY>f[0].offsetTop+b)return}1===a.which?(c.NC(a),c.$x=!0):3===a.which&&(c.mM(a),c.$D=!0)});$(document).on("mouseup",function(a){1===a.which&&c.$x?(c.OC(a),c.$x=!1):3===a.which&&c.$D&&(c.nM(a),c.$D=!1)});$(document).mousemove(function(a){c.Ib={x:a.pageX,y:a.pageY};c.PC(a)});c.Tc().mouseleave(function(a){c.lM(a)});
if(c.ea.Vb().Oo)c.xb().on("scroll",_.bind(c.onscroll,c));$(b).on("resize",_.bind(c.resize,c));c.on("PAUSE",function(){c.Ea.pause()});c.on("RESUME",function(){c.Ea.resume()});var h=!1,l=null,n;c.on("documentReady",function(){c.v.Le("Init",new b.Annotations.O.ub.Events.FC.create("Open",c,{}));c.v.Le("Open",new b.Annotations.O.ub.Events.FC.create("Open",c,{}));h||a(1)});c.on("pageNumberUpdated",function(b,e){a(e);c.v.nm({currentPage:e})});c.on("visiblePagesChanged",function(a,b){if(c.SA){c.ju();var e=
[];b.forEach(function(a){c.ug[a]&&e.push(a)});c.ug.fill(!1);e.forEach(function(a){c.ug[a]=!0});var f=c.da.Pc().filter(function(a){return-1===b.indexOf(a.Hb()-1)});c.da.ou(f,!0,!0)}c.v.nm({visiblePages:b});var g=_.intersection(b,c.hq);g.length&&(clearTimeout(c.nO),c.nO=setTimeout(function(){c.Si.Oi("DocumentViewer.renderRequest",{type:"annotations",pages:g})},80))});c.on("endOfDocumentResult",function(a,b){c.Ul=!1;c.Zr();b?(c.loop=!0,c.kC(c.IF,c.qP,!1)):c.loop=!1})},resize:function(a){a&&a.target!==
window||!this.v||!this.ea.Vb().Oo||(this.yf===this.Lg.Zoom?(this.wy(),this.ea.Vb().Mf(),this.onscroll()):(a=this.yf(),a!==this.N.mg?(this.bq(a),this.Jy()):(this.ea.Vb().Mf(),this.Jy(),this.onscroll())))},Jy:function(){var a=this.xb(),c=(a[0].scrollWidth-a.width()+this.$u())/2;a.scrollLeft(c)},oV:function(){this.resize()},vF:function(){var a=this;return this.tu=this.tu.then(function(){if(a.v)return a.trigger("documentUnloaded"),a.yh(!0),Promise.resolve(a.bd()).then(function(){a.WJ()});a.Wl&&a.Wl.Kb();
return Promise.resolve()})},WJ:function(){this.v=null;this.tu=Promise.resolve();this.Ea=new b.o.uM(this);this.ea.YJ(this.defaults.DisplayMode);this.yf=this.defaults.FitMode;this.JJ=!1;this.nI=[];this.ac=0;this.links={};this.vf=[];this.Pa||(this.Pa=Promise.resolve(null));this.N=new e.Ix(null);this.Ib=this.Ud=null;this.margin=4;this.NJ=this.OJ=0;this.$r=new c.xe;this.kd=this.GI=this.Lv=null;this.BI=this.YA=this.Ul=this.vA=this.loop=!1;this.CI=this.DI=null;this.br=!1;this.NK="rgba(0, 0, 200, 0.3)";this.HB=
"rgba(255, 255, 0, 0.5)";this.ty="rgba(248, 153, 57, 0.5)";var a=this,d=Object.keys(this.ni);0<d.length&&d.forEach(function(c){a.ni[c].then(function(a){a.destroy()})});this.ni={};this.Dz=[];this.Si=new b.o.Um.Dp;this.Si.uJ("DocumentViewer.renderRequest",{read:function(c){c.Ey&&a.ea.Mf();a.rX();c=a.ea.Sd();a.Ea.fp(c);return{xd:c,nV:a.HU()}},consolidateChanges:function(a){var c=a.filter(function(a){return"pages"===a.type}),b=a.filter(function(a){return"annotations"===a.type}),d=a.filter(function(a){return"layout"===
a.type});a=a.filter(function(a){return"retainScroll"===a.type});var e=[];c.length&&e.push({type:"pages",pages:_.union.apply(null,c.map(function(a){return a.pages||[]})),useVisiblePages:c.some(function(a){return!!a.useVisiblePages}),check:c.every(function(a){return!!a.check})});b.length&&e.push({type:"annotations",pages:_.union.apply(null,b.map(function(a){return a.pages||[]}))});d.length&&e.push({type:"layout",pages:_.union.apply(null,d.map(function(a){return a.pages||[]}))});return e=e.concat(a)},
write:function(c,b){var d={Ey:!1};b.forEach(function(b){var e;"pages"===b.type?(e=b.useVisiblePages?_.union(c.xd,b.pages):_.intersection(c.xd,b.pages),0<e.length&&(b.check?a.Ea.OO():a.zk(e))):"annotations"===b.type?(e=_.intersection(c.xd,b.pages),a.hq=_.difference(a.hq,e),a.Ea.xJ(),e.forEach(function(c){a.Tj(c)})):"layout"===b.type?(d.Ey=!0,e=a.ea.Cg().concat(b.pages),b.pages.forEach(function(c){a.N.UB(c,void 0)}),e.length&&(e.forEach(function(c){a.Ea.lv(a.N.Af(c))}),a.Si.Oi("DocumentViewer.renderRequest",
{type:"pages",pages:e})),a.Ea.rC(a.Ze())):"retainScroll"===b.type&&a.NX(c.nV)});return d},clearCacheIfFull:function(){var c=null;try{c=a.Xj(a.Hl()-1).getContext("2d")}catch(b){console.log("Cache is full")}c||(console.log("Clearing Cache"),a.yh(!1,!1,!1))}},{Ey:!0},!1);this.Wv=[];this.hq=[];this.Xt=null;this.ZE=Promise.resolve()},HU:function(){var a=this.Hl()-1,c=this.xb(),b=c.scrollLeft()||0,c=c.scrollTop()||0,e=document.getElementById("pageContainer"+a);e&&(b-=e.offsetLeft+e.parentNode.offsetLeft,
c-=e.offsetTop+e.parentNode.offsetTop);return{Jb:a,x:b,y:c}},NX:function(a){var c=document.getElementById("pageContainer"+a.Jb),b=a.x;a=a.y;c&&(b+=c.offsetLeft+c.parentNode.offsetLeft,a+=c.offsetTop+c.parentNode.offsetTop);this.scrollTo(b,a)},HL:function(a){var c={};_.isUndefined(a)||(_.isObject(a)?c=a:c.docId=a);"onError"in c||(c.onError=function(a){throw Error("Error loading document: "+a);});"getPassword"in c||(c.getPassword=function(){throw Error("Document requires a password. If you wish to process this type of document please define a getPassword callback.");
});"docId"in c||(c.docId=null);"workerTransportPromise"in c||("pdf"===c.type?c.workerTransportPromise=e.iv(c.pdfBackendType,c.workerHandlers,c.l):"office"===c.type&&(c.workerTransportPromise=e.TH(c.officeBackendType,c.workerHandlers,c.l)));return c},nJ:function(a){this.Si.Oi("DocumentViewer.renderRequest",{type:"layout",pages:a});this.Si.Oi("DocumentViewer.renderRequest",{type:"retainScroll"})},oH:function(){return this.Si},rG:function(){if(this.SA){for(var a=this.ea.Sd(),c=0;c<a.length;++c){var b=
a[c];if(!this.ug[b])return b}return null}b=this.ac;a=this.ug;for(c=b;!_.isUndefined(a[b])||!_.isUndefined(a[c]);){if(!1===a[b])return b;if(!1===a[c])return c;--c;++b}return null},uG:function(a){var c=this;a=a.pages;c.JH||-1===a.indexOf(1)||(c.trigger("documentReady"),c.JH=!0);var b=c.Ea.TR();a.forEach(function(a){--a;c.ug[a]=!0;0<=b.indexOf(a)&&c.Tj(a)});var e=c.rG();null===e&&c.trigger("annotationsLoaded");c.ov=!1;c.hq=c.hq.concat(a.map(function(a){return a-1}));c.ju(e)},ju:function(a){this.ov||
(a=_.isUndefined(a)?this.rG():a,null!==a?this.zT([a],this.v):this.ov=!1)},zT:function(a,c){var b=this;b.ov=!0;this.Wv=this.Wv.concat(a);this.Xt||(this.Xt=setTimeout(function(){if(b.Wl===c){var e=b.Wv;b.Wv=[];b.Xt=null;b.cZ=b.ZE.then(function(){if(b.Wl===c){var a=e.map(function(a){return a+1});b.da.wB(a);for(var f=e.length,n=0;n<f;++n)b.da.BT(e[n]);return b.getDocument().uz(a)}}).then(function(e){return new Promise(function(f){b.Wl===c&&e?e.hasOwnProperty("xfdfString")?b.VI(e.xfdfString,a,function(a){b.Wl!==
c||_.isUndefined(a)?f():b.da.RH(a,function(){b.uG(e);f()},b.GQ(e.xfdfString===a))}):e.hasOwnProperty("annots")&&(b.da.Yg(e.annots),b.uG(e),f()):(b.trigger("annotationsLoaded"),f())})})}},20))},mr:function(a,c){var g=this;c=g.HL(c);var k=new b.CoreControls.Document(c.docId,c.type);this.Wl=k;k.xg(g);g.tu.then(function(){return g.Pa}).then(function(a){k.um(a)}).then(function(){return new Promise(function(b,e){g.JH=!1;g.$E=!1;k.mr(a,function(a){k!==g.Wl?(k.Kb(),e(new f)):a?e(a):null!==g.v?b(g.vF().then(function(){return k})):
b(k)},{annotationManager:g.da,getPassword:c.getPassword,workerTransportPromise:c.workerTransportPromise,extension:c.extension,defaultPageSize:c.defaultPageSize,pageSizes:c.pageSizes,forceClientSideInit:c.forceClientSideInit})})}).then(function(a){g.v=a;var f=a.numPages;g.D_=f;g.ug=Array(f);g.ov=!1;f=a.Zo();g.ug.fill(f?!1:1);f&&g.ju(0);g.N=new e.Ix(a);g.defaults.FitMode===g.Lg.Zoom&&g.N.Xi(g.defaults.Zoom);g.v.on("bookmarksUpdated",function(){g.trigger("bookmarksUpdated")});g.v.on("officeAnnotationsUpdated",
function(a,c){g.da.Yg(c);g.da.ii(c)});g.N.on("layoutChanged",g.wT.bind(g));g.N.on("zoomChanged",function(a,c){g.tC=g.Ea.Eg;g.Ea.rC(c)});g.da.OU(g.N);g.trigger("beforeDocumentLoaded");c.type&&"pdf"===c.type&&b.o.GF!==b.o.Hm.Is||g.Ea.tW(!0);g.Ea.init();g.ea.AE(g.ea.Vb());g.mG||(g.mG=!0,g.AO());g.ea.Vb().mode!==b.o.Ad.Qf&&(g.N.Xi(g.Kt(g.yf)),g.yh(),g.ea.Cg(),g.ea.Mf(),g.zk(),a=g.xb(),f=(a[0].scrollWidth+g.$u()-a.innerWidth())/2,a.scrollLeft(f));g.mO=new Promise(function(a){g.off("annotationsLoaded.internal").on("annotationsLoaded.internal",
function(){g.$E=!0;a()})});g.trigger("documentLoaded");1.2>=g.v.v.Pf&&g.trigger("documentReady")})["catch"](function(a){if(!(a instanceof f))c.onError(a)})},HQ:function(){return this.mO},sm:function(a){this.ea.Vb().mode!==b.o.Ad.Qf&&this.xb().css("touch-action",a)},xb:function(){return $(this.Zu())},Zu:function(){this.PJ||this.nK(document.getElementById("DocumentViewer"));return this.PJ},nK:function(a){this.PJ=a},Tc:function(){return $(this.xH())},xH:function(){this.cL||this.rK(document.getElementById("viewer"));
return this.cL},rK:function(a){this.cL=a},$u:function(){var a=$('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div></div>');$("body").append(a);var c=$("div",a).innerWidth();a.css("overflow-y","auto");var b=$("div",a).innerWidth();$(a).remove();return c-b},bd:function(){var a=this;if(this.v){var c=this.v;clearTimeout(this.Xt);return this.da.bd().then(function(){return Promise.all([a.ZE,a.Si?a.Si.bd():null,a.Ea?a.Ea.bd():
null,a.N?a.N.bd():null])}).then(function(){a.off("documentReady.annotsLoaded");c.off();return c.Kb()})}return Promise.resolve()},fd:function(a){var c=this.v.Tq(a);return 90===c||270===c?this.v.gd(a):this.v.fd(a)},gd:function(a){var c=this.v.Tq(a);return 90===c||270===c?this.v.fd(a):this.v.gd(a)},Bc:function(a){return this.v.Bc(a)},Qa:function(){return this.da},xV:function(a){this.kO=a},GQ:function(a){return $.extend({DA:a},this.kO)},SV:function(a){this.SA=a},MV:function(){},jW:function(a){this.VI=
a},iW:function(a){this.SI=a},nF:function(){if(this.SI){for(var a=this.nI,c=this.ea.Sd(0,0),a=_.difference(c,a),b=0;b<a.length;++b)this.SI(a[b]+1);this.nI=c}},$j:function(){return this.ea},PW:function(a,c,b){if(!e.Bi())return console.warn("snapToNearest requires the full API to be enabled. Please set the fullAPI option to true in your WebViewer constructor."),Promise.resolve();var f=this.getDocument(),h=f.Ll(a-1,c,b);return this.cR(a).then(function(a){return a.snapToNearest(h.x,h.y)}).then(function(c){return f.fv(a-
1,c.x,c.y)})},cR:function(a){if(this.ni[a])return this.ni[a];var c=this,b;this.ni[a]=window.PDFNet.initialize().then(function(){return c.getDocument().kg().then(function(c){b=c;return b.requirePage(a)}).then(function(){return b.getGeometryCollectionForPage(a)}).then(function(a){return a})});c.gO(a);return this.ni[a]},gO:function(a){this.Dz.push(a);this.Dz.length>this.EL&&(a=this.Dz.shift(),this.ni[a].then(function(a){a.destroy()}),delete this.ni[a])},Cw:function(a,c){b.o.Aa.Cw(a,c)},oe:function(a){"undefined"!==
typeof a.enableAnnotations&&(this.Cq=!!a.enableAnnotations);"undefined"!==typeof a.annotMode&&(this.iO=!!a.annotMode)},Ze:function(){return this.N.mg},Tu:function(){return this.margin},tH:function(){return this.margin*this.Ze()},UV:function(a){this.margin=a},bv:function(a){return a?this.N.ER(a-1):this.N.bv()},jA:function(a){return a?this.N.FR(a-1):this.N.jA()},xW:function(a){this.NK=a},sW:function(a){this.HB=a.searchResult||this.HB;this.ty=a.activeSearchResult||this.ty},dv:function(){return this.xa},
gS:function(){return this.QK},cv:function(a){return this.QK[a]},Qd:function(a){return _.isUndefined(a)?this.N.hv:this.N.Rd(a-1).rotation},Pd:function(a){var c=this.Qd(a);if(_.isUndefined(a))return c;a=this.Kl(a)/90;return(c+a)%4},rW:function(a,c){var b;0<=a&&3>=a&&(_.isUndefined(c)?(this.N.SB(a),this.N.SO()):(b=c-1,this.N.Rr(b,a)),this.rotate(b))},Kl:function(a){--a;return 0>a||_.isNaN(a)?0:this.v.Tq?this.v.Tq(a):0},eW:function(a){var c=this;Object.keys(a).forEach(function(b){c.N.Rr(b,a[b])});this.bq(this.yf(),
void 0,void 0,!0)},DR:function(){return this.N.hR()},getDocument:function(){return this.v},Xq:function(a){var c=null;this.Ea.Eg&&(c=this.ea,c=c.no(a,c.rA(this.Ea.ce,this.Ea.ce)));return c},mS:function(a){var c=null;if(a=this.Xq(a))c=a.Xd;return c},Xo:function(a,c){var e=this.v.fc(a),f=this.kb(a),h=this.ea.jo(a),l,n=this.Xq(a);n&&(l=n.Xd,h=n.Lw);return b.o.Aa.Xo(c,{width:e.width,height:e.height},f,this.Qd(a+1),h,l,this.Kl(a+1)/90)},Xj:function(a){var c=this.v.fc(a),e=this.kb(a),f=this.ea.jo(a),h,l=
this.Xq(a);l&&(h=l.Xd,f=l.Lw);return b.o.Aa.Xj(a,{width:c.width,height:c.height},e,this.Qd(a+1),f,h,this.Kl(a+1)/90)},aR:function(){return this.yf},hA:function(){return this.JJ},qW:function(a){this.JJ=a},KP:function(a){if(a.url)(new Actions.oj({uri:a.url})).onTriggered(a,null,this);else a.isValid()?this.Pn(a.Hf,a.so,a.gp):console.warn("Tried to go to invalid bookmark destination")},Pn:function(a,c,b,e){if(this.ea.Vb().Oo){this.Hl()!==a&&this.Je(a);var f=this.gd(a-1),l=this.fd(a-1);a=this.ea.cf({x:c>
f?0:0>c?0:c,y:b>l?0:0>b?0:b},a-1);c=this.xb();b=c.offset();if(e&&(e=a.x-b.left-(c.scrollLeft()||0),f=a.y-b.top-(c.scrollTop()||0),0<e&&e<c.outerWidth()&&0<f&&f<c.outerHeight()))return;this.scrollTo(a.x-b.left,a.y-b.top)}else this.trigger("displayPageLocation",[a,b,c,e])},scrollTo:function(a,c){this.xb().scrollLeft(a).scrollTop(c)},XW:function(a,c,b){if(a!==this.Lv||c!==this.GI)this.DI=a,this.CI=c,this.YA=!0,this.BI=b},bX:function(a){var c=!1;if(null===this.Lv||this.Lv!==a)c=!0;if(null===this.loop||
!0===this.loop)c=!0;this.Lv=a;this.kd!==this.ac&&(this.kd=this.ac,c=!0);return c},kC:function(a,b,e,f){e=e||!1;this.GB=!1;var h=this,l=!0;this.IF!==a&&(this.IF=a,this.vA=!1);this.qP=b;for(var n=0;n<a.length;++n){var m=a.charCodeAt(n);if(!(1424<=m&&1535>=m||1536<=m&&1791>=m||1872<=m&&1919>=m||64336<=m&&65023>=m||65136<=m&&65279>=m)){l=!1;break}}l&&(a=a.split("").reverse().join(""));h.Z_=h.ac;if(!0===this.Ul)this.XW(a,b,e);else{e?(l=function(){},h.N.Py(),h.br=!1):(h.br=!0,l=function(a){a.pw===c.kc.Aq?
(h.gz(a),h.vA=!0):a.pw===c.kc.Al&&(h.vA?h.trigger("notify","endOfDocumentSearch"):h.trigger("notify","noMatchesFound"))});f=f||l;if(e||this.bX(a))e?(l=this.kd=0,n=this.v.numPages-1):0<(b&c.ib.oz)?(n=!0===this.loop?this.v.numPages-1:this.kd,l=0):(l=!0===this.loop?0:this.kd,n=this.v.numPages-1),this.$r.zO(this.v,a,b,l,n);this.$r.setMode(b);this.GI=b;this.dX(e,f)}},eJ:function(a){null===this.v.bA(a)&&this.v.rh(a,function(){})},Zr:function(){this.trigger("searchInProgress",[this.Ul,!this.br])},dX:function(a,
b){function e(){function g(){n=[];l=h.$r.run(n);m=l.pw;l.N_=n;var e=l;e.ambient_str=l.VE;e.result_str=l.DB;e.result_str_start=l.IJ;e.result_str_end=l.HJ;e.page_num=l.kB;e.resultCode=m;e.quads=n;if(h.GB)h.GB=!1,h.Ul=!1,h.Zr();else if(!0===h.YA)h.YA=!1,h.Ul=!1,h.Zr(),setTimeout(function(){h.kC(h.DI,h.CI,h.BI,b)},0);else{if(m===c.kc.wu){var q,v;if(h.$r.ph()){if(0<h.kd)for(h.kd--,v=0;3>v;++v)q=h.kd-v,0<q&&h.eJ(q)}else if(h.kd<h.v.numPages-1)for(h.kd++,v=0;3>v;++v)q=h.kd+v,q<h.v.numPages-1&&h.eJ(q)}else m!==
c.kc.Aq||a||(h.N.Qy(),h.N.gK(l.kB,l.DB));b(e);m===c.kc.Al||!a&&m===c.kc.Aq?(h.Ul=!1,h.Zr()):null!==h.v.bA(h.kd)?setTimeout(g,0):h.v.rh(h.kd,f)}}var m=-1;null!==h.v.bA(h.kd)?setTimeout(g,0):h.v.rh(h.kd,f)}function f(a){m===h.v&&(h.v.gW(h.kd,a),e())}var h=this;this.Ul=!0;this.Zr();!0===this.loop&&(h.kd=this.$r.ph()?this.v.numPages-1:0,this.loop=!1);var l,n=[],m=this.v;e()},kI:function(a,c){a!==this.ac&&this.Je(a+1);if(0<c.length){c=c.map(function(a){return a.mh?a.mh():a});for(var b=c[0].y4,e=c[0].x4,
f=c[0].y2,l=c[0].x2,n=1;n<c.length;n++)c[n].x4<e&&(e=c[n].x4),c[n].y4<b&&(b=c[n].y4),c[n].x2>l&&(l=c[n].x2),c[n].y2>f&&(f=c[n].y2);var n=this.xb(),m=n.offset(),r=m.top+(n.scrollTop()||0),p=r+n.innerHeight(),m=m.left+(n.scrollLeft()||0),u=m+n.innerWidth(),b=this.ea.cf({x:e,y:b},a),q=this.ea.cf({x:l,y:f},a),l=b.x<q.x?b.x:q.x,f=b.y<q.y?b.y:q.y,e=b.x>q.x?b.x:q.x,b=b.y>q.y?b.y:q.y;if(l<m||f<r||e>u||b>p)r=e-l,p=b-f,r=l-n.innerWidth()/2+r/2-n.offset().left,n=f-n.innerHeight()/2+p/2-n.offset().top,this.scrollTo(r,
n)}},lI:function(a,c){var b=a.page_num;"undefined"!==typeof c?c(b,a.quads):this.kI(b,a.quads)},gz:function(a,c){var b=this;this.br=!0;this.IE=a;this.ep(function(){var e=a.page_num;b.N.Py();b.N.fW(e,a);b.lI(a,c)})},JP:function(a){var c=this;this.ep(function(){c.N.uX(a.page_num,a)})},tV:function(a){this.br?this.gz(a):(this.IE=a,this.lI(a),this.ep())},XO:function(){var a=this;this.ep(function(){a.N.Py()});this.GB=!0},RJ:function(a,b,e){var f=new c.Ka;f.Da(b.x,b.y,b.x+1,b.y+1);var h=this,l=new c.mj(this.v),
n=this.v;n.rh(a,function(){n===h.v&&(l.yE(a,f),h.xo=l.yE,h.Pi=[[a,f]],e(a,l.he(),l.Oa))})},Po:function(a,b,e){if(b.constructor!==c.Ka){var f=new c.Ka;f.Da(b.x1,b.y1,b.x2,b.y2);b=f}var h=this,l=new c.mj(this.v),n=this.v;n.rh(a,function(){if(n===h.v){"rectangular"===Tools.Yb.SELECTION_MODE?l.SJ(a,b):l.QJ(a,b);var c=l.Oa,f=l.he();e&&e(a,f,c)}})},aw:function(a,c,b){this.N.gK(a,b);this.N.hW(a,c);this.trigger("textSelected",[c,b,a]);this.ep()},mz:function(a){this.NH(a-1)},OH:function(a,c,b){for(var e=0;e<
c.length;e++){var f=c[e];f.mh&&(f=f.mh());a.fillStyle=b;a.beginPath();a.moveTo(f.x1,f.y1);a.lineTo(f.x2,f.y2);a.lineTo(f.x3,f.y3);a.lineTo(f.x4,f.y4);a.closePath();a.fill()}},FS:function(a,c){var b=this.N.Rd(a).Ag;if(b&&0!==b.length){var e=c.getContext("2d");this.OH(e,b,this.NK);var f={he:function(){return b.map(function(a){return a.mh()})}},l=this.N.CR(),n=!1,m=!1;a===l[0]&&(n=!0);a===l[l.length-1]&&(m=!0);e.save();l=new Annotations.nj(f,!0,!1,n,m);n=this.Bc(a);l.draw(e,f,this.kb(a),n);e.restore()}},
ES:function(a,c){var b=this.N.Rd(a).Wi;if(b&&0!==b.length){var e=c.getContext("2d"),f=this;b.forEach(function(a){f.OH(e,a.quads,a===f.IE?f.ty:f.HB)})}},NH:function(a,c){c=c||this.Xj(a);null!==c&&(this.FS(a,c),this.ES(a,c))},ep:function(a){var c=this.N.iH();a&&a();a=this.N.iH();c=_.uniq(c.concat(a));for(a=0;a<c.length;++a)this.da.Od(c[a]+1)},select:function(a,b){if(null!==this.Ud&&null!==this.Ib||a||b){this.N.Qy();var e;a&&b?(a.Jb=a.pageIndex,a.x=a.x,a.y=a.y,b.Jb=b.pageIndex,b.x=b.x,b.y=b.y,e={first:a.Jb,
last:b.Jb}):(console.error("deprecated"),e=this.ea.av());var f=e.first;e=e.last;if(null!==f&&null!==e){var h=new c.Ka,l=a||this.ea.Ck(this.Ud,f),n=b||this.ea.Ck(this.Ib,f),m;l.y>n.y&&(m=l,l=n,n=m);m=this.gd(f);var r=this.fd(f);1<=e-f?h.Da(l.x,l.y,m,r):h.Da(l.x,l.y,n.x,n.y);this.Po(f,h,_.bind(this.aw,this));for(l=f+1;l<e;l++)h=new c.Ka,m=this.gd(l),r=this.fd(l),h.Da(0,0,m,r),this.Po(l,h,_.bind(this.aw,this));f!==e&&(l=a||this.ea.Ck(this.Ud,e),n=b||this.ea.Ck(this.Ib,e),l.y>n.y&&(n=l),h=new c.Ka,h.Da(0,
0,n.x,n.y),this.Po(e,h,_.bind(this.aw,this)))}}},YO:function(a){if(0!==this.bv().length||this.N.AR(a)){var c=this.Xj(a);null!==c&&(b.o.Aa.sq(c,this.gd(a),this.fd(a)),this.Cq&&this.da.Od(a+1))}},sF:function(){this.N.Qy();this.N.rF()},uq:function(){var a=this;this.ep(function(){a.sF();a.trigger("textSelected",[null,""]);a.dv()instanceof Tools.Wm&&a.dv().uq()})},PQ:function(a,c,e){var f=[],h=a-1;a=this.N.Af(h);if((a=this.Ea.Qc(a))&&a.me)for(c=this.iA({x:c,y:e},h),e=a.Xd?this.iA({x:a.Xd.x1,y:a.Xd.y1},
h):{x:0,y:0},h=b.utils.getCanvasMultiplier(),c.x*=h,c.y*=h,e.x*=h,e.y*=h,c=Math.round(c.y-e.y)*a.me.width+Math.round(c.x-e.x),a=a.me.data,e=0;e<a.length;++e)if(h=a[e],"Alpha"!==h.name){var l=new Uint8Array(h.data);c<l.length&&0<=c&&f.push({name:h.name,value:Math.round(l[c]/255*100)})}return f},iA:function(a,c){var e=this.kb(c),f=this.Pd(c+1);a=b.Bd(e,f,{width:this.gd(c),height:this.fd(c)},null,!1).W(a);return{x:a.x,y:a.y}},WR:function(a,c){var e=this.kb(c),f=this.Qd(c+1);a=b.Bd(e,f,this.v.fc(c),0,
!1).W(a);return{x:a.x,y:a.y}},Lg:{IC:function(){var a=this.$u(),c=this.xb(),b;b=1===this.ea.Vb().Rb?this.N.Rd(this.ac).width:this.ea.Nn().ya()/this.Ze();return parseFloat(c.innerWidth()-a)/(b+1+this.Tu()*this.ea.Vb().Rb*2)},rx:function(){var a=this.xb(),c=this.N.Rd(this.ac),b=parseFloat(a.innerHeight())/(c.height+2*this.Tu()),c=1===this.ea.Vb().Rb?c.width:this.ea.Nn().ya()/this.Ze(),a=parseFloat(a.innerWidth()-this.$u())/(c+1+this.Tu()*this.ea.Vb().Rb*2);return b<a?b:a},Zoom:function(){this.wy();
return this.N.mg}},YB:function(a){if(a&&this.xa!==a){a instanceof Tools.Hk||a instanceof Tools.Wm||a instanceof Tools.Cp||this.uq();var c;this.xa&&(this.xa.switchOut&&this.xa.switchOut(a),c=this.xa);a.switchIn&&a.switchIn(this.xa);this.xa=a;this.trigger("toolModeUpdated",[a,c])}},yX:function(){var a=this.xb();this.OJ=parseFloat(a.scrollTop())/a[0].scrollHeight;this.NJ=parseFloat(a.scrollLeft()+a.innerWidth()/2)/a[0].scrollWidth},xX:function(){var a=this.xb(),c=this.OJ*a[0].scrollHeight,a=this.NJ*
a[0].scrollWidth-a.innerWidth()/2;this.scrollTo(a,c)},RB:function(a){null===this.v?(this.yf=a,this.trigger("fitModeUpdated",this.yf)):(a=this.Kt(a),this.ea.Vb().mode===b.o.Ad.Qf?this.N.Xi(a):a!==this.N.mg&&(this.bq(a),this.Jy()))},Kt:function(a){this.yf=a;a=this.yf();this.trigger("fitModeUpdated",this.yf);return a},rotate:function(a){var c;_.isUndefined(a)||(c=a+1);this.bq(this.yf(),void 0,void 0,!0);this.trigger("rotationUpdated",[this.Pd(c),c])},mo:function(a,c){return c?(a+1)%4:(a-1+4)%4},eV:function(a){var c=
this,b;_.isUndefined(a)?(this.N.SB(this.mo(this.Qd(),!0)),this.N.zG(function(a){a.rotation=c.mo(a.rotation,!0)})):(b=a-1,this.N.Rr(b,this.mo(this.Qd(a),!0)));this.rotate(b)},fV:function(a){var c=this,b;_.isUndefined(a)?(this.N.SB(this.mo(this.Qd(),!1)),this.N.zG(function(a){a.rotation=c.mo(a.rotation,!1)})):(b=a-1,this.N.Rr(b,this.mo(this.Qd(a),!1)));this.rotate(b)},bq:function(a,c,b,e){this.N.Xi(a);this.ea.Vb().Oo&&("undefined"!==typeof c&&"undefined"!==typeof b?(this.yh(!1,e,!0),this.ea.Cg(),this.ea.Mf(),
this.scrollTo(c,b)):(this.yX(),this.yh(!1,e,!0),this.ea.Cg(),this.ea.Mf(),this.xX()),this.Ea.My(),this.zk(),this.trigger("zoomUpdated",this.N.mg))},Xw:function(a,c,b){this.Kt(this.Lg.Zoom);null===this.v?(this.N.Xi(a),this.trigger("zoomUpdated",a)):this.bq(a,c,b)},oL:function(a,c,b){this.Kt(this.Lg.Zoom);this.N.Xi(a);a=this.xb();c=this.Ib.x-c;b=this.Ib.y-b;var e=(parseFloat(a.scrollTop())+b)/a[0].scrollHeight,f=(parseFloat(a.scrollLeft())+c)/a[0].scrollWidth;this.yh(!1,!1,!0);this.ea.Cg();this.ea.Mf();
this.scrollTo(f*a[0].scrollWidth-c,e*a[0].scrollHeight-b);this.zk();this.trigger("zoomUpdated",this.N.mg)},kb:function(a){return this.N.Rd(a).zoom},Bw:function(a,c){var b=this.N.Af(a);this.Ea.XX(b);this.N.Bw(a,c)},yh:function(a,c,e){this.Ea.fP(this.N.mg,c);this.links=[];if(this.ea.Vb().mode!==b.o.Ad.Qf){var f=this.Ea.xd;if(!c&&e)for(var h=0;h<f.length;h++){var l=f[h],n;n=this.tC?$("#pageContainer"+l).find("#hrthumb"+l):$("#pageContainer"+l).find(".canvas"+l+":not(.progressive)");0<n.length&&this.N.UB(l,
n)}e&&!c||this.N.VO()}this.ea.Kr(!a)},PU:function(a){if(this.ea.Vb().Oo){var c=$("#pageContainer"+a),e=$(document.activeElement);0<e.closest("#pageWidgetContainer"+a).length&&e.trigger("focusout");this.ea.Vb().gr(a)||c.children("canvas").each(function(){this.height=this.width=0});c.children().detach();b.o.Aa.Ly(a)}a in this.links&&delete this.links[a]},Jt:function(a){if(0>a||a>=this.N.J.length)return!1;this.ac!==a&&(this.ac=a,this.trigger("pageNumberUpdated",a+1));return!0},Je:function(a){if(!this.ea.Vb().Oo)this.trigger("changePage",
a);else if(!1!==this.Jt(parseInt(a,10)-1)){this.HF=!0;a=this.ac;var c=this.ea.Vb();c.HA()||c.mode===b.o.Ad.Qf||(this.ea.Vb().mode===b.o.Ad.ps&&a++,c.Md=Math.floor(parseFloat(a)/c.Rb),c.ld=c.Md,c.gg=c.Md+1,this.yh(),this.ea.Cg(),this.ea.Mf());a=this.v.fc(this.ac);0<this.Kl(this.ac)/90%2&&(c=a.width,a.width=a.height,a.height=c);var c=this.ea.cf({x:0,y:0},this.ac),e=this.ea.cf({x:a.width,y:a.height},this.ac);a=c.x<e.x?c.x:e.x;c=c.y<e.y?c.y:e.y;e=this.xb().offset();this.scrollTo(a-e.left,c-this.tH()-
e.top);this.zk()}},Hl:function(){return this.ac+1},vb:function(){return this.v.numPages},MP:function(){this.Je(this.N.J.length)},LP:function(){this.Je(1)},wy:function(a){a=a||this.ea.Nn().va();var c=0,b=document.getElementById("docpad");if(null!==b){var e=this.Zu(),e=e?parseFloat(e.style.height):0;e>a&&(c=Math.floor((e-a)/2));b.style.marginBottom=parseInt(c,10)+"px"}},sO:function(a,c){var e=this.kb(c),f=this.N.Rd(c),h=this.Qd(c+1),l=Math.floor(f.width*e),e=Math.floor(f.height*e),f=null;h===b.o.Sa.Xe||
h===b.o.Sa.fg?(f="rotate("+90*h+"deg)",f=h===b.o.Sa.Xe?" translate("+l+"px, 0)  "+f:" translate(0,"+e+"px)  "+f,a.css("height",l),a.css("width",e)):(h===b.o.Sa.zq&&(f="translate("+l+"px,"+e+"px) scale(-1,-1)"),a.css("width",l),a.css("height",e));null!==f&&a.css({position:"absolute",transform:f,"transform-origin":"top left","ms-transform":f,"ms-transform-origin":"top left","-moz-transform":f,"-moz-transform-origin":"top left","-webkit-transform-origin":"top left","-webkit-transform":f,"-o-transform":f,
"-o-transform-origin":"top left"})},aF:function(a,c,e,f){this.trigger("appendThumb",c);a.id=(f?"hrthumb":"thumb")+c;a.style.position="absolute";var h=$(a);this.sO(h,c);e&&(h.css("z-index",f?"10":"7"),e=$("#pageContainer"+c),0<e.length?0===e.find("#"+a.id).length&&e.prepend(a):b.utils.warn("appendThumb: Page container "+c+" missing"))},Tj:function(a){this.Yt(a);this.YO(a);this.kP(a);this.tX(a);this.da.Od(a+1,void 0,!0);var c=b.o.Aa;2===c.rk&&c.Zj(a)===c.Zj(a+1)&&a+2<=this.vb()&&this.da.Od(a+2)},kq:function(a,
c){this.tC||this.N.UO(c);var e=b.o.Aa.kq(a,c);e||b.utils.warn("appendAllCanvas: Page container for page "+c+" does not exist.");return e},Yt:function(a){var c,e=this.Xq(a);e&&(c=e.Xd);var e=this.v.fc(a),f=this.Kl(a+1);if(90===f||270===f)f=e.width,e.width=e.height,e.height=f;b.o.Aa.Yt(a,e,this.kb(a),this.Pd(a+1),c)},Mn:function(a){var c,e=this.Xq(a);e&&(c=e.Xd);var e=this.v.fc(a),f=this.Kl(a+1);if(90===f||270===f)f=e.width,e.width=e.height,e.height=f;return b.o.Aa.Mn(a,e,this.kb(a),this.Pd(a+1),c)},
fw:function(a,c){var e=this.ho(a);b.o.Aa.fw(a,c,e)},rw:function(a,c){b.o.Aa.rw(a,c)},kP:function(a){var c=this.v.fc(a),e=c.width,c=c.height,f=this.v.Tq(a);if(90===f||270===f)f=e,e=c,c=f;var f=this.kb(a),e=e*f,c=c*f,h=b.Bd(1,this.Pd(a+1),{width:e,height:c},void 0,!1),f=$("#pageWidgetContainer"+a);0===f.length&&(f=$('<div id="pageWidgetContainer'+a+'" />'),b.o.Aa.BH(a).append(f));h="matrix("+h.m_a.toFixed(10)+","+h.m_b.toFixed(10)+","+h.m_c.toFixed(10)+","+h.m_d.toFixed(10)+","+h.m_h.toFixed(10)+","+
h.m_v.toFixed(10)+")";a=this.ea.$z(a);f.css({position:"absolute",top:a.y,left:a.x,width:e,height:c,"z-index":40,transform:h,"transform-origin":"top left","-webkit-transform":h,"-webkit-transform-origin":"top left","-ms-transform":h,"-ms-transform-origin":"top left","-moz-transform":h,"-moz-transform-origin":"top left",overflow:"hidden"});return f},ho:function(a){return this.N.Rd(a)},MU:function(){this.trigger("layoutChanged",{contentChanged:_.range(1,this.vb()+1),removed:[],added:[],moved:{}});this.Ea.My()},
qJ:function(a){this.trigger("layoutChanged",{contentChanged:[a],removed:[],added:[],moved:{}});this.Ea.lv(this.ho(a-1).id)},tX:function(a){a=this.v.yR(a);_.isArray(a)&&this.da.Yg(a,!0)},zk:function(a,c){_.isUndefined(c)||this.Jt(c);this.fp(a);this.Ea.PF(a);this.nF()},fp:function(a){a=a||this.ea.Sd();var c=this.Ea.uO(a);this.Ea.fp(a);c&&this.trigger("visiblePagesChanged",[a])},$o:function(a){this.Ea.$o(a)},onscroll:function(){this.v&&this.Si.Oi("DocumentViewer.renderRequest",{type:"pages",useVisiblePages:!0,
check:!0});this.nF()},zS:function(a){return 0<$("#pageContainer"+a).find("#thumb"+a).length},vS:function(a){return 0<$("#pageContainer"+a).find("#hrthumb"+a).length},rX:function(){if(this.HF)this.HF=!1;else{var a=0,c;this.fp();for(var e=this.Ea.xd,f=0;f<e.length;f++){var h=this.xb(),l=h.scrollTop()||0,n=l+h.innerHeight(),m=h.scrollLeft()||0,h=m+h.innerWidth(),n={x1:m,y1:l,x2:h,y2:n},h=e[f];0>h||(l=this.v.fc(h),m=this.ea.cf({x:0,y:0},h),h=this.ea.cf({x:l.width,y:l.height},h),n=b.utils.getRectIntersection(n,
{x1:m.x<h.x?m.x:h.x,y1:m.y<h.y?m.y:h.y,x2:m.x>h.x?m.x:h.x,y2:m.y>h.y?m.y:h.y}),l=parseFloat((n.x2-n.x1)*(n.y2-n.y1))/(l.width*l.height),l>a&&(c=e[f],a=l))}0<a&&this.Jt(c)}},$B:function(a){this.Ea.$B(a)},lK:function(){},wT:function(a,c){var b=this;b.nJ(c.contentChanged.map(function(a){return a-1}));var e=!1,f=c.added;0<f.length&&(f.forEach(function(a){b.ug.splice(a-1,0,!1)}),e=!0);f=c.removed;0<f.length&&(f.reverse().forEach(function(a){b.ug.splice(a-1,1)}),b.Ea.UK(b.v.io()),e=!0,b.ac>=b.vb()&&b.Jt(b.vb()-
1));if(e){b.Ea.WO();var l=b.xb(),f=l.offset(),l=b.ea.Ck({x:(l.scrollLeft()||0)+f.left,y:(l.scrollTop()||0)+f.top},b.ac);b.ea.TC();b.ea.Cg();b.ea.Mf();l=b.ea.cf(l,b.ac);b.scrollTo(l.x-f.left,l.y-f.top);b.zk()}f=c.contentChanged;(l=0<f.length)&&f.forEach(function(a){1===b.ug[a-1]&&(b.ug[a-1]=!1)});(e||l)&&b.ju();b.trigger("layoutChanged",[c])},um:function(a){this.Pa=Promise.resolve(a);if(this.v){var c=this;this.Pa.then(function(a){c.v.um(a)})}},yH:function(){return this.Pa}};$.extend(e.aa.prototype,
b.utils.eventHandler);Object.defineProperty(e.aa.prototype,"zoom",{get:function(){return this.Ze()},set:function(a){this.N.Xi(a)}});b.o=b.o||{}})(window);window.o.aa.prototype.version="5.1.6.71493";
(function(b){var f=b.Annotations||{};b.Annotations=f;f.O=f.O||{};f.O.getUsableInputWidth=function(b){return b};f.O.fj=function(b){this.da=b;this.init()};f.O.fj.prototype={init:function(){this.nb={};this.Fy=[];this.Zx=!1;this.Yo=this.PD=!0;this.zy=null},BV:function(b){this.Fy=b},Gb:function(b){if(!b)return null;b=b.split(".");var c=this.nb[b[0]];if(c)for(var a=1;a<b.length&&(c=c.Iz(b[a]),c);++a);return c?c:null},Rt:function(b,c){if(c){var a=this.Wu(b.name);a.set(b);b=a;(a=b.widgets.reduce(function(a,
c){return"Off"!==c.appearance&&c.appearance||a},null))&&a!==b.Va()&&b.yb(a);b.widgets.forEach(function(a){a.$J(b)});b.off("change")}else a=b.name.split("."),1===a.length?this.nb[b.name]=b:this.Wu(a.slice(0,-1).join(".")).ME(new f.O.ga(b.name,b));b.set({fieldManager:this});this.da&&b.xg(this.da.u);b.on("change",_.bind(this.wz,this));return b},oq:function(b,c){if(!this.Zx&&this.Yo){this.Zx=!0;var a=this.Fy;if(!c||this.PD)c=0,this.PD=!1;for(var d=c;d<a.length;++d){var f=a[d],k=this.Gb(f);k?k.trigger("calculate",
[b]):console.warn("Non-existent field referenced in calculation order",f,k)}this.Zx=!1}},wz:function(b,c){this.oq(c,0);this.da.trigger("fieldChanged",[c,c.value])},Wu:function(e){if(!e)return null;e=e.split(".");var c=this.nb[e[0]];c||(c=new b.Annotations.O.ga(e[0],{fieldManager:this}),c.on("change",_.bind(this.wz,this)),this.nb[e[0]]=c);for(var a=1;a<e.length;++a){var d=e[a],f=c.Iz(d);f?c=f:(f=new b.Annotations.O.ga(c.name+"."+d,{fieldManager:this}),c.ME(f),c=f,c.on("change",_.bind(this.wz,this)))}this.da&&
c.xg(this.da.u);return c},cs:function(b){this.Zn(function(c){c.sC(b)})},Zn:function(b){var c=this;Object.keys(this.nb).forEach(function(a){b(c.nb[a])})},bd:function(){this.Zn(function(b){b.off()});this.init()},alert:function(b){this.zy?this.zy(b):window.alert(b)},vV:function(b){this.zy=b}}})(window);
(function(b){b.Annotations||(b.Annotations={});var f=b.Annotations;f.O=f.O||{};f.O.ga=function(e,c){if(c instanceof f.O.ga)return c;b.Actions.Ih.call(this,c);this.vc=e;this.pf=[];this.Dj=[];this.jl=!1;this.dh=null;this.gn=new f.Mg;this.lc=new f.pj({mask:["ReadOnly","Required","NoExport"]});this.tf=-1;this.mc||(this.mc=new f.O.ga.Xb(this));this.initialize(c);this.on("calculate",_.bind(this.oq,this));this.on("commit",_.bind(this.Sy,this))};f.O.ga.prototype={initialize:function(b){_.isObject(b)&&(b.type&&
this.oK(b.type),_.isArray(b.children)&&$.extend(this.pf,b.children),b.widgets&&$.extend(this.Dj,b.widgets),b.fieldManager&&(this.dh=b.fieldManager),b.font&&this.gn.set(b.font),_.isUndefined(b.maxLen)||(this.tf=Number(b.maxLen)),b.tooltipName&&(this.EE=b.tooltipName),this.mc.set(b))},set:function(b){this.initialize(b);_.isObject(b)&&_.isObject(b.actions)&&this.Pt(b.actions,!0)},AG:function(b){this.Dj.forEach(b)},oK:function(b){"Tx"===b?this.mc=new f.O.ga.Dx(this,this.mc):"Ch"===b?this.mc=new f.O.ga.cx(this,
this.mc):"Btn"===b?this.mc=new f.O.ga.ax(this,this.mc):"Sig"===b?this.mc=new f.O.ga.Bx(this,this.mc):console.warn("Unrecognised field type: "+b);this.Mt=b},Lf:function(b){this.Dj.forEach(function(c){c.Lf(b)})},OG:function(){return this.pf},nT:function(){return 0===this.pf.length},hO:function(b,c){-1===this.Dj.indexOf(b)&&(_.isUndefined(c)?this.Dj.push(b):this.Dj[c]=b)},og:function(b){this.mc.og(b)},yb:function(b,c){this.mc.yb(b,c)},Va:function(){return this.mc.Va()},Lq:function(){return this.mc.Lq()},
oe:function(b){this.mc.oe(b)},Tt:function(b,c){this.mc.Tt(b,c)},lh:function(){return this.mc.lh()},yw:function(b){this.mc.yw(b)},Jq:function(){return this.mc.Jq()},cA:function(){var b=this.vc.split(".");return b[b.length-1]},GR:function(){var b,c=this.vc.split(".");1<c.length&&(b=c.slice(0,c.length-1).join("."));return b},sC:function(b,c){var a=this.cA();(c=(c?c+".":"")+a)||(c="");if(this.nT()){if(b.Ar){var d=!0;b.Au&&(b.Au(this)||(d=!1));d&&b.Ar(c,a,this)}}else{var f;b.Au?(f=[],this.pf.forEach(function(a){b.Au(a)&&
f.push(a)})):f=this.pf;0<f.length&&(b.Ov&&b.Ov(c,a,this),f.forEach(function(a){a.sC(b,c)}),b.dB&&b.dB(c,a,this))}},Iz:function(b){for(var c=this.pf,a=c.length,d=0;d<a;++d){var f=c[d];if(f.cA()===b)return f}if(b.match(/^\d+$/))return this.Dj[parseInt(b,10)]},removeChild:function(b){b=this.pf.indexOf(b);-1!==b&&this.pf.splice(b,1)},ME:function(b){var c=this.Iz(b.cA());c&&this.removeChild(c);this.pf.push(b)},GJ:function(){this.yb(this.Jq())},oq:function(e,c){var a=new b.Annotations.O.ub.Events.ga.create("Calculate",
this,{value:this.value,source:c,rc:!0}),d=this.Va();this.Le("C",a);var f=this.t_;this.tf=-1;var k=a.value;a.rc&&k!==d&&this.yb(k);this.tf=f},Jo:function(){this.AG(function(b){b.refresh()})},Sy:function(e,c,a){e=b.Annotations.O.ub.Events.ga.create("Keystroke",this,{value:c,change:"",willCommit:!0,selStart:-1,selEnd:-1});this.Le("K",e);e.rc&&(c=b.Annotations.O.ub.Events.oi(e),e=new b.Annotations.O.ub.Events.ga.create("Validate",this,{value:c}),this.Le("V",e),e.rc&&this.yb(e.value,a))},Ke:function(b,
c){this.mc.Ke(b,c)}};$.extend(f.O.ga.prototype,Object.create(b.utils.eventHandler));Object.defineProperties(f.O.ga.prototype,{name:{get:function(){return this.vc}},tooltipName:{get:function(){return this.EE},set:function(b){this.EE=b}},value:{get:function(){return this.Va()},set:function(b){this.yb(b)}},widgets:{get:function(){return this.Dj}},children:{get:function(){return this.pf}},options:{get:function(){return this.lh()},set:function(b){this.oe(b)}},exportValue:{get:function(){return this.Lq()}},
actions:{get:function(){return this.Vj()}},defaultValue:{get:function(){return this.Jq()},set:function(b){this.yw(b)}},flags:{get:function(){return this.mc.lc}},IsModified:{set:function(b){b!==this.jl&&this.pf.forEach(function(c){c.IsModified=b});this.jl=b},get:function(){return this.jl||this.pf.reduce(function(b,c){return b||c.IsModified},!1)}},font:{get:function(){return this.gn}},maxLen:{get:function(){return this.tf},set:function(b){this.tf=Number(b);0<this.tf&&this.yb(this.Va())}},type:{get:function(){return this.Mt}},
userName:{get:function(){return this.NN},set:function(b){this.NN=b}}});$.extend(f.O.ga.prototype,b.Actions.Ih.prototype);f.O.ga.Xb=function(b){this.Ja=b;this._value=this.Tx="";this.lc=new f.pj({mask:["ReadOnly","Required","NoExport"]})};f.O.ga.Xb.prototype={yb:function(e,c){var a=this.Ja,d=typeof e;"number"===d?e=b.Annotations.ba.toFixed(e,6):e&&"string"!==d&&(e=e.toString());d=this._value!==e;this.Ke(e);d&&(e=this._value,this.ZB(e,c),a.IsModified=!0,a.trigger("change",[a]))},ZB:function(b){this.Ja.AG(function(c){c.yb(b)})},
Ke:function(b){this._value=b},og:function(b){this.Ke(b)},set:function(b){_.isObject(b)&&(_.isNull(b.value)||_.isUndefined(b.value)||(this._value=b.value),_.isNull(b.defaultValue)||_.isUndefined(b.defaultValue)||(this.Tx=b.defaultValue),b.flags&&(_.isArray(b.flags)?this.lc.set(b.flags,!0):_.isObject(b.flags)&&this.lc.set(b.flags.toArray(),!0)))},Va:function(){return this._value},Jq:function(){return this.Tx},yw:function(b){this.Tx=b},Tt:function(){},lh:function(){return null},oe:function(){},Lq:function(){return this._value}};
Object.defineProperties(f.O.ga.Xb.prototype,{value:{get:function(){return this.Va()},set:function(b){this.yb(b)}},defaultValue:{get:function(){return this.Jq()},set:function(b){this.yw(b)}}});f.O.ga.Dx=function(b,c){if(c instanceof f.O.ga.Dx)return c;f.O.ga.Xb.call(this,b);this.lc.Eq("Multiline Password FileSelect DoNotSpellCheck DoNotScroll Comb RichText".split(" "));this.set(c)};f.O.ga.Dx.prototype=$.extend(Object.create(f.O.ga.Xb.prototype),{Ke:function(b,c){var a=this.Ja.maxLen;0<a&&!_.isNull(b)&&
(b=String(b),b.length>a&&!c&&(b=b.slice(0,a)));f.O.ga.Xb.prototype.Ke.call(this,b)}});f.O.ga.cx=function(b,c){if(c instanceof f.O.ga.cx)return c;f.O.ga.Xb.call(this,b);this.lc.Eq("Combo Edit Sort MultiSelect DoNotSpellCheck CommitOnSelChange".split(" "));this.bg=[];this.set(c)};f.O.ga.cx.prototype=$.extend(Object.create(f.O.ga.Xb.prototype),{set:function(b){_.isObject(b)&&b.options&&this.oe(b.options);f.O.ga.Xb.prototype.set.call(this,b)},wR:function(b){for(var c=0;c<this.bg.length;++c){var a=this.bg[c];
if(a.value===b)return a}return null},Ke:function(b){b=b.replace(/\n/g," ");this.lc.get("Edit")||!_.isNull(this.wR(b))?f.O.ga.Xb.prototype.Ke.call(this,b):f.O.ga.Xb.prototype.Ke.call(this,null)},lh:function(){return this.bg},Tt:function(b,c){for(var a=this.bg,d=0;d<a.length;++d)if(a[d].value===a.value)return;this.bg.splice(c,0,b);this.lc.get("Combo")||this.yb(b.value)},oe:function(b){this.bg=b.map(function(c){var a=c.value;c=c.displayValue;return{value:a,displayValue:_.isUndefined(c)?a:c}})}});f.O.ga.ax=
function(b,c){if(c instanceof f.O.ga.ax)return c;f.O.ga.Xb.call(this,b);this.lc.Eq(["NoToggleToOff","Radio","PushButton","RadiosInUnison"]);this.bg=null;this.set(c);""===this._value&&(this._value="Off")};f.O.ga.ax.prototype=$.extend(Object.create(f.O.ga.Xb.prototype),{set:function(b){f.O.ga.Xb.prototype.set.call(this,b);_.isObject(b)&&b.options&&this.oe(b.options)},lh:function(){return this.bg},og:function(b){(""===this._value||"Off"!==b||this.Ja.widgets.every(function(c){return!c.appearance}))&&
f.O.ga.Xb.prototype.og.call(this,b)},Ke:function(b){"Off"!==b?""===b?f.O.ga.Xb.prototype.Ke.call(this,"Off"):f.O.ga.Xb.prototype.Ke.call(this,b):this.lc.get("NoToggleToOff")&&this.lc.get("Radio")||f.O.ga.Xb.prototype.Ke.call(this,b)},Lq:function(){return this.bg?this.bg[Number(this.Va())]:f.O.ga.Xb.prototype.Lq.call(this)},oe:function(b){this.bg=b.slice()},ZB:function(b,c){f.O.ga.Xb.prototype.ZB.call(this,b,c)}});f.O.ga.Bx=function(b,c){if(c instanceof f.O.ga.Bx)return c;f.O.ga.Xb.call(this,b);this.set(c)};
f.O.ga.Bx.prototype=$.extend(Object.create(f.O.ga.Xb.prototype),{})})(window);
(function(b){function f(a){return _.isArray(a)?a.map(f).join(" "):_.isNumber(a)?a.toString():_.escape(String(a))}function e(a,c,b,d){b!==d&&a.writeAttributeString(c,f(b))}function c(a,c,b){var d=b.Mr||[];b=b.Co||{};for(var g=0;g<d.length;++g){var k=d[g],h=c[k];_.isUndefined(c)?console.warn("Required attribute: "+k+" is undefined"):a.writeAttributeString(k,f(h))}for(var l in b)b.hasOwnProperty(l)&&e(a,l,c[l],b[l])}function a(a,b,g,k){k=k||"actions";var h=Object.keys(b);if(0<h.length){a.writeStartElement(k);
for(k=0;k<h.length;++k)a.writeStartElement("action"),a.writeAttributeString("trigger",_.escape(h[k])),b[h[k]].forEach(function(b){var k=b.name;switch(k){case "JavaScript":a.writeStartElement("javascript");a.writeString(f(b.javascript));a.writeEndElement();break;case "ResetForm":a.writeStartElement("reset-form");c(a,b,{Mr:["exclude"]});b.fields&&d(a,b.fields);a.writeEndElement();break;case "SubmitForm":a.writeStartElement("submit-form");c(a,b,{Mr:["url","format"],Co:{method:"POST",exclude:!1}});k=
b.flags.toArray();0<k.length&&a.writeAttributeString("flags",f(k));b=b.fields;0<b.length&&d(a,b);a.writeEndElement();break;case "GoTo":a.writeStartElement("goto");a.writeStartElement("dest");b=b.dest;c(a,b,{Mr:["fit","page"],Co:{zoom:void 0}});var h=g(b.page).inverse(),k=b.top||0,m=b.left||0,l=b.bottom||0,p=b.right||0,m=h.W({x:m,y:k}),h=h.W({x:p,y:l}),k=_.isUndefined(b.top)?null:m.y,m=_.isUndefined(b.left)?null:m.x,p=_.isUndefined(b.right)?null:h.x,l=_.isUndefined(b.bottom)?null:h.y;e(a,"top",k,null);
e(a,"left",m,null);e(a,"right",p,null);e(a,"bottom",l,null);a.writeEndElement();a.writeEndElement();break;case "URI":a.writeStartElement("uri");c(a,b,{Mr:["uri"]});a.writeEndElement();break;case "Hide":a.writeStartElement("hide");c(a,b,{Co:{hide:!0}});d(a,b.fields);a.writeEndElement();break;case "Named":a.writeStartElement("named");a.writeAttributeString("name",_.escape(b.action));a.writeEndElement();break;default:console.warn("Unrecognised action name"+k)}}),a.writeEndElement();a.writeEndElement()}}
function d(a,c,b){b||(b="fields");a.writeStartElement(b);b=c.length;for(var d=0;d<b;++d){var e=a,f=c[d];e.writeStartElement("ffield");e.writeAttributeString("name",_.escape(f));e.writeEndElement()}a.writeEndElement()}function g(a,c,b,d){if(d||!c.iI())a.writeStartElement(b),e(a,"r",c.R,0),e(a,"g",c.G,0),e(a,"b",c.B,0),e(a,"a",c.A,1),a.writeEndElement()}function k(a,b,d){if(b&&(0!==b.size||""!==b.name||"Type1"!==b.type||!b.Ql())){a.writeStartElement("font");c(a,b,{Co:{type:"Type1",name:""}});var f=
b.size,k=d.inverse();d=k.W({x:0,y:0});k=k.W({x:f,y:0});f=d.x-k.x;d=d.y-k.y;e(a,"size",Math.sqrt(f*f+d*d),0);d=b.fillColor;d.Ql()||g(a,d,"fill-color",!0);b=b.strokeColor;b.Ql()||g(a,b,"stroke-color",!0);a.writeEndElement()}}function h(a,c,b){a.writeStartElement("aappearance");a.writeAttributeString("name",c);Object.keys(b).forEach(function(c){a.writeStartElement(c);a.writeString(f(b[c].data||""));a.writeEndElement()});a.writeEndElement()}b.kf=b.kf||{};var l=b.kf;l.si=function(a,c){var b;c in a?b=a[c]:
(b={},a[c]=b);return b};l.parse=function(a,c,b,d){var e={calculationOrder:[],widgets:[],fields:{},pages:[],documentActions:{},custom:[]},f=a.ua();"pdf-info"!==f?(console.warn("pdf-info missing. found: "+f),b(e)):(f=a.K("version"),"1"===f?l.PM.parse(a,c,b,d):"2"===f?l.ZC.parse(a,c,b,d):(console.warn("PDFInfo version is incorrect: "+f),b(e)))};l.hL=function(a,c,b){if(c)for(var d in c){var g=c[d],k;for(k in g){var h=g[k];"objnum"in h&&(a.writeStartElement("apref"),e(a,"appearance-state",d,"_DEFAULT"),
e(a,"annotation-state",k,"Normal"),a.writeAttributeString("gennum",f(h.gennum)),a.writeAttributeString("objnum",f(h.objnum)),h=h.offset,h=b.W({x:h.x,y:h.y}),a.writeAttributeString("x",f(h.x)),a.writeAttributeString("y",f(h.y)),a.writeEndElement())}}};l.write=function(b,m,r){b.writeStartElement("pdf-info");b.writeAttributeString("xmlns","http://www.pdftron.com/pdfinfo");b.writeAttributeString("version","2");var p=m.calculationOrder;_.isArray(p)&&0<p.length&&d(b,p,"calculation-order");a(b,m.documentActions,
r,"document-actions");p=m.pages;if(0<p.length){b.writeStartElement("pages");for(var u=0;u<p.length;++u){var q=b,v=p[u],w=r;q.writeStartElement("page");q.writeAttributeString("number",f(v.number));a(q,v.actions,w);q.writeEndElement()}b.writeEndElement()}u=m.fields;q=Object.keys(u);for(p=0;p<q.length;++p){var v=b,w=u[q[p]],A=r;v.writeStartElement("ffield");c(v,w,{Co:{},Mr:["type","name"]});var B=w.flags.toArray();0<B.length&&v.writeAttributeString("flags",f(B));B=w.maxLen;-1!==B&&v.writeAttributeString("max-len",
f(B));(B=w.tooltipName)&&v.writeAttributeString("tooltip-name",f(B));a(v,w.Vj(),A);(B=w.defaultValue)&&v.writeElementString("default-value",f(B));k(v,w.font,A(1));A=v;if((w=w.options)&&0<w.length){A.writeStartElement("options");for(var B=w.length,z=0;z<B;++z){A.writeStartElement("option");var x=w[z].displayValue,y=w[z].value;x===y||_.isUndefined(x)||A.writeAttributeString("display-value",f(x));A.writeAttributeString("value",f(y));A.writeEndElement()}A.writeEndElement()}v.writeEndElement()}m=m.widgets;
for(p=0;p<m.length;++p){u=b;q=m[p];v=r;u.writeStartElement("widget");c(u,q,{Co:{appearance:"",rotation:0,quadding:"Left-justified"}});w=q;w=w.Gb().widgets.indexOf(w);w=f(w);"0"!==w&&u.writeAttributeString("index",w);u.writeAttributeString("field",f(q.Gb().name));w=q.flags.toArray();0<w.length&&u.writeAttributeString("flags",f(w));w=q.PageNumber;u.writeAttributeString("page",f(w));w=v(w).inverse();A=u;z=q.rect;x=w;A.writeStartElement("rect");B=x.W({x:z.x1,y:z.y1});z=x.W({x:z.x2,y:z.y2});x={};x.x1=
_.min([B.x,z.x]);x.x2=_.max([B.x,z.x]);x.y1=_.min([B.y,z.y]);x.y2=_.max([B.y,z.y]);A.writeAttributeString("x1",f(Number(Number(x.x1).toFixed(4))));A.writeAttributeString("x2",f(Number(Number(x.x2).toFixed(4))));A.writeAttributeString("y1",f(Number(Number(x.y1).toFixed(4))));A.writeAttributeString("y2",f(Number(Number(x.y2).toFixed(4))));A.writeEndElement();A=u;!(B=q.border)||B.color.iI()&&1===B.width&&"Solid"===B.style||(A.writeStartElement("border"),e(A,"width",B.width,1),e(A,"style",B.style,"Solid"),
B=B.color,B.Ql()||g(A,B,"color",!0),A.writeEndElement());g(u,q.backgroundColor,"background-color");a(u,q.Vj(),v);l.hL(u,q.appearances,w);w=u;A=q.appearances;B=Object.keys(A);if(z=0<B.length)z=A[B[0]],z=0===Object.keys(z).length||"Normal"in z&&!!z.Normal.data;if(z){w.writeStartElement("appearances");z=B.length;for(x=0;x<z;++x)y=B[x],h(w,y,A[y]);w.writeEndElement()}w=u;A=q;A.tS()&&(w.writeStartElement("extra"),k(w,A.font,v(1)),w.writeEndElement());v=u;q=q.captions;w=q.Rollover;A=q.Down;if(q.Normal||
w||A)v.writeStartElement("captions"),e(v,"Normal",q.Normal,""),e(v,"Rollover",q.Rollover,""),e(v,"Down",q.Down,""),v.writeEndElement();u.writeEndElement()}b.writeEndElement()}})(window);
(function(b){function f(a){var c=[];for(a.oa();a.advance();){var b=a.ua();"field"===b?c.push(String(a.K("name"))):console.warn("unrecognised field list element: "+b)}a.Ba();return c}function e(a,c){return c?"false"===a?!1:!0:"true"===a?!0:!1}function c(a,c){var b=a.ua();switch(b){case "javascript":return{name:"JavaScript",javascript:a.current.textContent};case "uri":return{name:"URI",uri:a.K("uri")};case "goto":b=null;a.oa();if(a.advance()){var d=a.K("fit"),b={page:a.K("page"),fit:d};if("0"===b.page)console.warn("null page encountered in dest");
else{var g=c(Number(b.page));switch(d){case "Fit":case "FitB":break;case "FitH":case "FitBH":b.top=g.W({x:0,y:a.K("top")||0}).y;break;case "FitV":case "FitBV":b.left=g.W({x:a.K("left")||0,y:0}).x;break;case "FitR":d=g.W({x:a.K("left")||0,y:a.K("top")||0});g=g.W({x:a.K("right")||0,y:a.K("bottom")||0});g=new Annotations.Rect(d.x,d.y,g.x,g.y);b.top=g.y1;b.left=g.x1;b.bottom=g.y2;b.right=g.x2;break;case "XYZ":d=g.W({x:a.K("left")||0,y:a.K("top")||0});b.top=d.y;b.left=d.x;b.zoom=a.K("zoom")||0;break;default:console.warn("unknown dest fit: "+
d)}}b={name:"GoTo",dest:b}}else console.GX("missing dest in GoTo action");a.Ba();return b;case "submit-form":b={name:"SubmitForm",url:a.K("url"),format:a.K("format"),method:a.K("method")||"POST",exclude:e(a.K("exclude"),!1)};g=a.K("flags");b.flags=g?g.split(" "):[];for(a.oa();a.advance();)switch(g=a.ua(),g){case "fields":b.fields=f(a);break;default:console.warn("unrecognised submit-form child: "+g)}a.Ba();return b;case "reset-form":b={name:"ResetForm",exclude:e(a.K("exclude"),!1)};for(a.oa();a.advance();)switch(g=
a.ua(),g){case "fields":b.fields=f(a);break;default:console.warn("unrecognised reset-form child: "+g)}a.Ba();return b;case "hide":b={name:"Hide",hide:e(a.K("hide"),!0)};for(a.oa();a.advance();)switch(g=a.ua(),g){case "fields":b.fields=f(a);break;default:console.warn("unrecognised hide child: "+g)}a.Ba();return b;case "named":return{name:"Named",action:a.K("name")};default:console.warn("Encountered unexpected action type: "+b)}return null}function a(a,b,d){var e={};for(a.oa();a.advance();){var f=a.ua();
switch(f){case "action":f=a.K("trigger");if(b?-1!==b.indexOf(f):1){e[f]=[];for(a.oa();a.advance();){var g=c(a,d);_.isNull(g)||e[f].push(g)}a.Ba()}else console.warn("encountered unexpected trigger on field: "+f);break;default:console.warn("encountered unknown action child: "+f)}}a.Ba();return e}function d(a){return"calculation-order"===a.ua()?f(a):[]}function g(a){return new b.Annotations.Color(a.K("r")||0,a.K("g")||0,a.K("b")||0,a.K("a")||1)}function k(a,c){var b=a.K("name"),d=a.K("type")||"Type1",
e=a.K("size"),f=c.W({x:0,y:0}),k=c.W({x:Number(e),y:0}),e=f.x-k.x,f=f.y-k.y,b={name:b,type:d,size:Math.sqrt(e*e+f*f)||0,strokeColor:[0,0,0],fillColor:[0,0,0]};for(a.oa();a.advance();)switch(d=a.ua(),d){case "stroke-color":b.strokeColor=g(a);break;case "fill-color":b.fillColor=g(a);break;default:console.warn("unrecognised font child: "+d)}a.Ba();return b}function h(c,b){var d={border:{style:"Solid",width:1},backgroundColor:[],fieldName:c.K("field"),page:c.K("page"),index:c.K("index")||0,rotation:c.K("rotation")||
0,flags:[]},e=c.K("appearance");e&&(d.appearance=e);(e=c.K("flags"))&&(d.flags=e.split(" "));for(c.oa();c.advance();)switch(e=c.ua(),e){case "rect":var f=c,h=b(Number(d.page)),e=h.W({x:f.K("x1")||0,y:f.K("y1")||0}),f=h.W({x:f.K("x2")||0,y:f.K("y2")||0}),e=new Annotations.Rect(e.x,e.y,f.x,f.y);e.normalize();d.rect={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2};break;case "border":e=c;f={style:e.K("style")||"Solid",width:e.K("width")||1,color:[0,0,0]};for(e.oa();e.advance();)switch(h=e.ua(),h){case "color":f.color=
g(e);break;default:console.warn("unrecognised border child: "+h)}e.Ba();d.border=f;break;case "background-color":d.backgroundColor=g(c);break;case "actions":d.actions=a(c,"E X D U Fo Bl PO PC PV PI".split(" "),b);break;case "appearances":e=c;f=p.si(d,"appearances");for(e.oa();e.advance();)if(h=e.ua(),"appearance"===h){var h=e.K("name"),n=p.si(f,h),h=e;for(h.oa();h.advance();){var l=h.ua();switch(l){case "Normal":p.si(n,"Normal").data=h.current.textContent;break;default:console.warn("unexpected appearance state: ",
l)}}h.Ba()}else console.warn("unexpected appearances child: "+h);e.Ba();break;case "extra":e=c;f=b;h={};for(e.oa();e.advance();)switch(n=e.ua(),n){case "font":h.font=k(e,f(1));break;default:console.warn("unrecognised extra child: "+n)}e.Ba();e=h;e.font&&(d.font=e.font);break;case "captions":f=c;e={};(h=f.K("Normal"))&&(e.Normal=h);(h=f.K("Rollover"))&&(e.Rollover=h);(f=f.K("Down"))&&(e.Down=f);d.captions=e;break;default:console.warn("unrecognised widget child: "+e)}c.Ba();return d}function l(a){var c=
{value:a.K("value")};(a=a.K("display-value"))&&(c.displayValue=a);return c}function n(c,d){var e=c.K("name"),f={type:c.K("type"),quadding:c.K("quadding")||"Left-justified",maxLen:c.K("max-len")||-1},g=c.K("flags");_.isString(g)&&(f.flags=g.split(" "));for(c.oa();c.advance();)switch(g=c.ua(),g){case "actions":f.actions=a(c,["C","F","K","V"],d);break;case "default-value":g=c;g.oa();g.advance();var h=g.current.textContent;g.Ba();f.defaultValue=h;break;case "font":f.font=k(c,d);break;case "options":g=
c;h=[];for(g.oa();g.advance();){var n=g.ua();switch(n){case "option":h.push(l(g));break;default:console.warn("unrecognised options child: "+n)}}g.Ba();f.options=h;break;default:console.warn("unknown field child: "+g)}c.Ba();return new b.Annotations.O.ga(e,f)}function m(a,c){switch(a.type){case "Tx":return new b.Annotations.Xk(a,c);case "Ch":return a.flags.get("Combo")?new b.Annotations.Kg(a,c):new b.Annotations.gj(a,c);case "Btn":return a.flags.get("PushButton")?new b.Annotations.jj(a,c):a.flags.get("Radio")?
new b.Annotations.Pk(a,c):new b.Annotations.Hh(a,c);case "Sig":return new b.Annotations.Tf(a,c);default:console.warn("Unrecognised field type: "+a.type)}return null}function r(c,b){var d={number:c.K("number")};for(c.oa();c.advance();){var e=c.ua();switch(e){case "actions":d.actions=a(c,["O","C"],b);break;default:console.warn("unrecognised page child: "+e)}}c.Ba();return d}b.kf=b.kf||{};var p=b.kf;p.PM={parse:function(c,e,f,g){var k=[],l={};c.oa();var p=[],x={},y=[];b.busyLoop(function(){var b,f;if(c.advance()){b=
c.ua();switch(b){case "calculation-order":p=d(c);break;case "document-actions":x=a(c,["Init","Open"],e);break;case "pages":b=[];for(c.oa();c.advance();)switch(f=c.ua(),f){case "page":b.push(r(c,e));break;default:console.warn("unrecognised page child: "+f)}c.Ba();y=b;break;case "field":b=n(c,e(1));l[b.name]=b;break;case "widget":f=h(c,e);(b=l[f.fieldName])?(b=m(b,f),k.push(b)):console.warn("ignoring widget with no corresponding field data: "+f.fieldName);break;default:console.warn("Unknown element encountered in PDFInfo: "+
b)}return!0}return!1},function(){c.Ba();f({calculationOrder:p,widgets:k,fields:l,documentActions:x,pages:y,custom:[]})},g)},qU:n,sU:h,WI:d}})(window);
(function(b){function f(a){var c=[];for(a.oa();a.advance();){var b=a.ua();"ffield"===b?c.push(String(a.K("name"))):console.warn("unrecognised field list element: "+b)}a.Ba();return c}function e(a,c){return c?"false"===a?!1:!0:"true"===a?!0:!1}function c(a,c){var b=a.ua();switch(b){case "javascript":return{name:"JavaScript",javascript:a.current.textContent};case "uri":return{name:"URI",uri:a.K("uri")};case "goto":b=null;a.oa();if(a.advance()){var d=a.K("fit"),b={page:a.K("page"),fit:d};if("0"===b.page)console.warn("null page encountered in dest");
else{var g=c(Number(b.page));switch(d){case "Fit":case "FitB":break;case "FitH":case "FitBH":b.top=g.W({x:0,y:a.K("top")||0}).y;break;case "FitV":case "FitBV":b.left=g.W({x:a.K("left")||0,y:0}).x;break;case "FitR":d=g.W({x:a.K("left")||0,y:a.K("top")||0});g=g.W({x:a.K("right")||0,y:a.K("bottom")||0});g=new Annotations.Rect(d.x,d.y,g.x,g.y);b.top=g.y1;b.left=g.x1;b.bottom=g.y2;b.right=g.x2;break;case "XYZ":d=g.W({x:a.K("left")||0,y:a.K("top")||0});b.top=d.y;b.left=d.x;b.zoom=a.K("zoom")||0;break;default:console.warn("unknown dest fit: "+
d)}}b={name:"GoTo",dest:b}}else console.GX("missing dest in GoTo action");a.Ba();return b;case "submit-form":b={name:"SubmitForm",url:a.K("url"),format:a.K("format"),method:a.K("method")||"POST",exclude:e(a.K("exclude"),!1)};g=a.K("flags");b.flags=g?g.split(" "):[];for(a.oa();a.advance();)switch(g=a.ua(),g){case "fields":b.fields=f(a);break;default:console.warn("unrecognised submit-form child: "+g)}a.Ba();return b;case "reset-form":b={name:"ResetForm",exclude:e(a.K("exclude"),!1)};for(a.oa();a.advance();)switch(g=
a.ua(),g){case "fields":b.fields=f(a);break;default:console.warn("unrecognised reset-form child: "+g)}a.Ba();return b;case "hide":b={name:"Hide",hide:e(a.K("hide"),!0)};for(a.oa();a.advance();)switch(g=a.ua(),g){case "fields":b.fields=f(a);break;default:console.warn("unrecognised hide child: "+g)}a.Ba();return b;case "named":return{name:"Named",action:a.K("name")};default:console.warn("Encountered unexpected action type: "+b)}return null}function a(a,b,d){var e={};for(a.oa();a.advance();){var f=a.ua();
switch(f){case "action":f=a.K("trigger");if(b?-1!==b.indexOf(f):1){e[f]=[];for(a.oa();a.advance();){var g=c(a,d);_.isNull(g)||e[f].push(g)}a.Ba()}else console.warn("encountered unexpected trigger on field: "+f);break;default:console.warn("encountered unknown action child: "+f)}}a.Ba();return e}function d(a){return"calculation-order"===a.ua()?f(a):[]}function g(a){return new b.Annotations.Color(a.K("r")||0,a.K("g")||0,a.K("b")||0,a.K("a")||1)}function k(a,c,b){var d=q.si(c,"appearances"),e=a.K("appearance-state")||
"_DEFAULT",f=a.K("annotation-state")||"Normal";c=Number(a.K("objnum"));var g=Number(a.K("gennum")),k=Number(a.K("x")),h=Number(a.K("y"));a=a.K("blend-mode");d=q.si(d,e);f=q.si(d,f);f.objnum=c;f.gennum=g;f.offset=b.W({x:k,y:h});f.blendMode=a}function h(a,c){var b=a.K("name"),d=a.K("type")||"Type1",e=a.K("size"),f=c.W({x:0,y:0}),k=c.W({x:Number(e),y:0}),e=f.x-k.x,f=f.y-k.y,b={name:b,type:d,size:Math.sqrt(e*e+f*f)||0,strokeColor:[0,0,0],fillColor:[0,0,0]};for(a.oa();a.advance();)switch(d=a.ua(),d){case "stroke-color":b.strokeColor=
g(a);break;case "fill-color":b.fillColor=g(a);break;default:console.warn("unrecognised font child: "+d)}a.Ba();return b}function l(c,b){var d={border:{style:"Solid",width:1},backgroundColor:[],fieldName:c.K("field"),page:c.K("page"),index:c.K("index")||0,rotation:c.K("rotation")||0,quadding:c.K("quadding")||"Left-justified",flags:[]},e=c.K("appearance");e&&(d.appearance=e);(e=c.K("flags"))&&(d.flags=e.split(" "));for(c.oa();c.advance();)switch(e=c.ua(),e){case "rect":var f=c,n=b(Number(d.page)),e=
n.W({x:f.K("x1")||0,y:f.K("y1")||0}),f=n.W({x:f.K("x2")||0,y:f.K("y2")||0}),e=new Annotations.Rect(e.x,e.y,f.x,f.y);e.normalize();d.rect={x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2};break;case "border":e=c;f={style:e.K("style")||"Solid",width:e.K("width")||1,color:[0,0,0]};for(e.oa();e.advance();)switch(n=e.ua(),n){case "color":f.color=g(e);break;default:console.warn("unrecognised border child: "+n)}e.Ba();d.border=f;break;case "background-color":d.backgroundColor=g(c);break;case "actions":d.actions=a(c,"E X D U Fo Bl PO PC PV PI".split(" "),
b);break;case "appearances":e=c;f=q.si(d,"appearances");for(e.oa();e.advance();)if(n=e.ua(),"aappearance"===n){var n=e.K("name"),l=q.si(f,n),n=e;for(n.oa();n.advance();){var m=n.ua();switch(m){case "Normal":q.si(l,"Normal").data=n.current.textContent;break;default:console.warn("unexpected appearance state: ",m)}}n.Ba()}else console.warn("unexpected appearances child: "+n);e.Ba();break;case "apref":k(c,d,b(Number(d.page)));break;case "extra":e=c;f=b;n={};for(e.oa();e.advance();)switch(l=e.ua(),l){case "font":n.font=
h(e,f(1));break;default:console.warn("unrecognised extra child: "+l)}e.Ba();e=n;e.font&&(d.font=e.font);break;case "captions":f=c;e={};(n=f.K("Normal"))&&(e.Normal=n);(n=f.K("Rollover"))&&(e.Rollover=n);(f=f.K("Down"))&&(e.Down=f);d.captions=e;break;default:console.warn("unrecognised widget child: "+e)}c.Ba();return d}function n(a,c){var d=a.K("page"),e=c(1+Number(d)),d={page:d,rect:Annotations.ba.qu(a.K("rect"),e)};for(a.oa();a.advance();){var f=a.ua();switch(f){case "apref":k(a,d,e);break;default:console.warn("unrecognised custom tag: "+
f)}}a.Ba();return new b.Annotations.rp(d)}function m(a){var c={value:a.K("value")};(a=a.K("display-value"))&&(c.displayValue=a);return c}function r(c,d){var e=c.K("name"),f={type:c.K("type"),maxLen:c.K("max-len")||-1,tooltipName:c.K("tooltip-name")},g=c.K("flags");_.isString(g)&&(f.flags=g.split(" "));for(c.oa();c.advance();)switch(g=c.ua(),g){case "actions":f.actions=a(c,["C","F","K","V"],d);break;case "default-value":g=c;g.oa();g.advance();var k=g.current.textContent;g.Ba();f.defaultValue=k;break;
case "font":f.font=h(c,d);break;case "options":g=c;k=[];for(g.oa();g.advance();){var n=g.ua();switch(n){case "option":k.push(m(g));break;default:console.warn("unrecognised options child: "+n)}}g.Ba();f.options=k;break;default:console.warn("unknown field child: "+g)}c.Ba();return new b.Annotations.O.ga(e,f)}function p(a,c){switch(a.type){case "Tx":return new b.Annotations.Xk(a,c);case "Ch":return a.flags.get("Combo")?new b.Annotations.Kg(a,c):new b.Annotations.gj(a,c);case "Btn":return a.flags.get("PushButton")?
new b.Annotations.jj(a,c):a.flags.get("Radio")?new b.Annotations.Pk(a,c):new b.Annotations.Hh(a,c);case "Sig":return new b.Annotations.Tf(a,c);default:console.warn("Unrecognised field type: "+a.type)}return null}function u(c,b){var d={number:c.K("number")};for(c.oa();c.advance();){var e=c.ua();switch(e){case "actions":d.actions=a(c,["O","C"],b);break;default:console.warn("unrecognised page child: "+e)}}c.Ba();return d}b.kf=b.kf||{};var q=b.kf;q.ZC={parse:function(c,e,f,g){var k=[],h=[],m={};c.oa();
var q=[],K={},G=[];b.busyLoop(function(){var b,f;if(c.advance()){b=c.ua();switch(b){case "calculation-order":q=d(c);break;case "document-actions":K=a(c,["Init","Open"],e);break;case "pages":b=[];for(c.oa();c.advance();)switch(f=c.ua(),f){case "page":b.push(u(c,e));break;default:console.warn("unrecognised page child: "+f)}c.Ba();G=b;break;case "ffield":b=r(c,e(1));m[b.name]=b;break;case "widget":f=l(c,e);(b=m[f.fieldName])?(b=p(b,f),k.push(b)):console.warn("ignoring widget with no corresponding field data: "+
f.fieldName);break;case "custom":h.push(n(c,e));break;default:console.warn("Unknown element encountered in PDFInfo: "+b)}return!0}return!1},function(){c.Ba();f({calculationOrder:q,widgets:k,fields:m,documentActions:K,pages:G,custom:h})},g)},sZ:p,qU:r,sU:l,WI:d,SN:k}})(window);
(function(b){b.Annotations=b.Annotations||{};b.Annotations.O=b.Annotations.O||{};b.Annotations.O.ub=b.Annotations.O.ub||{};b=b.Annotations.O.ub;b.Events={};var f=b.Events;f.Event=function(c){this.rc=!0;_.isObject(c)&&(_.isString(c.name)&&Object.defineProperty(this,"name",{value:c.name,enumerable:!0}),_.isString(c.type)&&Object.defineProperty(this,"type",{value:c.type,enumerable:!0}))};f.oi=function(c){var a=String(c.value),b=c.change,e=a.slice(0,c.selStart),f=a.slice(c.selEnd);if(_.isObject(c.change)){var h=
c.selStart;c=c.selEnd;h===c&&("backspace"===b.type?e=a.slice(0,h-1):"delete"===b.type&&(f=a.slice(c+1)));b=""}return e+b+f};var e={Validate:function(c){f.Event.call(this,c);var a;_.isObject(c)&&(a=c.value);Object.defineProperty(this,"value",{value:a,writable:!0,enumerable:!0})},Calculate:function(c){f.Event.call(this,c);var a,b;_.isObject(c)&&(a=c.value,b=c.source);Object.defineProperties(this,{value:{value:a,writable:!0,enumerable:!0},source:{value:b,enumerable:!0}})},Format:function(c){f.Event.call(this,
c);var a;_.isObject(c)&&(a=c.value);Object.defineProperty(this,"value",{value:a,writable:!0,enumerable:!0})},Keystroke:function(c){f.Event.call(this,c);var a,b,e,k,h;_.isObject(c)&&(a=c.value,b=c.change,e=c.selStart,k=c.selEnd,h=c.willCommit);a="undefined"!==typeof a?a:"";b="undefined"!==typeof b||_.isString(b)?b:"";k="undefined"!==typeof k?k:a.length;Object.defineProperties(this,{value:{value:a,writable:!0,enumerable:!0},change:{value:b,writable:!0,enumerable:!0},selStart:{value:"undefined"!==typeof e?
e:0,writable:!0,enumerable:!0},selEnd:{value:k,writable:!0,enumerable:!0},willCommit:{value:h||!1,enumerable:!0}})},"Mouse Enter":function(c){f.Event.call(this,c)},"Mouse Leave":function(c){f.Event.call(this,c)},"Mouse Up":function(c){f.Event.call(this,c)},"Mouse Down":function(c){f.Event.call(this,c)},Focus:function(c){f.Event.call(this,c)},Blur:function(c){f.Event.call(this,c);var a;_.isObject(c)&&(a=c.value);Object.defineProperty(this,"value",{value:a,writable:!0,enumerable:!0})},Open:function(c){f.Event.call(this,
c);var a;_.isObject(c)&&(a=c.targetName);Object.defineProperty(this,"targetName",{value:a||"",writable:!0,enumerable:!0})},Close:function(c){f.Event.call(this,c)}};f.create=function(c,a){return e[c]?new e[c](a):null};f.ga={create:function(c,a,b){b=$.extend({name:c,type:"Field",value:a.Va()},b);return(c=f.create(c,b))?(Object.defineProperties(c,{target:{value:a,writable:!0,enumerable:!0},targetName:{value:a.name,enumerable:!0},modifier:{value:null,enumerable:!0},shift:{value:null,enumerable:!0}}),
c):null}};f.FC={create:function(c,a,b){b=$.extend({name:c,type:"Doc",targetName:""},b);return(c=f.create(c,b))?(Object.defineProperty(c,"target",{value:a,writable:!0,enumerable:!0}),c):null}};f.Bp={create:function(c,a,b){b=$.extend({name:c,type:"Page"},b);return(c=f.create(c,b))?(Object.defineProperty(c,"target",{value:a,writable:!0,enumerable:!0}),c):null}};f.rd={create:function(c,a){return f.create(c,a)}}})(window);
(function(b){function f(){}function e(a){this.stringValue=a}function c(a,c,b){c=c||",";b=b||".";var d=a.split(b),e=d[0];"-"===a.charAt(0)&&(e=e.substr(1));for(var f=[];3<e.length;)f.push(e.substr(e.length-3)),e=e.substr(0,e.length-3);0<e.length&&f.push(e);e=f.reverse().join(c);"-"===a.charAt(0)&&(e="-"+e);d[0]=e;return d.join(b)}function a(a,c,b){var d="\\.,";0===b?d="\\.":2===b&&(d=",");if(0===c)return/^-?\d*$/.test(a);if(_.isUndefined(c))return c=new RegExp("^-?\\d*(["+d+"]\\d*)?$"),c.test(a);c=
new RegExp("^-?\\d*(["+d+"]\\d{0,"+c.toString()+"})?$");return c.test(a)}function d(a){for(var c=[],b=[],d=-1;-1!==(d=a.indexOf(".",d+1));)c.push(d);for(d=-1;-1!==(d=a.indexOf(",",d+1));)b.push(d);if(c.length&&b.length){if(c[c.length-1]<b[0])return!0}else if(b.length)for(a=a.length-4,c=b.length-1;0<=c;--c)if(b[c]!==a)return!0;return!1}function g(a){return 65<=a&&90>=a||97<=a&&122>=a}function k(a,c){switch(c){case 57:return 48<=a&&57>=a;case 65:return g(a);case 79:return g(a)||48<=a&&57>=a;case 88:return!0;
default:return a===c}}function h(c){var b=typeof c;c=_.isNull(c)||"object"!==b&&"string"!==b?c:String(c).replace(",",d(c)?".":"");b=parseFloat(c);return a(c)&&!isNaN(b)?b:b="Off"===c||_.isUndefined(c)||_.isNull(c)||""===c?0:1}function l(a,c){var b=String(a);if(b.length<c)for(var d=c-b.length,e=0;e<d;++e)b="0"+b;return b}function n(a){_.isString(a)&&(a=a.replace(/\s+/g," "),a=a.replace(/[/.]/g,"-"));return a}function m(a){return a.replace(/(mmmm)|(mmm)|(:mm)|(mm)|(:m)|(m)|(dddd)|(ddd)|(dd)|(d)|(yyyy)|(yy)|(HH)|(H)|(hh)|(h)|(MM)|(M)|(ss)|(s)|(tt)|(t)/g,
function(a){return{mmmm:"MMMM",mmm:"MMM",":mm":":mm",mm:"MM",":m":":m",m:"M",dddd:"dddd",ddd:"ddd",dd:"DD",d:"D",yyyy:"YYYY",yy:"YY",HH:"HH",H:"H",hh:"hh",h:"h",MM:"mm",M:"m",ss:"ss",s:"s",tt:"A",t:"a"}[a]||""})}function r(a,c){if(!a)return null;var b=L.slice(0);c&&(c=m(c),c=n(c));a=n(a);c&&"d"===c.charAt(0).toLowerCase()?(I.unshift(c),b=G(a,I,!0)):(c&&b.unshift(c),b=G(a,b,!0));return b.isValid()?b:null}function p(a,c){return!a||null!==r(a,c)}function u(a,c){if(N[c]){a=n(a);var b;b=c&&"d"===c.charAt(0).toLowerCase()?
G(a,I,!0):G(a,L,!0);if(b.isValid())return b.format(N[c])}return null}function q(a,c){var b=String(a).split(":");if(3<c||0>c||!a)return null;var d=0,e=0,f=0;b[0]&&(d=Number(b[0]));b[1]&&(e=Number(b[1]));b[2]&&(f=Number(b[2]));if(23<d||59<e||59<f||_.isNaN(d)||_.isNaN(e)||_.isNaN(f))return null;var b=1===c||3===c,g;b?(g=12<=d&&24>d?"PM":"AM",d%=12,0===d&&(d=12)):d=l(d,2);e=l(e,2);f=l(f,2);d=d+":"+e+(2>c?"":":"+f);b&&(d+=" "+g);return d}function v(a,c){for(var b=0,d="",e=0;e<c.length&&b<a.length;++e){var f=
c.charAt(e);switch(f){case "9":d+=a.charAt(b);b++;break;default:d+=f}}return d}function w(a,c){this.MN=c;this.yz=!1;this.tT=a;a.SW()}function A(a){return function(){console.log("stub: "+a+" called with",arguments)}}function B(a){var c=null;if(_.isArray(a))switch(a[0]){case "T":c=[];break;case "G":c=a.slice(1,2);break;case "RGB":c=a.slice(1,4);break;case "CMYK":c=a.slice(1,5)}return c}function z(a,c){a.widgets.forEach(function(a){a.backgroundColor=c})}function x(a){this.nE={};this.YD=a}function y(){var a=
this;this.mE={Doc:new x(function(){return"id"}),Field:new x(function(a){return a.name})};this.Mp=0;this.Rs=[];this.CN={Doc:function(a){return D.LC(a)},Color:function(a){return D.ys(a)},Field:function(a){a.hk&&a.hk()&&(a=a.Gb());return new D.vp(a)},Event:function(c){var b={target:a.$l({Field:"Field",Page:"Doc",Doc:"Doc"}[c.type],c.target)};Object.defineProperties(b,{value:{get:function(){return D.utils.toString(c.value)},set:function(a){c.value=a},enumerable:!0}});for(var d in c)c.hasOwnProperty(d)&&
"target"!==d&&"value"!==d&&function(a){Object.defineProperty(b,a,{set:function(b){c[a]=b},get:function(){return c[a]},enumerable:!0})}(d);return b}}}function F(){y.call(this);this.uN=this.dR();b.XY=this.uN;for(var a in E)E.hasOwnProperty(a)&&(a in b||(b[a]=E[a]))}function K(){y.call(this);if(Q){this.Sp=$("<iframe />");this.Sp.css({display:"none"});this.Sp.appendTo("body");this.An=this.Sp[0].contentWindow;var a=this.An.document;a.open();a.write("<script>var event = {};\x3c/script>");a.write("<script>window.__add_action = function(__script){ return function(){(1,eval)(__script); } }\x3c/script>");
a.close();this.dl=!1;for(var c in E)E.hasOwnProperty(c)&&(this.An[c]=E[c]);f(this.An)}}b.Annotations=b.Annotations||{};b.Annotations.O=b.Annotations.O||{};b.Annotations.O.ub=b.Annotations.O.ub||{};var G=b.moment,D=b.Annotations.O.ub,L="M-D;M-D-YYYY;MM-DD-YY;MM-YY;D-MMM;D-MMM-YY;DD-MMM-YY;YYMM-DD;MMM-YY;MMMM-YY;MMM D, YYYY;MMMM D, YYYY;M-D-YY h:mm A;M-D-YY HH:mm;DD-MMM-YYYY".split(";"),I="D-MMM D-MMM-YY DD-MMM-YY DD-MMM-YYYY DD-MM-YYYY D-M-YYYY".split(" "),O="m/d;m/d/yy;mm/dd/yy;mm/yy;d-mmm;d-mmm-yy;dd-mmm-yy;yymm-dd;mmm-yy;mmmm-yy;mmm d, yyyy;mmmm d, yyyy;m/d/yy h:MM tt;m/d/yy HH:MM;dd-mmm-yyyy".split(";"),
N={"m/d":"M/D","m/d/yy":"M/D/YYYY","mm/dd/yy":"MM/DD/YY","mm/dd/yyyy":"MM/DD/YYYY","mm/yy":"MM/YY","d-mmm":"D-MMM","d-mmm-yy":"D-MMM-YY","dd-mmm-yy":"DD-MMM-YY","yymm-dd":"YYMM-DD","mmm-yy":"MMM-YY","mmmm-yy":"MMMM-YY","mmm d, yyyy":"MMM D, YYYY","mmmm d, yyyy":"MMMM D, YYYY","m/d/yy h:MM tt":"M/D/YY h:mm A","m/d/yy HH:MM":"M/D/YY HH:mm","dd-mmm-yyyy":"DD-MMM-YYYY"};D.utils={isNumber:a,W_:c,E_:h,C_:l,LZ:u,o_:p,MZ:q,formatNumber:v,toString:function(a){return _.isString(a)?a:_.isNumber(a)?String(a):
""},a0:function(c){var b=c;a(c)&&""!==c&&(b=h(c));return b},BU:function(a,c){var b=G(c),d=m(a);return b.format(d)},CU:function(a){var b=Array.prototype.slice.call(arguments,1),d=0;return a.replace(/%(,\d+)?([+ 0#]+)?(\d+)?(\.\d+)?([dfsx]+)/g,function(a,e,f,g,k,h){a=0;g=".";var n=",";if(e)switch(e.slice(1)){case "0":n=",";g=".";break;case "1":n="";g=".";break;case "2":n=".";g=",";break;case "3":n="",g=","}if(f)for(e=f.length-2,f=1;f<e;++f);k&&(a=k.slice(1));k=b[d];d++;e=String(k);switch(h){case "f":e=
Number(k).toFixed(a).replace(".",g);e=c(e,n,g);break;case "d":e=Number(k).toFixed();break;case "x":e=Number(k).toString(16)}return e})},DU:function(c,b){for(var d="",e=0,f="",k=c.length,h=0;h<k;++h){var n=b,l=c[h],m="";switch(l){case "?":m="upper"===f?m+n.charAt(e).toUpperCase():"lower"===f?m+n.charAt(e).toLowerCase():m+n.charAt(e);e++;break;case "X":for(;e<n.length;){l=n.charCodeAt(e);if(g(l)||48<=l&&57>=l){m="upper"===f?m+n.charAt(e).toUpperCase():"lower"===f?m+n.charAt(e).toLowerCase():m+n.charAt(e);
e++;break}e++}break;case "A":for(;e<n.length;){if(g(n.charCodeAt(e))){m="upper"===f?m+n.charAt(e).toUpperCase():"lower"===f?m+n.charAt(e).toLowerCase():m+n.charAt(e);e++;break}e++}break;case "9":for(;e<n.length;){if(a(n.charAt(e))){m+=n.charAt(e);e++;break}e++}break;case "*":m="lower"===f?n.slice(e).toLowerCase():"upper"===f?n.slice(e).toUpperCase():n.slice(e);e=n.length-1;break;case "\\":break;case ">":f="upper";break;case "<":f="lower";break;case "=":f="";break;default:m=l}d+=m}return d},BC:function(a,
c){c=c||a;var d=b.Annotations.O.ub.Events.oi(H);if(a&&d){var e=d.length,f=a.length;if(H.willCommit&&e!==f&&0!==f)M.Qa().ee().alert("The value entered does not match the format of the field [ "+c+" ]"),H.rc=!1;else if(e&&f)if(e<=f)for(f=0;f<e;++f){if(!k(d.charCodeAt(f),a.charCodeAt(f))){H.rc=!1;M.Qa().ee().alert("The value entered does not match the format of the field [ "+c+" ]");break}}else M.Qa().ee().alert("The value entered does not match the format of the field [ "+c+" ]"),H.rc=!1}},gs:function(a){var c=
String(H.value);c&&H.willCommit&&!p(c,a)&&(H.rc=!1,M.Qa().ee().alert("Invalid Date/Time: Input should match format "+a))}};Object.getOwnPropertyNames(String.prototype).forEach(function(a){e.prototype[a]=function(){return this.stringValue[a].apply(this.stringValue,arguments)}});e.prototype.valueOf=function(){this.VH||(this.VH=h(this.stringValue));return this.VH};w.prototype={terminate:function(){this.yz||(this.yz=!0,this.MN(),this.tT.sQ())}};var H=null,M=null,E={AFNumber_Format:function(b,d,e,f,g,
k){e=(e=M.Qa().ee().Gb(H.target.name))?e.Va():null;a(e)&&null!==e&&""!==e&&(e=h(e),isNaN(e)||(e=e.toFixed(b),0===d?e=c(e):2===d&&(e=c(e),b=e.indexOf("."),e=e.split(",").join("."),0<=b&&(e=e.substr(0,b)+","+e.substr(b+1))),H.value=k?g+e:e+g,H.rc=!0))},AFPercent_Format:function(b,d){var e=H.value;a(e)&&(e=h(e),e=(100*e).toFixed(b),d&&(e=c(e)),H.value=e+"%",H.rc=!0)},AFDate_KeystrokeEx:D.utils.gs,AFDate_Keystroke:function(a){a<O.length&&D.utils.gs(O[a])},AFDate_FormatEx:function(a){a=u(String(H.value),
a);_.isNull(a)||(H.value=a,H.rc=!0)},AFDate_Format:function(a){var c=String(H.value);a<O.length&&(a=u(c,O[a]),_.isNull(a)||(H.value=a,H.rc=!0))},AFRange_Validate:function(a,c,b,d){var e=Number(H.value),e=(!a||e>=c)&&(!b||e<=d);if(!e){var f="Invalid value: must be";a&&(f+=" greater than or equal to "+c);a&&b&&(f+=" and");b&&(f+=" less than or equal to "+d);M.Qa().ee().alert(f+".")}H.rc=e},AFTime_Format:function(a){H.value=q(H.value,a);H.rc=!0},AFTime_FormatEx:function(a){a=u(String(H.value),a);_.isNull(a)||
(H.value=a,H.rc=!0)},AFTime_Keystroke:function(a){switch(a){case 0:a="HH:MM";break;case 1:a="h:MM tt";break;case 2:a="HH:MM:ss";break;case 3:a="h:MM:ss tt"}D.utils.gs(a)},AFTime_KeyStrokeEx:D.utils.gs,AFMakeNumber:function(a){return Number(a)},AFSimple_Calculate:function(a,c){var b={PRD:function(a,c){return a*c},SUM:function(a,c){return a+c},MIN:function(a,c){return c<a?c:a},MAX:function(a,c){return c>a?c:a}}[a];b&&("string"===typeof c&&(c=c.split(",")),H.value=c.map(function(a){a=H.target.doc.getField(a).value;
return h(a)}).reduce(b),H.rc=!0)},AFNumber_Keystroke:function(c,d){H.rc=a(b.Annotations.O.ub.Events.oi(H),void 0,d)},AFPercent_Keystroke:function(c){H.rc=a(b.Annotations.O.ub.Events.oi(H),c+2)},AFMergeChange:function(a){return b.Annotations.O.ub.Events.oi(a)},AFParseDateEx:r,AFSpecial_Format:function(a){if(0===arguments.length)H.rc=!1;else{var c=H.value,b;switch(a){case 0:b="99999";break;case 1:b="99999-9999";break;case 2:b=10<=c.length?"(999) 999-9999":"999-9999";break;case 3:b="999-99-9999"}H.value=
c.match(/^\d+$/)?v(c,b):c;H.rc=!0}},AFSpecial_Keystroke:function(a){var c="",b;switch(a){case 0:c="99999";b="Zipcode";break;case 1:c="999999999";b="Zipcode + 4";break;case 2:c="9999999999";b="Phone";break;case 3:c="999999999",b="Social Security Number"}D.utils.BC(c,b)},AFSpecial_KeystrokeEx:D.utils.BC,util:{printd:D.utils.BU,printf:D.utils.CU,printx:D.utils.DU},app:{beep:A("app.beep"),alert:function(a){if(_.isObject(a)){var c=a.nType||0;a=a.cMsg;if(0===c)return M.Qa().ee().alert(a),1;a=window.confirm(a);
return 1===c?a?1:2:a?4:3}M.Qa().ee().alert(a);return 1},response:A("app.response"),setInterval:function(a,c){var b=M.getDocument().Up;a=b.Kn(a);var d=H,e=window.setInterval(function(){b.No(a,d,M)},c);return new w(b,function(){window.clearInterval(e)})},clearInterval:function(a){a.terminate()},setTimeOut:function(a,c){var b=M.getDocument().Up,d;a=b.Kn(a);var e=H,f=window.setTimeout(function(){b.No(a,e,M);d.terminate()},c);return d=new w(b,function(){window.clearTimeout(f)})},clearTimeOut:function(a){a.terminate()},
launchURL:A("app.launchURL")},console:{clear:function(){console.clear()},println:function(a){console.log(a)}},alert:function(a){M.Qa().ee().alert(a)},print:function(){$(window).trigger("documentPrint")},ADBE:null,color:{transparent:["T"],black:["G",0],white:["G",1],red:["RGB",1,0,0],green:["RGB",0,1,0],blue:["RGB",0,0,1],cyan:["CMYK",1,0,0,0],magenta:["CMYK",0,1,0,0],yellow:["CMYK",0,0,1,0],dkGray:["G",.25],gray:["G",.5],ltGray:["G",.75]},border:{s:"solid",b:"beveled",d:"dashed",i:"inset",b0:"underline"},
style:{ch:"check",cr:"cross",FZ:"diamond",ci:"circle",Y_:"start",X_:"square"},display:{visible:0,hidden:1,aU:2,bU:3}};D.vp=function(a){this.la=a};D.vp.prototype={insertItemAt:function(a,c,b){_.isUndefined(c)&&(c=a);_.isUndefined(b)&&(b=0);_.isArray(a)&&(a=a[0]);_.isArray(c)&&(c=c[0]);c={displayValue:a,value:c};var d=this.la.lh();b=-1===b?d.length-b:b;this.la.Tt(c,b);"Ch"!==this.la.type||this.la.flags.get("Combo")||this.la.yb(a)},getItemAt:function(a,c){c=_.isUndefined(c)?!0:!!c;var b=this.la.lh(),
b=-1===a?b[b.length-1]:b[a];return c?b.value:b.displayValue},deleteItemAt:function(a){var c=this.la.lh();if(_.isUndefined(a)){var b=this.la.Va();c.forEach(function(c,d){c.value===b&&(a=d)});_.isUndefined(a)||(c.splice(a,1),0===a?this.la.yb(c[c.length-1].value):this.la.yb(c[a-1].value))}else c.splice(a,1)},clearItems:function(){this.la.oe([]);this.la.yb(null);this.la.Jo()},setItems:function(a){for(var c=[],b=a.length,d=0;d<b;++d){var e=a[d];_.isString(e)?c.push({value:e}):_.isArray(e)&&c.push({displayValue:e[0],
value:e[1]?e[1]:e[0]})}this.la.oe(c);this.la.yb(c[0].value||null);this.la.Jo()},setFocus:function(){var a;if(a="widgets"in this.la?this.la.widgets[0]:this.la)this.la.gh().Pn(a.PageNumber,a.X,a.Y,!0),a.innerElement.trigger("focus")},isBoxChecked:function(a){return(a=this.la.widgets[a])?a.appearance===a.ri()?1:0:0},checkThisBox:function(a,c){_.isUndefined(c)&&(c=!0);var b=this.la.widgets[a];b&&(c?this.la.yb(b.ri()):this.la.Va()===b.ri()&&this.la.yb("Off"),this.la.Jo())},buttonSetCaption:function(a){this.la.widgets.forEach(function(c){c.captions.Normal=
String(a);c.refresh()})},getArray:function(){var a=[],c=this.la.gh().da.dh;this.la.sC({dB:function(){},Ov:function(){},Ar:function(b){a.push(new D.vp(c.Gb(b)))}},this.la.GR());return a}};Object.defineProperties(D.vp.prototype,{name:{get:function(){return this.la.name},enumerable:!0},doc:{get:function(){return D.LC(this.la.gh())},enumerable:!0},value:{get:function(){var c=this.la.Va();return"number"===typeof c?c:a(c)&&""!==c?"0"===c?0:new e(c):c||""},set:function(a){this.la.yb(a)},enumerable:!0},valueAsString:{get:function(){var a=
this.la.Va();return a?a.toString():""}},fillColor:{set:function(a){z(this.la,B(a))},get:function(){return D.ys(this.la.widgets[0].backgroundColor)},enumerable:!0},textColor:{set:function(a){this.la.font.fillColor=B(a)},get:function(){return D.ys(this.la.font.fillColor)},enumerable:!0},bgColor:{set:function(a){z(this.la,B(a))},get:function(){return D.ys(this.la.widgets[0].backgroundColor)},enumerable:!0},numItems:{get:function(){return(this.la.lh()||[]).length},enumerable:!0},charLimit:{set:function(a){a=
Number(a);_.isNaN(a)||(this.la.maxLen=a)},get:function(){return this.la.maxLen},enumerable:!0},hidden:{set:function(a){this.la.Lf(!a)},get:function(){return this.la.widgets[0].hidden},enumerable:!0},display:{set:function(a){a===E.display.visible||a===E.display.aU?this.la.Lf(!0):a!==E.display.hidden&&a!==E.display.bU||this.la.Lf(!1)},get:function(){return this.la.widgets[0].hidden},enumerable:!0},readonly:{set:function(a){this.la.flags.set("ReadOnly",a);this.la.Jo()},get:function(){return this.la.flags.get("ReadOnly")}},
required:{set:function(a){this.la.flags.set("Required",a);this.la.Jo()},get:function(){return this.la.flags.get("Required")}},userName:{set:function(a){this.la.userName=a;this.la.Jo()},get:function(){return this.la.userName},enumerable:!0},type:{get:function(){switch(this.la.type){case "Tx":return"text";case "Btn":return this.la.flags.get("PushButton")?"button":this.la.flags.get("Radio")?"radiobutton":"checkbox";case "Ch":return this.la.flags.get("Combo")?"combobox":"listbox";case "Sig":return"signature"}return null},
enumerable:!0},currentValueIndices:{get:function(){for(var a=this.la.lh(),c=this.la.value,b=0;b<a.length;++b)if(a[b].value===c)return b;return-1},enumerable:!0}});x.prototype={get:function(a){a=this.YD(a);a=this.nE[a];return _.isUndefined(a)?null:a},set:function(a){this.nE[this.YD(a)]=a}};D.ys=function(a){return a?0!==a.A?["RGB",a.R/255,a.G/255,a.B/255]:["T"]:["T"]};D.LC=function(a){var c=a.Qa().ee(),d={getField:function(a){return(a=c.Gb(a))?new D.vp(a):null},submitForm:function(c,d,e,f){_.isUndefined(d)&&
(d=!0);(new b.Actions.Vk({url:c,format:d?"fdf":"xfdf",includeEmpty:!!e,fields:f||[]})).onTriggered(null,null,a)},resetForm:function(c){(new b.Actions.Rk({fields:c})).onTriggered(null,null,a)},calculateNow:function(){c.oq(null)},getNthFieldName:function(a){var b,d=0;c.Zn(function(c){d===a&&(b=c.name);++d});return b}};Object.defineProperties(d,{calculate:{set:function(a){c.Yo=!!a},get:function(){return c.Yo},enumerable:!0},numPages:{get:function(){return a.vb()},enumerable:!0},pageNum:{get:function(){return a.Hl()-
1},set:function(c){a.Je(c+1)},enumerable:!0},numFields:{get:function(){var a=0;c.Zn(function(){++a});return a},enumerable:!0}});return d};y.prototype={Kn:function(){},No:function(){},bd:function(){this.Rs.forEach(function(a){a()})},qC:function(a){return a},xC:function(a){return a},Rw:function(a){return a},fL:function(a){return a},gL:function(a){return a},eL:function(a){return a},dL:function(a){return a},ip:function(a){var c=null;if(_.isArray(a))c=this.dL(a);else if(_.isNull(a))c=null;else switch(typeof a){case "object":c=
this.xC(a);break;case "function":c=this.Rw(a);break;case "number":c=this.fL(a);break;case "string":c=this.gL(a);break;case "boolean":c=this.eL(a);break;case "undefined":c=void 0;break;default:console.warn("unrecognised type: "+typeof a)}return c},wrap:function(a,c){var b=this.mE[a];if(b){var d=b.get(c);if(!_.isNull(d))return d}d=this.$l(a,c);d=this.ip(d);b&&b.set(d);return d},$l:function(a,c){var b=this.mE[a];if(b){var d=b.get(c);if(!_.isNull(d))return d}if(d=this.CN[a])return d=d(c),b&&b.set(d),
d;console.warn(a+" is not a valid normalizable embedded JS type",c);return{}},FX:function(a){0<this.Mp?this.Rs.push(a):a()},SW:function(){this.Mp+=1},sQ:function(){--this.Mp;if(0===this.Mp){var a=this.Rs;this.Rs=[];a.forEach(function(a){a()})}},dR:function(){return this.xC($.extend({},E))}};D.gY=E;var C=eval;F.prototype=$.extend(Object.create(y.prototype),{cq:function(a){a=this.$l("Doc",a);for(var c=Object.keys(a),d=0;d<c.length;++d){var e=c[d];Object.defineProperty(b,e,Object.getOwnPropertyDescriptor(a,
e))}},Kn:function(a){return function(c){H=c;C("with(_PDFTRON_JS_API){"+a+"\n}");H=null}},No:function(a,c,d){b.event=c;this.dl||(this.cq(d),this.dl=!0);var e=M;M=d;try{a(this.wrap("Event",c),this.wrap("Doc",d))}catch(f){console.warn("Embedded JS error encountered: "+f+" "+a.ir)}M=e}});(function(){y.call(this);this.Uh=continuum.qZ();this.dl=!1;for(var a=Object.keys(E),c=0;c<a.length;++c)this.Uh.global.RC(a[c],this.ip(E[a[c]]))}).prototype=$.extend(Object.create(y.prototype),{Kn:function(a){return continuum.rZ(a)},
cq:function(a){a=this.$l("Doc",a);for(var c=Object.keys(a),b=0;b<c.length;++b)this.Uh.global.RC(c[b],this.ip(a[c[b]]))},No:function(a,c,b){this.dl||(this.cq(b),this.dl=!0);c=this.$l("Event",c);b=this.ip(c);this.Uh.global.RC("event",b);H=c;this.Uh.evaluate(a);H=null},qC:function(a){var c=this;if(_.isObject(a)){if(a.vO)return a.vO.map(function(a){return c.qC(a)});console.warn("object argument: ",a)}return a},Rw:function(a){var c=this;return continuum.Vy(function(){var b=Array.prototype.map.call(arguments,
function(a){return c.qC(a)});return c.ip(a.apply(null,b))})},fL:function(a){return this.Uh.evaluate(JSON.stringify(a))},gL:function(a){return this.Uh.evaluate(JSON.stringify(a))},eL:function(a){return this.Uh.evaluate(JSON.stringify(a))},dL:function(a){var c=this.Uh.evaluate("new Array()");console.warn("array:",c);return a},xC:function(a){for(var c=this.Uh.evaluate("Object.create(null)"),b=Object.keys(a),d=b.length,e=0;e<d;++e){var f=b[e],g=Object.getOwnPropertyDescriptor(a,f),k={Enumerable:g.enumerable,
Writeable:g.writeable};_.isUndefined(g.value)||(k.Value=this.ip(g.value));_.isUndefined(g.set)||(k.Set=this.Rw(g.set));_.isUndefined(g.get)||(k.Get=this.Rw(g.get));c.cY(f,k)}return c}});var Q=!0;b.o.GP=function(){Q=!1};b.Annotations.O.nx={update:function(a){f=a},oi:b.Annotations.O.ub.Events.oi};K.prototype=$.extend(Object.create(y.prototype),{Kn:function(a){if(Q)try{var c=this.An.__add_action(a);c.ir=a;return c}catch(b){console.warn("Failed to compile embedded JS script")}},cq:function(a){a=this.$l("Doc",
a);for(var c=Object.keys(a),b=0;b<c.length;++b){var d=c[b];Object.defineProperty(this.An,d,Object.getOwnPropertyDescriptor(a,d))}},bd:function(){y.prototype.bd.call(this);this.Sp&&this.Sp.remove()},No:function(a,c,b){if(Q){this.dl||(this.cq(b),this.dl=!0);var d=M;M=b;c=this.$l("Event",c);this.An.event=c;b=H;H=c;try{a()}catch(e){console.warn("Embedded JS error encountered: ",e,a&&a.ir)}H=b;M=d}}});D.$X=F;D.jP=function(){return new K}})(window);
(function(b){if(b&&b.Worker){var f=b.Worker;b.bj=b.bj||[];b.bj.LK||(b.bj.LK=function(){for(var e=b.bj.length-1;0<=e;e--)b.bj[e].terminate(),delete b.bj[e]});b.Worker.isFake||(b.Worker=function(e){e=new f(e);b.bj.push(e);return e},b.RL=function(b){return b instanceof f},b.Worker.isFake=!0)}})(window);window.addEventListener("unload",function(){window.bj&&window.bj.LK()});
(function(b){b.Annotations=b.Annotations||{};var f=b.Annotations,e=f.ja||{};f.Annotation=function(){this.Subject="Annotation";this.qD=1;this.Kp=this.Lp=this.Os=this.Ns=0;this.gD=void 0;this.NoRotate=this.NoZoom=this.qY=this.pY=!1;this.Printable=!0;this.rj=new f.Color(0,0,0);this.yD=void 0;this.Sx=new Date;this.XD=e.qS();this.Yx=!0;this.aE=this.jl=!1;this.vE=Promise.resolve();this.cE=!0;this.un=[];this.uf=this.Sg=null;this.mD=this.nD=!1};f.Annotation.prototype={elementName:"annotation",selectionModel:f.zs,
IH:!1,kH:function(){return null},draw:function(){},render:function(){},Mw:function(){},hk:function(){return!1},cI:function(){return!1},Vl:function(){return!this.Hidden&&!this.NoView&&!this.Ci()},kK:function(c){var a=new f.Rect(c.x1,c.y1,c.x2,c.y2);0>a.ya()&&(c=a.x1,a.x1=a.x2,a.x2=c);0>a.va()&&(c=a.y1,a.y1=a.y2,a.y2=c);this.X=a.x1;this.Y=a.y1;this.Width=a.ya();this.Height=a.va()},yg:function(c){var a=this.Sc();c=new f.Rect(c.x1,c.y1,c.x2,c.y2);0>c.ya()&&(c.x1=a.x1,c.x2=a.x2);0>c.va()&&(c.y1=a.y1,c.y2=
a.y2);this.X=c.x1;this.Y=c.y1;this.Width=c.ya();this.Height=c.va()},adjustRect:function(){},resize:function(c){this.yg(c)},ck:function(){return this.X},sK:function(c){this.X=parseFloat(c)},dk:function(){return this.Y},tK:function(c){this.Y=parseFloat(c)},ya:function(){return this.Width},aC:function(c){this.Width=parseFloat(c)},va:function(){return this.Height},To:function(c){this.Height=parseFloat(c)},Sc:function(){return new f.Rect(this.X,this.Y,this.X+this.Width,this.Y+this.Height)},getRectPadding:function(){return 0},
Hb:function(){return this.PageNumber},wb:function(){return"undefined"===typeof this.PageNumber?void 0:this.PageNumber-1},fK:function(c){this.PageNumber=parseInt(c,10)},co:function(){return this.ck()},qH:function(){return this.co()+this.Width},lo:function(){return this.dk()},JG:function(){return this.lo()+this.Height},TQ:function(){return this.Custom},CV:function(c){this.Custom=c},eh:function(){return this.yU},Ch:function(c){this.yU=c;this.mb(!(this instanceof f.Ia))},Ut:function(c){if(c.Id)for(var a=
0;a<this.un.length;++a)if(this.un[a].Id===c.Id)return;this.un.push(c)},zP:function(c){c=this.un.indexOf(c);-1<c&&this.un.splice(c,1)},Yu:function(){return this.un},Ci:function(){return!(_.isUndefined(this.InReplyTo)||_.isNull(this.InReplyTo))},CB:function(){return this.vE},zf:function(){var c=this.appearances&&this.appearances._DEFAULT;return c&&c.Normal},mb:function(c){this.isImporting||(this.Sx=new Date,c||delete this.appearances);this.Yx||(this.jl=!0)},bR:function(){var c=[];this.Invisible&&c.push("invisible");
this.Hidden&&c.push("hidden");this.Printable&&c.push("print");this.NoZoom&&c.push("nozoom");this.NoRotate&&c.push("norotate");this.NoView&&c.push("noview");this.ReadOnly&&c.push("readonly");this.Locked&&c.push("locked");this.ToggleNoView&&c.push("togglenoview");this.LockedContents&&c.push("lockedcontents");return 0<c.length?c.join(","):null},LV:function(c){this.xN=c},kR:function(){return this.xN},serialize:function(c,a){var d=f.ba,e=this.Sc();this.Qv&&this.Qv.isEqual(e)?e=this.Rv:(e.nG(),this.Rv&&
(delete this.Rv,delete this.Qv),e=d.NB(e,a));var e={page:this.wb(),rect:e},k=d.wg(this.Color);null!==k&&(e.color=k);(k=this.bR())&&(e.flags=k);!this.yS&&this.Id&&(e.name=this.Id);this.Author&&(e.title=this.Author);this.Subject&&(e.subject=this.Subject);(k=this.Rotation)&&0!==k&&(e.rotation=k);if(k=this.DateModified){var h;this.hB&&(k.getTime()===this.NI?h=this.hB:(delete this.hB,delete this.NI));h||(h=d.nC(k));e.date=h}for(var l in e)c.setAttribute(l,e[l]);l=this.eh();l===this.LI?(this.OI&&(h=document.createElementNS("",
"contents-richtext"),d=document.createElementNS("",d.TU),c.pG=this.OI,h.appendChild(d),c.appendChild(h)),this.jB&&(h=document.createElementNS("","contents"),h.textContent=this.jB,c.appendChild(h))):(delete this.LI,delete this.jB,h=document.createElementNS("","contents"),h.textContent=l,c.appendChild(h));(d=this.appearances)&&b.kf.hL(new b.$C(c),d,a);return c},Zh:function(c){return(c=c.nodeName)&&this.elementName?c.toLowerCase()===this.elementName.toLowerCase():!1},deserialize:function(c,a){var d=
f.ba,e=c.getAttribute("page"),e=parseInt(e,10);this.PageNumber=e+1;this.Rv=e=c.getAttribute("rect")||"0,0,100,100";e=d.qu(e,a);e.normalize();this.yg(e);e=c.getAttribute("name");this.yS=!e;this.Id=e;this.Author=c.getAttribute("title");this.Subject=c.getAttribute("subject");e=(c.getAttribute("flags")||"").split(",");this.Invisible=-1!==e.indexOf("invisible");this.Hidden=-1!==e.indexOf("hidden");this.Printable=-1!==e.indexOf("print");this.NoZoom=-1!==e.indexOf("nozoom");this.NoRotate=-1!==e.indexOf("norotate");
this.NoView=-1!==e.indexOf("noview");this.ReadOnly=-1!==e.indexOf("readonly");this.Locked=-1!==e.indexOf("locked");this.ToggleNoView=-1!==e.indexOf("togglenoview");this.LockedContents=-1!==e.indexOf("lockedcontents");e=d.Rj(c.getAttribute("color"));this.Color=null!==e?e:new f.Color(0,0,0,0);(e=c.getAttribute("rotation"))&&(this.Rotation=e);(e=c.getAttribute("date"))?(this.hB=e,d=d.bz(e),this.NI=d.getTime(),this.DateModified=d):this.DateModified=null;var d=c.getElementsByTagName("contents-richtext"),
e="",k=c.getElementsByTagName("contents"),h=c.getElementsByTagName("apref"),l;if(0<k.length)this.jB=e=k[0].textContent;else if(0<d.length)if(l=d[0].getElementsByTagName("body"),0<l.length)if(k=l[0].getElementsByTagName("span"),0<k.length)for(l=0;l<k.length;++l)e+=k[l].textContent;else e=l[0].textContent;else e=d[0].textContent;0<d.length&&(this.OI=d[0].jU);for(l=0;l<h.length;++l)b.kf.ZC.SN(new b.Re(h[l]),this,a);this.LI=e;this.Ch(e)},Gh:function(c){var a={x:this.X,y:this.Y},b={x:a.x+this.Width,y:a.y+
this.Height},a=c.W(a),b=c.W(b);this.kK({x1:a.x,y1:a.y,x2:b.x,y2:b.y})},pe:function(c,a){var b=c.getAttribute(a);_.isUndefined(b)||_.isNull(b)||(this[a]=b)},Qr:function(c,a){var b=c.getAttribute(a);_.isUndefined(b)||_.isNull(b)||(this[a]=Number(b))},Ya:function(c,a,b){var e=this[a];_.isUndefined(e)||_.isNull(e)||e===b||c.setAttribute(a,e)},xk:function(){return!1},Fw:function(){this.Rv&&!this.Qv&&(this.Qv=this.Sc())}};f.Annotation.prototype=$.extend(Object.create(b.utils.eventHandler),f.Annotation.prototype);
Object.defineProperties(f.Annotation.prototype,{X:{get:function(){return this.Ns},set:function(c){this.Ns=parseFloat(c);this.mb(!0);(c=this.zf())&&c.offset&&(c.offset.x=this.Ns)}},Y:{get:function(){return this.Os},set:function(c){this.Os=parseFloat(c);this.mb(!0);(c=this.zf())&&c.offset&&(c.offset.y=this.Os)}},Width:{get:function(){return this.Lp},set:function(c){c=parseFloat(c);window.utils.fCmp(this.Lp,c)||(this.Lp=c,this.mb())}},Height:{get:function(){return this.Kp},set:function(c){c=parseFloat(c);
window.utils.fCmp(this.Kp,c)||(this.Kp=c,this.mb())}},NoMove:{get:function(){return this.oD},set:function(c){this.oD=!0===c||"true"===c}},NoResize:{get:function(){return this.pD},set:function(c){this.pD=!0===c||"true"===c}},PageNumber:{get:function(){return this.qD},set:function(c){this.qD=parseInt(c,10)}},DateModified:{get:function(){return this.Sx},set:function(c){this.Sx=e.RG(c)}},Id:{get:function(){return this.XD},set:function(c){this.XD=c}},Author:{get:function(){return this.yD},set:function(c){this.yD=
c}},IsAdded:{get:function(){return this.Yx},set:function(c){this.Yx=c}},IsModified:{get:function(){return this.jl},set:function(c){this.jl=c}},IsDeleted:{get:function(){return this.aE},set:function(c){this.aE=c}},Custom:{get:function(){return this.gD},set:function(c){this.gD=c}},Listable:{get:function(){return this.cE},set:function(c){this.cE=!!c}},Color:{get:function(){return this.rj},set:function(c){c instanceof f.Color&&(this.rj=c,this.mb())}},MaintainAspectRatio:{get:function(){return this.nD},
set:function(c){this.nD=c}},IsClickableOutsideRect:{get:function(){return this.mD},set:function(c){this.mD=c}}})})(window);
(function(b){var f=b.Annotations||{};f.mp=function(b){this.Np=new f.Color;this.pl=this.gl=this.zn=0;this.Jd=null;this.set(b)};f.mp.prototype={set:function(b){b instanceof f.mp?(this.Np=new f.Color(b.Np),this.zn=b.zn,this.gl=b.gl,this.pl=b.pl,this.Jd=b.Jd):_.isArray(b)?3===b.length||4===b.length?(_.isUndefined(b[0])||(this.gl=Number(b[0])),_.isUndefined(b[1])||(this.pl=Number(b[1])),_.isUndefined(b[2])||(this.zn=Number(b[2])),4===b.length&&_.isArray(b[3])&&console.warn("dashed borders are currently unsupported")):
console.warn("Invalid border specification ",b," should be 3 or 4 elements long"):_.isObject(b)&&(_.isArray(b.border)&&this.set(b.border),_.isUndefined(b.color)||(this.Np=new f.Color(b.color)),_.isUndefined(b.width)||(this.zn=Number(b.width)),_.isUndefined(b.cornerRadius)?_.isArray(b.cornerRadius)&&(this.gl=b.cornerRadius[0]||0,this.pl=b.cornerRadius[1]||0):this.pl=this.gl=Number(b.cornerRadius),_.isString(b.style)&&(this.Jd=b.style))},serialize:function(b){var c=f.ba;this.bN&&b.setAttribute("width",
this.bN);this.Jd&&b.setAttribute("style",this.Jd);var a=this.color;b.setAttribute("BC",[a.R/255,a.G/255,a.B/255].map(c.toFixed).join(","))},deserialize:function(b){var c=f.ba,a={};c.getAttribute(b,"width")?a.width=parseInt(c.getAttribute(b,"width"),10):a.width=1;c.getAttribute(b,"style")&&(a.style=c.getAttribute(b,"style"),"beveled"===a.style&&(a.style="bevelled"));c.getAttribute(b,"BC")&&(a.color=c.getAttribute(b,"BC").split(",").map(Number));this.set(a)},mC:function(b){var c=_.isNull(this.Jd)?"solid":
this.Jd;b*=this.zn;var a=this.gl.toFixed(6)+"px "+this.pl.toFixed(6)+"px",d={};"underline"===c?(d["border-bottom-style"]="solid",d["border-top-style"]="hidden",d["border-left-style"]="hidden",d["border-right-style"]="hidden"):(c={solid:"solid",bevelled:"outset",inset:"inset"}[c],_.isUndefined(c)&&(c="solid"),d["border-style"]=c);d["border-color"]=this.Np.toString();d["border-width"]=b;d["border-top-left-radius"]=a;d["border-top-right-radius"]=a;d["border-bottom-left-radius"]=a;d["border-bottom-right-radius"]=
a;return d}};Object.defineProperties(f.mp.prototype,{color:{get:function(){return this.Np},set:function(b){this.set({color:b})}},width:{get:function(){return this.zn},set:function(b){this.set({width:b})}},style:{get:function(){return this.Jd},set:function(b){this.set({style:b})}},cornerRadius:{get:function(){return[this.gl,this.pl]},set:function(b){this.set({cornerRadius:b})}}})})(window);
(function(b){var f=b.Annotations||{},e=f.ja||{};f.Mg=function(c){this.bl=this.vc="";this._size=0;this.Ys=new f.Color([0,0,0]);this.ol=new f.Color([0,0,0]);this.Mt="Type1";this.uj=0;this.lE=4;this.jE=12;this.set(c)};f.Mg.prototype={set:function(c){_.isObject(c)?(c.name&&(this.vc=String(c.name),this.bl=f.ba.Cr(this.vc),this.Rx=f.ba.ZI(this.vc),this.FD=f.ba.YI(this.vc)),c.size&&(this._size=Number(c.size)),c.fillColor&&(this.Ys=new f.Color(c.fillColor)),c.strokeColor&&(this.ol=new f.Color(c.strokeColor)),
c.type&&(this.Mt=c.type)):_.isString(c)&&(this.vc=c,this.bl=f.ba.Cr(this.vc),this.Rx=f.ba.ZI(this.vc),this.FD=f.ba.YI(this.vc))},tQ:function(c,a,b){if(0===this._size){var f=a.ev(1);if(0===c.replace(/\s/g,"").length)return this.uj=Math.min(f/2,this.jE);var k=20;b?(k=f*e.Lk,a.element?(a=a.element[0].cloneNode(!0),f=document.getElementsByTagName("body")[0],f.appendChild(a),k=e.vG(c,a.children[0],k)/e.Lk,f.removeChild(a)):k/=2):(a=.95*a.pA(1),f*=.95,c=e.measureText(c,k,this.bl?this.bl:void 0,this.Rx),
k*=Math.min(a/c.width,f/c.height));return this.uj=Math.max(this.lE,Math.min(k,this.jE))}},deserialize:function(c,a){var b=f.ba;if(b.getAttribute(c,"FontName")){var e=b.getAttribute(c,"FontName");this.vc=e;this.bl=f.ba.Cr(e)}if(b.getAttribute(c,"FontSize")){var e=parseFloat(b.getAttribute(c,"FontSize")),b=a.W({x:0,y:0}),k=a.W({x:e,y:0}),e=b.x-k.x,b=b.y-k.y;this._size=Math.sqrt(e*e+b*b)}},Ql:function(){return this.Ys.Ql()&&this.ol.Ql()},mC:function(c){var a={};""!==this.bl&&(a["font-family"]=this.bl,
a["font-weight"]=this.Rx,a["font-style"]=this.FD);a["font-size"]=0===this._size&&0!==this.uj?String(this.uj*c)+"px":String(this._size*c)+"px";a.color=this.Ys.toString();3>parseFloat(a["font-size"])&&(a["font-size"]="3px");return a}};Object.defineProperties(f.Mg.prototype,{name:{get:function(){return this.vc},set:function(c){this.set({name:c})}},size:{get:function(){return this._size},set:function(c){this.set({size:c})}},type:{get:function(){return this.Mt}},strokeColor:{get:function(){return this.ol},
set:function(c){this.set({strokeColor:c})}},fillColor:{get:function(){return this.Ys},set:function(c){this.set({fillColor:c})}},calculatedSize:{get:function(){return 0===this._size?this.uj:this._size}}})})(window);
(function(b){var f=b.Annotations||{};f.HTMLAnnotation=function(e){f.Annotation.call(this);b.Actions.Ih.call(this,e);this.ol=new f.Color(0,0,0,1);this.Ss=new f.Color;this.Ts=new f.mp;this.dt=!1;this.ly=0;this.ye=this.Yf=null;this.on("contentRemoved",function(){this.ye=this.Yf=null;this.Mx=!1});this.Lt=!0;_.isObject(e)&&(_.isUndefined(e.border)||this.Ts.set(e.border),_.isUndefined(e.backgroundColor)||(this.Ss=new f.Color(e.backgroundColor)),_.isUndefined(e.color)||(this.ol=new f.Color(e.color)),_.isUndefined(e.rect)||
(this.rect=new f.Rect(e.rect)));var c=this.Wq(),a=this;Object.keys(c).forEach(function(b){var e=c[b];$(a).on(e.internal_name,function(c){a.Le(b,e.getEvent(a,c))})})};f.HTMLAnnotation.prototype={Sj:"",pA:function(b){return(this.ya()-(this.Lt?2*this.border.width:0))*b},ev:function(b){return(this.va()-(this.Lt?2*this.border.width:0))*b},CK:function(b){this.Lt=!!b},serialize:function(){this.Hidden=this.hidden;f.Annotation.prototype.serialize.apply(this,arguments)},deserialize:function(){f.Annotation.prototype.deserialize.apply(this,
arguments);this.Hidden&&(this.hidden=!0,this.Hidden=!1)},Wq:function(){return{}},Xh:function(){},je:function(e){var c=this.ly,a=b.utils.getRotationOffsets(c,this.ya(),this.va()),d=a.dx*e,a=a.dy*e;return $.extend({left:this.X*e,top:this.Y*e,width:this.pA(e),height:this.ev(e),position:"absolute",padding:"0",margin:"0","background-color":this.Ss.toString(),"z-index":"35",display:this.dt?"none":"",transform:"translate("+d+"px,"+a+"px) rotate("+-c+"deg)","transform-origin":"top left","-webkit-transform":"translate("+
d+"px,"+a+"px) rotate("+-c+"deg)","-webkit-transform-origin":"top left","-ms-transform":"translate("+d+"px,"+a+"px) rotate("+-c+"deg)","-ms-transform-origin":"top left","-moz-transform":"translate("+d+"px,"+a+"px) rotate("+-c+"deg)","-moz-transform-origin":"top left","-webkit-appearance":"none"},this.Lt?this.Ts.mC(e):{})},Ac:function(b){if(!b)throw Error("no zoom?");return{position:"absolute","font-size":"inherit","font-family":"inherit","font-weight":"inherit","font-style":"inherit",color:"inherit",
width:this.pA(b),height:this.ev(b),border:0,padding:0,margin:0,"background-color":"transparent","vertical-align":"top"}},mq:function(b,c){for(var a in c){var d=c[a];"number"===typeof d&&(d+="px");b.style[a]=d}},Lf:function(b){this.dt=!b;this.Yf&&(this.Yf[0].style.display=this.dt?"none":"")},createInnerElement:function(){console.warn("missing inner element");return null},aH:function(){return this.ye},TG:function(){return this.Yf},render:function(b,c,a,d){if(!this.Yf){var f=document.createElement("div");
f.className=this.Sj;this.Yf=$(f)}var f=d?$(this.Yf[0].cloneNode()):this.Yf,k=this.je(a,c),h=JSON.stringify(k);h!==f.OA&&(f.css(k),f.OA=h);if(this.ye=this.ye||this.createInnerElement(c)){var l=d?$(this.ye[0].cloneNode(!0)):this.ye;l!==this.ye&&(this.refresh&&this.refresh(),l[0].value=this.ye[0].value,this.ye[0].checked&&(l[0].checked=!0));document.activeElement===l[0]&&l.trigger("focusout");a=this.Ac(a);h=JSON.stringify(a);h!==l.OA&&(this.mq(l[0],a),l.OA=h);this.Mx||(this.Xh(c),this.Mx=!0)}if(this.Yf[0].parentNode!==
b[0])for(b[0].appendChild(f[0]),b=0;b<this.ye.length;++b)c=0===b?l[0]:d?this.ye[b].cloneNode(!0):this.ye[b],f[0].appendChild(c)},Mw:function(){this.Yf&&(this.Yf.remove(),this.Mx=!1)}};f.HTMLAnnotation.prototype=$.extend(Object.create(f.Annotation.prototype),f.HTMLAnnotation.prototype,b.Actions.Ih.prototype);Object.defineProperties(f.HTMLAnnotation.prototype,{rect:{get:function(){return this.Sc()},set:function(b){this.yg(b)}},element:{get:function(){return this.TG()}},innerElement:{get:function(){return this.aH()}},
hidden:{get:function(){return this.dt},set:function(b){this.Lf(!b)}},StrokeColor:{get:function(){return this.ol},set:function(b){this.ol=new f.Color(b)}},border:{get:function(){return this.Ts},set:function(b){this.Ts.set(b)}},backgroundColor:{get:function(){return this.Ss},set:function(b){this.Ss=new f.Color(b)}},actions:{get:function(){return this.Vj()}},rotation:{get:function(){return this.ly},set:function(b){this.ly=Number(b)}}})})(window);
(function(b){var f=b.Annotations||{};f.rd=function(b){f.HTMLAnnotation.call(this,b);this.Listable=!1};f.rd.prototype=Object.create(f.HTMLAnnotation.prototype);f.rd.prototype.elementName="link";f.rd.prototype.createInnerElement=function(){var b=document.createElement("span");b.className="link";b.setAttribute("tabindex",0);return $(b)};f.rd.prototype.Xh=function(){f.HTMLAnnotation.prototype.Xh.apply(this,arguments);var b=this;this.innerElement.on("tap",function(){b.trigger("mouseup")})};f.rd.prototype.cI=
function(){return!0};f.rd.prototype.Wq=function(){var e=b.Annotations.O.ub.Events;return $.extend(f.HTMLAnnotation.prototype.Wq.call(this),{U:{triggers:"tap",internal_name:"mouseup",getEvent:function(){return e.rd.create("Mouse Up")}}})};f.rd.prototype.je=function(b,c){var a=f.HTMLAnnotation.prototype.je.apply(this,arguments),d={};if(this.StrokeThickness&&this.StrokeColor){var g=this.StrokeStyle,k="border";"underline"===g&&(k="border-bottom");"solid"!==g&&"dashed"!==g&&"inset"!==g&&(g="solid");var h=
c.u.Bc(this.wb());d[k]=f.ja.lq(h,this.StrokeThickness)*b+"px "+g+" "+this.StrokeColor.toHexString()}return $.extend(a,d)};f.rd.prototype.deserialize=function(b,c,a){f.HTMLAnnotation.prototype.deserialize.call(this,b,c,a);var d=f.ba.Rj(b.getAttribute("color"));d&&(this.StrokeColor=d);d=b.getAttribute("width");"undefined"!==typeof d&&null!==d&&(this.StrokeThickness=parseFloat(d));d=b.getAttribute("style");"undefined"!==typeof d&&null!==d&&(this.StrokeStyle=d);this.JE(b,c,a)};f.rd.prototype.serialize=
function(b,c){f.HTMLAnnotation.prototype.serialize.call(this,b,c);this.StrokeColor&&b.setAttribute("color",this.StrokeColor.toHexString());"undefined"!==typeof this.StrokeThickness&&null!==this.StrokeThickness&&b.setAttribute("width",this.StrokeThickness);this.StrokeStyle&&b.setAttribute("style",this.StrokeStyle);this.jV(b,c);return b}})(window);
(function(b){var f=b.Annotations||{};f.Ok=function(){f.Annotation.call(this);this._isOpen=!1;this.Id=null;this.NoRotate=this.NoZoom=this.Printable=!0;this.DateModified=null};f.Ok.prototype={elementName:"popup",isOpen:function(){return this._isOpen},eK:function(b){this._isOpen=b},serialize:function(b){b=f.Annotation.prototype.serialize.apply(this,arguments);this.isOpen()&&b.setAttribute("open","yes");return b},deserialize:function(b){this.Printable=!1;f.Annotation.prototype.deserialize.apply(this,
arguments);var c=b.getAttribute("open");this.eK(c&&"yes"===c)}};f.Ok.prototype=$.extend(new f.Annotation,f.Ok.prototype)})(window);
(function(b){var f=b.Annotations||{},e=f.ja||{};f.WidgetAnnotation=function(c,a){f.HTMLAnnotation.call(this,a);if(!c)throw Error("Please set the field properly in the widget constructor");this._value=null;this.Ja=c;this.gn=null;c.hO(this,a?a.index:void 0);this.IsAdded=!1;this.bY=new Date;this.rE="Left-justified";this.Listable=!1;this.wD="";this.Lx={};this.zD={Normal:"",Rollover:"",Down:""};this.Vs=!1;this.lc=new f.pj({mask:"Invisible Hidden NoPrint NoZoom NoRotate NoView ReadOnly Locked ToggleNoView LockedContents".split(" ")});
this["_xsi:type"]="Widget";this.Subject=this["_xsi:type"];this.set(a);var b=this;this.on("commit",_.bind(this.Sy,this));this.on("change",function(a,c){b.XJ();b.zg(c);b.trigger("commit")});this.on("blur",function(){b.fieldFlags.get("ReadOnly")||b.yb(b.Ja.value);b.refresh()});this.on("focus",function(){b.fieldFlags.get("ReadOnly")||b.zg(b.Ja.value);b.refresh()})};f.WidgetAnnotation.prototype={elementName:"widget",ym:null,Zh:function(c){if(!f.Annotation.prototype.Zh.call(this,c)||!this.ym)return!1;c=
f.ba.getAttribute(c,"FT");return this.ym===c},ri:function(){for(var c="",a=Object.keys(this.appearances),b=0;b<a.length;++b){var e=a[b];if("Off"!==e){c=e;break}}return c},og:function(c){this.zg(c)},XJ:function(){this.Vs=!0},set:function(c){if(_.isObject(c)){_.isUndefined(c.value)||(this.value=String(c.value));_.isUndefined(c.flags)||(this.lc.set(c.flags),this.lc.get("Hidden")&&this.Lf(!1),this.lc.get("NoView")&&this.Lf(!1));if(!_.isUndefined(c.captions)){var a=c.captions,b=this.zD;Object.keys(a).forEach(function(c){b[c]=
a[c]})}_.isUndefined(c.page)||(this.PageNumber=c.page);_.isUndefined(c.quadding)||(this.quadding=c.quadding);_.isUndefined(c.appearances)||(this.Lx=c.appearances);_.isUndefined(c.appearance)||(this.appearance=c.appearance);_.isUndefined(c.rotation)||(this.rotation=c.rotation);_.isUndefined(c.font)||(this.font=c.font)}},je:function(c){var a=f.HTMLAnnotation.prototype.je.apply(this,arguments),a=$.extend(a,this.font.mC(c));this.fieldFlags.get("Required")?a.border=1.5*c+"px solid red":a["border-width"]||
(a["border-width"]=0);return $.extend(a,this.RQ())},Ac:function(){var c=f.HTMLAnnotation.prototype.Ac.apply(this,arguments);return $.extend(c,{"text-align":{"Left-justified":"left",Centered:"center","Right-justified":"right"}[this.quadding]})},RQ:function(){var c=f.WidgetAnnotation.getContainerCustomStyles;return c&&c(this)},Jl:function(){var c=f.WidgetAnnotation.getCustomStyles;return c&&c(this)},UE:function(){function c(a){a.scale&&1!==a.scale&&a.preventDefault();a.stopPropagation()}var a=this.ye[0];
a.addEventListener("touchstart",c,{Fr:!1});a.addEventListener("touchmove",c,{Fr:!1});a.addEventListener("touchend",c,{Fr:!1});a.addEventListener("mousedown",c,{Fr:!1});a.addEventListener("mousemove",c,{Fr:!1});a.addEventListener("mouseup",c,{Fr:!1})},hk:function(){return!0},Va:function(){return this._value},yb:function(c){c=b.Annotations.O.ub.Events.ga.create("Format",this.Ja,{value:c});this.Ja.Le("F",c);this.zg(c.value)},Lf:function(c){this.lc.set("Hidden",!c);f.HTMLAnnotation.prototype.Lf.call(this,
c)},render:function(c,a,b,g){if(!g){e.Lk=b;var k=!1;this.innerElement&&this.element||(k=!0)}f.HTMLAnnotation.prototype.render.apply(this,arguments);k&&!g&&(this.element.attr("id",this.Ja.name),this.refresh())},zg:function(c){this._value=c;this.refresh()},refresh:function(){var c=this.fieldFlags.get("Multiline"),a=this._value?String(this._value):"";this instanceof f.Hh||this.font.tQ(a,this,c);if(c=this.element)if(c[0].setAttribute("id",this.Ja.name),a=this.je(e.Lk),this.mq(c[0],a),c=this.innerElement)a=
this.Ja.userName||this.Ja.tooltipName,this.Ja&&a&&c[0].setAttribute("title",a),a=this.Ac(e.Lk),this.mq(c[0],a)},vi:function(){return null},deserialize:function(c,a,b){f.HTMLAnnotation.prototype.deserialize.call(this,c,a);var e=f.ba;this.Ja.oK(e.getAttribute(c,"FT"));e.getAttribute(c,"creationdate")?this.DateCreated=e.bz(e.getAttribute(c,"creationdate")):this.DateCreated=null;this.border.deserialize(c);this.fieldFlags.deserialize(c);this.font.deserialize(c,a);var k=e.ao(c,"V","value");this.og(k);this.Ja.og(k);
this.defaultValue=e.ao(c,"DV","defaultvalue");k=e.ao(c,"defaultappearance","defaultappearance");k=e.XI(k);e.getAttribute(c,"color")?this.StrokeColor=e.getAttribute(c,"color").split(","):k.color&&(this.StrokeColor=k.color);e.getAttribute(c,"BG")&&(this.backgroundColor=e.getAttribute(c,"BG").split(","));this.rotation=e=(e=e.getAttribute(c,"rotation"))?parseInt(e,10):0;if(90===e||270===e)e=this.Width,this.Width=this.Height,this.Height=e;this.JE(c,a,b)},serialize:function(){},Gb:function(){return this.Ja},
$J:function(c){this.Ja=c;this.zg(this.Ja.value)},xg:function(c){f.HTMLAnnotation.prototype.xg.call(this,c);this.Ja&&this.Ja.xg(c)},WN:function(c,a){this.Ja.Fj(c,a)},Fj:function(c,a){-1!==["K","V","F","C"].indexOf(c)?this.WN(c,a):f.HTMLAnnotation.prototype.Fj.call(this,c,a)},Sy:function(){this.Ja.trigger("commit",this.Va(),this)},Wq:function(){var c=b.Annotations.O.ub.Events,a=this;return $.extend(f.HTMLAnnotation.prototype.Wq.call(this),{E:{triggers:"mouseenter",internal_name:"mouseenter",getEvent:function(){return c.ga.create("Mouse Enter",
a.Gb())}},X:{triggers:"mouseleave",internal_name:"mouseleave",getEvent:function(){return c.ga.create("Mouse Leave",a.Gb())}},D:{triggers:"mousedown",internal_name:"mousedown",getEvent:function(){return c.ga.create("Mouse Down",a.Gb())}},U:{triggers:b.utils.mouseUpEventBug?"touchend":"mouseup",internal_name:"mouseup",getEvent:function(){return c.ga.create("Mouse Up",a.Gb())}},Bl:{triggers:"focusout",internal_name:"blur",getEvent:function(){var b=a.Gb();return c.ga.create("Blur",b,{value:b.value})}},
Fo:{triggers:"focusin",internal_name:"focus",getEvent:function(){return c.ga.create("Focus",a.Gb())}}})},tS:function(){return!!this.gn},Xh:function(){f.HTMLAnnotation.prototype.Xh.apply(this,arguments);var c=this,a=this.innerElement;a&&(a.on("focusout",function(){c.Vs&&(c.Vs=!1,c.trigger("commit"));c.trigger("blur")}),a.on("focusin",function(){c.trigger("focus")}),a.on("mouseenter",function(){c.trigger("mouseenter")}),a.on("mouseleave",function(){c.trigger("mouseleave")}),a.on("mousedown",function(){c.trigger("mousedown")}),
a.on(c.$K?"click":b.utils.mouseUpEventBug?"touchend":"mouseup",function(){c.trigger("mouseup")}))}};f.WidgetAnnotation.prototype=$.extend(Object.create(f.HTMLAnnotation.prototype),f.WidgetAnnotation.prototype);Object.defineProperties(f.WidgetAnnotation.prototype,{fieldName:{get:function(){return this.Ja.name}},value:{get:function(){return this.Va()},set:function(c){this.yb(c)}},defaultValue:{get:function(){return this.Ja.defaultValue},set:function(c){this.Ja.defaultValue=c}},fieldFlags:{get:function(){return this.Ja.flags}},
flags:{get:function(){return this.lc}},font:{get:function(){return this.gn||this.Ja.font},set:function(c){this.gn=new b.Annotations.Mg(c)}},fieldActions:{get:function(){return this.Ja.actions}},appearance:{get:function(){return this.wD},set:function(c){this.Lx[c]?this.wD=c:console.log("Unknown appearance: "+c)}},quadding:{get:function(){return this.rE},set:function(c){this.rE=c}},appearances:{get:function(){return this.Lx}},captions:{get:function(){return this.zD}}})})(window);
(function(b){var f=b.Annotations||{},e=f.ja||{};f.qc=function(c,a){f.WidgetAnnotation.call(this,c,a)};f.qc.prototype={ym:"Btn",$t:null,Zh:function(c){if(f.WidgetAnnotation.prototype.Zh.call(this,c)){var a=new f.pj({mask:["PushButton","Radio"]}),b="C";a.deserialize(c);a.get("PushButton")?b="P":a.get("Radio")&&(b="R");return b===this.$t}return!1},MJ:function(c){if(b.utils.isSafari&&!b.utils.isIOS||b.utils.isFirefox)16>c.height||16>c.width?(c.transform="scale("+Math.min(c.height,c.width)/16+")",c.transformOrigin=
"top left"):(c.transform="",c.transformOrigin="")},yk:function(c){var a=!!this.fieldFlags.get("ReadOnly");c.disabled=a}};f.qc.prototype=$.extend(Object.create(f.WidgetAnnotation.prototype),f.qc.prototype);f.jj=function(c,a){f.qc.call(this,c,a)};f.jj.prototype={$t:"P",Sj:"pButton",Ac:function(){return $.extend(f.qc.prototype.Ac.apply(this,arguments),{"background-color":"transparent"},this.Jl())},deserialize:function(c,a,b){var e=f.ba;f.qc.prototype.deserialize.call(this,c,a,b);(c=e.getAttribute(c,
"ButtonLabel"))&&(this.captions.Normal=c)},vi:function(){return null},createInnerElement:function(){var c=document.createElement("button");c.setAttribute("tabindex",0);$(c).append(this.captions.Normal);this.yk(c);return $(c)}};f.jj.prototype=$.extend(!0,Object.create(f.qc.prototype),f.jj.prototype);f.Hh=function(c,a){f.qc.call(this,c,a);this.CK(!1);var b=this;this.$K=!0;this.on("click",function(){"Off"===this.Va()?b.trigger("change",b.ri()):b.trigger("change","Off")})};f.Hh.prototype={$t:"C",Sj:"checkBox",
refresh:function(){f.WidgetAnnotation.prototype.refresh.call(this);var c=this.innerElement;c&&(c.prop("checked",this.Va()===this.ri()),c.css(this.Ac(e.Lk)),this.yk(c[0]))},zg:function(c){c===this.ri()?(this.appearance=c,f.qc.prototype.zg.call(this,c)):(this.appearance="Off",f.qc.prototype.zg.call(this,"Off"))},Ac:function(){var c=f.qc.prototype.Ac.apply(this,arguments);c.left=Math.round(c.left);c.top=Math.round(c.top);this.MJ(c);return $.extend(c,{border:"none",margin:0},this.Jl())},vi:function(){var c=
this.innerElement;if(c)return c.prop("checked")?this.ri():"Off"},createInnerElement:function(){var c=document.createElement("input");c.type="checkbox";c.setAttribute("tabindex",0);this.yk(c);var a=this,c=$(c);c.on("click",function(){a.trigger("click")});return c},deserialize:function(c,a,b){var e=f.ba.getAttribute(c,"N");e&&(this.appearances.Off={},this.appearances[e]={});f.qc.prototype.deserialize.call(this,c,a,b)}};f.Hh.prototype=$.extend(!0,Object.create(f.qc.prototype),f.Hh.prototype);Object.defineProperties(f.Hh.prototype,
{buttonName:{set:function(c){this.cN=c},get:function(){return this.cN}}});f.Pk=function(c,a){f.qc.call(this,c,a);this.CK(!1);var b=this;this.$K=!0;this.on("click",function(){"Off"===this.Va()?b.trigger("change",b.ri()):b.trigger("change","Off")})};f.Pk.prototype={$t:"R",Sj:"radioButton",vi:function(){return this.ri()},refresh:function(){f.WidgetAnnotation.prototype.refresh.call(this);var c=this.innerElement;c&&(c.prop("checked",this.Ja.Va()===this.vi()),c.css(this.Ac(e.Lk)),this.yk(c[0]))},Ac:function(){var c=
f.qc.prototype.Ac.apply(this,arguments);c.left=Math.round(c.left);c.top=Math.round(c.top);this.MJ(c);return $.extend(c,{border:"none",margin:0},this.Jl())},zg:function(c){"Off"!==c&&-1!==Object.keys(this.appearances).indexOf(c)?(this.appearance=c,f.qc.prototype.zg.call(this,c)):(this.appearance="Off",f.qc.prototype.zg.call(this,"Off"))},createInnerElement:function(){var c=document.createElement("input");c.type="radio";c.setAttribute("tabindex",0);this.yk(c);var a=this;$(c).on("click",function(){a.trigger("click")});
return $(c)},deserialize:function(c,a,b){var e=f.ba.getAttribute(c,"N");e&&(this.appearances.Off={},this.appearances[e]={});f.qc.prototype.deserialize.call(this,c,a,b)}};f.Pk.prototype=$.extend(!0,Object.create(f.qc.prototype),f.Pk.prototype)})(window);
(function(b){var f=b.Annotations||{},e=f.ja||{},c,a;f.sa=function(){f.Annotation.call(this);this.Uf=new f.Color(0,0,0,0);this._opacity=this.sj=1;this.GD=new Date;this.Ft=null};f.sa.prototype={jc:function(a,c){null!==this.Opacity&&(a.globalAlpha=this.Opacity);null!==this.FillColor&&(a.fillStyle=this.FillColor.toString());null!==this.StrokeColor&&(a.strokeStyle=this.StrokeColor.toString());a.lineWidth=0===this.StrokeThickness?.001:this.$n(c)},JW:function(){var b=this.X+this.ya()+2*this.StrokeThickness+
100,e=this.Y+this.va()+2*this.StrokeThickness+100;c=c||document.createElement("canvas").getContext("2d");c.canvas.width=b;c.canvas.height=e;a=a||document.createElement("canvas").getContext("2d");a.canvas.width=b;a.canvas.height=e},bQ:function(b,e){this.JW();this.jc(c,e);c.globalAlpha=1;this.ji(c);c.stroke();this.jc(a,e);a.globalAlpha=1;this.ji(a);a.fill();c.globalCompositeOperation="source-out";c.drawImage(a.canvas,0,0);this.jc(b,e);b.globalCompositeOperation="source-over";b.drawImage(c.canvas,0,
0);this.ji(b);b.stroke()},nz:function(a,c){a.beginPath();1!==this.Opacity&&null!==this.Opacity?this.bQ(a,c):(this.jc(a,c),this.ji(a),a.fill(),a.stroke())},ji:function(){},kH:function(){return this.Ft},hK:function(a){this.Ft=a},$n:function(a){return f.ja.lq(a,this.StrokeThickness)},serialize:function(a,c){var b=f.Annotation.prototype.serialize.apply(this,arguments),e=f.ba,l={},n=e.wg(this.FillColor);null!==n&&(l["interior-color"]=n);_.isUndefined(this.StrokeThickness)||_.isNull(this.StrokeThickness)||
(n=this.StrokeThickness,1!==n&&(l.width=n));_.isUndefined(this.Opacity)||_.isNull(this.Opacity)||1===this.Opacity||(l.opacity=this.Opacity);(n=this.fringe)&&!n.jI()&&(l.fringe=f.ba.LB(this.fringe,c));if(n=this.DateCreated){var m;this.gB&&(n.getTime()===this.MI?m=this.gB:(delete this.gB,delete this.MI));m||(m=e.nC(n));l.creationdate=m}this.Ya(b,"style","solid");this.Ya(b,"dashes","3");this.Ya(b,"IT");this.Ya(b,"inreplyto");this.Ya(b,"replyType");for(var r in l)b.setAttribute(r,l[r]);!this.Ft||this instanceof
f.Ia||(e=document.createElementNS("","popup"),e=this.Ft.serialize(e,c),b.appendChild(e));return b},deserialize:function(a,c,b){f.Annotation.prototype.deserialize.apply(this,arguments);var e=f.ba,l=a.getAttribute("opacity");this.Opacity="undefined"!==typeof l&&null!==l?parseFloat(l):1;l=a.getAttribute("width");if(null!==this.StrokeThickness||"undefined"!==typeof l&&null!==l)this.sj=parseFloat(l||"1");this.pe(a,"style");this.pe(a,"dashes");this.pe(a,"IT");this.pe(a,"inreplyto");this.pe(a,"replyType");
this.iB=l=a.getAttribute("fringe");"undefined"!==typeof l&&null!==l&&(this.fringe=e.RF(l,c));l=e.Rj(a.getAttribute("interior-color"));null!==l?this.FillColor=l:null!==this.FillColor&&(this.FillColor=new f.Color(0,0,0,0));(l=a.getAttribute("creationdate"))?(this.gB=l,e=e.bz(l),this.MI=e.getTime(),this.DateCreated=e):this.DateCreated=null;e=a.getElementsByTagName("popup");0<e.length&&(l=new f.Ok,l.deserialize(e[0],c,b),this.hK(l))},selectionModel:f.pa,IH:!0};f.sa.prototype=$.extend(!0,new f.Annotation,
f.sa.prototype);Object.defineProperties(f.sa.prototype,{FillColor:{get:function(){return this.Uf},set:function(a){a instanceof f.Color&&(this.Uf=a,this.mb())}},StrokeColor:{get:function(){return this.rj},set:function(a){a instanceof f.Color&&(this.rj=a,this.mb())}},StrokeThickness:{get:function(){return this.sj},set:function(a){this.sj=parseFloat(a);this.mb();this.adjustRect()}},Opacity:{get:function(){return this._opacity},set:function(a){this._opacity=parseFloat(a);this.mb()}},Precision:{get:function(){return f.ja.lH(this)},
set:function(a){f.ja.iK(this,a)}},Scale:{get:function(){return f.ja.sH(this)},set:function(a){f.ja.mK(this,a[0],a[1])}},DateCreated:{get:function(){return this.GD},set:function(a){this.GD=e.RG(a)}}})})(window);
(function(b){var f=b.Annotations||{};f.Kg=function(e,c){var a=this;a.on("change",function(c,e){var f=b.Annotations.O.ub.Events.ga.create("Keystroke",a.Ja,{value:e,change:"",willCommit:!1,selStart:-1,selEnd:-1});a.Ja.Le("K",f)});f.WidgetAnnotation.call(this,e,c)};f.Kg.FORCE_SELECT=!1;f.Kg.prototype={ym:"Ch",Sj:"choice",Xh:function(){f.WidgetAnnotation.prototype.Xh.apply(this,arguments);this.UE()},Zh:function(b){if(f.WidgetAnnotation.prototype.Zh.call(this,b)){var c=new f.pj({mask:["Combo"]});c.deserialize(b);
if(c.get("Combo"))return!0}return!1},deserialize:function(b,c,a){f.WidgetAnnotation.prototype.deserialize.call(this,b,c,a);c=f.ba;c.getAttribute(b,"Opt")&&(b=c.getAttribute(b,"Opt"),this.Ja.options=b.split(",").map(function(a){return{value:a,displayValue:a}}),this.Gb().og(this.Va()),this.og(this.Gb().Va()))},je:function(){return $.extend(f.WidgetAnnotation.prototype.je.apply(this,arguments),{"overflow-y":"visible","overflow-x":"hide","z-index":"36"})},Ac:function(b){return $.extend(f.WidgetAnnotation.prototype.Ac.apply(this,
arguments),{resize:"none","min-height":"",height:this.ev(b)},this.Jl())},refresh:function(){f.WidgetAnnotation.prototype.refresh.apply(this,arguments);var b=this.innerElement,c=this.Va();b&&(b.val(c),this.yk(b[0]))},vi:function(){var b=this.innerElement;if(b)return b.val()},yk:function(b){var c=!!this.fieldFlags.get("ReadOnly");b.disabled=c},createInnerElement:function(){function e(){c(50,k.length);h.off("mousedown",null,e);h.off("touchend",null,e)}function c(a,c){for(var b=document.createDocumentFragment(),
e=a;e<c;++e){var f=k[e],g=document.createElement("OPTION");g.text=_.isUndefined(f.displayValue)?f.value:f.displayValue;g.value=f.value;b.appendChild(g)}d.appendChild(b)}var a,d,g=this;!g.fieldFlags.get("Edit")||b.utils.isSafari||9===b.utils.ie||f.Kg.FORCE_SELECT?d=a=document.createElement("select"):(a=document.createElement("input"),a.setAttribute("list",g.fieldName+"_list"),$(a).on("focus",function(){this.value=""}),d=document.createElement("datalist"),d.id=g.fieldName+"_list");g.yk(a);var k=g.options,
h=d===a?$(a):$([a,d]);50<k.length?(c(0,50),h.on("mousedown",e),h.on("touchend",e)):c(0,k.length);h.on("change",function(){g.trigger("change",[g.vi()])});return h}};f.Kg.prototype=$.extend(Object.create(f.WidgetAnnotation.prototype),f.Kg.prototype);Object.defineProperties(f.Kg.prototype,{options:{get:function(){return this.Ja.options}}})})(window);
(function(b){var f=b.Annotations||{};f.gj=function(b,c){f.WidgetAnnotation.call(this,b,c)};f.gj.prototype={ym:"Ch",Sj:"list",refresh:function(){f.WidgetAnnotation.prototype.refresh.apply(this,arguments);var b=this.innerElement;b&&(b[0].value=this.Va())},Zh:function(b){if(f.WidgetAnnotation.prototype.Zh.call(this,b)){var c=new f.pj({mask:"Combo"});c.deserialize(b);if(!c.get("Combo"))return!0}return!1},deserialize:function(b,c,a){f.WidgetAnnotation.prototype.deserialize.call(this,b,c,a);c=f.ba;c.getAttribute(b,
"Opt")&&(b=c.getAttribute(b,"Opt"),this.Ja.options=b.split(",").map(function(a){return{value:a,displayValue:a}}),this.Gb().og(this.Va()),this.og(this.Gb().Va()))},je:function(){return $.extend(f.WidgetAnnotation.prototype.je.apply(this,arguments),{"overflow-y":"auto","overflow-x":"hidden"})},vi:function(){var b=this.innerElement;return b?b.val():null},Ac:function(){return $.extend(f.WidgetAnnotation.prototype.Ac.apply(this,arguments),{"overflow-y":"scroll","overflow-x":"hidden"},this.Jl())},createInnerElement:function(){var b=
document.createElement("select");b.name=this.fieldName.replace(/\.|\s/g,"_");b.setAttribute("size",this.options.length);this.options.forEach(function(a){var c=_.isUndefined(a.displayValue)?a.value:a.displayValue,f=document.createElement("option");f.value=a.value;f.innerHTML=c;b.appendChild(f)});this.fieldFlags.get("ReadOnly")&&(b.disabled=!0);this.fieldFlags.get("MultiSelect")&&(b.multiple=!0);var c=this;$(b).on("change",function(){c.trigger("change",[c.vi()])});return $(b)}};f.gj.prototype=$.extend(Object.create(f.WidgetAnnotation.prototype),
f.gj.prototype);Object.defineProperties(f.gj.prototype,{options:{get:function(){return this.Ja.options}}})})(window);
(function(b){var f=b.Annotations||{};f.Tf=function(b,c){f.WidgetAnnotation.call(this,b,c);this.nt=void 0;this.freeHandAnnot=null};f.Tf.prototype={ym:"Sig",Sj:"signature",deserialize:function(b,c,a){f.WidgetAnnotation.prototype.deserialize.call(this,b,c,a);b=b.getElementsByTagName("imagedata");0<b.length&&(this.appearances._DEFAULT={Normal:b[0].textContent},this.appearance="_DEFAULT")},Ac:function(){var b=f.WidgetAnnotation.prototype.Ac.apply(this,arguments);return $.extend(b,{width:b.width,height:b.height},
this.Jl())},createInnerElement:function(b){var c=this,a=document.createElement("div");this.LA().then(function(d){if(d)d=new Image,d.src=c.ZG(),d.style.maxWidth="100%",d.style.maxHeight="100%",a.appendChild(d);else{d=b.u.cv("AnnotationCreateSignature");var g=c.createSignHereElement(d);d=c.mP(g,d,b);a.appendChild(d);b.Pc().forEach(function(a){a instanceof f.FreeHandAnnotation&&c.qv(a,{sy:!0})&&(c.freeHandAnnot=a,g.style.display="none")});b.on("annotationChanged",function(a,b,d){a.imported&&"add"===
d?b.forEach(function(a){a instanceof f.FreeHandAnnotation&&c.qv(a,{sy:!0})&&(c.freeHandAnnot=a,g.style.display="none")}):"delete"===d&&1===b.length&&b[0]===c.freeHandAnnot&&(c.freeHandAnnot=null,g.style.display="block")})}});return $(a)},ZG:function(){var b="",c=this.appearances[this.appearance];c&&(c=c.Normal)&&c.data&&(b=c.data);return b},LA:function(){var b=this;return new Promise(function(c){if(void 0!==b.nt)c(b.nt);else{var a=new Image;a.src=b.ZG();a.onload=function(){b.nt=!b.cT(this);c(b.nt)}}})},
lT:function(){return this.LA()},cT:function(b){var c=document.createElement("canvas"),a=c.getContext("2d");c.width=b.width;c.height=b.height;a.drawImage(b,0,0);b=!0;for(var d=a.getImageData(0,0,c.width,c.height).data,c=0;c<d.length;c+=4)if(a=d[c+3],0!==a){b=!1;break}return b},rS:function(b,c,a){this.freeHandAnnot&&a.eg(this.freeHandAnnot);b.style.display="none";this.freeHandAnnot=c;b=Math.min(this.Height/c.Height,this.Width/c.Width);b=new f.Rect(this.X,this.Y,this.X+c.Width*b,this.Y+c.Height*b);c.resize(b);
a.Wb(c)},nP:function(b){var c=document.createElement("div");c.style.position="absolute";c.innerHTML=b.kn();c.style.left="0px";c.style.top="0px";c.style.padding="3px";c.style.background="darkblue";c.style.color="white";return c},mP:function(b,c,a){var d=this,f=document.createElement("div");f.style.height="100%";f.style.width="100%";f.addEventListener("click",function(f){d.freeHandAnnot||(c.initAnnot(),c.mouseLeftDown(f),c.mouseLeftUp(f),c.off("annotationAdded.sigWidget").one("annotationAdded.sigWidget",
function(c,f){d.qv(f)&&d.rS(b,f,a)}))});f.appendChild(b);return f},qv:function(b,c){c=c||{};var a;if(c.sy)a=b.getRectPadding(),a=Math.abs(b.X-this.X)<=a&&Math.abs(b.Y-this.Y)<=a;else{a=this.Sc();var d=b.Sc();a=!(a.x1>d.x2||d.x1>a.x2||a.y1>d.y2||d.y1>a.y2)}return a}};f.Tf.prototype=$.extend(Object.create(f.WidgetAnnotation.prototype),f.Tf.prototype)})(window);
(function(b){var f=b.Annotations||{},e=f.ja||{};f.Xk=function(c,a){f.WidgetAnnotation.call(this,c,a);this.fieldFlags.Eq(["Multiline","DoNotScroll","Password"]);this.Vs=!1;this.tf=this.Ja.maxLen};f.Xk.prototype={ym:"Tx",Sj:"text",Xh:function(){f.WidgetAnnotation.prototype.Xh.apply(this,arguments);this.UE()},refresh:function(c){f.WidgetAnnotation.prototype.refresh.call(this);var a=this.innerElement;if(a){var b,e;c&&(b=a[0].selectionStart,e=a[0].selectionEnd);a[0].value=this.value||"";c&&a[0].setSelectionRange(b,
e);c=!!this.fieldFlags.get("ReadOnly");a[0].readOnly=c}},je:function(){return f.WidgetAnnotation.prototype.je.apply(this,arguments)},Ac:function(){var c=f.WidgetAnnotation.prototype.Ac.apply(this,arguments),a={"word-wrap":"break-word",resize:"none","background-color":"transparent","overflow-y":this.fieldFlags.get("Multiline")?"auto":"hidden","overflow-x":"hidden"};if(this.fieldFlags.get("Comb")){var b=f.WidgetAnnotation.prototype.je.apply(this,arguments),b=e.eS("1",b["font-size"]+" "+b["font-family"]),
g=c.width/this.tf;a["margin-left"]=.2*g+"px";a["letter-spacing"]=g-b+"px"}return $.extend(c,a,this.Jl())},mq:function(c,a){f.WidgetAnnotation.prototype.mq.apply(this,arguments);if(this.GA()&&a["font-size"]&&c.value){var b=c.style.overflowY;c.style.overflowY="hidden";c.offsetHeight;c.style.overflowY=b}},GA:function(){return 0===this.font.size},eT:function(){return this.GA()&&this.font.uj===this.font.lE},vi:function(){var c=this.innerElement;if(c)return c.val()},iR:function(c,a){if(c!==a){for(var b=
0;c.charAt(b)===a.charAt(b);)b++;for(var e=0;c.charAt(c.length-1-e)===a.charAt(a.length-1-e)&&e+b<c.length&&e+b<a.length;)e++;var f,h=0;c.length!==b+e&&(h=c.length-e-b,f="");a.length!==b+e&&(f=a.slice(b,a.length-e));return{result:f,start:b,end:b+h}}},createInnerElement:function(){function c(){setTimeout(function(){f.refresh(!0)},0)}function a(a){return f.GA()&&(!f.eT()||a)}function d(a,c){a.preventDefault();c.value=f.Va();c.style.overflowY="hidden";c.offsetHeight;c.style.overflowY="auto"}var f=this,
k=this.fieldFlags,h=k.get("Multiline"),l=k.get("ReadOnly"),n=k.get("DoNotScroll"),m;h?m=document.createElement("textarea"):(m=document.createElement("input"),m.type="text");0<this.tf&&m.setAttribute("maxlength",this.tf);l&&(m.readOnly=!0);e.eQ(m,function(k){var l=0,u=0,q=k.change,v=f.Va()||"";if(!k.bI){u=f.iR(v,q);if(!u)return;k.change=u.result;l=u.start;u=u.end}q=b.Annotations.O.ub.Events;l=q.ga.create("Keystroke",f.Gb(),{value:k.bI?"":v,change:k.change,selStart:l,selEnd:u,willCommit:!1});f.Ja.Le("K",
l);l.rc?(l=q.oi(l),v=null!==f._value&&l.length<f._value.length,u=!0,n?h?a(v)?c():m.scrollHeight-1>=Math.ceil($(m).innerHeight())&&(u=!1):v?(u=!0,a(v)&&c()):a(v)?c():u=e.measureText(l||" ",m.parentNode.style.fontSize,m.parentNode.style.fontFamily,m.parentNode.style.fontWeight).width<$(m).width():a(v)&&c(),0<f.tf&&(u=u&&l.length<=f.tf),u?(f._value=l,document.activeElement===m?f.XJ():f.trigger("commit")):d(k,m)):d(k,m)},!h);return $(m)}};f.Xk.prototype=$.extend(Object.create(f.WidgetAnnotation.prototype),
f.Xk.prototype)})(window);
(function(b){var f=b.Annotations||{};f.pj=function(b){this.Wh={};this.qn=null;this.$p=0;_.isObject(b)&&_.isArray(b.mask)&&this.Eq(b.mask)};f.pj.prototype={ej:{ReadOnly:1,Required:2,NoExport:4,Multiline:4096,Password:8192,NoToggleToOff:16384,Radio:32768,PushButton:65536,Combo:131072,Edit:262144,DoNotScroll:8388608,RadiosInUnison:33554432},clear:function(){this.Wh={}},Eq:function(b){_.isNull(this.qn)&&(this.qn={});for(var c=b.length,a=0;a<c;++a){var d=b[a];this.qn[d]=this.ej[d]||0}},vP:function(b){var c=
[],a=this.qn||this.ej;Object.keys(a).forEach(function(d){0!==(b&a[d])&&(b&=~a[d],c.push(d))});return{result:c,mX:b}},get:function(b){return!!this.Wh[b]},gX:function(){var b=0,c;for(c in this.Wh)this.Wh.hasOwnProperty(c)&&!0===this.Wh[c]&&(b|=this.ej[c]);return b|this.$p},toArray:function(){var b=this;return Object.keys(this.Wh).filter(function(c){return b.Wh[c]})},deserialize:function(b){b=f.ba.getAttribute(b,"Ff");this.set(parseInt(b,10))},serialize:function(b){b.setAttribute("Ff",String(this.gX()))},
set:function(b,c){if(_.isArray(b))for(var a=b.length,d=0;d<a;++d)this.set(b[d]);else _.isNumber(b)?(a=this.vP(b),this.$p|=a.mX,this.set(a.result)):_.isString(b)&&(a=!0,_.isUndefined(c)||(a=!!c),this.qn?_.isUndefined(this.qn[b])?this.$p|=this.ej[b]||0:this.Wh[b]=a:this.Wh[b]=a)}}})(window);
(function(b){var f=b.Annotations||{};f.pp=function(){f.sa.call(this);this["_xsi:type"]="Caret";this.Subject=f.ja.zc("caret");this.StrokeThickness=0;this.Uf=null};f.pp.prototype={elementName:"caret",draw:function(e,c){this.jc(e,c);var a=this.Width,d=this.Height,g=Number(this.Rotation);if(90===g||270===g)g=a,a=d,d=g;e.translate(this.X,this.Y);e.rotate(-this.Rotation*Math.PI/180);g=b.utils.getRotationOffsets((360-this.Rotation)%360,this.Width,this.Height);e.translate(-g.dx,-g.dy);e.translate(-this.X,
-this.Y);e.beginPath();e.fillStyle=this.StrokeColor.toString();a=new f.Rect(this.X,this.Y,this.X+a,this.Y+d);g=(a.x1+a.x2)/2;d=a.y1+3*d/4;e.moveTo(g,a.y1);e.quadraticCurveTo(g,d,a.x1,a.y2);e.lineTo(a.x2,a.y2);e.quadraticCurveTo(g,d,g,a.y1);e.closePath();e.fill();e.stroke()},selectionModel:f.pa,deserialize:function(b){f.sa.prototype.deserialize.apply(this,arguments);var c=Number(this.Rotation);if(90===c||270===c)c=this.Width,this.Width=this.Height,this.Height=c;this.StrokeThickness=0;this.pe(b,"symbol")},
serialize:function(b){var c=Number(this.Rotation),a;if(90===c||270===c)a=this.Width,this.Width=this.Height,this.Height=a;f.sa.prototype.serialize.apply(this,arguments);if(90===c||270===c)a=this.Width,this.Width=this.Height,this.Height=a;this.Ya(b,"symbol");b.removeAttribute("width");return b}};f.pp.prototype=$.extend(new f.sa,f.pp.prototype)})(window);
(function(b){var f=b.Annotations||{};f.Im=function(){f.sa.call(this);this["_xsi:type"]="Ellipse";this.Subject=f.ja.zc("ellipse");var b=this.getRectPadding();this.fringe=new f.Rect(b,b,b,b)};f.Im.prototype={elementName:"circle",draw:function(b,c){this.nz(b,c)},ji:function(b){var c=this.X+this.fringe.x1,a=this.Y+this.fringe.y1,d=this.ya()-this.fringe.x1-this.fringe.x2,f=this.va()-this.fringe.y1-this.fringe.y2,d=Math.max(d,1),f=Math.max(f,1),k=Math.min(d,f);b.lineWidth>=k&&(b.lineWidth=Math.max(k-1,
1));b.lineWidth*=2;k=d/f;isNaN(k)||Infinity===k||(b.save(),b.translate(c+(1-k)*d/2,a),b.scale(k,1),b.beginPath(),b.arc(.5*d,.5*f,Math.max(.5*f,0),0,2*Math.PI,!1),b.closePath(),b.restore(),b.clip())},getRectPadding:function(){return 0},selectionModel:f.pa};f.Im.prototype=$.extend(new f.sa,f.Im.prototype)})(window);
(function(b){var f=b.Annotations||{};f.FreeHandAnnotation=function(){f.sa.call(this);this.Fa=[];this.LeftMost=Infinity;this.RightMost=0;this.TopMost=Infinity;this.BottomMost=0;this.Za={x:0,y:0};this.Db={x:0,y:0};this.jt=!1;this["_xsi:type"]="Free Hand";this.Subject=f.ja.zc("freehand");this.Zf=this.Uf=null};f.FreeHandAnnotation.opacityCap=.7;f.FreeHandAnnotation.Fc={InkHighlight:"InkHighlight"};f.FreeHandAnnotation.prototype={elementName:"ink",shouldSimplifyPath:!1,Ub:function(b,c,a){"undefined"===
typeof a&&(a=0);if(a===this.Fa.length)this.Fa.push([]);else if(a>this.Fa.length){console.warn("FreeHandAnnotation addPathPoint: pathIndex out of bounds.");return}this.LeftMost=Math.min(this.LeftMost,b);this.RightMost=Math.max(this.RightMost,b);this.TopMost=Math.min(this.TopMost,c);this.BottomMost=Math.max(this.BottomMost,c);var d=this.getRectPadding();this.Ns=this.LeftMost-d;this.Os=this.TopMost-d;this.Lp=this.RightMost-this.LeftMost+2*d;this.Kp=this.BottomMost-this.TopMost+2*d;this.Fa[a].push(new f.Point(b,
c))},Kf:function(b,c,a,d){"undefined"===typeof d&&(d=0);var f;this.Fa.length>d?(f=this.Fa[d],f.length>b?(f[b].x=c,f[b].y=a,this.adjustRect()):f.length===b&&this.Ub(c,a,d)):this.Fa.length===d?this.Ub(c,a,d):console.warn("FreeHandAnnotation setPathPoint: pathIndex out of bounds.")},ti:function(b,c){"undefined"===typeof c&&(c=0);return this.Fa&&this.Fa.length>c&&this.Fa[c].length>b?this.Fa[c][b]:null},uk:function(b){"undefined"===typeof b&&(b=0);var c=null;this.Fa.length>b&&(c=this.Fa[b].pop(),this.adjustRect());
return c},getPath:function(b){"undefined"===typeof b&&(b=0);return this.Fa.length>b?this.Fa[b]:null},setPath:function(b,c){"undefined"===typeof c&&(c=0);this.Fa.length<c?console.warn("FreeHandAnnotation setPath: pathIndex out of bounds."):this.Fa.length>c?this.Fa[c]=b:this.Fa.length===c&&this.Fa.push(b);this.adjustRect()},kG:function(){this.Fa=[]},finish:function(){this.jt||(this.mb(),this.jt=!0)},resize:function(b){var c=b.x1,a=b.y1,d=b.ya(),f=b.va();b=a-this.Y;if(!(0===c-this.X&&0===b&&d===this.Width&&
f===this.Height||1>d||1>f)){var k=b=1;"undefined"!==typeof d&&"undefined"!==typeof f&&(b=f/this.Height,k=d/this.Width,this.Width=d,this.Height=f);for(d=0;d<this.Fa.length;d++)for(f=0;f<this.Fa[d].length;f++)this.Fa[d][f].x=(this.Fa[d][f].x-this.X)*k+c,this.Fa[d][f].y=(this.Fa[d][f].y-this.Y)*b+a;this.X=c;this.Y=a}},draw:function(b,c){this.jc(b,c);this.Zf===f.FreeHandAnnotation.Fc.InkHighlight&&b.globalAlpha>f.FreeHandAnnotation.opacityCap&&(b.globalAlpha=f.FreeHandAnnotation.opacityCap);b.beginPath();
for(var a=this.bk(),d=0;d<a.length;d++)this.ji(b,a[d]);b.lineCap="round";b.lineJoin="round";b.stroke()},bk:function(){return this.Fa},NW:function(b,c){if(this.shouldSimplifyPath)for(var a=0;a<this.Fa.length;a++){var d=window.simplify(this.getPath(a),b,c);this.setPath(d,a)}},ji:function(b,c){var a="undefined"===typeof c?0:c.length;if(3<=a){b.moveTo(c[0].x,c[0].y);for(a=1;a<c.length-2;a++)b.quadraticCurveTo(c[a].x,c[a].y,(c[a].x+c[a+1].x)/2,(c[a].y+c[a+1].y)/2);a+1<c.length&&b.quadraticCurveTo(c[a].x,
c[a].y,c[a+1].x,c[a+1].y)}else 2===a&&(b.moveTo(c[0].x,c[0].y),b.lineTo(c[1].x,c[1].y))},rotate:function(e,c){this.Fa.forEach(function(a){for(var d=0;d<a.length;++d)a[d]=b.ae.Math.gV(a[d],e,c)});this.adjustRect()},Gh:function(b){f.Annotation.prototype.Gh.apply(this,arguments);this.Fa.forEach(function(c){for(var a=0;a<c.length;++a)c[a]=b.W(c[a])})},adjustRect:function(){if(0!==this.Fa.length){this.Za={x:Number.MAX_VALUE,y:Number.MAX_VALUE};this.Db={x:-Number.MAX_VALUE,y:-Number.MAX_VALUE};var b,c;
for(b=0;b<this.Fa.length;b++)for(c=0;c<this.Fa[b].length;c++)if(null!==this.Fa[b][c]){var a=this.Fa[b][c].x,d=this.Fa[b][c].y;a>this.Db.x&&(this.Db.x=a);d>this.Db.y&&(this.Db.y=d);a<this.Za.x&&(this.Za.x=a);d<this.Za.y&&(this.Za.y=d)}b=this.getRectPadding();this.X=this.Za.x-b;this.Y=this.Za.y-b;this.Width=Math.max(0,this.Db.x-this.Za.x)+2*b;this.Height=Math.max(0,this.Db.y-this.Za.y)+2*b;this.Fw()}},getRectPadding:function(){return this.StrokeThickness},serialize:function(b,c){for(var a=f.sa.prototype.serialize.apply(this,
arguments),d=document.createElementNS("","inklist"),g=this.bk(),k=0;k<g.length;k++)if(!(1>g[k].length)){var h=f.ba.Ro(g[k],c),l=document.createElementNS("","gesture");l.textContent=h;d.appendChild(l)}a.appendChild(d);this.Zf&&(a.setAttribute("IT",this.Zf),this.Zf===f.FreeHandAnnotation.Fc.InkHighlight&&0!==this.Opacity&&this.Opacity>f.FreeHandAnnotation.opacityCap&&a.setAttribute("opacity",f.FreeHandAnnotation.opacityCap));return a},deserialize:function(b,c){f.sa.prototype.deserialize.apply(this,
arguments);var a=this;a.Fa=[];b.querySelectorAll("inklist gesture").forEach(function(b){b=f.ba.yl(b.textContent,c);b=a.shouldSimplifyPath?window.simplify(b,.5):b;a.Fa.push(b)});this.zf()||this.adjustRect();this.Zf=b.getAttribute("IT");this.Uf=null;this.Subject===f.ja.zc("signature")&&(this.MaintainAspectRatio=!0)},selectionModel:f.pa};f.FreeHandAnnotation.prototype=$.extend(new f.sa,f.FreeHandAnnotation.prototype);Object.defineProperties(f.FreeHandAnnotation.prototype,{Intent:{get:function(){return this.Zf},
set:function(b){this.Zf=b;this.mb()}}})})(window);
(function(b){var f=b.Annotations||{};f.qd=function(){f.sa.call(this);this.na=[];this.Za={x:0,y:0};this.Db={x:0,y:0}};f.qd.prototype={Ub:function(b,c){var a=this.getRectPadding();this.na.push(new f.Point(b,c));1===this.na.length?(this.Za={x:b,y:c},this.Db={x:b,y:c},this.X=b-a,this.Y=c-a):(b>this.Db.x&&(this.Width=b-this.Za.x+2*a,this.Db.x=b),c>this.Db.y&&(this.Height=c-this.Za.y+2*a,this.Db.y=c),b<this.Za.x&&(this.Width=this.Db.x-b+2*a,this.X=b-a,this.Za.x=b),c<this.Za.y&&(this.Height=this.Db.y-c+
2*a,this.Y=c-a,this.Za.y=c))},Gh:function(b){f.Annotation.prototype.Gh.apply(this,arguments);for(var c=this.na,a=0;a<c.length;++a)c[a]=b.W(c[a])},Kf:function(b,c,a){this.na&&this.na.length>b?(this.na[b].x=c,this.na[b].y=a,this.adjustRect()):this.na&&this.na.length===b&&this.Ub(c,a);this.mb()},ti:function(b){return this.na&&this.na.length>b?this.na[b]:null},uk:function(){var b=this.na.pop();this.adjustRect();return b},getPath:function(){return this.na},setPath:function(b){this.na=b;this.adjustRect()},
getRectPadding:function(){return this.StrokeThickness},adjustRect:function(){if(0!==this.na.length){this.Za={x:Number.MAX_VALUE,y:Number.MAX_VALUE};this.Db={x:-Number.MAX_VALUE,y:-Number.MAX_VALUE};for(var b=0;b<this.na.length;b++)if(null!==this.na[b]){var c=this.na[b].x,a=this.na[b].y;c>this.Db.x&&(this.Db.x=c);a>this.Db.y&&(this.Db.y=a);c<this.Za.x&&(this.Za.x=c);a<this.Za.y&&(this.Za.y=a)}b=this.getRectPadding();this.X=this.Za.x-b;this.Y=this.Za.y-b;this.Width=Math.max(0,this.Db.x-this.Za.x)+2*
b;this.Height=Math.max(0,this.Db.y-this.Za.y)+2*b;this.Fw()}},selectionModel:f.Rm};f.qd.prototype=$.extend(new f.sa,f.qd.prototype)})(window);
(function(b){var f=b.Annotations||{},e=f.ja||{};f.Ia=function(b){f.qd.call(this);this.na=[];this.Za={x:0,y:0};this.Db={x:0,y:0};this.mf=null;this["_xsi:type"]="FreeText";this.StrokeThickness=1;this.Uo(b);this.sv="left";this.vD=new f.Color(255,0,0);this.iD="Helvetica";this.jD="9pt";this.uD="left";this.sD=0;this.an=2;this.dF=!1;this.Subject=b!==f.Ia.Fc.FreeTextCallout?f.ja.zc("freetext"):f.ja.zc("callout")};f.Ia.EXPORT_CALCULATED_FONT_SIZE=!0;f.Ia.Fc={FreeText:"FreeText",FreeTextCallout:"FreeTextCallout",
FreeTextTypeWriter:"FreeTextTypeWriter"};f.Ia.prototype={elementName:"freetext",jh:function(){return this.intent},Uo:function(b){this.intent=b||f.Ia.Fc.FreeText;b!==f.Ia.Fc.FreeTextCallout?this.selectionModel=f.wp:(this.Yi("OpenArrow"),this.selectionModel=f.ns)},Yi:function(b){this.wn=b},Ye:function(){return this.wn},Ub:function(b,a){5>this.na.length&&f.qd.prototype.Ub.call(this,b,a)},adjustRect:function(){this.jh()===f.Ia.Fc.FreeTextCallout&&f.qd.prototype.adjustRect.apply(this,arguments)},resize:function(b){if(this.jh()===
f.Ia.Fc.FreeTextCallout){var a=b.y1-this.Y,d=b.ya()/this.Width,e=b.va()/this.Height;if(0!==b.x1-this.X||0!==a||1!==d||1!==e){var k=this;this.na.forEach(function(a){a.x=(a.x-k.X)*d+b.x1;a.y=(a.y-k.Y)*e+b.y1});this.adjustRect()}}else this.yg(b),a=this.getRectPadding(),this.rm(new f.Rect(a,a,a,a))},getRectPadding:function(){return this.jh()===f.Ia.Fc.FreeTextCallout?this.StrokeThickness/2:0},rm:function(b){var a=0;this.jh()===f.Ia.Fc.FreeTextCallout&&(a+=this.an+1);this.na[a]=new f.Point(this.X+b.x1,
this.Y+b.y2);this.na[a+1]=new f.Point(this.X+this.Width-b.x2,this.Y+this.Height-b.y1)},Zz:function(){var b=this.na.slice(-2),a=b[0],b=b[1];return new f.Rect(a.x-this.X,this.Y+this.Height-b.y,this.X+this.Width-b.x,a.y-this.Y)},Sz:function(){return this.FontSize.slice(-2)||"px"},Rz:function(){var b=parseFloat(this.FontSize),a=this.Sz(b);0===b&&this.eD&&f.Ia.EXPORT_CALCULATED_FONT_SIZE&&(b=this.eD,a="px");"px"===a&&(b*=.75);return b},MX:function(b,a,d,e,f,h,l){for(var n,m=e,r=b.measureText(".").width||
1,r=2*Math.ceil(f/r),p=a.split("\n"),u=0;u<p.length;u++){for(var q=p[u].split(" "),v="",w=0;w<q.length;w++){a=q[w];n=b.measureText(a);if(n.width>f){for(var A=1,B=r,z;A<=B;)if(z=Math.floor((B+A)/2),n=b.measureText(a.slice(0,z),b),n.width<f)A=z+1;else if(n.width>f)B=z-1;else break;a=a.slice(0,Math.max(1,B))}q[w]!==a&&(q.splice(w+1,0,q[w].substr(a.length)),q[w]=a);a=v+q[w];n=b.measureText(a);if(n.width>f&&0<w){b.fillText(v,d,e);v=q[w]+" ";if(e-m>=h)return;e+=l}else v=a+" "}b.fillText(v.slice(0,-1),d,
e);if(e-m>=h)break;e+=l}},QS:function(){this.mf=document.createElement("textarea");this.mf.className="freetext";this.mf.style.visibility="hidden";this.mf.style.position="absolute";this.mf.style.top="-9001px";document.getElementsByTagName("body")[0].appendChild(this.mf)},YG:function(b){return{wU:1.598*b,css:1+5/b}},draw:function(b,a){this.mf||this.QS();var d;this.jc(b,a);this.jh()===f.Ia.Fc.FreeTextCallout?(this.Tn(b,a),d=this.na.length===this.an+3):d=2===this.na.length;if(d){d=this.aS();this.aQ(b,
d);var e=this.eh();"undefined"!==typeof e&&this.$P(b,a,e,d)}},Tn:function(b,a){b.lineJoin="miter";var d=this.$n(a);0===d&&(d=b.lineWidth=1);for(var f=Math.min(this.an+1,this.na.length),k=0;k<f;k++){var h=this.na[k];0===k?(b.beginPath(),b.moveTo(h.x,h.y)):b.lineTo(h.x,h.y)}1<this.na.length&&e.RP(b,this.na[0],this.na[1],d)},aQ:function(b,a){var d=a.x,e=a.y,f=a.width,h=a.height;b.save();0<this.StrokeThickness&&(b.beginPath(),b.lineWidth*=2,b.rect(d,e,f,h),b.clip(),b.stroke());b.beginPath();b.rect(d+
b.lineWidth/2,e+b.lineWidth/2,f-b.lineWidth,h-b.lineWidth);b.closePath();b.fill();b.restore()},$P:function(b,a,d,f){var k=f.x,h=f.y,l=f.width,n=f.height;b.textBaseline="top";b.fillStyle=this.TextColor.toString();var m=b.lineWidth;f=0+m;b.save();b.beginPath();b.rect(k+m,h+m,Math.max(l-2*m,0),Math.max(n-2*m));b.clip();b.textAlign=this.TextAlign;if(this.Rotation){b.translate(k,h);b.rotate(-(Math.PI/180*this.Rotation));b.translate(-k,-h);if(90===this.Rotation||270===this.Rotation)m=l,l=n,n=m;90===this.Rotation?
b.translate(-l,0):270===this.Rotation?b.translate(0,-n):180===this.Rotation&&b.translate(-l,-n)}var m=l-2*f,n=Math.round(n-2*f),r=this.OQ(a);a=r.vQ;r=r.wQ;if(0===a){this.mf.style.width=m+"px";this.mf.style.height=n+"px";this.mf.style.fontFamily=this.Font;d=d.replace(/\s+$/g,"");this.mf.value=d;var p=this;a=e.vG(d,this.mf,n,function(a){return p.YG(a).css});r="px";this.eD=a}var u=this.YG(a).wU,q=k+f;"center"===this.TextAlign?q=k+l/2:"right"===this.TextAlign&&(q=k+l-f);b.font=a+r+" "+this.Font;this.MX(b,
d,q,h+f,m,n,u);b.restore()},OQ:function(b){b=f.ja.lq(b,parseFloat(this.FontSize));var a=this.Sz();"pt"===a&&(b*=.75);return{vQ:b,wQ:a}},aS:function(){var b=this.na.slice(-2),a=b[0],b=b[1];return{x:a.x,y:a.y,width:b.x-a.x,height:b.y-a.y}},serialize:function(b,a){var d=f.sa.prototype.serialize.apply(this,arguments),e=this.getPath(),k={},h=f.ba.wg(this.FillColor);null!==h?k.color=h:d.removeAttribute("color");d.removeAttribute("interior-color");var h=this.Rz(),l,n=this.Zz();this.fB&&this.fB.isEqual(n)?
l=this.iB:(this.iB&&(delete this.iB,delete this.fB),n.jI()||(l=f.ba.LB(n,a)));l&&d.setAttribute("fringe",l);this.originalTextAlignCalculated!==this.TextAlign||this.originalTextColorCalculated!==f.ba.wg(this.TextColor)||this.originalStrokeColorCalculated!==f.ba.wg(this.StrokeColor)||this.originalFontSizeCalculated!==this.FontSize||this.originalFontCalculated!==this.Font?(n=this.StrokeColor.fX()+" "+f.ba.qV(this.Font,h),l=f.ba.pV(this)):(n=this.originalDefaultAppearance,l=this.originalDefaultStyle);
var m=document.createElementNS("","defaultappearance");m.textContent=n;d.appendChild(m);n=document.createElementNS("","defaultstyle");n.textContent=l;d.appendChild(n);this.sv&&"left"!==this.sv&&(k.justification=this.sv);l=f.ba.wg(this.TextColor);null!==l&&d.setAttribute("TextColor",l);d.setAttribute("FontSize",h);h=this.jh();h===f.Ia.Fc.FreeTextCallout&&(e=f.ba.Ro(e.slice(0,-2),a,",",","),k.callout=e,k.head=this.Ye(),d.setAttribute("IT",h));for(var r in k)b.setAttribute(r,k[r]);return d},deserialize:function(b,
a){this.TextColor=new f.Color(0,0,0);var d=f.ba;f.sa.prototype.deserialize.apply(this,arguments);null!==d.Rj(b.getAttribute("color"))?this.FillColor=this.StrokeColor:this.FillColor=new f.Color(0,0,0,0);var e=d.ao(b,"defaultappearance","defaultappearance"),k=d.ao(b,"defaultstyle","defaultstyle"),h=d.XI(e);h.color&&(this.StrokeColor=d.Rj(h.color));h.font&&(this.Font=h.font.name,this.FontSize=h.font.size);h=d.pU(k);h.font&&(this.Font=h.font.name,this.FontSize=h.font.size);h.textAlign&&(this.TextAlign=
h.textAlign);h.color&&(this.TextColor=d.Rj(h.color));this.originalStrokeColorCalculated=d.wg(this.StrokeColor);this.originalTextAlignCalculated=this.TextAlign;this.originalTextColorCalculated=h.color?h.color:d.wg(this.TextColor);this.originalFontSizeCalculated=this.FontSize;this.originalFontCalculated=this.Font;this.originalDefaultStyle=b;this.originalDefaultAppearance=e;this.originalDefaultStyle=k;if((e=b.getAttribute("IT")||b.getAttribute("it"))&&e===f.Ia.Fc.FreeTextCallout){if(this.Uo(f.Ia.Fc.FreeTextCallout),
this.Yi(b.getAttribute("head")||"OpenArrow"),k=b.getAttribute("callout"))for(e=d.yl(k,a),3>e.length&&(k=d.yl(k,a,",",","),4>k.length&&(e=k,this.an=e.length-1)),k=this.getPath(),h=0;h<e.length;h++)k[h]=new f.Point(parseFloat(e[h].x),parseFloat(e[h].y))}else this.Uo(f.Ia.Fc.FreeText);this.fringe?this.rm(this.fringe):this.rm(new f.Rect(0,0,0,0));if(e=b.getAttribute("justification"))this.sv=e;d=d.Rj(b.getAttribute("TextColor"));null!==d&&(this.TextColor=d);d=b.getAttribute("FontSize");_.isUndefined(d)||
_.isNull(d)||(this.FontSize=d+"pt");(d=b.getAttribute("rotation"))&&(this.Rotation=parseInt(d,10));this.zf()||this.adjustRect();this.fB=this.Zz()},AV:function(b){this.dF=b},selectionModel:f.wp};f.Ia.prototype=$.extend(new f.qd,f.Ia.prototype);Object.defineProperties(f.Ia.prototype,{CalloutLineCount:{get:function(){return this.an},set:function(b){this.an=b;this.mb()}},TextColor:{get:function(){return this.vD},set:function(b){this.vD=b;this.mb()}},FontSize:{get:function(){return this.jD},set:function(b){this.jD=
b;this.mb()}},Font:{get:function(){return this.iD},set:function(b){this.iD=b;this.mb()}},TextAlign:{get:function(){return this.uD},set:function(b){this.uD=b;this.mb()}},Rotation:{get:function(){return this.sD},set:function(b){this.sD=b;this.mb()}}})})(window);
(function(b){var f=b.Annotations||{};f.ve=function(){f.sa.call(this);this["_xsi:type"]="Line";this.Subject=f.ja.zc("line");this.wn=this.Ws=this.End=this.Start=this.Uf=null};f.ve.prototype={elementName:"line",resize:function(b){var c=b.x1;b=b.y1;var a=c-this.X,d=b-this.Y;if(0!==a||0!==d)this.Start.x+=a,this.Start.y+=d,this.End.x+=a,this.End.y+=d,this.X=c,this.Y=b},adjustRect:function(){if(!_.isNull(this.Start)||!_.isNull(this.End)){"LineDimension"===this.IT&&this.Measure&&this.fq();var b=this.getRectPadding(),
c=this.iS(),a=this.JQ(),a=a.map(function(a){return c.W(a)}),d=a.map(function(a){return a.x}),a=a.map(function(a){return a.y});this.X=Math.min.apply(null,d)-b;this.Y=Math.min.apply(null,a)-b;this.Width=Math.max.apply(null,d)-this.X+2*b;this.Height=Math.max.apply(null,a)-this.Y+2*b;this.Fw()}},getRectPadding:function(){return this.StrokeThickness},WB:function(b,c){this.Start=new f.Point(b,c)},ZR:function(){return this.Start},setEndPoint:function(b,c){this.End=new f.Point(b,c)},YQ:function(){return this.End},
Yi:function(b){this.wn=b},Ye:function(){return this.wn||"None"},So:function(b){this.Ws=b},ih:function(){return this.Ws||"None"},yW:function(b){b.font=this.constant.FONT_SIZE+" "+this.constant.FONT_FAMILY;b.fillStyle=this.constant.TEXT_COLOR;b.textBaseline="top";b.textAlign="center"},BW:function(b){b.translate(this.Start.x,this.Start.y);b.rotate(Math.atan2(this.End.y-this.Start.y,this.End.x-this.Start.x));b.translate(0,this.qA())},draw:function(b,c){this.jc(b,c);if(this.Start&&this.End){var a=this.Pq(),
d;b.save();this.yW(b);this.BW(b);b.beginPath();this.leaderExtend&&this.VP(b,a);this.leaderLength&&this.WP(b,a);"yes"===this.caption&&(d=this.vH(this.eh(),a),this.SP(b,a,d));this.YP(b,a,d);this.XP(b,a,d);b.stroke();b.closePath();b.restore()}},VP:function(b,c){var a=this.leaderExtend;this.We(b,0,0,0,-this.Oq()*a);this.We(b,c,0,c,-this.Oq()*a)},WP:function(b,c){var a=this.leaderLength;this.We(b,0,0,0,a);this.We(b,c,0,c,a)},SP:function(b,c,a){var d=c/2,f;this.MA(a)?this["caption-offset-h"]&&!this.hI(c,
a)&&(d=this.NG(c,a),a.left>c?this.We(b,c,0,d.x,0):0>a.right&&this.We(b,0,0,d.x,0)):this["caption-offset-v"]&&(f=this.Hz(c,a),b.moveTo(c/2,0),b.lineTo(f.x,f.y),this["caption-offset-h"]&&(a.right<d||a.left>d)&&(d=this.NG(c,a),b.lineTo(d.x,d.y)));d=this.eh().split("\n");f=a.top;var k=a.height/d.length;this.Hy(a.width,c)||!this.MA(a)||this["caption-offset-h"]||(f-=17);for(c=0;c<d.length;c++)b.fillText(d[c],a.left+a.width/2,f),f+=k},YP:function(b,c,a){"yes"!==this.caption||this.Hy(a.width,c)?(this.Pu(this.Ye(),
"start").call(this,b),this.Pu(this.ih(),"end").call(this,b)):(a=5*b.lineWidth+10,"None"!==this.Ye()&&(this.Pu("ROpenArrow","start").call(this,b),"None"!==this.ih()&&this.We(b,-a,0,0,0)),"None"!==this.ih()&&(this.Pu("ROpenArrow","end").call(this,b),"None"!==this.Ye()&&this.We(b,c,0,c+a,0)))},XP:function(b,c,a){a?this.Hy(a.width,c)?this.MA(a)&&this.hI(c,a)?(this.We(b,0,0,a.left,0),this.We(b,a.right,0,c,0)):this.We(b,0,0,c,0):"None"!==this.Ye()&&"None"!==this.ih()||this.We(b,0,0,c,0):this.We(b,0,0,c,
0)},We:function(b,c,a,d,f){b.moveTo(c,a);b.lineTo(d,f)},Tn:function(b){var c=5*b.lineWidth+3,a=.2*Math.PI;b.moveTo(Math.cos(a)*c,-Math.sin(a)*c);b.lineTo(0,0);b.lineTo(Math.cos(a)*c,Math.sin(a)*c)},Gh:function(b){f.Annotation.prototype.Gh.apply(this,arguments);this.Start=b.W(this.Start);this.End=b.W(this.End)},serialize:function(b,c){b=f.sa.prototype.serialize.apply(this,arguments);var a=new f.Point(this.End.x,this.End.y),d=f.ba;b.setAttribute("start",d.vw(new f.Point(this.Start.x,this.Start.y),c));
b.setAttribute("end",d.vw(a,c));"None"!==this.Ye()&&b.setAttribute("head",this.Ye());"None"!==this.ih()&&b.setAttribute("tail",this.ih());"LineDimension"===this.IT&&this.Measure&&b.appendChild(d.uw(this.Measure));this.Ya(b,"leaderLength");this.Ya(b,"leaderExtend");this.Ya(b,"leader-offset");this.Ya(b,"caption");this.Ya(b,"caption-style");this.Ya(b,"caption-offset-h");this.Ya(b,"caption-offset-v");return b},deserialize:function(b,c){f.sa.prototype.deserialize.apply(this,arguments);var a=f.ba,d=a.SF(b.getAttribute("start"),
c);null!==d?this.WB(d.x,d.y):this.WB(this.X,this.Y);d=a.SF(b.getAttribute("end"),c);null!==d?this.setEndPoint(d.x,d.y):this.setEndPoint(this.X+this.Width,this.Y+this.Height);d=b.querySelector("measure");"LineDimension"===b.getAttribute("IT")&&d&&(this.Measure=a.pu(d));this.Yi(b.getAttribute("head")||"None");this.So(b.getAttribute("tail")||"None");this.pe(b,"caption");this.pe(b,"caption-style");this.Qr(b,"caption-offset-h");this.Qr(b,"caption-offset-v");this.Qr(b,"leaderLength");this.Qr(b,"leaderExtend");
this.Qr(b,"leader-offset");this.zf()||this.adjustRect()},selectionModel:f.yp,constant:{FONT_SIZE:"9px",FONT_FAMILY:"sans-serif",TEXT_COLOR:"#000000"},Un:{None:function(){},OpenArrow:{start:function(b){this.Tn(b)},end:function(b){b.save();b.translate(this.Pq(),0);b.scale(-1,1);this.Tn(b);b.restore()}},ROpenArrow:{start:function(b){b.save();b.scale(-1,1);this.Tn(b);b.restore()},end:function(b){b.save();b.translate(this.Pq(),0);this.Tn(b);b.restore()}}},fq:function(){var b=this.Measure.distance,b=f.ja.Vz(this.Pq()*
this.Measure.axis[0].factor*b[0].factor,b);this.Ch(b)},mT:function(b){return!!this.Un[b]},Hy:function(b,c){return b+24<=c},MA:function(b){return 0>b.top&&0<b.bottom},hI:function(b,c){return 0<=c.left&&c.right<=b},iS:function(){var b=this.qA(),c=Math.atan2(this.End.y-this.Start.y,this.End.x-this.Start.x),a=new XODText.Matrix2D,d=new XODText.Matrix2D;a.Da(1,0,0,1,this.Start.x,this.Start.y);d.set(Math.cos(c),Math.sin(c),-Math.sin(c),Math.cos(c),0,0);a.concat(d);d.set(1,0,0,1,0,b);a.concat(d);return a},
Pu:function(b,c){return _.isNull(b)?this.Un.None:this.mT(b)?"object"===typeof this.Un[b]?this.Un[b][c]:this.Un[b]:this.Un.OpenArrow[c]},vH:function(b,c){var a=f.ja.measureText(b,this.constant.FONT_SIZE,this.constant.FONT_FAMILY,"normal"),d=a.height,a=a.width,g=this.dS(d),k=this.bS(a,c);return{top:g,bottom:g+d,left:k,right:k+a,width:a,height:d}},dS:function(b){var c=-b/2;if("Top"===this["caption-style"]&&!this["caption-offset-v"])return-b;this["caption-offset-v"]&&(c-=this["caption-offset-v"]);return c},
bS:function(b,c){var a=c/2-b/2;this["caption-offset-h"]&&(a+=this["caption-offset-h"]);return a},Hz:function(b,c){var a=-this["caption-offset-v"],d=b/2,f={x:d,y:void 0};f.y=0>a?c.bottom:c.top;this["caption-offset-h"]&&(c.right<d||c.left>d)&&(f.y=0>a?f.y-c.height/2:f.y+c.height/2);return f},NG:function(b,c){var a={};a.y=this["caption-offset-v"]?this.Hz(b,c).y:0;a.x=0>this["caption-offset-h"]?c.right:c.left;return a},JQ:function(){var b=this.Pq(),c=[{x:0,y:0},{x:b,y:0}];if("yes"===this.caption){var a=
this.vH(this.eh(),b);c.push({x:a.left,y:a.top},{x:a.left,y:a.bottom},{x:a.right,y:a.top},{x:a.right,y:a.bottom});this["caption-offset-v"]&&(a=this.Hz(b,a),c.push({x:a.x,y:a.y}))}this.leaderExtend&&(a=this.leaderExtend,c.push({x:0,y:a*-this.Oq()},{x:b,y:a*-this.Oq()}));(a=this.qA())&&c.push({x:0,y:-a},{x:b,y:-a});return c},qA:function(){var b=this.leaderLength,c=this["leader-offset"],a=0;b&&(a-=b);c&&(a+=c*-this.Oq());return a},Oq:function(){return!this.leaderLength||0<this.leaderLength?1:-1},Pq:function(){return Math.sqrt(Math.pow(this.End.x-
this.Start.x,2)+Math.pow(this.End.y-this.Start.y,2))}};f.ve.prototype=$.extend(new f.sa,f.ve.prototype)})(window);
(function(b){var f=b.Annotations||{};f.Mh=function(){f.sa.call(this);this.na=[];this.jt=!1;this.Jd="solid";this.hl=2;this["_xsi:type"]="Polygon";this.Subject=f.ja.zc("polygon");this.Za={x:0,y:0};this.Db={x:0,y:0}};f.Mh.prototype={elementName:"polygon",resize:function(b){var c=b.x1;b=b.y1;var a=c-this.X,d=b-this.Y;if(0!==a||0!==d){for(var f=0;f<this.na.length;f++)this.na[f].x+=a,this.na[f].y+=d;this.X=c;this.Y=b}},adjustRect:function(){"PolygonDimension"===this.IT&&this.Measure&&this.fq();f.qd.prototype.adjustRect.call(this)},
fq:function(){var b=this.IQ(),c=this.Measure.axis[0],a=this.Measure.area,b=f.ja.Vz(b*c.factor*c.factor*a[0].factor,a);this.Ch(b)},finish:function(){b.ae.Math.cJ(this.na)&&(this.na[this.na.length]={x:this.na[0].x,y:this.na[0].y});this.adjustRect()},draw:function(b,c){this.nz(b,c)},ji:function(b){if("cloudy"===this.Style)f.ja.ZF(this,b,this.getPath());else for(var c=0;c<this.na.length;c++){var a=this.na[c];0===c?(b.beginPath(),b.moveTo(a.x,a.y)):b.lineTo(a.x,a.y)}1<this.na.length&&(b.closePath(),b.lineJoin=
"round")},IQ:function(){var b=this.getPath();return 3>b.length?0:Math.abs(b.reduce(function(c,a,d){return c+a.x*b[d===b.length-1?0:d+1].y-b[d===b.length-1?0:d+1].x*a.y},0))/2},Uo:function(b){this.Intent=b},jh:function(){return this.Intent},serialize:function(b,c){var a=f.sa.prototype.serialize.apply(this,arguments);"cloudy"===this.Style&&(a.setAttribute("style",this.Style),a.setAttribute("intensity",this.Intensity));var d=this.getPath();if(d&&0<d.length){var g=document.createElementNS("","vertices");
g.textContent=f.ba.Ro(d,c);a.appendChild(g)}"PolygonDimension"===this.IT&&this.Measure&&a.appendChild(f.ba.uw(this.Measure));return a},deserialize:function(b,c){f.sa.prototype.deserialize.apply(this,arguments);var a=b.getElementsByTagName("vertices");0<a.length&&(this.na=f.ba.yl(a[0].textContent,c));this.Jd=b.getAttribute("style");this.hl=parseInt(b.getAttribute("intensity")||0,10);this.Zf=b.getAttribute("IT");a=b.querySelector("measure");"PolygonDimension"===this.Zf&&a&&(this.Measure=f.ba.pu(a));
this.zf()||this.adjustRect()},selectionModel:f.Cs};f.Mh.prototype=$.extend(new f.qd,f.Mh.prototype);Object.defineProperties(f.Mh.prototype,{Intensity:{get:function(){return this.hl},set:function(b){this.hl=b;this.mb()}},Style:{get:function(){return this.Jd},set:function(b){this.Jd=b;this.mb()}},Intent:{get:function(){return this.Zf},set:function(b){this.Zf=b;this.mb()}}})})(window);
(function(b){var f=b.Annotations||{};f.Sm=function(){f.sa.call(this);this.na=[];this.jt=!1;this["_xsi:type"]="Polyline";this.Subject=f.ja.zc("polyline");this.Za={x:0,y:0};this.Db={x:0,y:0};this.Uf=null};f.Sm.prototype={elementName:"polyline",resize:function(b){var c=b.x1;b=b.y1;var a=c-this.X,d=b-this.Y;if(0!==a||0!==d){for(var f=0;f<this.na.length;f++)this.na[f].x+=a,this.na[f].y+=d;this.X=c;this.Y=b}},adjustRect:function(){"PolyLineDimension"===this.IT&&this.Measure&&this.fq();f.qd.prototype.adjustRect.call(this)},
fq:function(){var b=this.JR(),c=this.Measure.distance,b=f.ja.Vz(b*this.Measure.axis[0].factor*c[0].factor,c);this.Ch(b)},finish:function(){this.adjustRect()},draw:function(b,c){this.jc(b,c);for(var a=0;a<this.na.length;a++){var d=this.na[a];0===a?(b.beginPath(),b.moveTo(d.x,d.y)):b.lineTo(d.x,d.y)}1<this.na.length&&(b.lineJoin="round",b.stroke())},Yi:function(b){this.wn=b},Ye:function(){return this.wn||"None"},So:function(b){this.Ws=b},ih:function(){return this.Ws||"None"},JR:function(){var b=this.getPath();
return 2>b.length?0:b.reduce(function(c,a,d){if(0===d)return c;d=b[d-1];return c+Math.sqrt(Math.pow(a.x-d.x,2)+Math.pow(a.y-d.y,2))},0)},serialize:function(b,c){var a=f.sa.prototype.serialize.apply(this,arguments),d=this.getPath();if(d&&0<d.length){var g=document.createElementNS("","vertices");g.textContent=f.ba.Ro(d,c);a.appendChild(g)}a.setAttribute("head",this.Ye());a.setAttribute("tail",this.ih());"PolyLineDimension"===this.IT&&this.Measure&&a.appendChild(f.ba.uw(this.Measure));return a},deserialize:function(b,
c){f.sa.prototype.deserialize.apply(this,arguments);var a=b.getElementsByTagName("vertices");0<a.length&&(this.na=f.ba.yl(a[0].textContent,c));this.Yi(b.getAttribute("head")||"None");this.So(b.getAttribute("tail")||"None");a=b.querySelector("measure");"PolyLineDimension"===b.getAttribute("IT")&&a&&(this.Measure=f.ba.pu(a));this.zf()||this.adjustRect()},selectionModel:f.Rm};f.Sm.prototype=$.extend(new f.qd,f.Sm.prototype)})(window);
(function(b){var f=b.Annotations||{};f.Qk=function(){f.sa.call(this);this["_xsi:type"]="Rectangle";this.Subject=f.ja.zc("rectangle");var b=this.getRectPadding();this.fringe=new f.Rect(b,b,b,b);this.hl=2;this.Jd="solid"};f.Qk.prototype={elementName:"square",draw:function(b,c){this.nz(b,c)},ji:function(b){var c=this.Sc();c.x1+=this.fringe.x1;c.y1+=this.fringe.y1;c.x2-=this.fringe.x2;c.y2-=this.fringe.y2;if("cloudy"===this.Style)f.ja.ZF(this,b,[new f.Point(c.x1,c.y1),new f.Point(c.x2,c.y1),new f.Point(c.x2,
c.y2),new f.Point(c.x1,c.y2),new f.Point(c.x1,c.y1)]),b.closePath(),b.lineJoin="round";else{var a=1<=this.ya()&&1<=this.va();b.lineWidth*=a?2:.5;b.beginPath();b.moveTo(c.x1,c.y1);b.lineTo(c.x2,c.y1);b.lineTo(c.x2,c.y2);b.lineTo(c.x1,c.y2);b.closePath();a&&b.clip()}},getRectPadding:function(){return 0},serialize:function(){var b=f.sa.prototype.serialize.apply(this,arguments);"cloudy"===this.Style&&(b.setAttribute("style",this.Style),b.setAttribute("intensity",this.Intensity));return b},deserialize:function(b){f.sa.prototype.deserialize.apply(this,
arguments);this.Jd=b.getAttribute("style");this.hl=b.getAttribute("intensity")}};f.Qk.prototype=$.extend(new f.sa,f.Qk.prototype);Object.defineProperties(f.Qk.prototype,{Intensity:{get:function(){return this.hl},set:function(b){this.hl=b;this.mb()}},Style:{get:function(){return this.Jd},set:function(b){this.Jd=b;this.mb()}}})})(window);
(function(b){var f,e=b.Annotations||{};e.Uk=function(){e.sa.call(this);this["_xsi:type"]="Stamp";this.Subject=e.ja.zc("stamp");this.Icon="Draft";this.sj=this.rj=this.Uf=null;this.uo=1;this.xP="bold italic "+this.MK+"px Verdana"};e.Uk.prototype={elementName:"stamp",padding:20,MK:30,Yy:10,draw:function(c,a){this.jc(c,a);c.translate(this.X,this.Y);c.rotate(-this.Rotation*Math.PI/180);var d=b.utils.getRotationOffsets((360-this.Rotation)%360,this.Width,this.Height);c.translate(-d.dx,-d.dy);if(this.image){var d=
this.Width,e=this.Height;if(this.Rotation&&(90===Number(this.Rotation)||270===Number(this.Rotation)))var f=d,d=e,e=f;1!==this.uo&&(c.globalAlpha=1);c.drawImage(this.image,0,0,d,e)}else if("SHAccepted"===this.Icon)c.lineWidth=.2*Math.min(this.Width,this.Height),c.strokeStyle="#426922",c.beginPath(),c.moveTo(.05*this.Width,.5*this.Height),c.lineTo(.4*this.Width,.85*this.Height),c.lineTo(.95*this.Width,.05*this.Height),c.stroke();else if("SBRejected"===this.Icon)c.lineWidth=.2*Math.min(this.Width,this.Height),
c.strokeStyle="#8F110F",c.beginPath(),c.moveTo(.05*this.Width,.05*this.Height),c.lineTo(.95*this.Width,.95*this.Height),c.moveTo(.95*this.Width,.05*this.Height),c.lineTo(.05*this.Width,.95*this.Height),c.stroke();else{d=this.QQ();c.fillStyle=d.fill;c.strokeStyle=d.Av;c.lineWidth=1;e=this.Yy;if(this.ya()<=2*this.Yy||this.va()<=2*this.Yy)e=Math.min(this.ya()/2,this.va()/2);this.ZP(c,0,0,this.ya(),this.va(),e);c.font=this.xP;c.fillStyle=d.Av;d=this.GK.toUpperCase();e=c.measureText(d).width+2*this.padding;
c.save();e=this.ya()/e;f=this.va()/(1.5*this.MK);c.scale(e,f);c.textBaseline="middle";c.textAlign="center";c.fillText(d,this.ya()/(2*e),this.va()/(2*f));c.restore()}},jS:function(){var b=this.Icon;if(this.Xc[b])return this.Xc[b];if(0===b.indexOf("SB")||0===b.indexOf("SH")){var a=this.Xc[b.substring(2)];if(a)return a}return b},QQ:function(){var b=_.isUndefined(this.opacity)?1:parseFloat(this.opacity),a={Av:"rgba(145, 15, 5, "+b+")",fill:"rgba(242, 230, 227, "+.7*b+")"},d={Av:"rgba(65, 106, 28, "+b+
")",fill:"rgba(215, 226, 207, "+.7*b+")"},b={Av:"rgba(24, 37, 100, "+b+")",fill:"rgba(224, 235, 246, "+.7*b+")"};switch(this.GK){case this.Xc.Approved:case this.Xc.Completed:case this.Xc.Final:return d;case this.Xc.Asis:case this.Xc.Confidential:case this.Xc.Departmental:case this.Xc.Draft:case this.Xc.Experimental:case this.Xc.ForComment:case this.Xc.ForPublicRelease:case this.Xc.NotForPublicRelease:case this.Xc.Sold:case this.Xc.TopSecret:return b;case this.Xc.Expired:case this.Xc.NotApproved:case this.Xc.Void:return a;
default:return b}},Xc:{Approved:"Approved",AsIs:"As Is",Completed:"Completed",Confidential:"Confidential",Departmental:"Departmental",Draft:"Draft",Experimental:"Experimental",Expired:"Expired",Final:"Final",ForComment:"For Comment",ForPublicRelease:"For Public Release",InformationOnly:"Information Only",NotApproved:"Not Approved",NotForPublicRelease:"Not For Public Release",PreliminaryResults:"Preliminary Results",Sold:"Sold",TopSecret:"Top Secret",Void:"Void"},ZP:function(b,a,d,e,f,h){b.beginPath();
b.moveTo(a+h,d);b.lineTo(a+e-h,d);b.quadraticCurveTo(a+e,d,a+e,d+h);b.lineTo(a+e,d+f-h);b.quadraticCurveTo(a+e,d+f,a+e-h,d+f);b.lineTo(a+h,d+f);b.quadraticCurveTo(a,d+f,a,d+f-h);b.lineTo(a,d+h);b.quadraticCurveTo(a,d,a+h,d);b.closePath();b.fill();b.stroke()},ZK:function(b){f=f||document.createElement("canvas");f.width=this.image.width;f.height=this.image.height;var a=f.getContext("2d");a.drawImage(this.image,0,0);for(var d=a.getImageData(0,0,this.image.width,this.image.height),e=d.data,k=e.length,
h=3;h<k;h+=4)0!==e[h]&&(e[h]=255*b);a.putImageData(d,0,0);return f.toDataURL()},serialize:function(){var b=e.sa.prototype.serialize.apply(this,arguments);this.KI&&this.Icon===this.KI||b.setAttribute("icon",this.Icon);if(this.image){var a=document.createElementNS("","imagedata");a.textContent=this.image.src.split("%0A").join("");1===this.uo&&this.Opacity!==this.uo&&(a.textContent=this.ZK(this.Opacity));b.appendChild(a)}return b},deserialize:function(b){e.sa.prototype.deserialize.apply(this,arguments);
var a=b.getAttribute("icon");a?this.Icon=a:this.Subject&&(this.Icon=this.Subject);a||(this.KI=this.Icon);a=b.getElementsByTagName("imagedata");0<a.length&&(this.ImageData=a[0].textContent,this.uo=this.Opacity)}};e.Uk.prototype=$.extend(new e.sa,e.Uk.prototype,b.utils.eventHandler);Object.defineProperties(e.Uk.prototype,{Icon:{get:function(){return this.$M},set:function(b){this.$M=b;this.GK=this.jS();this.mb()}},ImageData:{get:function(){return this.image.src},set:function(b){this.image||(this.image=
new Image);if(this.image.src!==b){var a=this;this.vE=new Promise(function(d){a.image.onload=d;a.image.onerror=d;a.image.src=b;a.mb()})}}},Opacity:{get:function(){return Object.getOwnPropertyDescriptor(e.sa.prototype,"Opacity").get.call(this)},set:function(b){Object.getOwnPropertyDescriptor(e.sa.prototype,"Opacity").set.call(this,b);if(this.image&&1>this.uo){this.uo=1;var a=this;this.CB().then(function(){a.ImageData=a.ZK(1)})}}}})})(window);
(function(b){var f=b.Annotations||{};f.rp=function(b){f.Annotation.call(this);this["_xsi:type"]="Custom";this.Subject=f.ja.zc("custom");this.Opacity=1;if(_.isObject(b)&&(_.isUndefined(b.page)||(this.PageNumber=parseInt(b.page,10)+1),_.isUndefined(b.appearances)||(this.appearances=b.appearances),!_.isUndefined(b.rect))){var c=new f.Rect(b.rect.x1,b.rect.y1,b.rect.x2,b.rect.y2);0>c.ya()&&(b=c.x1,c.x1=c.x2,c.x2=b);0>c.va()&&(b=c.y1,c.y1=c.y2,c.y2=b);this.X=c.x1;this.Y=c.y1;this.Lp=c.ya();this.Kp=c.va()}};
f.rp.prototype={elementName:"custom",draw:function(){},serialize:function(b,c){return f.Annotation.prototype.serialize.apply(this,arguments)},deserialize:function(b,c){f.Annotation.prototype.deserialize.apply(this,arguments)}};f.rp.prototype=$.extend(new f.Annotation,f.rp.prototype)})(window);
(function(b){var f=b.Annotations||{};f.lj=function(){f.sa.call(this);this["_xsi:type"]="Sticky";this.Subject=f.ja.zc("stickyNote");this.Height=this.Width=20;this.IsClickableOutsideRect=this.NoRotate=this.NoZoom=this.NoResize=!0;this.Uf=this.sj=null;this.rj=new f.Color(255,255,0);this.Icon="Comment";this.kD=null};f.lj.prototype={SIZE:31,elementName:"text",zf:function(){return null},draw:function(e,c,a){if(!this.Ci()){var d=this.SIZE,f=this.SIZE;c=d<f?d:f;var k=.75*c,h=.48*c,l=.29*c,n=.19*c,m=c-n;e.strokeStyle=
"rgb(0, 0, 0)";e.fillStyle=this.StrokeColor.toString();e.globalAlpha=0===this.Opacity?0:this.Opacity||1;a=a||0;e.rotate(-a*Math.PI/180);a=b.utils.getRotationOffsets((360-a)%360,d,f);e.translate(-a.dx,-a.dy);e.beginPath();e.moveTo(7,2);e.lineTo(c-5-2,2);e.quadraticCurveTo(c-2,2,c-2,7);e.lineTo(c-2,k-5);e.quadraticCurveTo(c-2,k,c-5-2,k);e.lineTo(h,k);e.lineTo(l,c-2);e.lineTo(l,k);e.lineTo(7,k);e.quadraticCurveTo(2,k,2,k-5);e.lineTo(2,7);e.quadraticCurveTo(2,2,7,2);e.fill();e.moveTo(n,.25*c);e.lineTo(m,
.25*c);e.moveTo(n,.41*c);e.lineTo(m,.41*c);e.moveTo(n,.57*c);e.lineTo(.68*c,.57*c);e.stroke()}},serialize:function(){var b=f.sa.prototype.serialize.apply(this,arguments),c={};this.Icon&&(c.icon=this.Icon);null!==this.InReplyTo&&(c.inreplyto=this.InReplyTo);for(var a in c)b.setAttribute(a,c[a]);this.Ya(b,"state");this.Ya(b,"statemodel");return b},deserialize:function(b){f.sa.prototype.deserialize.apply(this,arguments);this.Uf=null;this.Icon=b.getAttribute("icon");var c=b.getAttribute("inreplyto");
c&&(this.InReplyTo=c);this.pe(b,"state");this.pe(b,"statemodel");this.NoRotate=this.NoZoom=!0;this.Height=this.Width=20;this.Fw()},selectionModel:f.Hp};f.lj.prototype=$.extend(!0,new f.sa,f.lj.prototype);Object.defineProperties(f.lj.prototype,{InReplyTo:{get:function(){return this.kD},set:function(b){this.kD=b;this.mb()}}})})(window);
(function(b){var f=b.Annotations||{},e=f.ja||{};f.Bb=function(){f.sa.call(this);this.Uf=null;this.rj=new f.Color(255,0,0);this.sj=null;this.oD=!0;this.pD=!1;this.fb=[];this.Xf=!1;this.SurroundingTexts=this.TextIndices=null;this["_xsi:type"]="Text Markup";this.Subject=this["_xsi:type"]};f.Bb.prototype={Dw:function(b){if(!b||"undefined"===typeof b.length||0===b.length)throw Error("Argument quads requires an array of at least one element");this.fb=b;for(var a=Infinity,d=Infinity,e=0,f=0,h=0;h<this.fb.length;h++)b=
this.fb[h],a=Math.min(a,b.x1,b.x2,b.x3,b.x4),d=Math.min(d,b.y1,b.y2,b.y3,b.y4),e=Math.max(e,b.x1,b.x2,b.x3,b.x4),f=Math.max(f,b.y1,b.y2,b.y3,b.y4);this.X=a;this.Y=d;this.Width=e-a;this.Height=f-d},he:function(){return this.fb},Gh:function(b){f.Annotation.prototype.Gh.apply(this,arguments);var a=[];this.fb.forEach(function(d){var e={x:d.x1,y:d.y1},k={x:d.x2,y:d.y2},h={x:d.x3,y:d.y3};d={x:d.x4,y:d.y4};e=b.W(e);k=b.W(k);h=b.W(h);d=b.W(d);a.push(new f.ab(e.x,e.y,k.x,k.y,h.x,h.y,d.x,d.y))});this.Dw(a)},
serialize:function(c,a){var d=f.sa.prototype.serialize.apply(this,arguments),g,k=[];for(g=0;g<this.Quads.length;g++){var h=this.Quads[g];k.push(new f.Point(h.x4,h.y4));k.push(new f.Point(h.x3,h.y3));k.push(new f.Point(h.x1,h.y1));k.push(new f.Point(h.x2,h.y2))}0<this.Quads.length&&(g=f.ba.Ro(k,a,",",","),d.setAttribute("coords",g));this.Ya(c,"inreplyto");this.Ya(c,"replyType");if(e.Fq){k={};this.TextIndices?k.selidxs=f.ba.sV(this.TextIndices):b.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.serialize: no idxs to serialize.");
if(this.SurroundingTexts)for(h=f.ba.rV(this.SurroundingTexts),g=0;g<h.length;g++)k["surrtxts_"+g+"_0"]=h[g][0],k["surrtxts_"+g+"_1"]=h[g][1];else b.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.serialize: no surrtxts to serialize.");for(var l in k)d.setAttribute(l,k[l])}return d},deserialize:function(c,a,d){f.sa.prototype.deserialize.apply(this,arguments);this.fb=[];this.pe(c,"inreplyto");this.pe(c,"replyType");for(var g=c.getAttribute("coords"),g=f.ba.yl(g,a,",",","),k=0;k+
3<g.length;k+=4){if(b.ae.Math.xT(g[k],g[k+3],g[k+1],g[k+2])){var h=g[k+2];g[k+2]=g[k+3];g[k+3]=h}this.fb.push(new f.ab(g[k+3].x,g[k+3].y,g[k+2].x,g[k+2].y,g[k+1].x,g[k+1].y,g[k].x,g[k].y))}d?f.ja.DP(this,c,d):(this instanceof f.Bb&&b.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: no annotManager provided; could not attempt to deserialize extra selector data."),this.Xf=!1);var l=function(a){var c=!1,d;if(this.uf&&this.fb.length===this.uf.length)for(c=!0,k=0;k<this.fb.length;k++)for(d=
0;8>d;d++)if(5<=Math.abs(this.fb[k].Fz()[d]-this.uf[k][d])){c=!1;k=this.fb.length;break}var e=!1;if(this.Sg&&this.fb.length===this.Sg.length)for(e=!0,k=0;k<this.fb.length;k++)for(d=0;8>d;d++)if(5<=Math.abs(this.fb[k].Fz()[d]-this.Sg[k][d])){e=!1;k=this.fb.length;break}c||b.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: absolute position selector DOES NOT agree with surrtxt selector.");e||b.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: absolute position selector DOES NOT agree with index-based selector.");
d=null!==this.Sg&&(0<this.Sg.length||0===this.fb.length&&0===this.Sg.length);var g=null!==this.uf&&(0<this.uf.length||0===this.fb.length&&0===this.uf.length),h=[],l=Array(8);if(d&&g)if(c||e)b.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: using absolute coordinates.");else{for(k=0;k<this.uf.length;k++){for(d=0;8>d;d++)l[d]=Math.round(this.uf[k][d]);h.push(new f.ab(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7]))}this.fb=h}else if(d)if(e)b.utils.warn("annot_extra_selectors",
"Annotations.TextMarkupAnnotation.deserialize: using absolute coordinates.");else{for(k=0;k<this.Sg.length;k++){for(d=0;8>d;d++)l[d]=Math.round(this.Sg[k][d]);h.push(new f.ab(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7]))}this.fb=h}else if(g)if(c)b.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: using absolute coordinates.");else{for(k=0;k<this.uf.length;k++){for(d=0;8>d;d++)l[d]=Math.round(this.uf[k][d]);h.push(new f.ab(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7]))}this.fb=
h}else b.utils.warn("annot_extra_selectors","Annotations.TextMarkupAnnotation.deserialize: using absolute coordinates.");e=c=9007199254740991;for(k=l=h=0;k<this.fb.length;k++)d=this.fb[k].Fz(),d[0]<c&&(c=d[0]),d[7]<e&&(e=d[7]),d[2]>h&&(h=d[2]),d[3]>l&&(l=d[3]);this.kK(new f.Rect(c,e,h,l));a.Wb(this);this.trigger("extraSelectorsUsedForAdjustments");this.Op=!0}.bind(this);if(e.Fq&&this.Xf&&d)if(this.sE)l(d);else this.one("quadsCalculatedFromExtraSelectors",function(){l(d)});else b.utils.warn("annot_extra_selectors",
"Annotations.TextMarkupAnnotation.deserialize: NOT taking extra selectors path.")},xk:function(){return!0},selectionModel:f.nj};f.Bb.prototype=$.extend(new f.sa,f.Bb.prototype);Object.defineProperties(f.Bb.prototype,{Quads:{get:function(){return this.fb},set:function(b){this.Dw(b)}}})})(window);
(function(b){var f=b.Annotations||{},e=f.ja||{};f.Oh=function(){f.Bb.call(this);this.rj=new f.Color(255,255,0);this["_xsi:type"]="Highlight";this.Subject=f.ja.zc("highlight");this.Opacity=1};f.Oh.opacityCap=.3;f.Oh.prototype={elementName:"highlight",zf:function(){return null},draw:function(b,a){var d=function(){this.jc(b,a);if(_.isUndefined(this.Opacity)||_.isNull(this.Opacity)||this.Opacity>f.Oh.opacityCap)b.globalAlpha=f.Oh.opacityCap;b.fillStyle=this.StrokeColor.toString();for(var d,e=0;e<this.Quads.length;e++)d=
this.Quads[e],b.beginPath(),b.moveTo(d.x1,d.y1),b.lineTo(d.x2,d.y2),b.lineTo(d.x3,d.y3),b.lineTo(d.x4,d.y4),b.closePath(),b.fill()}.bind(this);if(e.Fq&&this.Xf)if(this.Op)d();else this.one("extraSelectorsUsedForAdjustments",function(){d()});else d()}};f.Oh.prototype=$.extend(new f.Bb,f.Oh.prototype)})(window);
(function(b){var f=b.Annotations||{},e=f.ja||{};f.Xm=function(){f.Bb.call(this);this["_xsi:type"]="Squiggly";this.Subject=f.ja.zc("squiggly")};f.Xm.prototype={elementName:"squiggly",draw:function(b,a){var d=function(){var d,e,f,l,n,m,r;this.jc(b,a);for(var p=0;p<this.fb.length;p++){e=this.fb[p];d=Math.sqrt((e.x1-e.x2)*(e.x1-e.x2)+(e.y1-e.y2)*(e.y1-e.y2));var u=5/3,q=d/10;b.save();b.translate(e.x1,e.y1-1.25);b.rotate(Math.atan2(e.y2-e.y1,e.x2-e.x1));e=Math.abs(e.y1-e.y4);b.beginPath();b.rect(0,-e,
d,e+1.25+1);b.clip();b.beginPath();for(var v=0;v<2*q;v+=2)r=5*v,n=5*v+u/2,m=u,f=5*(v+1)-u/2,l=u,d=5*(v+1),e=0,b.moveTo(r,0),b.bezierCurveTo(n,m,f,l,d,e),n=5*(v+1)+u/2,m=-u,f=5*(v+2)-u/2,l=-u,d=5*(v+2),e=0,b.bezierCurveTo(n,m,f,l,d,e);b.stroke();b.restore()}}.bind(this);if(e.Fq&&this.Xf)if(this.Op)d();else this.one("extraSelectorsUsedForAdjustments",function(){d()});else d()}};f.Xm.prototype=$.extend(new f.Bb,f.Xm.prototype)})(window);
(function(b){var f=b.Annotations||{},e=f.ja||{};f.Ym=function(){f.Bb.call(this);this["_xsi:type"]="Strikeout";this.Subject=f.ja.zc("strikeout")};f.Ym.prototype={elementName:"strikeout",draw:function(b,a){var d=function(){this.jc(b,a);0===this.StrokeThickness&&(b.lineWidth=1);for(var d,e=0;e<this.fb.length;e++){d=this.fb[e];var f=(d.x1+d.x4)/2,l=(d.y1+d.y4)/2,n=(d.x2+d.x3)/2;d=(d.y2+d.y3)/2;b.beginPath();b.moveTo(f,l);b.lineTo(n,d);b.stroke()}}.bind(this);if(e.Fq&&this.Xf)if(this.Op)d();else this.one("extraSelectorsUsedForAdjustments",
function(){d()});else d()}};f.Ym.prototype=$.extend(new f.Bb,f.Ym.prototype)})(window);
(function(b){var f=b.Annotations||{},e=f.ja||{};f.Zm=function(){f.Bb.call(this);this["_xsi:type"]="Underline";this.Subject=f.ja.zc("underline")};f.Zm.prototype={elementName:"underline",draw:function(b,a){var d=function(){this.jc(b,a);for(var d,e=0;e<this.fb.length;e++)d=this.fb[e],b.beginPath(),b.moveTo(d.x1,d.y1),b.lineTo(d.x2,d.y2),b.closePath(),b.stroke()}.bind(this);if(e.Fq&&this.Xf)if(this.Op)d();else this.one("extraSelectorsUsedForAdjustments",function(){d()});else d()}};f.Zm.prototype=$.extend(new f.Bb,
f.Zm.prototype)})(window);
(function(b){var f=b.Annotations||{},e=new f.Color(0,0,0,0),c=new f.Color(0,0,0,1),a=new f.Color(255,0,0,1);f.Dd=function(b){b=b||{};f.TextMarkupAnnotation.call(this);this["_xsi:type"]="Redact";this.Subject=f.ja.zc("redact");this.Opacity=1;this.IsHoverable=!0;this.IsHovering=!1;this.PageNumber=b.PageNumber||this.PageNumber;this.StrokeThickness=1.5;this.Color=b.StrokeColor||new f.Color(a);this.FillColor=b.FillColor||new f.Color(c);this.FillDisplayColor=new f.Color(e);b.Rect&&this.yg(b.Rect);b.Quads?
(this.Quads=b.Quads,this.IsText=!0):b.Rect&&(this.VB(),this.NoMove=this.IsText=!1)};f.Dd.prototype={elementName:"redact",draw:function(a,b){this.jc(a,b);this.Uq().forEach(function(b){var c=b.x2-b.x1,e=b.y2-b.y1;a.save();a.beginPath();a.rect(b.x1,b.y1,c,e);a.clip();a.stroke();a.fill();a.closePath();a.restore()})},Uq:function(){var a=this.he();return a=0===a.length?[this.Sc()]:a.map(function(a){return{x1:a.x4,y1:a.y4,x2:a.x2,y2:a.y2}})},yg:function(a){f.Bb.prototype.yg.call(this,a);this.IsText||(this.VB(!0),
this.NoMove=!1)},jc:function(a,b){var c=this.je();a.globalAlpha=1;a.fillStyle=c.fillColor.toString();c.strokeColor&&(a.strokeStyle=c.strokeColor.toString());a.lineWidth=2*f.ja.lq(b,c.IK)},je:function(){return this.IsHovering?{fillColor:this.FillColor,IK:0,strokeColor:this.FillColor}:{fillColor:this.FillDisplayColor,IK:this.StrokeThickness,strokeColor:this.StrokeColor}},VB:function(){if(!this.IsText){var a=this.Sc();this.Quads=[{x1:a.x1,x2:a.x2,x3:a.x2,x4:a.x1,y1:a.y2,y2:a.y2,y3:a.y1,y4:a.y1}]}},selectionModel:f.Ds,
serialize:function(){var a=f.Bb.prototype.serialize.apply(this,arguments);this.Ya(a,"overlay-text");this.Ya(a,"overlay-text-repeat");this.Ya(a,"justification");this.Ya(a,"defaultappearance");this.IsText||a.removeAttribute("coords");return a},deserialize:function(a){f.Bb.prototype.deserialize.apply(this,arguments);this.pe(a,"overlay-text");this.pe(a,"overlay-text-repeat");this.pe(a,"justification");this.defaultappearance=f.ba.ao(a,"defaultappearance","defaultappearance");this.Quads.length?this.NoMove=
this.IsText=!0:(this.NoMove=this.IsText=!1,this.VB())}};f.Dd.prototype=$.extend(new f.Bb,f.Dd.prototype)})(window);
(function(b){function f(){}function e(a){this.size=a;this.oc=Array(this.size);for(a=0;a<this.size;a++)this.oc[a]={ah:b.o.Aa.al(1,1,1),Sv:b.o.Aa.al(1,1,1),Hn:null,Ii:[],$q:!1}}function c(a){var b=a.width;a.width=1;a.width=b}var a={Is:"ViewportCanvas",ux:"PageCanvas"};e.prototype={Zj:function(a,b,c){return c&&1<b?0===a?0:Math.floor((a+1)/b):Math.floor(a/b)},Ru:function(a,b,c){b=this.Zj(a,b,c);c=null;for(var d=0;d<this.size;d++){if(this.oc[d].Hn===b)return-1===this.oc[d].Ii.indexOf(a)&&this.oc[d].Ii.push(a),
this.oc[d].$q=!0,this.oc[d];this.oc[d].$q||(c=this.oc[d])}return c?(c.Hn=b,c.Ii.push(a),c.$q=!0,c):null},ZQ:function(a,b,c){b=this.Zj(a,b,c);for(c=0;c<this.size;c++)if(this.oc[c].Hn===b)return-1===this.oc[c].Ii.indexOf(a)&&this.oc[c].Ii.push(a),this.oc[c].$q=!0,this.oc[c];return null},Io:function(a){for(var b=0;b<this.size;b++){var c=this.oc[b].Ii,d=c.indexOf(a),e=!1;-1<d&&(c.splice(d,1),e=!0);if(e&&0===c.length){this.pF(this.oc[b]);break}}},Hr:function(){for(var a=0;a<this.size;a++)this.pF(this.oc[a])},
pF:function(a){a.Hn=null;a.$q=!1;$(a.ah).removeAttr("style").removeClass();$(a.Sv).removeAttr("style").removeClass();c(a.ah);a.ah.getContext("2d").clearRect(0,0,a.ah.width,a.ah.height);a.Ii=[]},ZW:function(a,b,c){a=this.Ru(a,c,this.wo);_.isNull(b)&&(b=a.Sv);a.Sv=a.ah;a.ah=b}};f.prototype={Bk:!1,VJ:function(){},init:function(){var a=b.innerWidth,c=b.innerHeight;this.oc=new e(3);this.Dn=new e(3);this.xh=this.al(a,c,1);this.rk=1},Ly:function(){},Zj:function(a){return this.Dn.Zj(a,this.rk,this.wo)},Cw:function(a,
b){this.rk=a;this.wo=b},Oy:function(){this.xh.getAttribute("style");this.xh.removeAttribute("style")},rw:function(a,b){this.oc.ZW(a,b,this.rk)},Io:function(a){this.oc.Io(a);this.Dn.Io(a)},Hr:function(){this.oc.Hr();this.Dn.Hr()},vn:function(a,c,d){var e=$(a);c=Math.floor(c);d=Math.floor(d);var f=parseInt(a.style.width,10),g=parseInt(a.style.height,10),p=""===a.style.width||1<Math.abs(f-c),g=""===a.style.height||1<Math.abs(g-d),f=.01<Math.abs(a.width/f-b.utils.getCanvasMultiplier());if(p||g||f)p=b.utils.getCanvasMultiplier(),
f=Math.floor(d*p),a.setAttribute("width",Math.floor(c*p)),a.setAttribute("height",f),e.css("width",c),e.css("height",d)},al:function(a,b,c,d){if("undefined"===typeof d||null===d)d=document.createElement("canvas");this.vn(d,a,b);return"undefined"===typeof d.getContext("2d")?null:d},jN:function(a,b,c,d){var e=1,f=null,g=a;if(1>=a*c||1>=b*c)f=this.al(1,1,1);if(4E6>a*b)return this.al(a,b,c);var u=a/b;64E6<a*b&&(b=Math.sqrt(64E6/u),e=u*b/a,a=u*b);u=null;for("undefined"===typeof d&&(d=.25);null===f;){var u=
this.al(Math.ceil(a*e),Math.ceil(b*e),c,u),q=u.getContext("2d");q.fillStyle="white";q.fillRect(u.width-1,u.height-1,1,1);q=!(1>window.devicePixelRatio)&&(u.width<parseFloat(u.style.width)||u.height<parseFloat(u.style.height));if(null!==u&&0<this.oN(u)&&!q)f=u;else if(e-=d,0>=e)return console.error("No canvas could be created"),null}1>e&&(a="scale("+g/parseFloat(f.style.width)+")",$(f).css({transform:a,"transform-origin":"top left","ms-transform":a,"ms-transform-origin":"top left","-moz-transform":a,
"-moz-transform-origin":"top left","-webkit-transform-origin":"top left","-webkit-transform":a,"-o-transform":a,"-o-transform-origin":"top left"}));$(f).css("position","absolute");f.getContext("2d").clearRect(f.width-1,f.height-1,1,1);return f},oN:function(a){return a.getContext("2d").getImageData(a.width-1,a.height-1,1,1).data[3]},sq:function(a,b,c){if(!a)throw Error("Canvas not defined");b=b||a.width;c=c||a.height;a.getContext("2d").clearRect(0,0,b,c)},WG:function(a,c,d,e,f,g){if(a!==this.xh)throw Error("Canvas drawing error");
var p=this.oc.Ru(c,this.rk,this.wo);a=p.ah;this.vn(a,parseFloat(this.xh.style.width),parseFloat(this.xh.style.height));p=p.Ii.sort(function(a,b){return a-b});c<=p[0]&&(a.width=a.width);c=b.utils.getCanvasMultiplier();d=b.Bd(d,e,g,f,!0,c);e=a.getContext("2d");e.save();e.transform(d.m_a,d.m_b,d.m_c,d.m_d,d.m_h,d.m_v);e.fillStyle="white";e.fillRect(0,0,g.width,g.height);e.restore();e.drawImage(this.xh,0,0);this.Oy();return a},Wo:function(a,c,d,e,f,r,p){if(p)return g.Wo.apply(g,arguments);this.vn(this.xh,
b.innerWidth,b.innerHeight);var u=b.utils.getCanvasMultiplier(),u=b.Bd(c,d,a,e,!0,u),q=this.xh.getContext("2d");q.restore();q.save();q.transform(u.m_a,u.m_b,u.m_c,u.m_d,u.m_h,u.m_v);b.utils.canvasClipBug||(q.beginPath(),q.rect(0,0,a.width,a.height),q.clip());return{canvas:this.xh,ctx:q,t:u}},kq:function(a,b){var c=document.getElementById("pageContainer"+b);if(!c)return null;var d=$(a);d.css({"z-index":"20"});d.addClass("hacc canvas"+b);return c.parentNode},wN:function(a,b,c,d){a=d?this.Dn.Ru(a,this.rk,
this.wo):this.Dn.ZQ(a,this.rk,this.wo);if(!a)return null;d=d?a.ah:a.Sv;this.vn(d,b,c);return d},Xo:function(a,c,d,e,f,g,p){g=a[0].getContext("2d");g.restore();g.save();var u=b.utils.getCanvasMultiplier();if(1===p||3===p)c={width:c.height,height:c.width};d=b.Bd(d,(e+p||0)%4,c,f,!0,u);g.setTransform(d.m_a,d.m_b,d.m_c,d.m_d,d.m_h,d.m_v);b.utils.canvasClipBug||(g.beginPath(),g.rect(0,0,c.width,c.height),g.clip());return a[0]},Xj:function(a,b,c,d,e,f,g){a=$("#pageContainer"+a).parent().find(".auxiliary");
return 0===a.length?null:this.Xo(a,b,c,d,e,f,g)},Mn:function(a,c,d,e,f){var g=b.innerWidth,p=this.wN(a,g,b.innerHeight,f);if(!p)return null;a=$(p);a.addClass("auxiliary");a.css({"z-index":"30",position:"absolute",display:""});f=p.getContext("2d");d*=parseFloat(p.style.width)/g;g=b.utils.getCanvasMultiplier();c=b.Bd(d,e,c,null,!0,g);f.transform(c.m_a,c.m_b,c.m_c,c.m_d,c.m_h,c.m_v);return a[0]},Yt:function(a,b,d,e){var f=document.getElementById("pageContainer"+a);if(!f)return null;f=$(f).parent();0<
f.find(".auxiliary").length?(b=this.Dn.Ru(a,this.rk,this.wo),d=b.Ii.sort(function(a,b){return a-b}),a<=d[0]&&c(b.ah)):(a=this.Mn(a,b,d,e,!0),f.append(a))},fw:function(a,c,d){if(a=document.querySelector("#pageContainer"+a).parentNode.querySelector(".auxiliary"))b.o.Aa.sq(a,d.width,d.height),d=a.getContext("2d"),d.setTransform(1,0,0,1,0,0),d.drawImage(c,0,0)},BH:function(a){return $("#pageContainer"+a).parent()},sA:function(a){return $("#pageWidgetContainer"+a)}};var d=new f,g=new f;$.extend(g,{Bk:!0,
VJ:function(a){this.Bk=1<a},init:function(){this.tl={}},Ly:function(a){this.tl[a]&&(this.tl[a].width=0,this.tl[a].height=0);delete this.tl[a]},Zj:function(a){return a},Cw:function(){},Oy:function(){},rw:function(){},Io:function(){},Hr:function(){},sq:function(a){if(!a)throw Error("Canvas not defined");var b=a.getContext("2d");b.save();b.setTransform(1,0,0,1,0,0);b.clearRect(0,0,a.width,a.height);b.restore()},WG:function(a){return a},Wo:function(a,c,d,e,f,g){var p=!1;if(d===b.o.Sa.Xe||d===b.o.Sa.fg)p=
!0;(e=!_.isUndefined(g))?(f=(p?g.y2-g.y1:g.x2-g.x1)*c,p=(p?g.x2-g.x1:g.y2-g.y1)*c):(f=p?a.height*c:a.width*c,p=p?a.width*c:a.height*c);var u,p=this.al(f,p,c);u=parseFloat(p.style.width);var q=b.utils.getCanvasMultiplier();a=b.Bd(u/f*c,d,e?g:a,{x:0,y:0},!0,q);c=p.getContext("2d");b.zz||(p.style.backgroundColor="white");c.transform(a.m_a,a.m_b,a.m_c,a.m_d,a.m_h,a.m_v);return{canvas:p,ctx:c,t:a}},kq:function(a,b){var c=document.getElementById("pageContainer"+b);if(!c)return null;$(c).find(".canvas"+
b).remove();var d=a.S_,e=$(a);e.css({"z-index":"20",position:"absolute"});e.addClass("hacc canvas"+b);_.isUndefined(d)||e.css("top",function(a){return a*d});$(c).append(e);return c},UD:function(a){return{width:a.x2-a.x1,height:a.y2-a.y1}},wE:function(a,c){var d=!1;if(c===b.o.Sa.Xe||c===b.o.Sa.fg)d=!0;return{width:d?a.height:a.width,height:d?a.width:a.height}},Xo:function(a,c,d,e,f,g,p){if(g){var u=a[0].getContext("2d");u.restore();u.save();var q=b.utils.getCanvasMultiplier(),v=this.wE(this.UD(g),
e),w=Math.round(v.width*d),v=Math.round(v.height*d),A=Math.round(parseFloat(a.css("width"))),B=Math.round(parseFloat(a.css("height")));a.css({left:f.x,top:f.y});(1<Math.abs(A-w)||1<Math.abs(B-v))&&a.attr({width:w*q,height:v*q}).css({width:w,height:v});if(g&&p){f=c.width;w=c.height;if(1===p||3===p)f=c.height,w=c.width;c=b.Bd(1,p,{width:f,height:w},null,!1).inverse();g=b.utils.normalizeRect(c.W({x:g.x1,y:g.y1}),c.W({x:g.x2,y:g.y2}))}d=b.Bd(d,(e+(p||0))%4,g,null,!0,q);u.setTransform(d.m_a,d.m_b,d.m_c,
d.m_d,d.m_h,d.m_v)}else a.css({top:"",left:""});return a[0]},Xj:function(a,b,c,d,e,f,g){a=$("#pageContainer"+a).find(".auxiliary");return 0<a.length?this.Xo(a,b,c,d,e,f,g):null},Mn:function(a,c,d,e,f,g){var p;f?(p=this.UD(f),f=p.width,p=p.height):(f=c.width,p=c.height);p=this.wE({width:f,height:p},e);f=p.width*d;var u=p.height*d;!g&&this.tl[a]?(p=this.tl[a],this.vn(p,f,u),p.getContext("2d").setTransform(1,0,0,1,0,0)):p=this.jN(f,u,d,.2);g||(this.tl[a]=p);a=$(p);a.addClass("auxiliary");a.css({"z-index":"30",
position:"absolute"});a=p.getContext("2d");a.clearRect(0,0,p.width,p.height);c=b.Bd(parseFloat(p.style.width)/f*d,e,c);a.transform(c.m_a,c.m_b,c.m_c,c.m_d,c.m_h,c.m_v);return p},Yt:function(a,b,c,d,e){var f=document.getElementById("pageContainer"+a);if(!f)return null;f=$(f);0<f.find(".auxiliary").length||(a=this.Mn(a,b,c,d,e,!0),f.prepend(a))},fw:function(a,c){var d=document.querySelector("#pageContainer"+a+" .auxiliary");d&&(b.o.Aa.sq(d),d.width=c.width,d.height=c.height,d.style.width=c.style.width,
d.style.height=c.style.height,d.style.top=c.style.top,d.style.left=c.style.left,d=d.getContext("2d"),d.setTransform(1,0,0,1,0,0),d.drawImage(c,0,0))},BH:function(a){return $("#pageContainer"+a)},sA:function(a){return $("#pageWidgetContainer"+a)}});b.o.JM=function(c){if(c===a.Is)b.o.Aa=d;else if(c===a.ux)b.o.Aa=g;else throw Error("Invalid Canvas Manager type");b.o.GF=c;b.o.Aa.init()};b.o.Hm=a;b.o.GF=a.ux;b.o.Aa=g;b.o.Aa.init()})(window);
(function(b){function f(a,d,f,k){for(var h=d.password||d.p,l=d.type.toUpperCase(),n=e.length,m,r=0;r<n;r++)e[r].done&&(m=e[r]);!m&&4>n&&(m={done:!1,worker:new Worker(b.o.wi()+"DecryptWorker.js"),callback:k},e[n]=m,m.worker.addEventListener("message",function(a){if(a.data.error)throw d.error&&d.error(a.data.error),Error(a.data.error);m.callback(a.data);0<c.length?(a=c[0],c.shift(),m.done=!1,m.callback=a.callback,m.worker.postMessage({data:a.data,password:a.password,partName:a.dm,type:l})):(m.callback=
null,m.done=!0)}));m?(m.done=!1,m.callback=k,m.worker.postMessage({data:a,password:h,partName:f,type:l})):c.push({data:a,password:h,dm:f,type:l,callback:k})}var e=[],c=[];b.o=b.o||{};b.o.Jh=b.o.Jh||{};b.o.Jh.decrypt=function(a,c,e,k){a=b.Yj(a);f(a,c,e,k)};b.o.Jh.OF=function(a,c,e){a=b.Yj(a);var f=c.password||c.p;switch(c.type.toUpperCase()){case "AES":a=b.NF(a,f,e);break;default:a=b.NF(a,f,e)}if(a.error)throw c.error&&c.error(a.error),Error(a.error);return a}})(window);
(function(b){b.NF=function(b,e,c){for(var a=[],d=0;16>d;++d){a[d]=d;d<e.length&&(a[d]|=e.charCodeAt(d));var g=c.length+d-16;0<=g&&(a[d]|=c.charCodeAt(g))}e=[];for(c=0;16>c;++c)e.push(b.charCodeAt(c));b=b.slice(16);a=forge.aes.startDecrypting(a,e);a.update(forge.util.createBuffer(b));return a.finish()?a.output.data:{error:"Bad password or file corrupt"}}})(self);
(function(b){var f,e,c,a={},d=b.o;d.$V=function(a){a.lastIndexOf("/")!==a.length-1&&(a+="/");e=a};d.Xz=function(){return e||d.wi()+"office/"};d.ZV=function(a){a.lastIndexOf("/")!==a.length-1&&(a+="/");c=a};d.vR=function(){return c||d.wi()+"office/"};d.Jz=function(){return a.nq};d.fJ=function(e,k,h){_.isUndefined(h)&&(h={});d.Cf().xr&&e===d.Jz()||(h.workerId="office_pnacl_module",h.pnaclWorkerPath=window.o.Xz()+(b.Gw?"WebOfficeWorkerSubzero.nmf":"WebOfficeWorker.nmf"),h.emsWorkerPath=window.o.Xz()+
"OfficeWorker.js",h.wC=a,c&&(h.pdfWorkerPath=c),f=d.hJ(e,k,h))};d.ZU=function(a){f=Promise.resolve(a);d.Ew({office:null})};d.$H=function(){};d.TH=function(a,c,e){f||d.Cf().xr||d.fJ(a,c);d.Ou()||d.bK(e);e=e||d.Ou();if(!d.Cf().xr){var l;a=Promise.all([d.bH(e),f]).then(function(a){var c=a[0],e=a[1];return new Promise(function(a,f){d.wO(function(){f(new b.Yk("The worker has encountered an error",b.utils.ie?"error.EmsWorkerErrorIE":"error.EmsWorkerError"))});l=new d.dM(e,d.MR(),{l:c});l.vC.then(function(){a(l)},
function(a){f(a)})})});d.Ew({office:a})}return d.Cf().xr}})("undefined"===typeof window?this:window);
(function(b){b.GetPageMatrix=b.Bd;b.CoreControls=function(){};b.CoreControls.setWorkerPath=b.o.EW;b.CoreControls.getWorkerPath=b.o.wi;b.CoreControls.setPDFWorkerPath=b.o.cW;b.CoreControls.getPDFWorkerPath=b.o.Yz;b.CoreControls.setPDFResourcePath=b.o.bW;b.CoreControls.getPDFResourcePath=b.o.Xu;b.CoreControls.setPDFAsmPath=b.o.aW;b.CoreControls.getPDFAsmPath=b.o.xR;b.CoreControls.setLocalWorkerPath=b.o.TV;b.CoreControls.getLocalWorkerPath=b.o.Uz;b.CoreControls.setOfficeWorkerPath=b.o.$V;b.CoreControls.getOfficeWorkerPath=
b.o.Xz;b.CoreControls.setOfficeResourcePath=b.o.ZV;b.CoreControls.getOfficeResourcePath=b.o.vR;b.CoreControls.setResourcesPath=b.o.pW;b.CoreControls.getResourcesPath=b.o.Vq;b.CoreControls.setAdvancedImageScaling=b.o.uV;b.CoreControls.setProgressiveTime=b.o.mW;b.CoreControls.preloadPDFWorker=b.o.gJ;b.CoreControls.initPDFWorkerTransports=b.o.iv;b.CoreControls.forceBackendType=b.o.xQ;b.CoreControls.getDefaultBackendType=b.o.Lz;b.CoreControls.getDefaultPdfBackendType=b.o.Lz;b.CoreControls.getCurrentPDFBackendType=
b.o.Kz;b.CoreControls.getCurrentOfficeBackendType=b.o.Jz;b.CoreControls.resetWorker=b.o.$U;b.CoreControls.resetOfficeWorker=b.o.ZU;b.CoreControls.isDemoMode=b.o.$H;b.CoreControls.setEmscriptenHeapSize=b.o.EV;b.CoreControls.setCustomFontURL=b.o.ww;b.CoreControls.disableEmbeddedJavaScript=b.o.GP;b.CoreControls.enableSubzero=b.o.hQ;b.CoreControls.isSubzeroEnabled=b.o.gI;b.CoreControls.enableFullPDF=b.o.fQ;b.CoreControls.isFullPDFEnabled=b.o.Bi;b.CoreControls.preloadOfficeWorker=b.o.fJ;b.CoreControls.initOfficeWorkerTransports=
b.o.TH;b.CoreControls.setWorkerTransportPromise=b.o.Ew;b.CoreControls.BlackBoxAnnotationManager=b.o.Fm;b.CoreControls.BlackBoxAnnotationManager.prototype.initiateCollaboration=b.o.Fm.prototype.SS;b.CoreControls.BlackBoxAnnotationManager.prototype.disableCollaboration=b.o.Fm.prototype.ez;b.CoreControls.BlackBoxAnnotationManager.prototype.preloadAnnotations=b.o.Fm.prototype.AU;b.XODText=XODText;b.XODText.ResultCode=XODText.kc;b.XODText.ResultCode.e_done=XODText.kc.Al;b.XODText.ResultCode.e_page=XODText.kc.wu;
b.XODText.ResultCode.e_found=XODText.kc.Aq;b.XODText.Quad=XODText.ab;b.XODText.Quad.prototype.getPoints=XODText.ab.prototype.mh;b.XODText.Quad.prototype.getNormalizedPoints=XODText.ab.prototype.uR;b.XODText.Matrix2D=XODText.Matrix2D;b.XODText.Matrix2D.prototype.initMatrix=XODText.Matrix2D.prototype.initMatrix;b.XODText.Matrix2D.prototype.initCoordinates=XODText.Matrix2D.prototype.Da;b.XODText.Matrix2D.prototype.mult=XODText.Matrix2D.prototype.W;b.XODText.Point2D=XODText.Cd;b.XODText.SelectionInfo=
XODText.we;b.XODText.SelectionInfo.prototype.parseFromOld=XODText.we.prototype.Dr;b.CoreControls.Encryption=b.o.Jh;b.CoreControls.Encryption.decrypt=b.o.Jh.decrypt;b.CoreControls.Encryption.decryptSynchronous=b.o.Jh.OF;b.CoreControls.PartRetrievers=function(){};b.CoreControls.PartRetrievers.PartRetriever=b.o.V.lf;b.CoreControls.PartRetrievers.PartRetriever.prototype.setErrorCallback=b.o.V.lf.prototype.FV;b.CoreControls.PartRetrievers.PartRetriever.prototype.setCustomHeaders=b.o.V.lf.prototype.om;
b.CoreControls.PartRetrievers.PartRetriever.prototype.setWithCredentials=b.o.V.lf.prototype.Sr;b.CoreControls.PartRetrievers.CacheHinting=b.o.V.dj;b.CoreControls.PartRetrievers.CacheHinting.NEVER_CACHE=b.o.V.dj.xs;b.CoreControls.PartRetrievers.CacheHinting.CACHE=b.o.V.dj.DC;b.CoreControls.PartRetrievers.CacheHinting.NO_HINT=b.o.V.dj.WL;b.CoreControls.PartRetrievers.LocalPartRetriever=b.o.V.KC;b.CoreControls.PartRetrievers.HttpPartRetriever=b.o.V.Kk;b.CoreControls.PartRetrievers.HttpPartRetriever.prototype.requestDocument=
b.o.V.lf.prototype.hm;b.CoreControls.PartRetrievers.HttpPartRetriever.prototype.request=b.o.V.lf.prototype.request;b.CoreControls.PartRetrievers.ExternalHttpPartRetriever=b.o.V.ox;b.CoreControls.PartRetrievers.ExternalPdfPartRetriever=b.o.V.ts;b.CoreControls.PartRetrievers.ExternalPdfPartRetriever.prototype.setCustomHeaders=b.o.V.ts.prototype.om;b.CoreControls.PartRetrievers.ExternalPdfPartRetriever.prototype.getFileData=b.o.V.ts.prototype.getFileData;b.CoreControls.PartRetrievers.ArrayBufferPdfPartRetriever=
b.o.V.qL;b.CoreControls.PartRetrievers.LocalPdfPartRetriever=b.o.V.TL;b.CoreControls.PartRetrievers.StreamingPartRetriever=b.o.V.XC;b.CoreControls.PartRetrievers.RangeStreamingPartRetriever=b.o.V.sM;b.CoreControls.PartRetrievers.BlackBoxPartRetriever=b.o.V.ls;b.CoreControls.PartRetrievers.BlackBoxPartRetriever.prototype.setCustomHeaders=b.o.V.ls.prototype.om;b.CoreControls.PartRetrievers.BlackBoxPartRetriever.prototype.getFileData=b.o.V.ls.prototype.getFileData;b.CoreControls.PartRetrievers.BlackBoxPartRetriever.prototype.setWithCredentials=
b.o.V.ls.prototype.Sr;b.CoreControls.PartRetrievers.WebDBPartRetriever=b.o.V.Ip;b.CoreControls.PartRetrievers.AndroidContentPartRetriever=b.o.V.pL;b.CoreControls.PartRetrievers.AzurePartRetriever=b.o.V.tL;b.CoreControls.PartRetrievers.IOSPartRetriever=b.o.V.xp;b.CoreControls.PartRetrievers.IOSPartRetriever.partSuccess=b.o.V.xp.nB;b.CoreControls.PartRetrievers.IOSPartRetriever.partFail=b.o.V.xp.mB;b.CoreControls.PartRetrievers.WinRTPartRetriever=b.o.V.Jp;b.CoreControls.PartRetrievers.WinRTPartRetriever.partSuccess=
b.o.V.Jp.nB;b.CoreControls.PartRetrievers.WinRTPartRetriever.partFail=b.o.V.Jp.mB;b.CoreControls.CanvasMode=b.o.Hm;b.CoreControls.CanvasMode.ViewportCanvas=b.o.Hm.Is;b.CoreControls.CanvasMode.PageCanvas=b.o.Hm.ux;b.CoreControls.SetCanvasMode=b.o.JM;b.CoreControls.Bookmark=b.o.df;b.CoreControls.Bookmark.prototype.getName=b.o.df.prototype.getName;b.CoreControls.Bookmark.prototype.getVPos=b.o.df.prototype.lS;b.CoreControls.Bookmark.prototype.getHPos=b.o.df.prototype.fR;b.CoreControls.Bookmark.prototype.getPageNumber=
b.o.df.prototype.Hb;b.CoreControls.Bookmark.prototype.getURL=b.o.df.prototype.kS;b.CoreControls.Bookmark.prototype.getParent=b.o.df.prototype.getParent;b.CoreControls.Bookmark.prototype.getChildren=b.o.df.prototype.OG;b.CoreControls.Bookmark.prototype.isValid=b.o.df.prototype.isValid;b.CoreControls.BaseDocument=b.o.cj;b.CoreControls.BaseDocument.prototype.calculateBoundingBox=b.o.cj.prototype.Fn;b.CoreControls.BaseDocument.prototype.addPage=b.o.cj.prototype.ZN;b.CoreControls.BaseDocument.prototype.getPage=
b.o.cj.prototype.ho;b.PageInfo=b.Nk;b.PageInfo.prototype.setFromPageData=b.Nk.prototype.aK;b.CoreControls.Document=b.o.Document;b.CoreControls.Document.registerDocumentType=b.o.Document.Ir;b.CoreControls.Document.unregisterDocumentType=b.o.Document.lX;b.CoreControls.Document.prototype.getType=b.o.Document.prototype.oA;b.CoreControls.Document.prototype.isWebViewerServerDocument=b.o.Document.prototype.rg;b.CoreControls.Document.prototype.getMetadata=b.o.Document.prototype.getMetadata;b.CoreControls.Document.prototype.getBookmarks=
b.o.Document.prototype.IG;b.CoreControls.Document.prototype.getLayers=b.o.Document.prototype.SZ;b.CoreControls.Document.prototype.getLinks=b.o.Document.prototype.eo;b.CoreControls.Document.prototype.loadThumbnailAsync=b.o.Document.prototype.WA;b.CoreControls.Document.prototype.includesThumbnails=b.o.Document.prototype.fk;b.CoreControls.Document.prototype.loadPageText=b.o.Document.prototype.ET;b.CoreControls.Document.prototype.refreshTextData=b.o.Document.prototype.tJ;b.CoreControls.Document.prototype.getTextPosition=
b.o.Document.prototype.cS;b.CoreControls.Document.prototype.extractXFDF=b.o.Document.prototype.uz;b.CoreControls.Document.prototype.loadCanvasAsync=b.o.Document.prototype.yv;b.CoreControls.Document.prototype.pauseLoadCanvas=b.o.Document.prototype.Yv;b.CoreControls.Document.prototype.resumeLoadCanvas=b.o.Document.prototype.qw;b.CoreControls.Document.prototype.cancelLoadCanvas=b.o.Document.prototype.$h;b.CoreControls.Document.prototype.cancelLoadThumbnail=b.o.Document.prototype.Lj;b.CoreControls.Document.prototype.unloadCanvasResources=
b.o.Document.prototype.cp;b.CoreControls.Document.prototype.getPageInfo=b.o.Document.prototype.fc;b.CoreControls.Document.prototype.getPageMatrix=b.o.Document.prototype.Bc;b.CoreControls.Document.prototype.getPageCount=b.o.Document.prototype.vb;b.CoreControls.Document.prototype.getPDFCoordinates=b.o.Document.prototype.Ll;b.CoreControls.Document.prototype.getXODCoordinates=b.o.Document.prototype.gv;b.CoreControls.Document.prototype.getViewerCoordinates=b.o.Document.prototype.fv;b.CoreControls.Document.prototype.loadAsync=
b.o.Document.prototype.mr;b.CoreControls.Document.prototype.unloadResources=b.o.Document.prototype.Kb;b.CoreControls.Document.prototype.initOfflineDB=b.o.Document.prototype.Ol;b.CoreControls.Document.prototype.storeOffline=b.o.Document.prototype.ap;b.CoreControls.Document.prototype.isDownloaded=b.o.Document.prototype.gk;b.CoreControls.Document.prototype.getOfflineModeEnabled=b.o.Document.prototype.fo;b.CoreControls.Document.prototype.setOfflineModeEnabled=b.o.Document.prototype.Vo;b.CoreControls.Document.prototype.cancelOfflineModeDownload=
b.o.Document.prototype.Gn;b.CoreControls.Document.prototype.getPrintablePDF=b.o.Document.prototype.ko;b.CoreControls.Document.prototype.getDownloadLink=b.o.Document.prototype.Kq;b.CoreControls.Document.prototype.submitRedactions=b.o.Document.prototype.Ur;b.CoreControls.Document.prototype.getFileData=b.o.Document.prototype.getFileData;b.CoreControls.Document.prototype.onJSCompletion=b.o.Document.prototype.eU;b.CoreControls.Document.prototype.insertPages=b.o.Document.prototype.Ai;b.CoreControls.Document.prototype.getPDFDoc=
b.o.Document.prototype.kg;b.CoreControls.Document.prototype.getLayersArray=b.o.Document.prototype.pi;b.CoreControls.Document.prototype.setLayersArray=b.o.Document.prototype.qm;b.CoreControls.Document.prototype.setOverprintPreviewMode=b.o.Document.prototype.Aw;b.CoreControls.Document.prototype.extractPDFNetLayersContext=b.o.Document.prototype.li;b.CoreControls.Document.prototype.insertBlankPages=b.o.Document.prototype.ar;b.CoreControls.Document.prototype.removePages=b.o.Document.prototype.Ri;b.CoreControls.Document.prototype.movePages=
b.o.Document.prototype.jk;b.CoreControls.Document.prototype.rotatePages=b.o.Document.prototype.Vi;b.CoreControls.Document.prototype.extractPages=b.o.Document.prototype.bh;b.CoreControls.Document.prototype.cropPages=b.o.Document.prototype.gi;b.CoreControls.Document.prototype.print=b.o.Document.prototype.print;b.CoreControls.Document.prototype.documentCompletePromise=b.o.Document.prototype.bc;b.CoreControls.Document.prototype.setWatermark=b.o.Document.prototype.um;b.CoreControls.Document.prototype.requirePage=
b.o.Document.prototype.im;b.CoreControls.Document.prototype.supportsExtraSelectorPositioning=b.o.Document.prototype.xk;b.CoreControls.Document.prototype.getOfficeDocInfo=b.o.Document.prototype.TZ;b.CoreControls.Document.prototype.getOfficeResources=b.o.Document.prototype.UZ;b.CoreControls.Document.prototype.enableColorSeparations=b.o.Document.prototype.yu;b.CoreControls.Document.prototype.getColorSeparations=b.o.Document.prototype.Nu;b.CoreControls.Document.prototype.enableSeparation=b.o.Document.prototype.zu;
b.CoreControls.PageRotation=b.o.Sa;b.CoreControls.PageRotation.e_0=b.o.Sa.ki;b.CoreControls.PageRotation.e_90=b.o.Sa.Xe;b.CoreControls.PageRotation.e_180=b.o.Sa.zq;b.CoreControls.PageRotation.e_270=b.o.Sa.fg;b.CoreControls.OverprintPreviewMode=b.o.Ap;b.CoreControls.OverprintPreviewMode.OFF=b.o.Ap.YL;b.CoreControls.OverprintPreviewMode.ON=b.o.Ap.$L;b.CoreControls.OverprintPreviewMode.PDFX_ON=b.o.Ap.qM;b.CoreControls.SaveOptions=b.o.Tk;b.CoreControls.SaveOptions.INCREMENTAL=b.o.Tk.NL;b.CoreControls.SaveOptions.REMOVE_UNUSED=
b.o.Tk.rM;b.CoreControls.SaveOptions.HEX_STRINGS=b.o.Tk.IL;b.CoreControls.SaveOptions.OMIT_XREF=b.o.Tk.ZL;b.CoreControls.SaveOptions.LINEARIZED=b.o.Tk.SL;b.CoreControls.SaveOptions.COMPATIBILITY=b.o.Tk.uL;b.CoreControls.DocumentViewer=b.o.aa;b.CoreControls.DocumentViewer.prototype.loadAsync=b.o.aa.prototype.mr;b.CoreControls.DocumentViewer.prototype.dispose=b.o.aa.prototype.bd;b.CoreControls.DocumentViewer.prototype.FitMode=function(){};b.CoreControls.DocumentViewer.prototype.FitMode.FitWidth=b.o.aa.prototype.Lg.IC;
b.CoreControls.DocumentViewer.prototype.FitMode.FitPage=b.o.aa.prototype.Lg.rx;b.CoreControls.DocumentViewer.prototype.FitMode.Zoom=b.o.aa.prototype.Lg.Zoom;b.CoreControls.DocumentViewer.prototype.displayLastPage=b.o.aa.prototype.MP;b.CoreControls.DocumentViewer.prototype.displayFirstPage=b.o.aa.prototype.LP;b.CoreControls.DocumentViewer.prototype.setCurrentPage=b.o.aa.prototype.Je;b.CoreControls.DocumentViewer.prototype.getCurrentPage=b.o.aa.prototype.Hl;b.CoreControls.DocumentViewer.prototype.setRightToLeftPages=
b.o.aa.prototype.qW;b.CoreControls.DocumentViewer.prototype.getRightToLeftPages=b.o.aa.prototype.hA;b.CoreControls.DocumentViewer.prototype.getZoom=b.o.aa.prototype.Ze;b.CoreControls.DocumentViewer.prototype.getPageCount=b.o.aa.prototype.vb;b.CoreControls.DocumentViewer.prototype.setFitMode=b.o.aa.prototype.RB;b.CoreControls.DocumentViewer.prototype.getFitMode=b.o.aa.prototype.aR;b.CoreControls.DocumentViewer.prototype.zoomTo=b.o.aa.prototype.Xw;b.CoreControls.DocumentViewer.prototype.zoomToMouse=
b.o.aa.prototype.oL;b.CoreControls.DocumentViewer.prototype.setToolMode=b.o.aa.prototype.YB;b.CoreControls.DocumentViewer.prototype.getToolMode=b.o.aa.prototype.dv;b.CoreControls.DocumentViewer.prototype.getToolModeMap=b.o.aa.prototype.gS;b.CoreControls.DocumentViewer.prototype.getTool=b.o.aa.prototype.cv;b.CoreControls.DocumentViewer.prototype.rotateClockwise=b.o.aa.prototype.eV;b.CoreControls.DocumentViewer.prototype.rotateCounterClockwise=b.o.aa.prototype.fV;b.CoreControls.DocumentViewer.prototype.textSearchInit=
b.o.aa.prototype.kC;b.CoreControls.DocumentViewer.prototype.SearchMode=function(){};b.CoreControls.DocumentViewer.prototype.SearchMode.e_case_sensitive=XODText.ib.dG;b.CoreControls.DocumentViewer.prototype.SearchMode.e_whole_word=XODText.ib.hG;b.CoreControls.DocumentViewer.prototype.SearchMode.e_search_up=XODText.ib.oz;b.CoreControls.DocumentViewer.prototype.SearchMode.e_page_stop=XODText.ib.fG;b.CoreControls.DocumentViewer.prototype.SearchMode.e_highlight=XODText.ib.eG;b.CoreControls.DocumentViewer.prototype.SearchMode.e_ambient_string=
XODText.ib.cG;b.CoreControls.DocumentViewer.prototype.SearchMode.e_wild_card=XODText.ib.iG;b.CoreControls.DocumentViewer.prototype.SearchMode.e_regex=XODText.ib.gG;b.CoreControls.DocumentViewer.prototype.displayBookmark=b.o.aa.prototype.KP;b.CoreControls.DocumentViewer.prototype.displayPageLocation=b.o.aa.prototype.Pn;b.CoreControls.DocumentViewer.prototype.getDocument=b.o.aa.prototype.getDocument;b.CoreControls.DocumentViewer.prototype.getSelectedText=b.o.aa.prototype.bv;b.CoreControls.DocumentViewer.prototype.getSelectedTextQuads=
b.o.aa.prototype.jA;b.CoreControls.DocumentViewer.prototype.setTextHighlightColor=b.o.aa.prototype.xW;b.CoreControls.DocumentViewer.prototype.setSearchHighlightColors=b.o.aa.prototype.sW;b.CoreControls.DocumentViewer.prototype.displaySearchResult=b.o.aa.prototype.gz;b.CoreControls.DocumentViewer.prototype.displayAdditionalSearchResult=b.o.aa.prototype.JP;b.CoreControls.DocumentViewer.prototype.setActiveSearchResult=b.o.aa.prototype.tV;b.CoreControls.DocumentViewer.prototype.clearSearchResults=b.o.aa.prototype.XO;
b.CoreControls.DocumentViewer.prototype.getColorSeparationsAtPoint=b.o.aa.prototype.PQ;b.CoreControls.DocumentViewer.prototype.scrollViewUpdated=b.o.aa.prototype.oV;b.CoreControls.DocumentViewer.prototype.closeDocument=b.o.aa.prototype.vF;b.CoreControls.DocumentViewer.prototype.setOptions=b.o.aa.prototype.oe;b.CoreControls.DocumentViewer.prototype.recalculateLayout=b.o.aa.prototype.nJ;b.CoreControls.DocumentViewer.prototype.refreshAll=b.o.aa.prototype.MU;b.CoreControls.DocumentViewer.prototype.refreshPage=
b.o.aa.prototype.qJ;b.CoreControls.DocumentViewer.prototype.getAnnotationsLoadedPromise=b.o.aa.prototype.HQ;b.CoreControls.DocumentViewer.prototype.printCurrentDocument=b.o.aa.prototype.M_;b.CoreControls.DocumentViewer.prototype.getRenderingPipeline=b.o.aa.prototype.oH;b.CoreControls.DocumentViewer.prototype.setWatermark=b.o.aa.prototype.um;b.CoreControls.DocumentViewer.prototype.getWatermark=b.o.aa.prototype.yH;b.CoreControls.DocumentViewer.prototype.getViewer=b.o.aa.prototype.Tc;b.CoreControls.DocumentViewer.prototype.getViewerElement=
b.o.aa.prototype.xH;b.CoreControls.DocumentViewer.prototype.setViewerElement=b.o.aa.prototype.rK;b.CoreControls.DocumentViewer.prototype.getScrollView=b.o.aa.prototype.xb;b.CoreControls.DocumentViewer.prototype.getScrollViewElement=b.o.aa.prototype.Zu;b.CoreControls.DocumentViewer.prototype.setScrollViewElement=b.o.aa.prototype.nK;b.CoreControls.RenderingPipeline=b.o.Um;b.CoreControls.RenderingPipeline.PipelineManager=b.o.Um.Dp;b.CoreControls.RenderingPipeline.PipelineManager.prototype.registerHandlers=
b.o.Um.Dp.prototype.uJ;b.CoreControls.RenderingPipeline.PipelineManager.prototype.pushChange=b.o.Um.Dp.prototype.Oi;b.CoreControls.RenderingPipeline.PipelineManager.prototype.hasPipeline=b.o.Um.Dp.prototype.xS;b.CoreControls.SetCachingLevel=b.o.Ax;b.CoreControls.SetPreRenderLevel=b.o.UC;b.CoreControls.DocumentViewer.prototype.getMargin=b.o.aa.prototype.Tu;b.CoreControls.DocumentViewer.prototype.setMargin=b.o.aa.prototype.UV;b.CoreControls.DocumentViewer.prototype.updateView=b.o.aa.prototype.zk;b.CoreControls.DocumentViewer.prototype.updateVisiblePages=
b.o.aa.prototype.fp;b.CoreControls.DocumentViewer.prototype.stopPageRender=b.o.aa.prototype.$o;b.CoreControls.DocumentViewer.prototype.setPagesPerCanvas=b.o.aa.prototype.Cw;b.CoreControls.DocumentViewer.prototype.returnCanvas=b.o.aa.prototype.rw;b.CoreControls.DocumentViewer.prototype.drawSelection=b.o.aa.prototype.mz;b.CoreControls.DocumentViewer.prototype.clearSelection=b.o.aa.prototype.uq;b.CoreControls.DocumentViewer.prototype.removeContent=b.o.aa.prototype.yh;b.CoreControls.DocumentViewer.prototype.select=
b.o.aa.prototype.select;b.CoreControls.DocumentViewer.prototype.getPageHeight=b.o.aa.prototype.fd;b.CoreControls.DocumentViewer.prototype.getPageWidth=b.o.aa.prototype.gd;b.CoreControls.DocumentViewer.prototype.setPageZoom=b.o.aa.prototype.Bw;b.CoreControls.DocumentViewer.prototype.getPageZoom=b.o.aa.prototype.kb;b.CoreControls.DocumentViewer.prototype.getRotation=b.o.aa.prototype.Qd;b.CoreControls.DocumentViewer.prototype.setRotation=b.o.aa.prototype.rW;b.CoreControls.DocumentViewer.prototype.getCompleteRotation=
b.o.aa.prototype.Pd;b.CoreControls.DocumentViewer.prototype.getPageRotations=b.o.aa.prototype.DR;b.CoreControls.DocumentViewer.prototype.setPageRotations=b.o.aa.prototype.eW;b.CoreControls.DocumentViewer.prototype.getAnnotationManager=b.o.aa.prototype.Qa;b.CoreControls.DocumentViewer.prototype.setAnnotationImportOptions=b.o.aa.prototype.xV;b.CoreControls.DocumentViewer.prototype.setInternalAnnotationsTransform=b.o.aa.prototype.MV;b.CoreControls.DocumentViewer.prototype.setPagesUpdatedInternalAnnotationsTransform=
b.o.aa.prototype.jW;b.CoreControls.DocumentViewer.prototype.setLoadAnnotationsFromVisiblePages=b.o.aa.prototype.SV;b.CoreControls.DocumentViewer.prototype.setPageVisibilityCallback=b.o.aa.prototype.iW;b.CoreControls.DocumentViewer.prototype.getDisplayModeManager=b.o.aa.prototype.$j;b.CoreControls.DocumentViewer.prototype.snapToNearest=b.o.aa.prototype.PW;b.CoreControls.DocumentViewer.prototype.setViewportRenderMode=b.o.aa.prototype.$B;b.CoreControls.DocumentViewer.prototype.getViewportRegionRect=
b.o.aa.prototype.mS;b.CoreControls.DocumentViewer.prototype.setRenderBatchSize=b.o.aa.prototype.lK;b.CoreControls.DisplayMode=b.o.zd;b.CoreControls.DisplayMode.prototype.setParameters=b.o.zd.prototype.kW;b.CoreControls.DisplayMode.prototype.isContinuous=b.o.zd.prototype.HA;b.CoreControls.DisplayMode.prototype.windowToPage=b.o.zd.prototype.Ck;b.CoreControls.DisplayMode.prototype.windowToPageNoRotate=b.o.zd.prototype.KX;b.CoreControls.DisplayMode.prototype.pageToWindow=b.o.zd.prototype.cf;b.CoreControls.DisplayMode.prototype.pageToWindowNoRotate=
b.o.zd.prototype.lU;b.CoreControls.DisplayMode.prototype.getSelectedPages=b.o.zd.prototype.av;b.CoreControls.DisplayMode.prototype.getVisiblePages=b.o.zd.prototype.Sd;b.CoreControls.DisplayMode.prototype.getPageTransform=b.o.zd.prototype.jo;b.CoreControls.DisplayMode.prototype.getPageOffset=b.o.zd.prototype.$z;b.CoreControls.DisplayMode.prototype.createPageSections=b.o.zd.prototype.pZ;b.CoreControls.DisplayMode.prototype.setCustomFunctions=b.o.zd.prototype.DV;b.CoreControls.DisplayModes=b.o.Ad;b.CoreControls.DisplayModes.Single=
b.o.Ad.VC;b.CoreControls.DisplayModes.Continuous=b.o.Ad.qp;b.CoreControls.DisplayModes.Facing=b.o.Ad.GC;b.CoreControls.DisplayModes.FacingContinuous=b.o.Ad.qx;b.CoreControls.DisplayModes.Cover=b.o.Ad.os;b.CoreControls.DisplayModes.CoverFacing=b.o.Ad.ps;b.CoreControls.DisplayModes.Custom=b.o.Ad.Qf;b.CoreControls.DisplayModeManager=b.o.tp;b.CoreControls.DisplayModeManager.prototype.setDisplayMode=b.o.tp.prototype.YJ;b.CoreControls.DisplayModeManager.prototype.getDisplayMode=b.o.tp.prototype.Vb;b.CoreControls.AnnotationManager=
b.o.ia;b.CoreControls.AnnotationManager.prototype.addAnnotation=b.o.ia.prototype.Xg;b.CoreControls.AnnotationManager.prototype.addAnnotations=b.o.ia.prototype.Yg;b.CoreControls.AnnotationManager.prototype.deleteAnnotation=b.o.ia.prototype.eg;b.CoreControls.AnnotationManager.prototype.deleteAnnotations=b.o.ia.prototype.ou;b.CoreControls.AnnotationManager.prototype.applyRedactions=b.o.ia.prototype.By;b.CoreControls.AnnotationManager.prototype.isApplyRedactionEnabled=b.o.ia.prototype.FA;b.CoreControls.AnnotationManager.prototype.isCreateRedactionEnabled=
b.o.ia.prototype.aT;b.CoreControls.AnnotationManager.prototype.isAnnotationRedactable=b.o.ia.prototype.ZS;b.CoreControls.AnnotationManager.prototype.enableRedaction=b.o.ia.prototype.gQ;b.CoreControls.AnnotationManager.prototype.selectAnnotation=b.o.ia.prototype.jm;b.CoreControls.AnnotationManager.prototype.selectAnnotations=b.o.ia.prototype.JB;b.CoreControls.AnnotationManager.prototype.deselectAnnotation=b.o.ia.prototype.On;b.CoreControls.AnnotationManager.prototype.deselectAllAnnotations=b.o.ia.prototype.Nd;
b.CoreControls.AnnotationManager.prototype.isAnnotationSelected=b.o.ia.prototype.Pl;b.CoreControls.AnnotationManager.prototype.getSelectedAnnotations=b.o.ia.prototype.Ee;b.CoreControls.AnnotationManager.prototype.updateCopiedAnnotations=b.o.ia.prototype.qX;b.CoreControls.AnnotationManager.prototype.pasteCopiedAnnotations=b.o.ia.prototype.uU;b.CoreControls.AnnotationManager.prototype.getAnnotationCopy=b.o.ia.prototype.Ez;b.CoreControls.AnnotationManager.prototype.drawAnnotations=b.o.ia.prototype.Od;
b.CoreControls.AnnotationManager.prototype.redrawAnnotation=b.o.ia.prototype.Wb;b.CoreControls.AnnotationManager.prototype.drawAnnotationsFromList=b.o.ia.prototype.ii;b.CoreControls.AnnotationManager.prototype.updateAnnotation=b.o.ia.prototype.WK;b.CoreControls.AnnotationManager.prototype.jumpToAnnotation=b.o.ia.prototype.uT;b.CoreControls.AnnotationManager.prototype.hasAnnotation=b.o.ia.prototype.xi;b.CoreControls.AnnotationManager.prototype.getAnnotationsList=b.o.ia.prototype.Pc;b.CoreControls.AnnotationManager.prototype.setNoteContents=
b.o.ia.prototype.TB;b.CoreControls.AnnotationManager.prototype.getCurrentUser=b.o.ia.prototype.Il;b.CoreControls.AnnotationManager.prototype.setCurrentUser=b.o.ia.prototype.QB;b.CoreControls.AnnotationManager.prototype.getIsAdminUser=b.o.ia.prototype.lR;b.CoreControls.AnnotationManager.prototype.setIsAdminUser=b.o.ia.prototype.NV;b.CoreControls.AnnotationManager.prototype.setReadOnly=b.o.ia.prototype.nW;b.CoreControls.AnnotationManager.prototype.getReadOnly=b.o.ia.prototype.nH;b.CoreControls.AnnotationManager.prototype.canModify=
b.o.ia.prototype.Kd;b.CoreControls.AnnotationManager.prototype.canModifyContents=b.o.ia.prototype.Gy;b.CoreControls.AnnotationManager.prototype.setPermissionCheckCallback=b.o.ia.prototype.lW;b.CoreControls.AnnotationManager.prototype.setSubmitFormActionCallback=b.o.ia.prototype.wW;b.CoreControls.AnnotationManager.prototype.getAnnotCommand=b.o.ia.prototype.Ku;b.CoreControls.AnnotationManager.prototype.importAnnotCommand=b.o.ia.prototype.vo;b.CoreControls.AnnotationManager.prototype.exportAnnotations=
b.o.ia.prototype.Cu;b.CoreControls.AnnotationManager.prototype.importAnnotations=b.o.ia.prototype.JS;b.CoreControls.AnnotationManager.prototype.importAnnotationsAsync=b.o.ia.prototype.RH;b.CoreControls.AnnotationManager.prototype.useFreeTextEditing=b.o.ia.prototype.CX;b.CoreControls.AnnotationManager.prototype.disableFreeTextEditing=b.o.ia.prototype.HP;b.CoreControls.AnnotationManager.prototype.registerAnnotationType=b.o.ia.prototype.NU;b.CoreControls.AnnotationManager.prototype.deregisterAnnotationType=
b.o.ia.prototype.CP;b.CoreControls.AnnotationManager.prototype.getRegisteredAnnotationTypes=b.o.ia.prototype.SR;b.CoreControls.AnnotationManager.prototype.getAnnotationFromPopup=b.o.ia.prototype.FQ;b.CoreControls.AnnotationManager.prototype.getAnnotationByMouseEvent=b.o.ia.prototype.Iq;b.CoreControls.AnnotationManager.prototype.getAnnotationById=b.o.ia.prototype.Wj;b.CoreControls.AnnotationManager.prototype.getRootAnnotation=b.o.ia.prototype.Ml;b.CoreControls.AnnotationManager.prototype.createAnnotationReply=
b.o.ia.prototype.hP;b.CoreControls.AnnotationManager.prototype.hideAnnotation=b.o.ia.prototype.DS;b.CoreControls.AnnotationManager.prototype.hideAnnotations=b.o.ia.prototype.MH;b.CoreControls.AnnotationManager.prototype.showAnnotation=b.o.ia.prototype.LW;b.CoreControls.AnnotationManager.prototype.showAnnotations=b.o.ia.prototype.BK;b.CoreControls.AnnotationManager.prototype.setRedrawThrottle=b.o.ia.prototype.oW;b.CoreControls.AnnotationManager.prototype.getFieldManager=b.o.ia.prototype.ee;b.CoreControls.AnnotationManager.prototype.getEditBoxManager=
b.o.ia.prototype.Nz;b.CoreControls.AnnotationManager.prototype.setAnnotationStyles=b.o.ia.prototype.yV;b.CoreControls.AnnotationManager.prototype.setAnnotationDisplayAuthorMap=b.o.ia.prototype.UJ;b.CoreControls.AnnotationManager.prototype.getDisplayAuthor=b.o.ia.prototype.VQ;b.Actions=b.Actions;b.Actions.GoTo=b.Actions.gf;b.Actions.GoTo.Dest=b.Actions.gf.sp;b.Actions.GoToR=b.Actions.Mm;b.Actions.URI=b.Actions.oj;b.Actions.Named=b.Actions.Qm;b.Actions.JavaScript=b.Actions.Om;b.Actions.ResetForm=b.Actions.Rk;
b.Actions.SubmitForm=b.Actions.Vk;b.Actions.Hide=b.Actions.Nm;b.Annotations=b.Annotations;b.Annotations.Color=b.Annotations.Color;b.Annotations.Color.prototype.toHexString=b.Annotations.Color.prototype.toHexString;b.Annotations.Forms=b.Annotations.O;b.Annotations.Forms.FieldManager=b.Annotations.O.fj;b.Annotations.Forms.FieldManager.prototype.getField=b.Annotations.O.fj.prototype.Gb;b.Annotations.Forms.FieldManager.prototype.addField=b.Annotations.O.fj.prototype.Rt;b.Annotations.Forms.FieldManager.prototype.forEachField=
b.Annotations.O.fj.prototype.Zn;b.Annotations.Forms.FieldManager.prototype.setAlertHandler=b.Annotations.O.fj.prototype.vV;b.Annotations.Forms.Field=b.Annotations.O.ga;b.Annotations.Forms.Field.prototype.getValue=b.Annotations.O.ga.prototype.Va;b.Annotations.Forms.Field.prototype.setValue=b.Annotations.O.ga.prototype.yb;b.Annotations.Forms.Field.prototype.setVisible=b.Annotations.O.ga.prototype.Lf;b.Annotations.Forms.Field.prototype.on=b.Annotations.O.ga.prototype.on;b.Annotations.Forms.Field.prototype.off=
b.Annotations.O.ga.prototype.off;b.Annotations.Forms.Field.prototype.trigger=b.Annotations.O.ga.prototype.trigger;b.Annotations.Forms.Field.prototype.getActions=b.Annotations.O.ga.prototype.Vj;b.Annotations.Forms.EmbeddedJS=b.Annotations.O.nx;b.Annotations.Forms.EmbeddedJS.update=b.Annotations.O.nx.update;b.Annotations.Forms.EmbeddedJS.getFinalKeypressValue=b.Annotations.O.nx.oi;b.Annotations.HTMLAnnotation=b.Annotations.HTMLAnnotation;b.Annotations.HTMLAnnotation.prototype.addAction=b.Annotations.HTMLAnnotation.prototype.Fj;
b.Annotations.HTMLAnnotation.prototype.getActions=b.Annotations.HTMLAnnotation.prototype.Vj;b.Annotations.HTMLAnnotation.prototype.triggerAction=b.Annotations.HTMLAnnotation.prototype.Le;b.Annotations.HTMLAnnotation.prototype.getInnerElement=b.Annotations.HTMLAnnotation.prototype.aH;b.Annotations.HTMLAnnotation.prototype.getElement=b.Annotations.HTMLAnnotation.prototype.TG;b.Annotations.WidgetAnnotation=b.Annotations.WidgetAnnotation;b.Annotations.WidgetAnnotation.prototype.setValue=b.Annotations.WidgetAnnotation.prototype.yb;
b.Annotations.WidgetAnnotation.prototype.getValue=b.Annotations.WidgetAnnotation.prototype.Va;b.Annotations.WidgetAnnotation.prototype.addAction=b.Annotations.WidgetAnnotation.prototype.Fj;b.Annotations.WidgetAnnotation.prototype.getField=b.Annotations.WidgetAnnotation.prototype.Gb;b.Annotations.WidgetAnnotation.prototype.setField=b.Annotations.WidgetAnnotation.prototype.$J;b.Annotations.WidgetAnnotation.prototype.on=b.Annotations.WidgetAnnotation.prototype.on;b.Annotations.WidgetAnnotation.prototype.off=
b.Annotations.WidgetAnnotation.prototype.off;b.Annotations.WidgetAnnotation.prototype.trigger=b.Annotations.WidgetAnnotation.prototype.trigger;b.Annotations.TextWidgetAnnotation=b.Annotations.Xk;b.Annotations.ChoiceWidgetAnnotation=b.Annotations.Kg;b.Annotations.ListWidgetAnnotation=b.Annotations.gj;b.Annotations.ButtonWidgetAnnotation=b.Annotations.qc;b.Annotations.PushButtonWidgetAnnotation=b.Annotations.jj;b.Annotations.CheckButtonWidgetAnnotation=b.Annotations.Hh;b.Annotations.RadioButtonWidgetAnnotation=
b.Annotations.Pk;b.Annotations.SignatureWidgetAnnotation=b.Annotations.Tf;b.Annotations.SignatureWidgetAnnotation.prototype.createSignHereElement=b.Annotations.Tf.prototype.nP;b.Annotations.SignatureWidgetAnnotation.prototype.isSignedDigitally=b.Annotations.Tf.prototype.LA;b.Annotations.SignatureWidgetAnnotation.prototype.isSignedInitially=b.Annotations.Tf.prototype.lT;b.Annotations.Annotation=b.Annotations.Annotation;b.Annotations.Annotation.prototype.getPageNumber=b.Annotations.Annotation.prototype.Hb;
b.Annotations.Annotation.prototype.setPageNumber=b.Annotations.Annotation.prototype.fK;b.Annotations.Annotation.prototype.getX=b.Annotations.Annotation.prototype.ck;b.Annotations.Annotation.prototype.setX=b.Annotations.Annotation.prototype.sK;b.Annotations.Annotation.prototype.getY=b.Annotations.Annotation.prototype.dk;b.Annotations.Annotation.prototype.setY=b.Annotations.Annotation.prototype.tK;b.Annotations.Annotation.prototype.getTop=b.Annotations.Annotation.prototype.lo;b.Annotations.Annotation.prototype.getBottom=
b.Annotations.Annotation.prototype.JG;b.Annotations.Annotation.prototype.getLeft=b.Annotations.Annotation.prototype.co;b.Annotations.Annotation.prototype.getRight=b.Annotations.Annotation.prototype.qH;b.Annotations.Annotation.prototype.getWidth=b.Annotations.Annotation.prototype.ya;b.Annotations.Annotation.prototype.setWidth=b.Annotations.Annotation.prototype.aC;b.Annotations.Annotation.prototype.getHeight=b.Annotations.Annotation.prototype.va;b.Annotations.Annotation.prototype.setHeight=b.Annotations.Annotation.prototype.To;
b.Annotations.Annotation.prototype.getCustom=b.Annotations.Annotation.prototype.TQ;b.Annotations.Annotation.prototype.setCustom=b.Annotations.Annotation.prototype.CV;b.Annotations.Annotation.prototype.draw=b.Annotations.Annotation.prototype.draw;b.Annotations.Annotation.prototype.serialize=b.Annotations.Annotation.prototype.serialize;b.Annotations.Annotation.prototype.deserialize=b.Annotations.Annotation.prototype.deserialize;b.Annotations.Annotation.prototype.setRect=b.Annotations.Annotation.prototype.yg;
b.Annotations.Annotation.prototype.getRect=b.Annotations.Annotation.prototype.Sc;b.Annotations.Annotation.prototype.getRectPadding=b.Annotations.Annotation.prototype.getRectPadding;b.Annotations.Annotation.prototype.adjustRect=b.Annotations.Annotation.prototype.adjustRect;b.Annotations.Annotation.prototype.setContents=b.Annotations.Annotation.prototype.Ch;b.Annotations.Annotation.prototype.getContents=b.Annotations.Annotation.prototype.eh;b.Annotations.Annotation.prototype.isReply=b.Annotations.Annotation.prototype.Ci;
b.Annotations.Annotation.prototype.getReplies=b.Annotations.Annotation.prototype.Yu;b.Annotations.Annotation.prototype.isWidget=b.Annotations.Annotation.prototype.hk;b.Annotations.Annotation.prototype.isVisible=b.Annotations.Annotation.prototype.Vl;b.Annotations.Annotation.prototype.getInternal=b.Annotations.Annotation.prototype.kR;b.Annotations.Annotation.prototype.resourcesLoaded=b.Annotations.Annotation.prototype.CB;b.Annotations.Annotation.prototype.selectionModel=b.Annotations.Annotation.prototype.selectionModel;
b.Annotations.Annotation.prototype.elementName=b.Annotations.Annotation.prototype.elementName;b.Annotations.Point=b.Annotations.Point;b.Annotations.Quad=b.Annotations.ab;b.Annotations.Border=b.Annotations.mp;b.Annotations.Font=b.Annotations.Mg;b.Annotations.Rect=b.Annotations.Rect;b.Annotations.Rect.prototype.getWidth=b.Annotations.Rect.prototype.ya;b.Annotations.Rect.prototype.getHeight=b.Annotations.Rect.prototype.va;b.Annotations.Rect.prototype.translate=b.Annotations.Rect.prototype.translate;
b.Annotations.Rect.prototype.fitTo=b.Annotations.Rect.prototype.Eu;b.Annotations.Rect.prototype.normalize=b.Annotations.Rect.prototype.normalize;b.Annotations.Rect.prototype.exportNormalize=b.Annotations.Rect.prototype.nG;b.Annotations.Link=b.Annotations.rd;b.Annotations.PopupAnnotation=b.Annotations.Ok;b.Annotations.PopupAnnotation.prototype.isOpen=b.Annotations.Ok.prototype.isOpen;b.Annotations.PopupAnnotation.prototype.setOpen=b.Annotations.Ok.prototype.eK;b.Annotations.MarkupAnnotation=b.Annotations.sa;
b.Annotations.MarkupAnnotation.prototype.setStyles=b.Annotations.sa.prototype.jc;b.Annotations.MarkupAnnotation.prototype.selectionModel=b.Annotations.sa.prototype.selectionModel;b.Annotations.MarkupAnnotation.prototype.getPopup=b.Annotations.sa.prototype.kH;b.Annotations.MarkupAnnotation.prototype.setPopup=b.Annotations.sa.prototype.hK;b.Annotations.IPathAnnotation=b.Annotations.qd;b.Annotations.IPathAnnotation.prototype.addPathPoint=b.Annotations.qd.prototype.Ub;b.Annotations.IPathAnnotation.prototype.setPathPoint=
b.Annotations.qd.prototype.Kf;b.Annotations.IPathAnnotation.prototype.getPathPoint=b.Annotations.qd.prototype.ti;b.Annotations.IPathAnnotation.prototype.popPath=b.Annotations.qd.prototype.uk;b.Annotations.IPathAnnotation.prototype.getPath=b.Annotations.qd.prototype.getPath;b.Annotations.LineAnnotation=b.Annotations.ve;b.Annotations.LineAnnotation.prototype.setStartPoint=b.Annotations.ve.prototype.WB;b.Annotations.LineAnnotation.prototype.getStartPoint=b.Annotations.ve.prototype.ZR;b.Annotations.LineAnnotation.prototype.setEndPoint=
b.Annotations.ve.prototype.setEndPoint;b.Annotations.LineAnnotation.prototype.getEndPoint=b.Annotations.ve.prototype.YQ;b.Annotations.LineAnnotation.prototype.setStartStyle=b.Annotations.ve.prototype.Yi;b.Annotations.LineAnnotation.prototype.getStartStyle=b.Annotations.ve.prototype.Ye;b.Annotations.LineAnnotation.prototype.setEndStyle=b.Annotations.ve.prototype.So;b.Annotations.LineAnnotation.prototype.getEndStyle=b.Annotations.ve.prototype.ih;b.Annotations.RectangleAnnotation=b.Annotations.Qk;b.Annotations.EllipseAnnotation=
b.Annotations.Im;b.Annotations.FreeHandAnnotation=b.Annotations.FreeHandAnnotation;b.Annotations.FreeHandAnnotation.prototype.addPathPoint=b.Annotations.FreeHandAnnotation.prototype.Ub;b.Annotations.FreeHandAnnotation.prototype.setPathPoint=b.Annotations.FreeHandAnnotation.prototype.Kf;b.Annotations.FreeHandAnnotation.prototype.getPathPoint=b.Annotations.FreeHandAnnotation.prototype.ti;b.Annotations.FreeHandAnnotation.prototype.popPath=b.Annotations.FreeHandAnnotation.prototype.uk;b.Annotations.FreeHandAnnotation.prototype.getPath=
b.Annotations.FreeHandAnnotation.prototype.getPath;b.Annotations.FreeHandAnnotation.prototype.setPath=b.Annotations.FreeHandAnnotation.prototype.setPath;b.Annotations.FreeHandAnnotation.prototype.getPaths=b.Annotations.FreeHandAnnotation.prototype.bk;b.Annotations.FreeHandAnnotation.prototype.emptyPaths=b.Annotations.FreeHandAnnotation.prototype.kG;b.Annotations.FreeHandAnnotation.prototype.shouldSimplifyPath=b.Annotations.FreeHandAnnotation.prototype.shouldSimplifyPath;b.Annotations.TextMarkupAnnotation=
b.Annotations.Bb;b.Annotations.TextMarkupAnnotation.prototype.setQuads=b.Annotations.Bb.prototype.Dw;b.Annotations.TextMarkupAnnotation.prototype.getQuads=b.Annotations.Bb.prototype.he;b.Annotations.TextMarkupAnnotation.SurroundingTexts=b.Annotations.Bb.yY;b.Annotations.TextMarkupAnnotation.TextIndices=b.Annotations.Bb.zY;b.Annotations.TextHighlightAnnotation=b.Annotations.Oh;b.Annotations.TextUnderlineAnnotation=b.Annotations.Zm;b.Annotations.TextStrikeoutAnnotation=b.Annotations.Ym;b.Annotations.TextSquigglyAnnotation=
b.Annotations.Xm;b.Annotations.CaretAnnotation=b.Annotations.pp;b.Annotations.StickyAnnotation=b.Annotations.lj;b.Annotations.StampAnnotation=b.Annotations.Uk;b.Annotations.RedactionAnnotation=b.Annotations.Dd;b.Annotations.RedactionAnnotation.prototype.setRect=b.Annotations.Dd.prototype.yg;b.Annotations.PolylineAnnotation=b.Annotations.Sm;b.Annotations.PolygonAnnotation=b.Annotations.Mh;b.Annotations.FreeTextAnnotation=b.Annotations.Ia;b.Annotations.FreeTextAnnotation.prototype.getPadding=b.Annotations.Ia.prototype.Zz;
b.Annotations.FreeTextAnnotation.prototype.setPadding=b.Annotations.Ia.prototype.rm;b.Annotations.FreeTextAnnotation.prototype.getIntent=b.Annotations.Ia.prototype.jh;b.Annotations.FreeTextAnnotation.prototype.setIntent=b.Annotations.Ia.prototype.Uo;b.Annotations.FreeTextAnnotation.prototype.addPathPoint=b.Annotations.Ia.prototype.Ub;b.Annotations.FreeTextAnnotation.prototype.setStartStyle=b.Annotations.Ia.prototype.Yi;b.Annotations.FreeTextAnnotation.prototype.getStartStyle=b.Annotations.Ia.prototype.Ye;
b.Annotations.FreeTextAnnotation.Intent=b.Annotations.Ia.Fc;b.Annotations.ControlHandle=b.Annotations.ControlHandle;b.Annotations.ControlHandle.prototype.testSelection=b.Annotations.ControlHandle.prototype.testSelection;b.Annotations.BoxControlHandle=b.Annotations.Pe;b.Annotations.LineControlHandle=b.Annotations.Pm;b.Annotations.PathControlHandle=b.Annotations.Og;b.Annotations.TextControlHandle=b.Annotations.Wk;b.Annotations.SelectionModel=b.Annotations.SelectionModel;b.Annotations.SelectionModel.prototype.testSelection=
b.Annotations.SelectionModel.prototype.testSelection;b.Annotations.SelectionModel.prototype.testControlHandles=b.Annotations.SelectionModel.prototype.Vr;b.Annotations.SelectionModel.prototype.getControlHandles=b.Annotations.SelectionModel.prototype.SQ;b.Annotations.SelectionModel.prototype.canModify=b.Annotations.SelectionModel.prototype.Kd;b.Annotations.SelectionModel.prototype.draw=b.Annotations.SelectionModel.prototype.draw;b.Annotations.BoxSelectionModel=b.Annotations.pa;b.Annotations.LineSelectionModel=
b.Annotations.yp;b.Annotations.PathSelectionModel=b.Annotations.Rm;b.Annotations.RedactionSelectionModel=b.Annotations.Ds;b.Annotations.TextSelectionModel=b.Annotations.nj;b.Annotations.StickySelectionModel=b.Annotations.Hp;b.Annotations.XfdfUtils=b.Annotations.ba;b.Annotations.XfdfUtils.serializePoint=b.Annotations.ba.vw;b.Annotations.XfdfUtils.deserializePoint=b.Annotations.ba.vw;b.Annotations.XfdfUtils.serializePointArray=b.Annotations.ba.Ro;b.Annotations.XfdfUtils.deserializePointArray=b.Annotations.ba.yl;
b.Annotations.XfdfUtils.serializeRect=b.Annotations.ba.NB;b.Annotations.XfdfUtils.deserializeRect=b.Annotations.ba.qu;b.Annotations.XfdfUtils.serializeFringeRect=b.Annotations.ba.LB;b.Annotations.XfdfUtils.deserializeFringeRect=b.Annotations.ba.RF;b.Annotations.XfdfUtils.serializeMeasure=b.Annotations.ba.uw;b.Annotations.XfdfUtils.deserializeMeasure=b.Annotations.ba.pu;b.Annotations.XfdfUtils.toXmlDate=b.Annotations.ba.nC;b.Annotations.SelectionAlgorithm=b.Annotations.Ab;b.Annotations.SelectionAlgorithm.boundingRectTest=
b.Annotations.Ab.ul;b.Annotations.SelectionAlgorithm.canvasVisibilityTest=b.Annotations.Ab.vl;b.Annotations.SelectionAlgorithm.textQuadTest=b.Annotations.Ab.jC;b.Annotations.Utilities=b.Annotations.ja;b.Annotations.Utilities.setExtraSelectors=b.Annotations.ja.HV;b.Annotations.Utilities.setAnnotationSubjectHandler=b.Annotations.ja.zV;b.Tool=b.Tool;b.Tools=b.ca;b.Tools.Tool=b.ca.Tool;b.Tools.Tool.prototype.getDocumentViewer=b.ca.Tool.prototype.gh;b.Tools.Tool.prototype.getMouseLocation=b.ca.Tool.prototype.jg;
b.Tools.Tool.prototype.setStyles=b.ca.Tool.prototype.jc;b.Tools.Tool.prototype.setName=b.ca.Tool.prototype.XV;b.Tools.AnnotationSelectTool=b.ca.AnnotationSelectTool;b.Tools.TextTool=b.ca.Yb;b.Tools.GenericAnnotationCreateTool=b.ca.GenericAnnotationCreateTool;b.Tools.PanTool=b.ca.Cp;b.Tools.TextSelectTool=b.ca.Wm;b.Tools.AnnotationEditTool=b.ca.Hk;b.Tools.LineCreateTool=b.ca.Kh;b.Tools.ArrowCreateTool=b.ca.$w;b.Tools.DistanceMeasurementCreateTool=b.ca.kx;b.Tools.PerimeterMeasurementCreateTool=b.ca.vx;
b.Tools.AreaMeasurementCreateTool=b.ca.Zw;b.Tools.RectangleCreateTool=b.ca.wx;b.Tools.RedactionCreateTool=b.ca.Fp;b.Tools.EllipseCreateTool=b.ca.mx;b.Tools.FreeHandCreateTool=b.ca.FreeHandCreateTool;b.Tools.SignatureCreateTool=b.ca.SignatureCreateTool;b.Tools.MarqueeZoomTool=b.ca.jf;b.Tools.MarqueeZoomTool.setZoomHandler=b.ca.jf.FW;b.Tools.MarqueeZoomTool.setMaxZoomLevel=b.ca.jf.VV;b.Tools.MarqueeZoomTool.setMinZoomLevel=b.ca.jf.WV;b.Tools.SignatureCreateTool.setTextHandler=b.ca.SignatureCreateTool.XB;
b.Tools.SignatureCreateTool.prototype.setSignatureCanvas=b.ca.SignatureCreateTool.prototype.uW;b.Tools.SignatureCreateTool.prototype.clearSignatureCanvas=b.ca.SignatureCreateTool.prototype.ZO;b.Tools.SignatureCreateTool.prototype.initDefaultSignature=b.ca.SignatureCreateTool.prototype.SH;b.Tools.SignatureCreateTool.prototype.saveDefaultSignature=b.ca.SignatureCreateTool.prototype.kV;b.Tools.SignatureCreateTool.prototype.setUpSignature=b.ca.SignatureCreateTool.prototype.qK;b.Tools.SignatureCreateTool.prototype.getSignaturePreview=
b.ca.SignatureCreateTool.prototype.YR;b.Tools.SignatureCreateTool.prototype.drawAnnot=b.ca.SignatureCreateTool.prototype.iz;b.Tools.SignatureCreateTool.prototype.hasLocation=b.ca.SignatureCreateTool.prototype.wS;b.Tools.SignatureCreateTool.prototype.clearLocation=b.ca.SignatureCreateTool.prototype.TO;b.Tools.SignatureCreateTool.prototype.hasDefaultSignature=b.ca.SignatureCreateTool.prototype.sS;b.Tools.SignatureCreateTool.prototype.addDefaultSignature=b.ca.SignatureCreateTool.prototype.UN;b.Tools.SignatureCreateTool.prototype.openSignature=
b.ca.SignatureCreateTool.prototype.hU;b.Tools.SignatureCreateTool.prototype.addSignature=b.ca.SignatureCreateTool.prototype.QE;b.Tools.SignatureCreateTool.prototype.isEmptySignature=b.ca.SignatureCreateTool.prototype.aI;b.Tools.StickyCreateTool=b.ca.Cx;b.Tools.TextAnnotationCreateTool=b.ca.Gc;b.Tools.TextHighlightCreateTool=b.ca.Ex;b.Tools.TextUnderlineCreateTool=b.ca.Hx;b.Tools.TextStrikeoutCreateTool=b.ca.Gx;b.Tools.TextSquigglyCreateTool=b.ca.Fx;b.Tools.PolylineCreateTool=b.ca.Qg;b.Tools.PolylineCreateTool.prototype.setAllowCreationOverAnnotation=
b.ca.Qg.prototype.wV;b.Tools.PolygonCreateTool=b.ca.Pg;b.Tools.PolygonCloudCreateTool=b.ca.Ep;b.Tools.CalloutCreateTool=b.ca.CalloutCreateTool;b.Tools.FreeTextCreateTool=b.ca.Lm;b.Tools.FreeTextCreateTool.setTextHandler=b.ca.Lm.XB;b.Tools.StampCreateTool=b.ca.Gp})(window);
(function(){function b(b,c,a){function d(a,b){var c=b<<1;return 128>b?a*(c+(a*(255-c)>>8))>>8:a*(511-c)+Math.sqrt(a<<8)*(c-255)>>8}function g(a,b){return 128>a?a*b>>7:255-((255-b)*(255-a)>>7)}function k(a,b){return 255==b&&0==a?255:Math.min(255,(a<<8)/(255-b))}function h(a,b){return 255==b&&0==a?0:255-Math.min(255,(255-a<<8)/b)}function l(a,b,c){return{r:.299*a+.587*b+.114*c,g:-.1687*a-.3313*b+.5*c,b:.5*a-.4187*b-.0813*c}}function n(a,b,c){return{r:a+1.402*c,g:a-.3441*b-.7141*c,b:a+1.772*b}}function m(a,
b,c){a=l(a,b,c);return{Df:Math.atan2(a.g,a.b),s:Math.sqrt(a.g*a.g+a.b*a.b),bL:a.r}}function r(a,b,c){return n(c,b*Math.sin(a),b*Math.cos(a))}var p={},u;for(u in f)f.hasOwnProperty(u)&&(p[u]=a&&a[u]||f[u]);"auto"==p.width&&(p.width=this.canvas.width);"auto"==p.height&&(p.height=this.canvas.height);p.width=Math.min(p.width,this.canvas.width-p.EK,b.canvas.width-p.x);p.height=Math.min(p.height,this.canvas.height-p.FK,b.canvas.height-p.y);u=this.getImageData(p.EK,p.FK,p.width,p.height);a=b.getImageData(p.x,
p.y,p.width,p.height);u=u.data;for(var q=a.data,v,w,A=q.length,B,z,x,y,F,K,G,D,L,I,O,N,H,M,E=0;E<A;E+=4)if(v=u[E+3]/255,w=q[E+3]/255,G=v+w-v*w,q[E+3]=255*G,0!=v)if(0==w)q[E]=u[E],q[E+1]=u[E+1],q[E+2]=u[E+2];else{D=q[E];L=q[E+1];I=q[E+2];O=u[E];N=u[E+1];H=u[E+2];B=O/255*v;y=D/255*w;z=N/255*v;F=L/255*w;x=H/255*v;K=I/255*w;M=255/G;G=w*v;var C=w-G,Q=v-G;switch(c){case "normal":case "src-over":q[E]=(B+y-y*v)*M;q[E+1]=(z+F-F*v)*M;q[E+2]=(x+K-K*v)*M;break;case "screen":q[E]=(B+y-B*y)*M;q[E+1]=(z+F-z*F)*
M;q[E+2]=(x+K-x*K)*M;break;case "multiply":q[E]=(B*y+B*(1-w)+y*(1-v))*M;q[E+1]=(z*F+z*(1-w)+F*(1-v))*M;q[E+2]=(x*K+x*(1-w)+K*(1-v))*M;break;case "difference":q[E]=(B+y-2*Math.min(B*w,y*v))*M;q[E+1]=(z+F-2*Math.min(z*w,F*v))*M;q[E+2]=(x+K-2*Math.min(x*w,K*v))*M;break;case "src-in":G=v*w;M=255/G;q[E]=B*w*M;q[E+1]=z*w*M;q[E+2]=x*w*M;q[E+3]=255*G;break;case "plus":case "add":q[E]=Math.min(B+y,1)*M;q[E+1]=Math.min(z+F,1)*M;q[E+2]=Math.min(x+K,1)*M;break;case "overlay":q[E]=G*g(D,O)+C*D+Q*O;q[E+1]=G*g(L,
N)+C*L+Q*N;q[E+2]=G*g(I,H)+C*I+Q*H;break;case "hard-light":q[E]=G*g(O,D)+C*D+Q*O;q[E+1]=G*g(N,L)+C*L+Q*N;q[E+2]=G*g(H,I)+C*I+Q*H;break;case "color-dodge":case "dodge":q[E]=G*k(D,O)+C*D+Q*O;q[E+1]=G*k(L,N)+C*L+Q*N;q[E+2]=G*k(I,H)+C*I+Q*H;break;case "color-burn":case "burn":q[E]=G*h(D,O)+C*D+Q*O;q[E+1]=G*h(L,N)+C*L+Q*N;q[E+2]=G*h(I,H)+C*I+Q*H;break;case "darken":case "darker":q[E]=G*(D<O?D:O)+C*D+Q*O;q[E+1]=G*(L<N?L:N)+C*L+Q*N;q[E+2]=G*(I<H?I:H)+C*I+Q*H;break;case "lighten":case "lighter":q[E]=(B<y?
y:B)*M;q[E+1]=(z<F?F:z)*M;q[E+2]=(x<K?K:x)*M;break;case "exclusion":q[E]=(y+B-2*y*B)*M;q[E+1]=(F+z-2*F*z)*M;q[E+2]=(K+x-2*K*x)*M;break;case "soft-light":q[E]=G*d(D,O)+C*D+Q*O;q[E+1]=G*d(L,N)+C*L+Q*N;q[E+2]=G*d(I,H)+C*I+Q*H;break;case "luminosity":v=l(D,L,I);w=l(O,N,H);v=n(w.r,v.g,v.b);q[E]=G*v.r+C*D+Q*O;q[E+1]=G*v.g+C*L+Q*N;q[E+2]=G*v.b+C*I+Q*H;break;case "color":v=l(D,L,I);w=l(O,N,H);v=n(v.r,w.g,w.b);q[E]=G*v.r+C*D+Q*O;q[E+1]=G*v.g+C*L+Q*N;q[E+2]=G*v.b+C*I+Q*H;break;case "hue":v=m(D,L,I);w=m(O,N,
H);v=r(w.Df,v.s,v.bL);q[E]=G*v.r+C*D+Q*O;q[E+1]=G*v.g+C*L+Q*N;q[E+2]=G*v.b+C*I+Q*H;break;case "saturation":v=m(D,L,I);w=m(O,N,H);v=r(v.Df,w.s,v.bL);q[E]=G*v.r+C*D+Q*O;q[E+1]=G*v.g+C*L+Q*N;q[E+2]=G*v.b+C*I+Q*H;break;case "lighter-color":v=0<2.623*(D-O)+5.15*(L-N)+I-H?{r:D,g:L,b:I}:{r:O,g:N,b:H};q[E]=G*v.r+C*D+Q*O;q[E+1]=G*v.g+C*L+Q*N;q[E+2]=G*v.b+C*I+Q*H;break;case "darker-color":v=0>2.623*(D-O)+5.15*(L-N)+I-H?{r:D,g:L,b:I}:{r:O,g:N,b:H};q[E]=G*v.r+C*D+Q*O;q[E+1]=G*v.g+C*L+Q*N;q[E+2]=G*v.b+C*I+Q*H;
break;default:D=E/4%this.canvas.width,L=Math.floor(E/4/this.canvas.width),D=4>D%8&&4>L%8||3<D%8&&3<L%8,q[E]=q[E+3]=255,q[E+1]=D?255:0,q[E+2]=D?0:255}}b.putImageData(a,p.x,p.y)}var f={x:0,y:0,EK:0,FK:0,width:"auto",height:"auto"};(function(e){if(!e||"function"!==typeof e.getImageData)return console.error("context blender called without a valid context prototype");Object.defineProperty(e,"bO",{value:b});for(var c=b.$_="normal src-over screen multiply difference src-in plus add overlay hardlight colordodge dodge colorburn burn darken darker lighten lighter exclusion softlight luminosity color hue saturation lightercolor darkercolor".split(" "),
a=b.supports={},d=c.length;d--;)a[c[d]]=!0;b.bZ={"src-over":"normal",Ho:"add",HZ:"colordodge",fZ:"colorburn",BZ:"darken",q_:"lighten"};return e})(CanvasRenderingContext2D&&CanvasRenderingContext2D.prototype)})();("undefined"===typeof window?this:window).KZ=0;
(function(b){b.ws=function(f,e){this.name=f;this.Jn=e;this.IO=1;this.gm=!0;this.Yh={};var c=this.Ot={};this.RN={};this.Gv=null;c.console_log=[function(a){b.utils.log(a)}];c.console_error=[function(a){b.utils.error(a)}];c.workerLoaded=[function(){}];e.addEventListener("message",this.FH.bind(this))};b.ws.prototype={on:function(f,e,c){var a=this.Ot;a[f]&&b.utils.error('There is already an actionName called "'+f+'"');a[f]=[e,c]},replace:function(b,e,c){this.Ot[b]=[e,c]},send:function(b,e){this.postMessage({action:b,
data:e})},Rq:function(){return this.IO++},Ua:function(b,e,c){var a=this.Rq();b={action:b,data:e,callbackId:a,priority:c};e=createPromiseCapability();this.Yh[a]=e;try{this.postMessage(b)}catch(d){e.reject(d)}return e.promise},tw:function(b,e,c){var a=this.Rq();b={action:b,data:e,callbackId:a,priority:c};e=createPromiseCapability();this.Yh[a]=e;try{this.postMessage(b)}catch(d){e.reject(d)}return{promise:e.promise,HO:a}},KB:function(b,e){if(b.message||b.nQ){b.message&&b.message.message&&(b.message=b.message.message);
var c=b.nQ;b={type:b.type?b.type:"JavascriptError",message:b.message};if(c)for(var a in c)c.hasOwnProperty(a)&&(b[a]=c[a])}this.postMessage({isReply:!0,callbackId:e,error:b})},eA:function(f){if(f in this.Yh)return this.Yh[f];b.utils.error("Cannot get promise for callback "+f)},kF:function(f){if(f in this.Yh){var e=this.Yh[f];delete this.Yh[f];e.reject({type:"Cancelled",message:"Request has been cancelled."});this.postMessage({action:"actionCancel",data:{callbackId:f}})}else b.utils.warn("Cannot cancel callback "+
f)},postMessage:function(b){if(this.gm){var e=this.hS(b);this.Jn.postMessage(b,e)}else this.Jn.postMessage(b)},eH:function(b,e){if("object"===typeof b)if(b instanceof Uint8Array)e.push(b.buffer);else if(b instanceof ArrayBuffer)e.push(b);else for(var c in b)b.hasOwnProperty(c)&&this.eH(b[c],e)},hS:function(b){var e=[];this.eH(b,e);return 0===e.length?void 0:e},FH:function(f){var e=this,c=f.data,a=this.Ot,d=this.RN;f=this.Yh;var g;c.isReply?(a=c.callbackId,a in f?(d=f[a],delete f[a],"error"in c?d.reject(c.error):
d.resolve(c.data)):b.utils.warn("Cannot resolve callback "+a)):c.action in a?(g=a[c.action],c.callbackId?Promise.resolve().then(function(){return g[0].call(g[1],c.data)}).then(function(a){e.postMessage({isReply:!0,callbackId:c.callbackId,data:a})},function(a){e.KB(a,c.callbackId)}):g[0].call(g[1],c.data)):c.action in d?(g=d[c.action],c.callbackId?g[0].call(g[1],c).then(function(a){e.postMessage({isReply:!0,callbackId:c.callbackId,data:a});e.Gv()},function(a){e.KB(a,c.callbackId);e.Gv()}):g[0].call(g[1],
c).then(function(){e.Gv()},function(){e.Gv()})):b.utils.error("Unknown action from worker: "+c.action)}}})("undefined"===typeof window?this:window);var na=this;
na.RM=function(){function b(b,e,c){var a=this;this.pk=[];this.Yn={};this.Wn={};createPromiseCapability();this.vC=new Promise(function(d,g){if("undefined"!==typeof Worker)try{var k=new na.ws("main",b);k.gm=e;a.qa=k;k.on("test",function(b){b&&b.supportTypedArray?(b.supportTransfers||(k.gm=!1),a.HW(k),d()):g(new na.Yk("Typed arrays are not supported. Can't start a worker.","error.WorkerInitError"))});var h={array:new Uint8Array([255])};try{h.options=c?c:{},h.options.chunkMax=na.wL,k.send("test",h)}catch(l){na.utils.log("Cannot use postMessage transfers"),
k.gm=!1,h.array[0]=0,k.send("test",h)}return}catch(l){g(new na.Yk("The worker has been disabled. This may be the result of using PNaCl on an unsupported browser.","error.PNaClSupportError"))}g(new na.Yk("Can't start a worker","error.WorkerInitError"))})}b.prototype={Lo:0,OK:1,md:2,ng:3,HW:function(b){this.qa=b;b.on("event",this.KJ,this)},KJ:function(b){var e=b.docId;if(this.Yn[e])this.Yn[e](b);else e in this.Wn?this.Wn[e].push(b):this.Wn[e]=[b]},addEventListener:function(b,e){if(this.Yn[b])na.utils.error("Event listener already set for "+
b);else if(this.Yn[b]=e,b in this.Wn){for(var c=this.Wn[b],a=0;a<c.length;++a)this.KJ(c[a]);delete this.Wn[b]}},RO:function(b){delete this.Yn[b]},oQ:function(b){return this.qa.Ua("NewDoc",b,this.ng)},FT:function(b,e){var c={array:b,workerPath:na.o.wi()};e&&(c.l=e);return this.qa.Ua("LoadRes",c,this.ng)},GT:function(b,e){var c={path:b};e&&(c.l=e);return this.qa.Ua("LoadResFromPath",c,this.ng)},MQ:function(b,e,c,a,d,g,k,h){return"undefined"===typeof h?this.qa.tw("GetCanvas",{docId:b,pageIndex:e,width:c,
height:a,rotation:d,layers:g,overprintMode:k},this.Lo):this.qa.tw("GetCanvasPartial",{docId:b,pageIndex:e,width:c,height:a,rotation:d,layers:g,bbox:[h.x1,h.y1,h.x2,h.y2],overprintMode:k},this.Lo)},NQ:function(b,e,c,a,d,g,k,h,l){return"undefined"===typeof h?this.qa.tw("GetCanvas",{docId:b,pageIndex:e,width:c,height:a,rotation:d,layers:g,filePath:l,overprintMode:k},this.Lo):this.qa.tw("GetCanvasPartial",{docId:b,pageIndex:e,width:c,height:a,rotation:d,layers:g,bbox:[h.x1,h.y1,h.x2,h.y2],filePath:l,
overprintMode:k},this.Lo)},MG:function(b,e){return"undefined"!==typeof e?this.qa.Ua("GetCanvasProgressive",{callbackId:b,filePath:e},this.Lo):this.qa.Ua("GetCanvasProgressive",{callbackId:b},this.Lo)},rh:function(b,e){return this.qa.Ua("LoadText",{docId:b,pageIndex:e},this.OK)},AT:function(b){return this.qa.Ua("LoadBookmarks",{docId:b},this.ng)},yT:function(b,e){var c={docId:b};e&&(c.pages=e);return this.qa.Ua("LoadAnnotations",c,this.ng)},rr:function(b,e){return this.qa.Ua("MergeXFDF",{docId:b,xfdf:e},
this.md)},LJ:function(b){return this.qa.Ua("SaveDoc",b,this.md)},lV:function(b){return this.qa.Ua("SaveDocFromFixedElements",b,this.md)},mV:function(b){return this.qa.Ua("SaveDocAs",b,this.md)},vX:function(b,e){return this.qa.Ua("UpdatePassword",{docId:b,password:e},this.ng)},ar:function(b,e,c,a){return this.qa.Ua("InsertBlankPages",{docId:b,width:c,height:a,pageArray:e},this.md)},Ai:function(b,e,c,a,d){return this.qa.Ua("InsertPages",{docId:b,doc:e,pageArray:c,destPos:a,insertBookmarks:d},this.md)},
jk:function(b,e,c){return this.qa.Ua("MovePages",{docId:b,pageArray:e,destPos:c},this.md)},Ri:function(b,e){return this.qa.Ua("RemovePages",{docId:b,pageArray:e},this.md)},Vi:function(b,e,c){return this.qa.Ua("RotatePages",{docId:b,pageArray:e,rotation:c},this.md)},kg:function(b){return this.qa.Ua("GetPDFDoc",{docId:b},this.md)},bh:function(b,e,c,a){return this.qa.Ua("ExtractPages",{docId:b,pageArray:e,xfdfString:c,watermarks:a},this.md)},gi:function(b,e,c,a,d,g){return this.qa.Ua("CropPages",{docId:b,
pageArray:e,topMargin:c,botMargin:a,leftMargin:d,rightMargin:g},this.md)},nm:function(b,e){return this.qa.Ua("DownloaderHint",{docId:b,hint:e},this.md)},dT:function(b){return this.qa.Ua("IsLinearized",{docId:b},this.md)},pi:function(b){return this.qa.Ua("GetLayers",{docId:b},this.md)},li:function(b,e){return this.qa.Ua("ExtractPDFNetLayersContext",{docId:b,layers:e},this.md)},Rq:function(){return this.qa.Rq()},$y:function(b){return this.qa.Ua("DeleteDocument",{docId:b},this.md)},PB:function(b){return this.qa.Ua("SetColorManagement",
{value:b},this.ng)},ww:function(b){return this.qa.Ua("SetCustomFontURL",{fontURL:b},this.ng)},getWorkerType:function(){return this.qa.Jn&&"function"===typeof this.qa.Jn.getWorkerType?this.qa.Jn.getWorkerType():na.RL(this.qa.Jn)?"ems":"pnacl"},im:function(b,e){return this.qa.Ua("RequirePage",{docId:b,pageNum:e},this.ng)},sendWithPromise:function(b,e,c){return this.qa.Ua(b,e,c)},cu:function(b){this.qa.kF(b)},Mu:function(b,e){return this.qa.Ua("GetAnnotationAppearances",{docId:b,references:e},this.OK)}};
return b}();
(function(b){function f(){var a=document.createElement("embed");a.type="application/pdf";a.style.position="fixed";a.style.width="9px";a.style.height="9px";a.style.top="-9990px;";a.style.left="-999px";return a}function e(a,b){for(var c=!1,e=0,f=navigator.plugins;e<f.length;++e){var l=f[e].name;if("Chrome PDF Viewer"===l||"Chromium PDF Viewer"===l){c=!0;break}}c?a():b()}var c;b.isPDFiumSupported=function(){c||(c=new Promise(function(a){e(function(){a(!0)},function(){a(!1)})}));return c};b.pdfiumPrint=
function(a){var b={Xn:null,Zv:"",handleEvent:function(){var a=b;window.removeEventListener("focus",a);a.Xn&&a.Xn.remove();a.Zv&&URL.revokeObjectURL(a.Zv)}};b.Zv=URL.createObjectURL(a);b.Xn=f();b.Xn.src=b.Zv;b.Xn.addEventListener("message",function(){console.log("I actually got a message")});document.body.appendChild(b.Xn);window.addEventListener("focus",b)}})(window);
(function(b){function f(e,c){b.ws.call(this,e,c);this.hi={};this.Lr={};this.Li=[]}f.prototype={St:function(b){this.Li.push(b)},uy:function(b,c){b in this.hi?this.hi[b].push(c):this.hi[b]=[c];b in this.Lr&&delete this.Lr[b]},hw:function(b){b in this.hi&&delete this.hi[b];this.Lr[b]=b;this.Li=[]},FH:function(e){var c=this,a=e.data,d=this.Ot;e=this.Yh;if("object"===typeof a){if("type"in a&&0<this.Li.length&&"onloaddocument"===a.type)for(;0<this.Li.length;)this.uy(a.data.docId,this.Li.shift());if("callbackId"in
a)if(d=a.callbackId,d in e){var f=e[d];delete e[d];"type"in a&&"error"===a.type?f.reject(a):f.resolve(a.data)}else b.utils.warn("Cannot resolve callback "+d);else if(a.action in d){var k=d[a.action];a.callbackId?Promise.resolve().then(function(){return k[0].call(k[1],a.data)}).then(function(b){c.postMessage({isReply:!0,callbackId:a.callbackId,data:b})},function(a){c.KB(a)}):k[0].call(k[1],a.data)}else if(a.type)if("page"===a.type)e=a.meta.docId,this.hi[e]?this.hi[e].forEach(function(b){b(a)}):0<this.Li.length&&
!(e in this.Lr)?this.Li.forEach(function(b){b(a)}):b.utils.warn("load","No doc listeners for this docId: "+JSON.stringify(a));else{if("documentComplete"===a.type||"error"===a.type)e=a.docId,this.hi[e]?this.hi[e].forEach(function(b){b(a)}):0<this.Li.length&&!(e in this.Lr)?this.Li.forEach(function(b){b(a)}):b.utils.warn("load","No doc listeners for this docId: "+JSON.stringify(a))}else b.utils.error("Unknown action from worker: "+a.action)}}};f.prototype=$.extend(Object.create(b.ws.prototype),f.prototype);
b.cM=f})("undefined"===typeof window?this:window);
(function(b){function f(e,c,a){var d=this;this.pk=[];this.Yn={};createPromiseCapability();this.vC=new Promise(function(f,k){if("undefined"!==typeof Worker)try{if(d.qa)f();else{var h=new b.cM("main",e);h.gm=c;d.qa=h;h.on("test",function(a){if(a.ready){var c=a&&a.supportTypedArray;a&&a.info&&b.utils.log("load","Office worker info: "+a.info);c?(a.supportTransfers||(h.gm=!1),f()):k(new b.Yk("Typed arrays are not supported. Can't start a worker.","error.WorkerInitError"))}else k("License Key Error: "+a.license)});
var l={array:new Uint8Array([255])};try{a&&(l=$.extend({},l,a)),h.send("test",l)}catch(n){h.gm=!1,l.array[0]=0,h.send("test",l)}}return}catch(n){k(new b.Yk("The worker has been disabled. This may be the result of using PNaCl on an unsupported browser.","error.PNaClSupportError"))}k(new b.Yk("Can't start a worker","error.WorkerInitError"))})}f.prototype={rI:function(b){return this.qa.Ua("loadDocument",b,this.ng)},St:function(b){this.qa.St(b)},uy:function(b,c){this.qa.uy(b,c)},hw:function(b){this.qa.hw(b)},
$y:function(b){this.qa.hw(b);return this.qa.Ua("unloadDocument",{docId:b},this.md)},cu:function(b){this.qa.kF(b)},WQ:function(b){return this.qa.Ua("getDocBuffer",{docId:b},this.ng)}};b.o.dM=f})("undefined"===typeof window?this:window);
(function(b){function f(a){this.Mv=!1;this.tb=[];this.Wr={};this.Zt={};this.mu={};this.Iu=[];this.Fl={};this.Ta={};this.Ge=a}function e(){}function c(a,b){this.Hf=a;this.Ta={};this.rb=null;this.Ga=b}e.prototype={DG:function(a){var b=this;b.functions=[];a.forEach(function(a){b.functions.push(new Function("c","t",a))});this.index=0},run:function(a,b,c){var e=this.functions[this.index];c&&this.index++;return e?(e(a,b),!1):!0},clone:function(){var a=new e;a.functions=this.functions;a.index=0;return a},
zr:function(){return Promise.resolve()},cancel:function(){}};f.prototype={lA:function(a,b){var c=a+1;if(c in this.tb){var c=this.tb[c],f=$.extend({},c);if(!c.rb){var h=new e;h.DG(c.ir);c.rb=h}f.rb=c.rb.clone();b(null,f)}else b(Error("The page "+c+" does not exist yet."))},aA:function(a,c,f){a+=1;if(a in this.tb){c=this.tb[a];a=$.extend({},c);if(!c.rb){var k=new e;k.DG(c.ir);c.rb=k}a.rb=c.rb.clone();a.Ta=$.extend(!0,{},a.Ta);for(var h in a.Ta)if(c=a.Ta[h],"jpg"===c.type)a.Ta[h].data=b.o.Wz(c.data.type,
c.data.data);else{if(b.Hq)k=b.o.Wz(c.data.type,c.data.data),k=new b.ef.FontFace(c.name,"","sfnt",k);else{for(var k="",l=new Uint8Array(c.data.data),n=l.byteLength,m=0;m<n;m++)k+=String.fromCharCode(l[m]);k=new b.ef.FontFace(c.name,k,"sfnt",void 0)}this.Ge.IA(c.name)||k.insert();a.Ta[h].data=k}f(null,a)}else f(Error("The page "+a+" does not exist yet."))},$N:function(a){var b=a.meta.page,e=new c(b,this),f=a.img,h=a.text_structure,l={},n="",m;for(n in f)f[n]&&f[n].data?(m={data:f[n],type:"jpg",name:n},
l[n]=m,this.Ta[n]=m):l[n]=this.Ta[n];f=a.embeddedFonts;for(n in f)(m=f[n])&&m.data?(m={data:m,type:"font",name:n},l[n]=m,this.Ta[n]=m):l[n]=this.Ta[n];e.ir=a.js;e.Ta=l;e.text=h;this.tb[b]=e},qq:function(){}};_(f.prototype).extend(Backbone.Events);b.o.bM=f})(window);
(function(b){function f(){}var e=b.o;e.As=function(c){this.vf=[];this.Ld=[];this.ke={};this.J=[];this.Vv={};this.yi={};this.te={};this.Gq={};this.ma=null;this.tn=new b.hf.Es;this.id=c;this.aB=[]};e.As.prototype=Object.create(e.Se.prototype);e.As.prototype.constructor=e.Lh;e.Document.Ir("office",e.As);$.extend(e.As.prototype,{YN:function(c){this.Ga.$N(c);var a=new b.Nk(c.meta.width,c.meta.height);a.cb=new XODText.Matrix2D;a.cb.Da(1,0,0,-1,0,c.meta.height);a.rotation=0;this.J.push(a);this.qr=this.pq();
c=c.fonts;for(var d in c){var e=c[d];d in this.Gq?a=this.Gq[d]:(a=new XODText.Mg,a.To(-e.ascent,e.descent),a.pK(500),this.Gq[d]=a);for(var e=e.charX,f=e.length,h=0;h<f;h+=3)a.Qt(e[h],e[h+1],e[h+2])}},loadAsync:function(c,a,d){var f=this;this.Wa=c;this.J=[];f.ke={};var k=d.annotsLoadedCallback;f.bc=new Promise(function(a){f.bind("documentComplete",function(){f.unbind("documentComplete");a()})});var h=d.workerTransportPromise;c.getFileData(function(d){f.bind("documentReady",a);var n={outputFormat:"canvasCommands"};
c.file?(n.type="file",n.value={bytes:d.buffer,name:c.file.name},f.Du=c.file.name):c.url?(n.type="file",n.value={bytes:d.buffer,name:c.filename||c.url},f.Du=n.value.name):(n.type="array",n.value=d.buffer,f.Du="");f.Ga=new e.bM(f.tn);var m=!1;h.then(function(c){f.za=c;b.utils.log("load","Worker Initialized");f.za.St(function(c){switch(c.type){case "page":var d=150,e=function(){var a;13<f.lk.length?a=f.lk.splice(0,13):(a=f.lk,f.lk=[]);return a},n=function(){for(var c=e(),h=0;h<c.length;++h)b.utils.log("load",
"page "+c[h].meta.page+": "+c[h].meta.elapsedTime+"ms"),f.YN(c[h]);for(h=0;h<c.length;++h)if(c[h].annotations)for(var l=0;l<c[h].annotations.length;++l){var p=c[h].annotations[l],r=new Annotations.Rect(parseInt(p.x1,10),parseInt(p.y1,10),parseInt(p.x2,10),parseInt(p.y2,10)),r=new Annotations.rd({rect:r});r.Fj("U",new Actions.oj({uri:p.URI}));r.PageNumber=c[h].meta.page;f.aB.push(r)}f.bc.then(function(a){f.Uj({type:"officeAnnotationsUpdated",data:a})}.bind(null,f.aB));f.aB=[];m||(m=!0,a(),k&&k('<?xml version="1.0" encoding="UTF-8"?><xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">  <pdf-info version="2" xmlns="http://www.pdftron.com/pdfinfo" /></xfdf>'));
f.Uj({type:"pagesUpdated",data:f.J.slice()});b.utils.log("load","processed "+c.length+" pages, "+f.lk.length+" remaining");0<f.lk.length?(f.qo=setTimeout(n,d),d=30):(f.qo=null,f.NP&&f.trigger("documentComplete"))};f.lk?(f.lk.push(c),f.qo||(f.qo=setTimeout(n,d),d=30)):(b.utils.log("load","Received first page data"),f.lk=[c],n());break;case "error":m?console.error(c.message):a(c);break;case "documentComplete":f.qo?f.NP=!0:f.trigger("documentComplete")}});f.za.rI(n).then(function(a){f.ma=a.docId;b.utils.log("load",
"Document initialized")})["catch"](function(b){a(b)})})})},loadTextData:function(b,a){var d=this;this.J[b].text?a(this.J[b].text):this.Ga.lA(b,function(e,f){if(!e&&"undefined"!==typeof f.text){var h=new XODText.we,l=new XODText.Matrix2D;l.Da(1,0,0,1,0,0);var n=new XODText.Vm(d.Gq),m=f.rb.clone(),r=!1;try{do r=m.run(n,l,!0);while(!r)}catch(p){console.warn("Custom Canvas has encountered an error: "+p.message);return}h.dP(f.text,n);d.J[b].text=h;a(h)}})},Tl:function(){return!1},Ol:f,ap:f,gk:function(){return!1},
extractXFDF:function(){return{xfdfString:'<?xml version="1.0" encoding="UTF-8"?><xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">  <pdf-info version="2" xmlns="http://www.pdftron.com/pdfinfo" /></xfdf>',pages:_.range(1,this.J.length+1)}},Gn:f,fo:function(){return!1},Vo:f,gC:f,eo:function(){return[]},vb:function(){return this.J.length},fc:function(b){var a={};a.width=this.J[b].width;a.height=this.J[b].height;return a},Kb:function(){e.Se.prototype.Kb.call(this);clearTimeout(this.qo);this.Ga=
this.qo=null;this.za&&this.ma&&this.za.$y(this.ma)},Us:function(){},ex:function(c){var a=new b.Nk(c.width,c.height);a.cb=new XODText.Matrix2D;c=c.matrix;a.cb.Da(c[0],c[1],c[2],c[3],c[4],c[5]);c=this.Kj(a.cb);a.cb=this.FB({w:a.width,Df:a.height});a.rotation=c;return a},getBookmarks:function(){return Promise.resolve([])},PN:function(){var b=this,a={outputFormat:"binaryStream"};b.Du?(a.type="file",a.value={bytes:null,name:b.Du}):(a.type="array",a.value=null);var d=0,e=[];return new Promise(function(f,
h){b.bc.then(function(){b.za.hw(b.ma);b.za.St(function(a){switch(a.type){case "page":"binaryStream"===a.format&&a.bytes||h("Expected binaryStream data");e.push(new Uint8Array(a.bytes));d+=a.bytes.byteLength;break;case "error":console.error(a.message);h(a.message);break;case "documentComplete":a=new Uint8Array(d);for(var b=0,c=0;c<e.length;++c)a.set(e[c],b),b+=e[c].length,e[c]=null;f(a);break;default:h("Unable to export data")}});b.za.rI(a).then(function(a){b.ma=a.docId})})})},getFileData:function(b){var a=
"pdf"===b.downloadType;if(this.za&&this.ma){var d=this.ma;return a?(a=e.iv(e.Jz(),{}),Promise.all([a,this.PN()]).then(function(a){var d=a[0];b.bytes=a[1].buffer;return d.lV(b).then(function(a){return a.fileData&&0!==a.fileData.byteLength?Promise.resolve(a.fileData):Promise.reject("Failed to convert document to PDF")},function(a){console.error(a);return Promise.resolve(a)})})):this.za.WQ(this.ma).then(function(a){return a&&"array"===a.type&&d===a.docId?a.value:Promise.reject()})}return Promise.reject()},
fk:function(){return!1},jH:function(b){return this.J[b].links},xk:function(){return!0}})})(window);
(function(b){function f(b){return new Promise(function(a,d){var e=indexedDB.open("wasm-cache",b);e.onerror=d.bind(null,"Error opening wasm cache database");e.onsuccess=function(){a(e.result)};e.onupgradeneeded=function(a){var b=e.result;b.objectStoreNames.contains("wasm-cache")&&(console.log("Clearing out version "+a.oldVersion+" wasm cache"),b.deleteObjectStore("wasm-cache"));console.log("Creating version "+a.newVersion+" wasm cache");b.createObjectStore("wasm-cache")}})}function e(b,a){return new Promise(function(d,
e){var f=b.transaction(["wasm-cache"]).objectStore("wasm-cache").get(a);f.onsuccess=function(){f.result?d(f.result):e("Module "+a+" was not found in wasm cache")};f.onerror=e.bind(null,"Error getting wasm module "+a)})}b.pT=function(){return f(23).then(function(b){return e(b,"PDFNetCWasm.wasm").then(function(){return!0})})["catch"](function(){return!1})};b.h_=function(c,a,d,g){function k(b,c){var d=b.transaction(["wasm-cache"],"readwrite").objectStore("wasm-cache").put(c,a);d.onerror=function(a){console.log("Failed to store in wasm cache: "+
a)};d.onsuccess=function(){console.log("Successfully stored "+a+" in wasm cache")}}function h(c){n=n||Date.now();return c?(b.utils.log("load","Try instantiateStreaming"),fetch(b.NZ(a)).then(function(a){return WebAssembly.VS(a,d)})["catch"](function(c){b.utils.log("load","instantiateStreaming Failed "+a+" message "+c.message);return h(!1)})):b.r_(a,g,!0,!0).then(function(a){l=Date.now();b.utils.log("load","Request took "+(l-n)+" ms");return WebAssembly.CA(a,d)})}var l,n;return f(c).then(function(c){return e(c,
a).then(function(c){b.utils.log("Found "+a+" in wasm cache");return WebAssembly.CA(c,d)},function(a){b.utils.log(a);return h(!!WebAssembly.VS).then(function(a){try{b.utils.log("load","WASM compilation took "+(Date.now()-(l||n))+" ms"),k(c,a.w_)}catch(d){}return a.instance})})},function(a){console.log(a);return h().then(function(a){return a.instance})})}})(this);
(function(b){function f(){this.Br=this.zi=null;this.zoom=0;this.IS=!0;this.Nv=0;this.Fh=null}function e(a,b){this.Hf=a;this.Ta={};this.text=this.rb=null;this.Ga=b;this.xm=this.zi=null}function c(a,b){var c=a.lastIndexOf(".");return a.substring(0,c)+"-"+b+a.substring(c)}function a(a,b,c,d){this.w=b;this.Df=c;this.Jb=a;this.Zi=d;this.lp={}}function d(a,b){var d=b.split(".").slice(-2,-1)[0].split("_");return{counter:void 0,url:b,Zi:a,jw:(5<d.length?parseInt(d[5],10):1)/parseInt(d[0],10),jL:parseInt(d[1],
10),mL:parseInt(d[2],10),iL:parseInt(d[3],10),lL:parseInt(d[4],10),getName:function(){return c("tile_"+b.substring(b.lastIndexOf("/")+1),void 0)},bG:function(a){var b=this.jw*this.Zi*this.iL,c=this.jw*this.Zi*this.lL,d=this.jw*this.jL,e=this.jw*this.mL,f=this.getName();a.JX=!0;a.YT=!0;a.ZT=!0;a.HS="high";a.GS=!0;window.ci[f]&&a.I(window.ci[f],0,0,this.jL,this.mL,b,c,d,e)}}}function g(){}var k=0;e.prototype={clone:function(){var a=new e(this.Hf,this.Ga);a.Ta=JSON.parse(JSON.stringify(this.Ta));a.rb=
this.rb.clone();a.xm=this.xm;return a}};a.prototype={$O:function(){this.lp={}},eO:function(a,b){var c=Math.ceil(1*this.w*b/this.Zi)|0;this.lp[b]=this.lp[b]||[];for(var d=this.lp[b],e=0;e<a.length;e++)d[a[e].lL*c+a[e].iL]=a[e]},fS:function(a,b){var c=Math.max(Math.min(30,Math.round(3*b)|0),1),d=c/b,e=Math.ceil(1*this.w*c/this.Zi)|0,f;if(!(c in this.lp))return null;var g=[],h={tiles:g,p:this.Jb,z:c,missing:0},k=Math.floor(a[0]*d/this.Zi)|0,l=Math.ceil(a[2]*d/this.Zi)|0,z=Math.ceil(a[3]*d/this.Zi)|0,
c=this.lp[c];for(f=Math.floor(a[1]*d/this.Zi)|0;f<z;f++)for(d=k;d<l;d++)c[f*e+d]?g.push(c[f*e+d]):h.missing+=1;return h}};f.prototype={create:function(a,b,c,d,e){this.zi=b;this.Br=c;this.Jb=a;this.Xr=d;this.lr=e;this.yr=this.Fh;this.Nv=this.zoom;this.Yl=this.Fh=null;this.Rl=!1},AW:function(a){this.Fh=a},run:function(a,b){var c=this;if(c.Rl)return!0;this.zoom=Math.sqrt(b.m_a*b.m_a+b.m_c*b.m_c);var d=0,e=this.zoom.toFixed(5)===this.Nv.toFixed(5);if(!c.Fh){a.S();a.JX=!0;a.YT=!0;a.ZT=!0;a.HS="high";a.GS=
!0;a.I(window.ci[this.zi],0,0,this.Br.width,this.Br.height);a.r();if(this.yr)for(d=0;d<this.yr.length;d++)this.yr[d].bG(a,b,e?"rgba(0, 0, 255, 0.5)":"rgba(255, 0, 0, 0.5)");if(d=this.Xr&&this.lr){var e=new XODText.Matrix2D,f=1/this.zoom;e.Da(b.m_a*f,b.m_b*f,b.m_c*f,b.m_d*f,b.m_h,b.m_v);e=e.inverse();f=new XODText.Ka;f.Da(0,0,a.canvas.width,a.canvas.height);e.pC(f);var e=[f.x1,f.y1,f.x2,f.y2],g=c.lr,f=c.Xr;c.lr=null;c.Xr=null;this.Yl=createPromiseCapability();var h=function(){c.Rl||c.Yl&&c.Yl.resolve()};
f(c.Jb,c.zoom,e,960).then(function(a){!c.Rl&&a&&g(a,c,h)})}return!d}if(this.Fh&&this.Fh.length)for(d=0;d<this.Fh.length;d++)this.Fh[d].bG(a,b,"rgba(0, 255, 0, 0.5)");return!0},clone:function(){var a=new f;a.zi=this.zi;a.Br=this.Br;a.Jb=this.Jb;a.Xr=this.Xr;a.lr=this.lr;a.Fh=this.Fh;a.yr=this.yr;a.zoom=this.zoom;a.Nv=this.Nv;return a},zr:function(){return this.Yl?this.Yl.promise:Promise.resolve()},cancel:function(){this.Rl=!0;this.Yl&&this.Yl.resolve()}};var h=b.o;h.ks=function(a){this.vf=[];this.Ld=
{};this.ke={};this.Vv={};this.yi={};this.te={};this.Gq={};this.ma=null;this.tn=this.Ge=new b.hf.Es;this.id=a;this.Ga=this;this.tb=[];this.lC=[];this.Bg={};this.dJ=this.J=[];this.page=[];this.sd=null;this.nk={};this.bs=createPromiseCapability();this.Xv=createPromiseCapability();this.Eo=null;this.$v=[];this.wq=null;this.Iw=this.Hw=!0;this.vT=0;this.eX=1;this.jq=null;this.YF=this.hC=!1;this.kw=[];this.tF=createPromiseCapability();this.counter=k++};h.ks.prototype=Object.create(h.Se.prototype);h.ks.prototype.constructor=
h.Lh;h.Document.Ir("blackbox",h.ks);var l={Ld:!0,Kb:!0,loadThumbnailAsync:!0,Lj:!0,ko:!0,Kq:!0,getFileData:!0,extractXFDF:!0,Zo:!0,Gl:!0,io:!0,Sq:!0,rg:!0,kg:!0,Ai:!0,jk:!0,Ri:!0,Vi:!0,bh:!0,gi:!0,pi:!0,qm:!0,li:!0};$.extend(h.ks.prototype,{AS:function(a){return a.DH().then(function(a){return Promise.resolve(!!a.url)})},oP:function(a){return a.XU()},Lj:function(a){2===this.Bg[a]?(delete this.Bg[a],this.qq(0,a)):this.Bg[a]&&delete this.Bg[a]},loadThumbnailAsync:function(a,b){if(!this.J||this.J.length<
a)throw Error("Document is not initialized!");var c=this,d=c,e,f=null;c.lC[a]?f=Promise.resolve(c.lC[a]):this.Oj||(f=c.sd.mw(a));f?(e=c.DF(),d.Bg[e]=1,f.then(function(f){var g=new Image;c.lC[a]=f;g.onload=function(){URL.revokeObjectURL(f.url);d.Bg[e]&&(b(g),delete d.Bg[e]);g=g.onload=null};g.src=f.url})):(c=this.Oj,f=c.J[a],e=c.loadCanvasAsync({pageIndex:a,zoom:f.width>f.height?450/f.width:450/f.height,drawComplete:function(a){a.style.backgroundColor="white";d.Bg[e]&&(c.cp(e),b(a),delete d.Bg[e])},
pageCanvas:!0}),d.Bg[e]=2);return e},dC:function(){return!0===this.fz?!1:this.Iw&&(b.utils.ie||!this.Hw||b.utils.isMobileDevice)},JO:function(){return!b.utils.isMobileDevice||this.fz},rg:function(){return!this.fz},KK:function(a){function c(h){l[h]||("function"===typeof a[h]?(b.utils.log("load","Redirected function name "+h),g[h]=f(h)):(b.utils.log("load","Redirected property name "+h),Object.defineProperty(g,h,{get:d(h),set:e(h)})))}function d(a){return function(){return g.Oj[a]}}function e(a){return function(b){g.Oj[a]=
b}}function f(a){return function(){return g.Oj[a].apply(g.Oj,arguments)}}if(null===a)return b.utils.log("load","Not switching backends because the server gave us nothing to use"),!1;var g=this,k=this.dC();b.utils.log("load","Switching backend XOD: "+k);var w=k?h.Se.prototype:h.Lh.prototype;g.hC=k;if(g.Eo&&g.hC&&(k=g.Eo.gh().Qa().Pc())){g.dJ=g.J;g.$v=[];for(var A=0;A<k.length;++A)g.$v.push(k[A])}g.Oj=a;for(var B in a)(a.hasOwnProperty(B)||w.hasOwnProperty(B))&&c(B);g.Nw();a.iU=a.qB;a.Pa=g.Pa;a.qB=
function(b){if("pagesUpdated"===b.type){var c=b.data.pageDimensions;Object.keys(c).forEach(function(a){var b=parseInt(a,10)-1;a=c[a];a.id=""+b;a.contentChanged&=!g.kw[b];g.kw[b]=0})}a.iU(b)};a.Bu=g.Bu;try{localStorage.setItem("isCached",!0)}catch(z){b.utils.log("load","Couldn't add the loaded marker to localStorage")}this.tF.resolve(a);return!0},g0:function(){return Promise.resolve(b.WebAssembly?b.pT():!0)},KW:function(a){return this.dC()?this.AS(a):a.PG().then(function(a){return Promise.resolve(a.unhealthy)})},
AF:function(a,c,d){function e(a,b){return new Promise(function(c,e){b.loadAsync(a,function(a){a?e(a):c(b)},d)})}var f=c.UQ(),g=c.oo();if(this.dC()){var k=function(c){if(c.flat||!c.url)return Promise.resolve(null);c=new b.o.V.Kk(c.url);c.Sr(g);c.om(f);var d=new h.Se(a);return e(c,d)};return d.KH?k(d.KH):this.oP(c).then(k)}if(!this.JO())return Promise.resolve(null);var l=h.Lz().then(function(a){return h.iv(a,d.workerHandlers?d.workerHandlers:{},d.l)});return Promise.all([c.EJ(),l]).then(function(a){a=
new h.V.ts(a[0].url,{useDownloader:!0,withCredentials:g});a.om(f);var b=new h.Lh;d.workerTransportPromise=l;d.extension="pdf";return e(a,b)})},aO:function(a){if(0!==a.length){for(var b=0;b<a.length;++b)for(var c=a[b],d=Math.min(this.J.length,c.i-1),e=c.i+c.n-2;e>=d;--e){var f=this.ex(c);this.J[e]=f}this.qr=this.pq();this.Uj({type:"pagesUpdated",data:this.J.slice()})}},TN:function(a){function b(a){var c=[];a.children.forEach(function(a){c.push(b(a))});return new h.df(c,a.name,a.pageNumber,a.parent,
a.verticalOffset,a.horizontalOffset,a.url)}for(var c=0;c<a.length;++c)this.vf.push(b(a[c]))},loadAsync:function(a,c,d){var e=this;e.sd=e.Wa=a;e.J=[];e.Ga=e;e.fz=d.forceClientSideInit;b.utils.log("load","Request Document");e.sd.RV(function(){e.XS()},null);e.sd.PG().then(function(f){e.Hw&=f.hasPDF;e.Iw&=f.hasXOD;"tileScale"in f&&(e.eX=f.tileScale);e.sd.zX().then(function(){e.sd.hm(d.extension).then(function(f){b.utils.log("load","Document response received.");f&&("pages"in f&&e.aO(f.pages),"bookmarks"in
f&&(e.vf=[],e.TN(f.bookmarks)));e.jq=e.sd.HG();e.KW(a).then(function(f){b.utils.log("load","Should we use client side rendering? "+f);if(f)"object"===typeof f&&(d.KH=f),e.AF(e.id,a,d).then(function(a){e.KK(a);e.Nw().then(function(){e.Eo=c();e.Xv.resolve(e.Eo)})});else{e.Nw().then(function(){e.Eo=c();e.Xv.resolve(e.Eo)});if(e.Hw||e.Iw)b.utils.log("load","Load client side document"),e.bs.resolve(!0),e.bs.promise.then(function(){e.AF(e.id,a,d).then(function(a){var b=e.J[0].height,c;e.KK(a)&&e.Xv.promise.then(function(a){if(a=
a.gh()){for(var d=0;d<e.J.length;d++)e.J[d].xg(a);for(var f=!1,g=(e.J[0].height|0)===(b|0),h=b/e.J[0].height,k=a.N.Sd(),d=0;d<k.length;d++)!g&&a.N.zR(k[d].Ra-1)&&(f=!0,a.N.Bw(k[d].Ra-1,k[d].zoom*h),a.Xj(k[d].Ra-1)),(c=a.Ea.Qc(k[d].id))&&c.Dc&&(c.Dc=null);g||a.N.Xi(a.N.mg*h);f||g||(a.yh(),a.ea.Cg());a.trigger("backendSwitch")}})})});e.bc=new Promise(function(a){e.bind("documentComplete",function(){e.unbind("documentComplete");a()})})}})},function(a){c(a)})})},function(a){c(a)})},loadTextData:function(a,
b){a in this.tb&&this.tb[a].text?b(this.tb[a].text):this.lA(a,b)},ig:function(a,b){if(this.rg())throw Error('Client side document is not instantiated. Please pass the "forceClientSideInit: true" option into the WebViewer constructor or loadAsync.');return this.tF.promise.then(function(c){return a(c).apply(c,b)})},kg:function(){return this.ig(function(a){return a.kg},arguments)["catch"](function(a){throw a;})},Ai:function(){return this.ig(function(a){return a.Ai},arguments)},jk:function(){return this.ig(function(a){return a.jk},
arguments)},Ri:function(){return this.ig(function(a){return a.Ri},arguments)},Vi:function(){return this.ig(function(a){return a.Vi},arguments)},bh:function(){return this.ig(function(a){return a.bh},arguments)},gi:function(){return this.ig(function(a){return a.gi},arguments)},pi:function(){return this.ig(function(a){return a.pi},arguments)},qm:function(){return this.ig(function(a){return a.qm},arguments)},li:function(){return this.ig(function(a){return a.li},arguments)},ei:function(a){return a},aA:function(g,
h,k){if(g in this.J){var l=this;l.vT=g;this.tb[g]=this.tb[g]||new e(g,this);var u=this.tb[g],q=null,v=null;u.rb?q=Promise.resolve(u):(b.utils.log("load","blackbox(pgi: "+g+") request image"),q=(0!==g?l.bs.promise.then(function(){return l.sd.mw(g)}):l.sd.mw(g)).then(function(b){u.xm=new a(g,l.J[g].width,l.J[g].height,960);l.J[g].zi=c(b.name,l.counter);u.rb=new f;u.Ta[l.J[g].zi]={data:b.url,type:"jpg",name:l.J[g].zi};return u},function(a){v=a;b.utils.log("load","blackbox(pgi "+g+") error requesting image: "+
a);u.Ta.img_error={data:"",type:"jpg",name:"img_error"};u.rb=new f;u.rb.create(g,"img_error",l.J[g],null,null);return u}));var w=function(a,b,c,e){var f=u.xm.fS(c,b);return f&&0===f.missing?Promise.resolve(f):l.sd?l.sd.WU(a,b,c,e).then(function(a){for(var b=a.tiles,c=0;c<b.length;c++)b[c]=d(a.size,b[c]);return Promise.resolve(a)}):Promise.resolve(null)};q.then(function(a){b.utils.log("load","blackbox(pg "+g+") has image URL");var c=null,d=l.kw[g];l.kw[g]=d?d+1:1;a.rb.create(g,l.J[g].zi,l.J[g],w,function(d,
e,f){if(h in l.Ld&&!a.rb.Rl){var g,k,n=d.tiles,q=l.Ld[h].Gf,r=!("missing"in d),u=[],v=0;for(;v<n.length;v++)k=n[v],g=k.getName(),c.Ta[g]||(k={data:k.url,type:"jpg",name:g},u.push(k),c.Ta[g]=k);r&&a.xm.eO(n,d.z);a.Ta=JSON.parse(JSON.stringify(c.Ta));e.AW(n);a.rb=e.clone();q.VA(function(){l.bs.resolve();f()},u,!0);r&&b.utils.log("load","Server took "+d.runTime+"ms to generate "+n.length+" tiles")}});c=a.clone();l.nk[h]=c.rb;b.utils.log("load","blackbox(pg "+g+") calling resource load callback");k(v,
c)},function(a){console.warn("Error creating resources for page: "+a);k(a)})}else k(Error("The page "+(g+1)+" does not exist."))},lA:function(a,b){var c=this;if(a in this.J){this.tb[a]=this.tb[a]||new e(a,this);var d=this.tb[a],f=null,f=d.text?Promise.resolve(d):c.sd.VU(a).then(function(b){var e=new XODText.we;e.Dr({m_Struct:b.struct,m_Str:b.str,m_Offsets:b.offsets,m_Quads:b.quads,m_Ready:!0});c.J[a].text=e;c.correctQuadsForPageRotation(a,e);d.text=e;return d},function(b){console.warn("Error retrieving text for page: "+
b);b=new XODText.we;b.Dr({m_Struct:[],m_Str:"",m_Offsets:[],m_Quads:[],m_Ready:!0});c.J[a].text=b;d.text=b;return d});f.then(function(a){b(a.text)})}else b(Error("The page "+(a+1)+" does not exist."))},qq:function(a,b){b in this.nk&&(this.bs.resolve(),this.nk[b].cancel(),delete this.nk[b])},hZ:function(){for(var a=_.keys(this.nk),b=0;b<a.length;b++)this.qq(0,a[b])},XS:function(){this.tb&&_.each(this.tb,function(a){a.xm&&a.xm.$O()})},Tl:function(){return!1},Ol:g,ap:g,gk:function(){return!1},extractXFDF:function(){var a=
this;return a.Nw().then(function(){return a.jq.then(function(b){return{xfdfString:b,pages:_.range(1,a.J.length+1)}})})},Nw:function(){var a=this;a.jq||(a.jq=a.sd.HG());return a.jq.then(function(c){if(a.hC&&!a.YF){c=b.Annotations.ba.Yq(c);a.dE(c);var d=[];a.$v.forEach(function(b){var c=b.IsModified,e=b.Hb()-1;if(!d[e]){var f=a.dJ[e].cb;d[e]=new XODText.Matrix2D;d[e].initMatrix(a.J[e].cb);d[e].concat(f.inverse())}b.Gh(d[e]);b.IsModified=c});a.$v=[];a.YF=!0}})},Gn:g,fo:function(){return!1},Vo:g,gC:g,
eo:function(){return[]},vb:function(){return this.J.length},fc:function(a){var b={};b.width=this.J[a].width;b.height=this.J[a].height;return b},Mj:function(a){a in this.Ld&&this.Ld[a]&&delete this.Ld[a];a in this.nk&&delete this.nk[a]},Kb:function(){var a=this,c;for(c in b.ci)(c.startsWith("tile_t")||c.startsWith("pageimg"))&&delete b.ci[c];h.Se.prototype.Kb.call(this);return a.sd&&a.sd.uF().then(function(){a.tb=[];a.Bg={};a.nk={};a.Ga=null;a.Oj&&a.Oj.Kb()})},Us:function(){},ex:function(a){var c=
new b.Nk(a.w,a.h),d=a.mtx;c.cb=new XODText.Matrix2D;c.cb.Da(d[0],d[1],d[2],d[3],d[4],d[5]);var e=this.Kj(c.cb);c.cb=this.jX(d,{w:a.w,Df:a.h});c.rotation=e;return c},jX:function(a,b){var c=new XODText.Matrix2D;c.Da(a[0],a[1],a[2],a[3],a[4],a[5]);var d=this.Fn(c,b);c.Da(1,0,0,-1,-d.x1,d.y2);return c},getBookmarks:function(){return Promise.resolve(this.vf)},getFileData:function(a){if(!this.rg())return this.ig(function(a){return a.getFileData},arguments);if(this.wq)return this.wq.promise;var b=this.wq=
createPromiseCapability(),c=this,d={};a.xfdfString&&(d.annots=a.xfdfString);this.Mz(d).then(function(a){var d=new XMLHttpRequest;d.open("GET",a.url,!0);d.withCredentials=!0;d.responseType="arraybuffer";d.setRequestHeader("Cache-Control","no-cache");d.setRequestHeader("X-Requested-With","XMLHttpRequest");d.onreadystatechange=function(){if(4===d.readyState){c.wq=null;try{200===d.status?b.resolve(d.response):b.reject("Unable to download PDF data: "+d.status)}catch(a){b.reject("Unable to download PDF data: "+
a)}}};d.send()},function(a){b.reject("Unable to download PDF data: "+a)});return b.promise},ko:function(){return this.Mz({print:!0})},Kq:function(a){if(!this.rg())return null;a=a||{};var b=this;return this.Mz(a).then(function(c){c.url=b.XG({downloadName:a.downloadName||a.filename,url:c.url});return Promise.resolve(c)})},XG:function(a){var b=a.downloadName||a.filename,c=a.url.lastIndexOf(".pdf");return a.url.substring(0,0<c?c:a.url.length)+"?attach=pdf"+(b?"&dlname="+encodeURIComponent(b):"")},Gl:function(a){a=
a.length;for(var b=Array(a),c=0;c<a;++c)b[c]=Promise.reject("BlackBoxDocument does not support appearances");return b},Mz:function(a){var b=this;return this.Xv.promise.then(function(c){var d=c.gh();return d.yH().then(function(c){var e=createPromiseCapability(),f=createPromiseCapability();c?b.zH().toBlob(function(a){e.resolve(a)}):e.resolve(null);c=d.Qa();c=a.annots||(c?c.Cu():null);a.annots=null;f.resolve(c);return Promise.all([f.promise,e.promise]).then(function(c){var d=JSON.parse(JSON.stringify(a||
{}));d.annots=c[0];d.watermark=c[1];return b.sd.cH(d)})})})},Ur:function(a,b){var c=this,d=Annotations.Rg.XR(a,b);return c.sd.cH(d).then(function(a){a.url=c.XG(a);return a})},fk:function(){return!1},jH:function(a){return this.J[a].links},xk:function(){return!0}})})(window);}).call(window);
