diff options
-rw-r--r-- | deploy/biblez-ng/build/app.css | 34 | ||||
-rw-r--r-- | deploy/biblez-ng/build/app.js | 16 | ||||
-rw-r--r-- | deploy/biblez-ng/lib/sword/sword.min.js | 2 |
3 files changed, 34 insertions, 18 deletions
diff --git a/deploy/biblez-ng/build/app.css b/deploy/biblez-ng/build/app.css index 86695cb..aaa849f 100644 --- a/deploy/biblez-ng/build/app.css +++ b/deploy/biblez-ng/build/app.css @@ -1810,8 +1810,8 @@ } .biblez-bc-popup { - height: 350px; - width: 420px; + height: 500px; + width: 495px; } /* MODULE MANAGER */ @@ -1842,16 +1842,24 @@ /* BOOK CHAPTER SELECTOR */ .bc-item { height: 30px; - width: 50px; - margin: 5px; - border: 1px solid #ccc; - padding: 10px 5px 5px 5px; + width: 45px; + margin: 3px; + /* border: 1px solid #ccc; */ + padding: 5px 5px 5px 5px; float: left; - vertical-align: middle; + line-height: 30px; text-align: center; font-weight: bold; } +.books-ot { + background-color: #DAA520; +} + +.books-nt { + background-color: #F0E68C; +} + /* POPUPs */ .message-popup { text-align: center; @@ -1887,12 +1895,20 @@ /* BIBLE TEXT STYLE */ .verse-number { font-weight: bold; - font-size: 1.3em; - line-height: 1em; text-decoration: none; color: #010101; } +@media all and (max-width: 800px) { + .verse-number { + font-weight: bold; + font-size: 1.3em; + line-height: 1em; + text-decoration: none; + color: #010101; + } +} + h3, h1 { font-size: 1.3em; } diff --git a/deploy/biblez-ng/build/app.js b/deploy/biblez-ng/build/app.js index fdb1154..aae6ed3 100644 --- a/deploy/biblez-ng/build/app.js +++ b/deploy/biblez-ng/build/app.js @@ -202,23 +202,23 @@ enyo.kind({name:"onyx.ContextualPopup",kind:"enyo.Popup",modal:!0,autoDismiss:!0 // lib/sword/sword.min.js (function(t,e){"function"==typeof define&&define.amd?define(e):t.sword=e()})(this,function(){var requirejs,require,define;return function(t){function e(t,e){return v.call(t,e)}function n(t,e){var n,i,s,o,a,r,l,h,u,c,d=e&&e.split("/"),p=f.map,g=p&&p["*"]||{};if(t&&"."===t.charAt(0))if(e){for(d=d.slice(0,d.length-1),t=d.concat(t.split("/")),h=0;t.length>h;h+=1)if(c=t[h],"."===c)t.splice(h,1),h-=1;else if(".."===c){if(1===h&&(".."===t[2]||".."===t[0]))break;h>0&&(t.splice(h-1,2),h-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((d||g)&&p){for(n=t.split("/"),h=n.length;h>0;h-=1){if(i=n.slice(0,h).join("/"),d)for(u=d.length;u>0;u-=1)if(s=p[d.slice(0,u).join("/")],s&&(s=s[i])){o=s,a=h;break}if(o)break;!r&&g&&g[i]&&(r=g[i],l=h)}!o&&r&&(o=r,a=l),o&&(n.splice(0,a,o),t=n.join("/"))}return t}function i(e,n){return function(){return u.apply(t,y.call(arguments,0).concat([e,n]))}}function s(t){return function(e){return n(e,t)}}function o(t){return function(e){p[t]=e}}function a(n){if(e(g,n)){var i=g[n];delete g[n],m[n]=!0,h.apply(t,i)}if(!e(p,n)&&!e(m,n))throw Error("No "+n);return p[n]}function r(t){var e,n=t?t.indexOf("!"):-1;return n>-1&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function l(t){return function(){return f&&f.config&&f.config[t]||{}}}var h,u,c,d,p={},g={},f={},m={},v=Object.prototype.hasOwnProperty,y=[].slice;c=function(t,e){var i,o=r(t),l=o[0];return t=o[1],l&&(l=n(l,e),i=a(l)),l?t=i&&i.normalize?i.normalize(t,s(e)):n(t,e):(t=n(t,e),o=r(t),l=o[0],t=o[1],l&&(i=a(l))),{f:l?l+"!"+t:t,n:t,pr:l,p:i}},d={require:function(t){return i(t)},exports:function(t){var e=p[t];return e!==void 0?e:p[t]={}},module:function(t){return{id:t,uri:"",exports:p[t],config:l(t)}}},h=function(n,s,r,l){var h,u,f,v,y,b,x=[];if(l=l||n,"function"==typeof r){for(s=!s.length&&r.length?["require","exports","module"]:s,y=0;s.length>y;y+=1)if(v=c(s[y],l),u=v.f,"require"===u)x[y]=d.require(n);else if("exports"===u)x[y]=d.exports(n),b=!0;else if("module"===u)h=x[y]=d.module(n);else if(e(p,u)||e(g,u)||e(m,u))x[y]=a(u);else{if(!v.p)throw Error(n+" missing "+u);v.p.load(v.n,i(l,!0),o(u),{}),x[y]=p[u]}f=r.apply(p[n],x),n&&(h&&h.exports!==t&&h.exports!==p[n]?p[n]=h.exports:f===t&&b||(p[n]=f))}else n&&(p[n]=r)},requirejs=require=u=function(e,n,i,s,o){return"string"==typeof e?d[e]?d[e](n):a(c(e,n).f):(e.splice||(f=e,n.splice?(e=n,n=i,i=null):e=t),n=n||function(){},"function"==typeof i&&(i=s,s=o),s?h(t,e,n,i):setTimeout(function(){h(t,e,n,i)},4),u)},u.config=function(t){return f=t,f.deps&&u(f.deps,f.callback),u},define=function(t,n,i){n.splice||(i=n,n=[]),!e(p,t)&&!e(g,t)&&(g[t]=[t,n,i])},define.amd={jQuery:!0}}(),define("almond",function(){}),function(){function t(t){throw t}function e(t,e){var n=t.split("."),i=f;!(n[0]in i)&&i.execScript&&i.execScript("var "+n[0]);for(var s;n.length&&(s=n.shift());)n.length||e===g?i=i[s]?i[s]:i[s]={}:i[s]=e}function n(t){var e,n,i,s,o,a,r,l,h,u=t.length,c=0,d=Number.POSITIVE_INFINITY;for(l=0;u>l;++l)t[l]>c&&(c=t[l]),d>t[l]&&(d=t[l]);for(e=1<<c,n=new(m?Uint32Array:Array)(e),i=1,s=0,o=2;c>=i;){for(l=0;u>l;++l)if(t[l]===i){for(a=0,r=s,h=0;i>h;++h)a=a<<1|1&r,r>>=1;for(h=a;e>h;h+=o)n[h]=i<<16|l;++s}++i,s<<=1,o<<=1}return[n,c,d]}function i(e,n){switch(this.l=[],this.m=32768,this.d=this.f=this.c=this.t=0,this.input=m?new Uint8Array(e):e,this.u=!1,this.n=T,this.K=!1,(n||!(n={}))&&(n.index&&(this.c=n.index),n.bufferSize&&(this.m=n.bufferSize),n.bufferType&&(this.n=n.bufferType),n.resize&&(this.K=n.resize)),this.n){case P:this.a=32768,this.b=new(m?Uint8Array:Array)(32768+this.m+258);break;case T:this.a=0,this.b=new(m?Uint8Array:Array)(this.m),this.e=this.W,this.B=this.R,this.q=this.V;break;default:t(Error("invalid inflate mode"))}}function s(e,n){for(var i,s=e.f,o=e.d,a=e.input,r=e.c;n>o;)i=a[r++],i===g&&t(Error("input buffer is broken")),s|=i<<o,o+=8;return i=s&(1<<n)-1,e.f=s>>>n,e.d=o-n,e.c=r,i}function o(t,e){for(var n,i,s,o=t.f,a=t.d,r=t.input,l=t.c,h=e[0],u=e[1];u>a&&(n=r[l++],n!==g);)o|=n<<a,a+=8;return i=h[o&(1<<u)-1],s=i>>>16,t.f=o>>s,t.d=a-s,t.c=l,65535&i}function a(t){function e(t,e,n){var i,a,r,l;for(l=0;t>l;)switch(i=o(this,e)){case 16:for(r=3+s(this,2);r--;)n[l++]=a;break;case 17:for(r=3+s(this,3);r--;)n[l++]=0;a=0;break;case 18:for(r=11+s(this,7);r--;)n[l++]=0;a=0;break;default:a=n[l++]=i}return n}var i,a,r,l,h=s(t,5)+257,u=s(t,5)+1,c=s(t,4)+4,d=new(m?Uint8Array:Array)(A.length);for(l=0;c>l;++l)d[A[l]]=s(t,3);i=n(d),a=new(m?Uint8Array:Array)(h),r=new(m?Uint8Array:Array)(u),t.q(n(e.call(t,h,i,a)),n(e.call(t,u,i,r)))}function r(t){t=t||{},this.files=[],this.v=t.comment}function l(t,e){e=e||{},this.input=m&&t instanceof Array?new Uint8Array(t):t,this.c=0,this.ba=e.verify||!1,this.j=e.password}function h(t,e){this.input=t,this.offset=e}function u(t,e){this.input=t,this.offset=e}function c(e){var n,i,s,o,a=[],r={};if(!e.i){if(e.o===g){var l,u=e.input;if(!e.D)t:{var c,d=e.input;for(c=d.length-12;c>0;--c)if(d[c]===J[0]&&d[c+1]===J[1]&&d[c+2]===J[2]&&d[c+3]===J[3]){e.D=c;break t}t(Error("End of Central Directory Record not found"))}l=e.D,(u[l++]!==J[0]||u[l++]!==J[1]||u[l++]!==J[2]||u[l++]!==J[3])&&t(Error("invalid signature")),e.ha=u[l++]|u[l++]<<8,e.ja=u[l++]|u[l++]<<8,e.ka=u[l++]|u[l++]<<8,e.aa=u[l++]|u[l++]<<8,e.Q=(u[l++]|u[l++]<<8|u[l++]<<16|u[l++]<<24)>>>0,e.o=(u[l++]|u[l++]<<8|u[l++]<<16|u[l++]<<24)>>>0,e.w=u[l++]|u[l++]<<8,e.v=m?u.subarray(l,l+e.w):u.slice(l,l+e.w)}for(n=e.o,s=0,o=e.aa;o>s;++s)i=new h(e.input,n),i.parse(),n+=i.length,a[s]=i,r[i.filename]=s;e.Q<n-e.o&&t(Error("invalid file header size")),e.i=a,e.G=r}}function d(t,e,n){return n^=t.s(e),t.k(e,n),n}var p,g=void 0,f=this,m="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array;new(m?Uint8Array:Array)(256);var v;for(v=0;256>v;++v)for(var y=v,b=7,y=y>>>1;y;y>>>=1)--b;var x,C=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],w=m?new Uint32Array(C):C,_=[];for(x=0;288>x;x++)switch(!0){case 143>=x:_.push([x+48,8]);break;case 255>=x:_.push([x-144+400,9]);break;case 279>=x:_.push([x-256+0,7]);break;case 287>=x:_.push([x-280+192,8]);break;default:t("invalid literal: "+x)}var S=function(){function e(e){switch(!0){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:t("invalid length: "+e)}}var n,i,s=[];for(n=3;258>=n;n++)i=e(n),s[n]=i[2]<<24|i[1]<<16|i[0];return s}();m&&new Uint32Array(S);var P=0,T=1;i.prototype.r=function(){for(;!this.u;){var e=s(this,3);switch(1&e&&(this.u=!0),e>>>=1){case 0:var n=this.input,i=this.c,o=this.b,r=this.a,l=g,h=g,u=g,c=o.length,d=g;switch(this.d=this.f=0,l=n[i++],l===g&&t(Error("invalid uncompressed block header: LEN (first byte)")),h=l,l=n[i++],l===g&&t(Error("invalid uncompressed block header: LEN (second byte)")),h|=l<<8,l=n[i++],l===g&&t(Error("invalid uncompressed block header: NLEN (first byte)")),u=l,l=n[i++],l===g&&t(Error("invalid uncompressed block header: NLEN (second byte)")),u|=l<<8,h===~u&&t(Error("invalid uncompressed block header: length verify")),i+h>n.length&&t(Error("input buffer is broken")),this.n){case P:for(;r+h>o.length;){if(d=c-r,h-=d,m)o.set(n.subarray(i,i+d),r),r+=d,i+=d;else for(;d--;)o[r++]=n[i++];this.a=r,o=this.e(),r=this.a}break;case T:for(;r+h>o.length;)o=this.e({H:2});break;default:t(Error("invalid inflate mode"))}if(m)o.set(n.subarray(i,i+h),r),r+=h,i+=h;else for(;h--;)o[r++]=n[i++];this.c=i,this.a=r,this.b=o;break;case 1:this.q(V,U);break;case 2:a(this);break;default:t(Error("unknown BTYPE: "+e))}}return this.B()};var k,I,R=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],A=m?new Uint16Array(R):R,N=[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,258,258],E=m?new Uint16Array(N):N,M=[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,0,0],D=m?new Uint8Array(M):M,B=[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],O=m?new Uint16Array(B):B,$=[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],z=m?new Uint8Array($):$,H=new(m?Uint8Array:Array)(288);for(k=0,I=H.length;I>k;++k)H[k]=143>=k?8:255>=k?9:279>=k?7:8;var L,F,V=n(H),W=new(m?Uint8Array:Array)(30);for(L=0,F=W.length;F>L;++L)W[L]=5;var U=n(W);p=i.prototype,p.q=function(t,e){var n=this.b,i=this.a;this.C=t;for(var a,r,l,h,u=n.length-258;256!==(a=o(this,t));)if(256>a)i>=u&&(this.a=i,n=this.e(),i=this.a),n[i++]=a;else for(r=a-257,h=E[r],D[r]>0&&(h+=s(this,D[r])),a=o(this,e),l=O[a],z[a]>0&&(l+=s(this,z[a])),i>=u&&(this.a=i,n=this.e(),i=this.a);h--;)n[i]=n[i++-l];for(;this.d>=8;)this.d-=8,this.c--;this.a=i},p.V=function(t,e){var n=this.b,i=this.a;this.C=t;for(var a,r,l,h,u=n.length;256!==(a=o(this,t));)if(256>a)i>=u&&(n=this.e(),u=n.length),n[i++]=a;else for(r=a-257,h=E[r],D[r]>0&&(h+=s(this,D[r])),a=o(this,e),l=O[a],z[a]>0&&(l+=s(this,z[a])),i+h>u&&(n=this.e(),u=n.length);h--;)n[i]=n[i++-l];for(;this.d>=8;)this.d-=8,this.c--;this.a=i},p.e=function(){var t,e,n=new(m?Uint8Array:Array)(this.a-32768),i=this.a-32768,s=this.b;if(m)n.set(s.subarray(32768,n.length));else for(t=0,e=n.length;e>t;++t)n[t]=s[t+32768];if(this.l.push(n),this.t+=n.length,m)s.set(s.subarray(i,i+32768));else for(t=0;32768>t;++t)s[t]=s[i+t];return this.a=32768,s},p.W=function(t){var e,n,i,s,o=0|this.input.length/this.c+1,a=this.input,r=this.b;return t&&("number"==typeof t.H&&(o=t.H),"number"==typeof t.P&&(o+=t.P)),2>o?(n=(a.length-this.c)/this.C[2],s=0|258*(n/2),i=r.length>s?r.length+s:r.length<<1):i=r.length*o,m?(e=new Uint8Array(i),e.set(r)):e=r,this.b=e},p.B=function(){var t,e,n,i,s,o=0,a=this.b,r=this.l,l=new(m?Uint8Array:Array)(this.t+(this.a-32768));if(0===r.length)return m?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);for(e=0,n=r.length;n>e;++e)for(t=r[e],i=0,s=t.length;s>i;++i)l[o++]=t[i];for(e=32768,n=this.a;n>e;++e)l[o++]=a[e];return this.l=[],this.buffer=l},p.R=function(){var t,e=this.a;return m?this.K?(t=new Uint8Array(e),t.set(this.b.subarray(0,e))):t=this.b.subarray(0,e):(this.b.length>e&&(this.b.length=e),t=this.b),this.buffer=t},r.prototype.L=function(t){this.j=t},r.prototype.s=function(t){var e=2|65535&t[2];return 255&e*(1^e)>>8},r.prototype.k=function(t,e){t[0]=(w[255&(t[0]^e)]^t[0]>>>8)>>>0,t[1]=(6681*(20173*(t[1]+(255&t[0]))>>>0)>>>0)+1>>>0,t[2]=(w[255&(t[2]^t[1]>>>24)]^t[2]>>>8)>>>0},r.prototype.T=function(t){var e,n,i=[305419896,591751049,878082192];for(m&&(i=new Uint32Array(i)),e=0,n=t.length;n>e;++e)this.k(i,255&t[e]);return i};var j={O:0,M:8},K=[80,75,1,2],q=[80,75,3,4],J=[80,75,5,6];h.prototype.parse=function(){var e=this.input,n=this.offset;(e[n++]!==K[0]||e[n++]!==K[1]||e[n++]!==K[2]||e[n++]!==K[3])&&t(Error("invalid file header signature")),this.version=e[n++],this.ia=e[n++],this.Z=e[n++]|e[n++]<<8,this.I=e[n++]|e[n++]<<8,this.A=e[n++]|e[n++]<<8,this.time=e[n++]|e[n++]<<8,this.U=e[n++]|e[n++]<<8,this.p=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.z=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.J=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.h=e[n++]|e[n++]<<8,this.g=e[n++]|e[n++]<<8,this.F=e[n++]|e[n++]<<8,this.ea=e[n++]|e[n++]<<8,this.ga=e[n++]|e[n++]<<8,this.fa=e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24,this.$=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.filename=String.fromCharCode.apply(null,m?e.subarray(n,n+=this.h):e.slice(n,n+=this.h)),this.X=m?e.subarray(n,n+=this.g):e.slice(n,n+=this.g),this.v=m?e.subarray(n,n+this.F):e.slice(n,n+this.F),this.length=n-this.offset};var Y={N:1,ca:8,da:2048};u.prototype.parse=function(){var e=this.input,n=this.offset;(e[n++]!==q[0]||e[n++]!==q[1]||e[n++]!==q[2]||e[n++]!==q[3])&&t(Error("invalid local file header signature")),this.Z=e[n++]|e[n++]<<8,this.I=e[n++]|e[n++]<<8,this.A=e[n++]|e[n++]<<8,this.time=e[n++]|e[n++]<<8,this.U=e[n++]|e[n++]<<8,this.p=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.z=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.J=(e[n++]|e[n++]<<8|e[n++]<<16|e[n++]<<24)>>>0,this.h=e[n++]|e[n++]<<8,this.g=e[n++]|e[n++]<<8,this.filename=String.fromCharCode.apply(null,m?e.subarray(n,n+=this.h):e.slice(n,n+=this.h)),this.X=m?e.subarray(n,n+=this.g):e.slice(n,n+=this.g),this.length=n-this.offset},p=l.prototype,p.Y=function(){var t,e,n,i=[];for(this.i||c(this),n=this.i,t=0,e=n.length;e>t;++t)i[t]=n[t].filename;return i},p.r=function(e,n){var s;this.G||c(this),s=this.G[e],s===g&&t(Error(e+" not found"));var o;o=n||{};var a,r,l,h,p,f,v,y,b=this.input,x=this.i;if(x||c(this),x[s]===g&&t(Error("wrong index")),r=x[s].$,a=new u(this.input,r),a.parse(),r+=a.length,l=a.z,0!==(a.I&Y.N)){for(!o.password&&!this.j&&t(Error("please set password")),f=this.S(o.password||this.j),v=r,y=r+12;y>v;++v)d(this,f,b[v]);for(r+=12,l-=12,v=r,y=r+l;y>v;++v)b[v]=d(this,f,b[v])}switch(a.A){case j.O:h=m?this.input.subarray(r,r+l):this.input.slice(r,r+l);break;case j.M:h=new i(this.input,{index:r,bufferSize:a.J}).r();break;default:t(Error("unknown compression type"))}if(this.ba){var C,_=g,S="number"==typeof _?_:_=0,P=h.length;for(C=-1,S=7&P;S--;++_)C=C>>>8^w[255&(C^h[_])];for(S=P>>3;S--;_+=8)C=C>>>8^w[255&(C^h[_])],C=C>>>8^w[255&(C^h[_+1])],C=C>>>8^w[255&(C^h[_+2])],C=C>>>8^w[255&(C^h[_+3])],C=C>>>8^w[255&(C^h[_+4])],C=C>>>8^w[255&(C^h[_+5])],C=C>>>8^w[255&(C^h[_+6])],C=C>>>8^w[255&(C^h[_+7])];p=(4294967295^C)>>>0,a.p!==p&&t(Error("wrong crc: file=0x"+a.p.toString(16)+", data=0x"+p.toString(16)))}return h},p.L=function(t){this.j=t},p.k=r.prototype.k,p.S=r.prototype.T,p.s=r.prototype.s,e("Zlib.Unzip",l),e("Zlib.Unzip.prototype.decompress",l.prototype.r),e("Zlib.Unzip.prototype.getFilenames",l.prototype.Y),e("Zlib.Unzip.prototype.setPassword",l.prototype.L)}.call(this),define("unzip",function(t){return function(){var e;return e||t.Zlib}}(this)),function(){function t(t){var n=!1;return function(){if(n)throw Error("Callback was already called.");n=!0,t.apply(e,arguments)}}var e,n,i={};e=this,null!=e&&(n=e.async),i.noConflict=function(){return e.async=n,i};var s=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;t.length>n;n+=1)e(t[n],n,t)},o=function(t,e){if(t.map)return t.map(e);var n=[];return s(t,function(t,i,s){n.push(e(t,i,s))}),n},a=function(t,e,n){return t.reduce?t.reduce(e,n):(s(t,function(t,i,s){n=e(n,t,i,s)}),n)},r=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e};"undefined"!=typeof process&&process.nextTick?(i.nextTick=process.nextTick,i.setImmediate="undefined"!=typeof setImmediate?setImmediate:i.nextTick):"function"==typeof setImmediate?(i.nextTick=function(t){setImmediate(t)},i.setImmediate=i.nextTick):(i.nextTick=function(t){setTimeout(t,0)},i.setImmediate=i.nextTick),i.each=function(e,n,i){if(i=i||function(){},!e.length)return i();var o=0;s(e,function(s){n(s,t(function(t){t?(i(t),i=function(){}):(o+=1,o>=e.length&&i(null))}))})},i.forEach=i.each,i.eachSeries=function(t,e,n){if(n=n||function(){},!t.length)return n();var i=0,s=function(){e(t[i],function(e){e?(n(e),n=function(){}):(i+=1,i>=t.length?n(null):s())})};s()},i.forEachSeries=i.eachSeries,i.eachLimit=function(t,e,n,i){var s=l(e);s.apply(null,[t,n,i])},i.forEachLimit=i.eachLimit;var l=function(t){return function(e,n,i){if(i=i||function(){},!e.length||0>=t)return i();var s=0,o=0,a=0;(function r(){if(s>=e.length)return i();for(;t>a&&e.length>o;)o+=1,a+=1,n(e[o-1],function(t){t?(i(t),i=function(){}):(s+=1,a-=1,s>=e.length?i():r())})})()}},h=function(t){return function(){var e=Array.prototype.slice.call(arguments);return t.apply(null,[i.each].concat(e))}},u=function(t,e){return function(){var n=Array.prototype.slice.call(arguments);return e.apply(null,[l(t)].concat(n))}},c=function(t){return function(){var e=Array.prototype.slice.call(arguments);return t.apply(null,[i.eachSeries].concat(e))}},d=function(t,e,n,i){var s=[];e=o(e,function(t,e){return{index:e,value:t}}),t(e,function(t,e){n(t.value,function(n,i){s[t.index]=i,e(n)})},function(t){i(t,s)})};i.map=h(d),i.mapSeries=c(d),i.mapLimit=function(t,e,n,i){return p(e)(t,n,i)};var p=function(t){return u(t,d)};i.reduce=function(t,e,n,s){i.eachSeries(t,function(t,i){n(e,t,function(t,n){e=n,i(t)})},function(t){s(t,e)})},i.inject=i.reduce,i.foldl=i.reduce,i.reduceRight=function(t,e,n,s){var a=o(t,function(t){return t}).reverse();i.reduce(a,e,n,s)},i.foldr=i.reduceRight;var g=function(t,e,n,i){var s=[];e=o(e,function(t,e){return{index:e,value:t}}),t(e,function(t,e){n(t.value,function(n){n&&s.push(t),e()})},function(){i(o(s.sort(function(t,e){return t.index-e.index}),function(t){return t.value}))})};i.filter=h(g),i.filterSeries=c(g),i.select=i.filter,i.selectSeries=i.filterSeries;var f=function(t,e,n,i){var s=[];e=o(e,function(t,e){return{index:e,value:t}}),t(e,function(t,e){n(t.value,function(n){n||s.push(t),e()})},function(){i(o(s.sort(function(t,e){return t.index-e.index}),function(t){return t.value}))})};i.reject=h(f),i.rejectSeries=c(f);var m=function(t,e,n,i){t(e,function(t,e){n(t,function(n){n?(i(t),i=function(){}):e()})},function(){i()})};i.detect=h(m),i.detectSeries=c(m),i.some=function(t,e,n){i.each(t,function(t,i){e(t,function(t){t&&(n(!0),n=function(){}),i()})},function(){n(!1)})},i.any=i.some,i.every=function(t,e,n){i.each(t,function(t,i){e(t,function(t){t||(n(!1),n=function(){}),i()})},function(){n(!0)})},i.all=i.every,i.sortBy=function(t,e,n){i.map(t,function(t,n){e(t,function(e,i){e?n(e):n(null,{value:t,criteria:i})})},function(t,e){if(t)return n(t);var i=function(t,e){var n=t.criteria,i=e.criteria;return i>n?-1:n>i?1:0};n(null,o(e.sort(i),function(t){return t.value}))})},i.auto=function(t,e){e=e||function(){};var n=r(t);if(!n.length)return e(null);var o={},l=[],h=function(t){l.unshift(t)},u=function(t){for(var e=0;l.length>e;e+=1)if(l[e]===t)return l.splice(e,1),void 0},c=function(){s(l.slice(0),function(t){t()})};h(function(){r(o).length===n.length&&(e(null,o),e=function(){})}),s(n,function(n){var l=t[n]instanceof Function?[t[n]]:t[n],d=function(t){var a=Array.prototype.slice.call(arguments,1);if(1>=a.length&&(a=a[0]),t){var l={};s(r(o),function(t){l[t]=o[t]}),l[n]=a,e(t,l),e=function(){}}else o[n]=a,i.setImmediate(c)},p=l.slice(0,Math.abs(l.length-1))||[],g=function(){return a(p,function(t,e){return t&&o.hasOwnProperty(e)},!0)&&!o.hasOwnProperty(n)};if(g())l[l.length-1](d,o);else{var f=function(){g()&&(u(f),l[l.length-1](d,o))};h(f)}})},i.waterfall=function(t,e){if(e=e||function(){},t.constructor!==Array){var n=Error("First argument to waterfall must be an array of functions");return e(n)}if(!t.length)return e();var s=function(t){return function(n){if(n)e.apply(null,arguments),e=function(){};else{var o=Array.prototype.slice.call(arguments,1),a=t.next();a?o.push(s(a)):o.push(e),i.setImmediate(function(){t.apply(null,o)})}}};s(i.iterator(t))()};var v=function(t,e,n){if(n=n||function(){},e.constructor===Array)t.map(e,function(t,e){t&&t(function(t){var n=Array.prototype.slice.call(arguments,1);1>=n.length&&(n=n[0]),e.call(null,t,n)})},n);else{var i={};t.each(r(e),function(t,n){e[t](function(e){var s=Array.prototype.slice.call(arguments,1);1>=s.length&&(s=s[0]),i[t]=s,n(e)})},function(t){n(t,i)})}};i.parallel=function(t,e){v({map:i.map,each:i.each},t,e)},i.parallelLimit=function(t,e,n){v({map:p(e),each:l(e)},t,n)},i.series=function(t,e){if(e=e||function(){},t.constructor===Array)i.mapSeries(t,function(t,e){t&&t(function(t){var n=Array.prototype.slice.call(arguments,1);1>=n.length&&(n=n[0]),e.call(null,t,n)})},e);else{var n={};i.eachSeries(r(t),function(e,i){t[e](function(t){var s=Array.prototype.slice.call(arguments,1);1>=s.length&&(s=s[0]),n[e]=s,i(t)})},function(t){e(t,n)})}},i.iterator=function(t){var e=function(n){var i=function(){return t.length&&t[n].apply(null,arguments),i.next()};return i.next=function(){return t.length-1>n?e(n+1):null},i};return e(0)},i.apply=function(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e.concat(Array.prototype.slice.call(arguments)))}};var y=function(t,e,n,i){var s=[];t(e,function(t,e){n(t,function(t,n){s=s.concat(n||[]),e(t)})},function(t){i(t,s)})};i.concat=h(y),i.concatSeries=c(y),i.whilst=function(t,e,n){t()?e(function(s){return s?n(s):(i.whilst(t,e,n),void 0)}):n()},i.doWhilst=function(t,e,n){t(function(s){return s?n(s):(e()?i.doWhilst(t,e,n):n(),void 0)})},i.until=function(t,e,n){t()?n():e(function(s){return s?n(s):(i.until(t,e,n),void 0)})},i.doUntil=function(t,e,n){t(function(s){return s?n(s):(e()?n():i.doUntil(t,e,n),void 0)})},i.queue=function(e,n){function o(t,e,o,a){e.constructor!==Array&&(e=[e]),s(e,function(e){var s={data:e,callback:"function"==typeof a?a:null};o?t.tasks.unshift(s):t.tasks.push(s),t.saturated&&t.tasks.length===n&&t.saturated(),i.setImmediate(t.process)})}void 0===n&&(n=1);var a=0,r={tasks:[],concurrency:n,saturated:null,empty:null,drain:null,push:function(t,e){o(r,t,!1,e)},unshift:function(t,e){o(r,t,!0,e)},process:function(){if(r.concurrency>a&&r.tasks.length){var n=r.tasks.shift();r.empty&&0===r.tasks.length&&r.empty(),a+=1;var i=function(){a-=1,n.callback&&n.callback.apply(n,arguments),r.drain&&0===r.tasks.length+a&&r.drain(),r.process()},s=t(i);e(n.data,s)}},length:function(){return r.tasks.length},running:function(){return a}};return r},i.cargo=function(t,e){var n=!1,a=[],r={tasks:a,payload:e,saturated:null,empty:null,drain:null,push:function(t,n){t.constructor!==Array&&(t=[t]),s(t,function(t){a.push({data:t,callback:"function"==typeof n?n:null}),r.saturated&&a.length===e&&r.saturated()}),i.setImmediate(r.process)},process:function l(){if(!n){if(0===a.length)return r.drain&&r.drain(),void 0;var i="number"==typeof e?a.splice(0,e):a.splice(0),h=o(i,function(t){return t.data});r.empty&&r.empty(),n=!0,t(h,function(){n=!1;var t=arguments;s(i,function(e){e.callback&&e.callback.apply(null,t)}),l()})}},length:function(){return a.length},running:function(){return n}};return r};var b=function(t){return function(e){var n=Array.prototype.slice.call(arguments,1);e.apply(null,n.concat([function(e){var n=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(e?console.error&&console.error(e):console[t]&&s(n,function(e){console[t](e)}))}]))}};i.log=b("log"),i.dir=b("dir"),i.memoize=function(t,e){var n={},i={};e=e||function(t){return t};var s=function(){var s=Array.prototype.slice.call(arguments),o=s.pop(),a=e.apply(null,s);a in n?o.apply(null,n[a]):a in i?i[a].push(o):(i[a]=[o],t.apply(null,s.concat([function(){n[a]=arguments;var t=i[a];delete i[a];for(var e=0,s=t.length;s>e;e++)t[e].apply(null,arguments)}])))};return s.memo=n,s.unmemoized=t,s},i.unmemoize=function(t){return function(){return(t.unmemoized||t).apply(null,arguments)}},i.times=function(t,e,n){for(var s=[],o=0;t>o;o++)s.push(o);return i.map(s,e,n)},i.timesSeries=function(t,e,n){for(var s=[],o=0;t>o;o++)s.push(o);return i.mapSeries(s,e,n)},i.compose=function(){var t=Array.prototype.reverse.call(arguments);return function(){var e=this,n=Array.prototype.slice.call(arguments),s=n.pop();i.reduce(t,n,function(t,n,i){n.apply(e,t.concat([function(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);i(t,e)}]))},function(t,n){s.apply(e,[t].concat(n))})}};var x=function(t,e){var n=function(){var n=this,i=Array.prototype.slice.call(arguments),s=i.pop();return t(e,function(t,e){t.apply(n,i.concat([e]))},s)};if(arguments.length>2){var i=Array.prototype.slice.call(arguments,2);return n.apply(this,i)}return n};i.applyEach=h(x),i.applyEachSeries=c(x),i.forever=function(t,e){function n(i){if(i){if(e)return e(i);throw i}t(n)}n()},define!==void 0&&define.amd?define("async",[],function(){return i}):"undefined"!=typeof module&&module.exports?module.exports=i:e.async=i}(),define("tools",[],function(){function t(t){var e=t.split(/[\r\n]+/g),n={},i=null;return n.GlobalOptionFilter=[],n.Feature=[],e.forEach(function(t){i=t.split(/=(.+)/),""!==i[0]&&(-1!==i[0].search(/\[.*\]/)?n.moduleKey=i[0].replace("[","").replace("]",""):"GlobalOptionFilter"===i[0]?n[i[0]].push(i[1]):"Feature"===i[0]?n[i[0]].push(i[1]):n[i[0]]="Versification"===i[0]?i[1].toLowerCase():i[1])}),n}function e(t){return function(e,n){return e[t]>n[t]?1:e[t]<n[t]?-1:0}}function n(){var t=arguments;return function(n,i){for(var s=0,o=0,a=t.length;0===o&&a>s;)o=e(t[s])(n,i),s++;return o}}function i(t){for(var e=[],n=0;t.length>n;n++)t[n]&&e.push(t[n]);return e}return{readConf:t,dynamicSort:e,dynamicSortMultiple:n,cleanArray:i}}),function(t,e,n){"function"==typeof define?define("idb",e):"undefined"!=typeof module&&module.exports?module.exports=e():n[t]=e()}("IDBStore",function(){var t=function(t){throw t},e={storeName:"Store",storePrefix:"IDBWrapper-",dbVersion:1,keyPath:"id",autoIncrement:!0,onStoreReady:function(){},onError:t,indexes:[]},n=function(t,n){n===void 0&&"function"==typeof t&&(n=t),"[object Object]"!=Object.prototype.toString.call(t)&&(t={});for(var i in e)this[i]=t[i]!==void 0?t[i]:e[i];this.dbName=this.storePrefix+this.storeName,this.dbVersion=parseInt(this.dbVersion,10)||1,n&&(this.onStoreReady=n),i="object"==typeof window?window:self,this.idb=i.indexedDB||i.webkitIndexedDB||i.mozIndexedDB,this.keyRange=i.IDBKeyRange||i.webkitIDBKeyRange||i.mozIDBKeyRange,this.features={hasAutoIncrement:!i.mozIndexedDB},this.consts={READ_ONLY:"readonly",READ_WRITE:"readwrite",VERSION_CHANGE:"versionchange",NEXT:"next",NEXT_NO_DUPLICATE:"nextunique",PREV:"prev",PREV_NO_DUPLICATE:"prevunique"},this.openDB()};n.prototype={constructor:n,version:"1.4.0",db:null,dbName:null,dbVersion:null,store:null,storeName:null,keyPath:null,autoIncrement:null,indexes:null,features:null,onStoreReady:null,onError:null,_insertIdCount:0,openDB:function(){var t=this.idb.open(this.dbName,this.dbVersion),e=!1;t.onerror=function(t){var e=!1;"error"in t.target?e="VersionError"==t.target.error.name:"errorCode"in t.target&&(e=12==t.target.errorCode),e?this.onError(Error("The version number provided is lower than the existing one.")):this.onError(t)}.bind(this),t.onsuccess=function(t){e||(this.db?this.onStoreReady():(this.db=t.target.result,"string"==typeof this.db.version?this.onError(Error("The IndexedDB implementation in this browser is outdated. Please upgrade your browser.")):this.db.objectStoreNames.contains(this.storeName)?(this.store=this.db.transaction([this.storeName],this.consts.READ_ONLY).objectStore(this.storeName),this.indexes.forEach(function(t){var n=t.name;n?(this.normalizeIndexData(t),this.hasIndex(n)?this.indexComplies(this.store.index(n),t)||(e=!0,this.onError(Error('Cannot modify index "'+n+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))):(e=!0,this.onError(Error('Cannot create new index "'+n+'" for current version. Please bump version number to '+(this.dbVersion+1)+".")))):(e=!0,this.onError(Error("Cannot create index: No index name given.")))},this),e||this.onStoreReady()):this.onError(Error("Something is wrong with the IndexedDB implementation in this browser. Please upgrade your browser."))))}.bind(this),t.onupgradeneeded=function(t){this.db=t.target.result,this.store=this.db.objectStoreNames.contains(this.storeName)?t.target.transaction.objectStore(this.storeName):this.db.createObjectStore(this.storeName,{keyPath:this.keyPath,autoIncrement:this.autoIncrement}),this.indexes.forEach(function(t){var n=t.name;n||(e=!0,this.onError(Error("Cannot create index: No index name given."))),this.normalizeIndexData(t),this.hasIndex(n)?this.indexComplies(this.store.index(n),t)||(this.store.deleteIndex(n),this.store.createIndex(n,t.keyPath,{unique:t.unique,multiEntry:t.multiEntry})):this.store.createIndex(n,t.keyPath,{unique:t.unique,multiEntry:t.multiEntry})},this)}.bind(this)},deleteDatabase:function(){this.idb.deleteDatabase&&this.idb.deleteDatabase(this.dbName)},put:function(e,n,s,o){null!==this.keyPath&&(o=s,s=n,n=e),o||(o=t),s||(s=i);var a=!1,r=null,l=this.db.transaction([this.storeName],this.consts.READ_WRITE);return l.oncomplete=function(){(a?s:o)(r)},l.onabort=o,l.onerror=o,null!==this.keyPath?(this._addIdPropertyIfNeeded(n),e=l.objectStore(this.storeName).put(n)):e=l.objectStore(this.storeName).put(n,e),e.onsuccess=function(t){a=!0,r=t.target.result},e.onerror=o,l},get:function(e,n,s){s||(s=t),n||(n=i);var o=!1,a=null,r=this.db.transaction([this.storeName],this.consts.READ_ONLY);return r.oncomplete=function(){(o?n:s)(a)},r.onabort=s,r.onerror=s,e=r.objectStore(this.storeName).get(e),e.onsuccess=function(t){o=!0,a=t.target.result},e.onerror=s,r},remove:function(e,n,s){s||(s=t),n||(n=i);var o=!1,a=null,r=this.db.transaction([this.storeName],this.consts.READ_WRITE);return r.oncomplete=function(){(o?n:s)(a)},r.onabort=s,r.onerror=s,e=r.objectStore(this.storeName)["delete"](e),e.onsuccess=function(t){o=!0,a=t.target.result -},e.onerror=s,r},batch:function(e,n,s){s||(s=t),n||(n=i),"[object Array]"!=Object.prototype.toString.call(e)&&s(Error("dataArray argument must be of type Array."));var o=this.db.transaction([this.storeName],this.consts.READ_WRITE);o.oncomplete=function(){(l?n:s)(l)},o.onabort=s,o.onerror=s;var a=e.length,r=!1,l=!1,h=function(){a--,0===a&&!r&&(l=r=!0)};return e.forEach(function(t){var e=t.type,n=t.key,i=t.value,t=function(t){o.abort(),r||(r=!0,s(t,e,n))};"remove"==e?(i=o.objectStore(this.storeName)["delete"](n),i.onsuccess=h,i.onerror=t):"put"==e&&(null!==this.keyPath?(this._addIdPropertyIfNeeded(i),i=o.objectStore(this.storeName).put(i)):i=o.objectStore(this.storeName).put(i,n),i.onsuccess=h,i.onerror=t)},this),o},putBatch:function(t,e,n){return this.batch(t.map(function(t){return{type:"put",value:t}}),e,n)},removeBatch:function(t,e,n){return this.batch(t.map(function(t){return{type:"remove",key:t}}),e,n)},getBatch:function(e,n,s,o){s||(s=t),n||(n=i),o||(o="sparse"),"[object Array]"!=Object.prototype.toString.call(e)&&s(Error("keyArray argument must be of type Array."));var a=this.db.transaction([this.storeName],this.consts.READ_ONLY);a.oncomplete=function(){(h?n:s)(u)},a.onabort=s,a.onerror=s;var r=[],l=e.length,h=!1,u=null,c=function(t){t.target.result||"dense"==o?r.push(t.target.result):"sparse"==o&&r.length++,l--,0===l&&(h=!0,u=r)};return e.forEach(function(t){t=a.objectStore(this.storeName).get(t),t.onsuccess=c,t.onerror=function(t){u=t,s(t),a.abort()}},this),a},getAll:function(e,n){n||(n=t),e||(e=i);var s=this.db.transaction([this.storeName],this.consts.READ_ONLY),o=s.objectStore(this.storeName);return o.getAll?this._getAllNative(s,o,e,n):this._getAllCursor(s,o,e,n),s},_getAllNative:function(t,e,n,i){var s=!1,o=null;t.oncomplete=function(){(s?n:i)(o)},t.onabort=i,t.onerror=i,t=e.getAll(),t.onsuccess=function(t){s=!0,o=t.target.result},t.onerror=i},_getAllCursor:function(t,e,n,i){var s=[],o=!1,a=null;t.oncomplete=function(){(o?n:i)(a)},t.onabort=i,t.onerror=i,t=e.openCursor(),t.onsuccess=function(t){(t=t.target.result)?(s.push(t.value),t["continue"]()):(o=!0,a=s)},t.onError=i},clear:function(e,n){n||(n=t),e||(e=i);var s=!1,o=null,a=this.db.transaction([this.storeName],this.consts.READ_WRITE);a.oncomplete=function(){(s?e:n)(o)},a.onabort=n,a.onerror=n;var r=a.objectStore(this.storeName).clear();return r.onsuccess=function(t){s=!0,o=t.target.result},r.onerror=n,a},_addIdPropertyIfNeeded:function(t){!this.features.hasAutoIncrement&&t[this.keyPath]===void 0&&(t[this.keyPath]=this._insertIdCount++ +Date.now())},getIndexList:function(){return this.store.indexNames},hasIndex:function(t){return this.store.indexNames.contains(t)},normalizeIndexData:function(t){t.keyPath=t.keyPath||t.name,t.unique=!!t.unique,t.multiEntry=!!t.multiEntry},indexComplies:function(t,e){return["keyPath","unique","multiEntry"].every(function(n){return"multiEntry"==n&&void 0===t[n]&&!1===e[n]?!0:e[n]==t[n]})},iterate:function(e,n){var n=o({index:null,order:"ASC",autoContinue:!0,filterDuplicates:!1,keyRange:null,writeAccess:!1,onEnd:null,onError:t},n||{}),i="desc"==n.order.toLowerCase()?"PREV":"NEXT";n.filterDuplicates&&(i+="_NO_DUPLICATE");var s=!1,a=this.db.transaction([this.storeName],this.consts[n.writeAccess?"READ_WRITE":"READ_ONLY"]),r=a.objectStore(this.storeName);return n.index&&(r=r.index(n.index)),a.oncomplete=function(){s?n.onEnd?n.onEnd():e(null):n.onError(null)},a.onabort=n.onError,a.onerror=n.onError,i=r.openCursor(n.keyRange,this.consts[i]),i.onerror=n.onError,i.onsuccess=function(t){(t=t.target.result)?(e(t.value,t,a),n.autoContinue&&t["continue"]()):s=!0},a},query:function(t,e){var n=[],e=e||{};return e.onEnd=function(){t(n)},this.iterate(function(t){n.push(t)},e)},count:function(e,n){var n=o({index:null,keyRange:null},n||{}),i=n.onError||t,s=!1,a=null,r=this.db.transaction([this.storeName],this.consts.READ_ONLY);r.oncomplete=function(){(s?e:i)(a)},r.onabort=i,r.onerror=i;var l=r.objectStore(this.storeName);return n.index&&(l=l.index(n.index)),l=l.count(n.keyRange),l.onsuccess=function(t){s=!0,a=t.target.result},l.onError=i,r},makeKeyRange:function(t){var e=t.lower!==void 0,n=t.upper!==void 0,i=t.only!==void 0;switch(!0){case i:t=this.keyRange.only(t.only);break;case e&&n:t=this.keyRange.bound(t.lower,t.upper,t.excludeLower,t.excludeUpper);break;case e:t=this.keyRange.lowerBound(t.lower,t.excludeLower);break;case n:t=this.keyRange.upperBound(t.upper,t.excludeUpper);break;default:throw Error('Cannot create KeyRange. Provide one or both of "lower" or "upper" value, or an "only" value.')}return t}};var i=function(){},s={},o=function(t,e){var n,i;for(n in e)i=e[n],i!==s[n]&&i!==t[n]&&(t[n]=i);return t};return n.version=n.prototype.version,n},this),define("idbPluginWrapper",["idb"],function(t){function e(e){i?e(null,s):s=new t({storeName:"swordjs",dbVersion:4,indexes:[{name:"modules",keyPath:"moduleKey",unique:!0}],onStoreReady:function(){i=!0,e(null,s)},onError:function(t){i=!1,e(t)}})}function n(){return t}var i=!1,s=null;return{getDB:e,getIDBWrapper:n}}),define("dataMgr",["async","tools","idbPluginWrapper"],function(t,e,n){function i(t,e){n.getDB(function(n,i){n?e(n):i.get(t,function(t){e(null,t)},function(t){e(t)})})}function s(t,i){var s=new FileReader;s.readAsText(t),s.onload=function(t){var s=e.readConf(t.target.result);n.getDB(function(t,e){t?i(t):e.put(s,function(t){i(null,{id:t,modKey:s.moduleKey,v11n:s.Versification})},function(t){i(t)})})}}function o(e,i,s){var o=(e.length,{});o.docId=i.id,t.eachSeries(e,function(t,e){var a=t.name.split("/"),r=a[a.length-3];n.getDB(function(n,l){n?s(n):l.put({fileName:a[a.length-1],modKey:i.modKey,driver:r,blob:t.blob},function(t){o[a[a.length-1].split(".")[0]]=t,e(null)},function(t){e(t)})})},function(t){t?s(t):a(o,s)})}function a(t,e){n.getDB(function(n,i){n?e(n):i.get(t.docId,function(n){n.nt=t.nt,n.ot=t.ot,i.put(n,function(){e(null)},function(t){e(t)})},function(t){e(t)})})}function r(t,e){n.getDB(function(n,i){n?e(n):i.get(t,function(t){e(null,t.blob)},function(t){e(t)})})}function l(t,e,i,s){n.getDB(function(n,o){n?s(n):o.put({modKey:i.modKey,ot:t,nt:e},function(t){o.get(i.id,function(e){e.bcvPosID=t,o.put(e,function(){s(null)},function(t){s(t)})},function(t){s(t)})},function(t){s(t)})})}function h(t){n.getDB(function(e,n){e?t(e):n.query(function(e){t(null,e)},{onError:function(e){t(e)},index:"modules"})})}function u(t,e){n.getDB(function(n,i){n?e(n):i.remove(t,e(null),function(t){e(t)})})}function c(){n.getDB(function(t,e){t?inCallback(t):e.clear(function(){},function(t){console.log(t)})})}function d(){return n.getIDBWrapper()}return{clearDatabase:c,saveConfig:s,saveModule:o,saveBCVPos:l,getBlob:r,get:i,remove:u,getModules:h,getIDBWrapper:d}}),function(){function t(t,e){var n=t.split("."),i=p;!(n[0]in i)&&i.execScript&&i.execScript("var "+n[0]);for(var s;n.length&&(s=n.shift());)n.length||e===c?i=i[s]?i[s]:i[s]={}:i[s]=e}function e(t){var e,n,i,s,o,a,r,l,h,u=t.length,c=0,d=Number.POSITIVE_INFINITY;for(l=0;u>l;++l)t[l]>c&&(c=t[l]),d>t[l]&&(d=t[l]);for(e=1<<c,n=new(g?Uint32Array:Array)(e),i=1,s=0,o=2;c>=i;){for(l=0;u>l;++l)if(t[l]===i){for(a=0,r=s,h=0;i>h;++h)a=a<<1|1&r,r>>=1;for(h=a;e>h;h+=o)n[h]=i<<16|l;++s}++i,s<<=1,o<<=1}return[n,c,d]}function n(t,e,n){this.t=[],this.q=n?n:32768,this.u=0,this.a=e===c?0:e,this.d=this.e=0,this.input=g?new Uint8Array(t):t,this.c=new(g?Uint8Array:Array)(this.q),this.b=0,this.s=this.l=!1,this.f=0,this.status=f}function i(t,e){for(var n,i=t.e,s=t.d,o=t.input,a=t.a;e>s;){if(a>=o.length)return-1;n=o[a++],i|=n<<s,s+=8}return n=i&(1<<e)-1,t.e=i>>>e,t.d=s-e,t.a=a,n}function s(t,e){for(var n,i,s,o=t.e,a=t.d,r=t.input,l=t.a,h=e[0],u=e[1];u>a;){if(l>=r.length)return-1;n=r[l++],o|=n<<a,a+=8}return i=h[o&(1<<u)-1],s=i>>>16,t.e=o>>s,t.d=a-s,t.a=l,65535&i}function o(t){t.r=t.a,t.p=t.d,t.o=t.e}function a(t){t.a=t.r,t.d=t.p,t.e=t.o}function r(t){function n(){function t(t,e,n){for(var o,a,r,l,h=0,h=0;t>h;){if(o=s(this,e),0>o)throw Error("not enough input");switch(o){case 16:if(0>(l=i(this,2)))throw Error("not enough input");for(r=3+l;r--;)n[h++]=a;break;case 17:if(0>(l=i(this,3)))throw Error("not enough input");for(r=3+l;r--;)n[h++]=0;a=0;break;case 18:if(0>(l=i(this,7)))throw Error("not enough input");for(r=11+l;r--;)n[h++]=0;a=0;break;default:a=n[h++]=o}}return n}var n;for(f=0;h>f;++f){if(0>(n=i(this,3)))throw Error("not enough input");p[b[f]]=n}u=e(p),c=new(g?Uint8Array:Array)(r),d=new(g?Uint8Array:Array)(l),this.k=e(t.call(this,r,u,c)),this.n=e(t.call(this,l,u,d))}var r,l,h,u,c,d,p=new(g?Uint8Array:Array)(b.length),f=0;if(t.status=3,o(t),r=i(t,5)+257,l=i(t,5)+1,h=i(t,4)+4,0>r||0>l||0>h)return a(t),-1;try{n.call(t)}catch(m){return a(t),-1}return t.status=4,0}function l(t){var e,n,r,l,u,c=t.c,d=t.b,p=t.k,g=t.n,f=c.length;for(t.status=5;;){if(o(t),e=s(t,p),0>e)return t.b=d,a(t),-1;if(256===e)break;if(256>e)d===f&&(c=h(t),f=c.length),c[d++]=e;else{if(n=e-257,l=C[n],_[n]>0){if(u=i(t,_[n]),0>u)return t.b=d,a(t),-1;l+=u}if(e=s(t,g),0>e)return t.b=d,a(t),-1;if(r=P[e],k[e]>0){if(u=i(t,k[e]),0>u)return t.b=d,a(t),-1;r+=u}for(d+l>=f&&(c=h(t),f=c.length);l--;)c[d]=c[d++-r];if(t.a===t.input.length)return t.b=d,-1}}for(;t.d>=8;)t.d-=8,t.a--;t.b=d,t.status=6}function h(t){var e,n,i,s,o=0|t.input.length/t.a+1,a=t.input,r=t.c;return 2>o?(n=(a.length-t.a)/t.k[2],s=0|258*(n/2),i=r.length>s?r.length+s:r.length<<1):i=r.length*o,g?(e=new Uint8Array(i),e.set(r)):e=r,t.c=e,t.c}function u(t){this.input=t===c?new(g?Uint8Array:Array):t,this.a=0,this.h=new n(this.input,this.a),this.c=this.h.c}var c=void 0,d=!0,p=this,g="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,f=0;n.prototype.i=function(t,e){var n=!1;for(t!==c&&(this.input=t),e!==c&&(this.a=e);!n;)switch(this.status){case f:case 1:var s,u=c;if(this.status=1,o(this),0>(u=i(this,3)))a(this),s=-1;else{switch(1&u&&(this.l=d),u>>>=1){case 0:this.g=0;break;case 1:this.g=1;break;case 2:this.g=2;break;default:throw Error("unknown BTYPE: "+u)}this.status=2,s=c}0>s&&(n=d);break;case 2:case 3:switch(this.g){case 0:var p,m=c,v=c,y=this.input,b=this.a;if(this.status=3,b+4>=y.length)p=-1;else{if(m=y[b++]|y[b++]<<8,v=y[b++]|y[b++]<<8,m===~v)throw Error("invalid uncompressed block header: length verify");this.d=this.e=0,this.a=b,this.m=m,this.status=4,p=c}0>p&&(n=d);break;case 1:this.status=3,this.k=N,this.n=M,this.status=4;break;case 2:0>r(this)&&(n=d)}break;case 4:case 5:switch(this.g){case 0:var x;t:{var C=this.input,w=this.a,_=this.c,S=this.b,P=this.m;for(this.status=5;P--;){if(S===_.length&&(_=h(this)),w>=C.length){this.a=w,this.b=S,this.m=P+1,x=-1;break t}_[S++]=C[w++]}0>P&&(this.status=6),this.a=w,this.b=S,x=0}0>x&&(n=d);break;case 1:case 2:0>l(this)&&(n=d)}break;case 6:this.l?n=d:this.status=f}var T,k=this.b;return this.s?g?(T=new Uint8Array(k),T.set(this.c.subarray(this.f,k))):T=this.c.slice(this.f,k):T=g?this.c.subarray(this.f,k):this.c.slice(this.f,k),this.buffer=T,this.f=k,this.buffer};var m,v,y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],b=g?new Uint16Array(y):y,x=[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,258,258],C=g?new Uint16Array(x):x,w=[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,0,0],_=g?new Uint8Array(w):w,S=[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],P=g?new Uint16Array(S):S,T=[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],k=g?new Uint8Array(T):T,I=new(g?Uint8Array:Array)(288);for(m=0,v=I.length;v>m;++m)I[m]=143>=m?8:255>=m?9:279>=m?7:8;var R,A,N=e(I),E=new(g?Uint8Array:Array)(30);for(R=0,A=E.length;A>R;++R)E[R]=5;var M=e(E);n.prototype.j=function(){return g?this.c.subarray(0,this.b):this.c.slice(0,this.b)},u.prototype.i=function(t){var e;if(t!==c)if(g){var n=new Uint8Array(this.input.length+t.length);n.set(this.input,0),n.set(t,this.input.length),this.input=n}else this.input=this.input.concat(t);var i;if(i=this.method===c){var s,o=this.a,a=this.input,r=a[o++],l=a[o++];if(r===c||l===c)s=-1;else{switch(15&r){case 8:this.method=8;break;default:throw Error("unsupported compression method")}if(0!==((r<<8)+l)%31)throw Error("invalid fcheck flag:"+((r<<8)+l)%31);if(32&l)throw Error("fdict flag is not supported");this.a=o,s=c}i=0>s}return i?new(g?Uint8Array:Array):(e=this.h.i(this.input,this.a),this.a=this.h.a,e)},u.prototype.j=function(){return this.h.j()},t("Zlib.InflateStream",u),t("Zlib.InflateStream.prototype.decompress",u.prototype.i),t("Zlib.InflateStream.prototype.getBytes",u.prototype.j)}.call(this),define("inflateStream",function(t){return function(){var e;return e||t.Zlib}}(this)),define("zText",["inflateStream","async"],function(t,e){var n={},i=new FileReader,s=new FileReader;return n.getRawEntry=function(n,o,a,r,l){if(o[a[0].chapter-1]){var h=o[a[0].chapter-1].bookStartPos,u=o[a[0].chapter-1].startPos,c=o[a[0].chapter-1].length,d=h+u,p=d+c,g=n.slice(h,p);i.readAsArrayBuffer(g),i.onload=function(n){var i=new Uint8Array(n.target.result),h=new t.InflateStream,c=new Blob([h.decompress(i)]),d=[],p=0,g=0,f=0;e.whilst(function(){return a.length>f},function(t){p=u+o[a[f].chapter-1].verses[a[f].verse-1].startPos,g=p+o[a[f].chapter-1].verses[a[f].verse-1].length,r?s.readAsText(c.slice(p,g),r):s.readAsText(c.slice(p,g),"CP1252"),s.onload=function(e){d.push({text:e.target.result,osis:a[f].osis,verse:a[f].verse}),f++,t()}},function(t){l(t,d)})}}else l({message:"Wrong passage. The requested chapter is not available in this module."})},n}),define("text",["module"],function(t){var e,n,i,s,o,a=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],r=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,l=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,h="undefined"!=typeof location&&location.href,u=h&&location.protocol&&location.protocol.replace(/\:/,""),c=h&&location.hostname,d=h&&(location.port||void 0),p={},g=t.config&&t.config()||{};return e={version:"2.0.10",strip:function(t){if(t){t=t.replace(r,"");var e=t.match(l);e&&(t=e[1])}else t="";return t},jsEscape:function(t){return t.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:g.createXhr||function(){var t,e,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(e=0;3>e;e+=1){n=a[e];try{t=new ActiveXObject(n)}catch(i){}if(t){a=[n];break}}return t},parseName:function(t){var e,n,i,s=!1,o=t.indexOf("."),a=0===t.indexOf("./")||0===t.indexOf("../");return-1!==o&&(!a||o>1)?(e=t.substring(0,o),n=t.substring(o+1,t.length)):e=t,i=n||e,o=i.indexOf("!"),-1!==o&&(s="strip"===i.substring(o+1),i=i.substring(0,o),n?n=i:e=i),{moduleName:e,ext:n,strip:s}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(t,n,i,s){var o,a,r,l=e.xdRegExp.exec(t);return l?(o=l[2],a=l[3],a=a.split(":"),r=a[1],a=a[0],!(o&&o!==n||a&&a.toLowerCase()!==i.toLowerCase()||(r||a)&&r!==s)):!0},finishLoad:function(t,n,i,s){i=n?e.strip(i):i,g.isBuild&&(p[t]=i),s(i)},load:function(t,n,i,s){if(s.isBuild&&!s.inlineText)return i(),void 0;g.isBuild=s.isBuild;var o=e.parseName(t),a=o.moduleName+(o.ext?"."+o.ext:""),r=n.toUrl(a),l=g.useXhr||e.useXhr;return 0===r.indexOf("empty:")?(i(),void 0):(!h||l(r,u,c,d)?e.get(r,function(n){e.finishLoad(t,o.strip,n,i)},function(t){i.error&&i.error(t)}):n([a],function(t){e.finishLoad(o.moduleName+"."+o.ext,o.strip,t,i)}),void 0)},write:function(t,n,i){if(p.hasOwnProperty(n)){var s=e.jsEscape(p[n]);i.asModule(t+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(t,n,i,s,o){var a=e.parseName(n),r=a.ext?"."+a.ext:"",l=a.moduleName+r,h=i.toUrl(a.moduleName+r)+".js";e.load(l,i,function(){var n=function(t){return s(h,t)};n.asModule=function(t,e){return s.asModule(t,h,e)},e.write(t,l,n,o)},o)}},"node"===g.env||!g.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(n=require.nodeRequire("fs"),e.get=function(t,e,i){try{var s=n.readFileSync(t,"utf8");0===s.indexOf("")&&(s=s.substring(1)),e(s)}catch(o){i(o)}}):"xhr"===g.env||!g.env&&e.createXhr()?e.get=function(t,n,i,s){var o,a=e.createXhr();if(a.open("GET",t,!0),s)for(o in s)s.hasOwnProperty(o)&&a.setRequestHeader(o.toLowerCase(),s[o]);g.onXhr&&g.onXhr(a,t),a.onreadystatechange=function(){var e,s;4===a.readyState&&(e=a.status,e>399&&600>e?(s=Error(t+" HTTP status: "+e),s.xhr=a,i(s)):n(a.responseText),g.onXhrComplete&&g.onXhrComplete(a,t))},a.send(null)}:"rhino"===g.env||!g.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?e.get=function(t,e){var n,i,s="utf-8",o=new java.io.File(t),a=java.lang.System.getProperty("line.separator"),r=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(o),s)),l="";try{for(n=new java.lang.StringBuffer,i=r.readLine(),i&&i.length()&&65279===i.charAt(0)&&(i=i.substring(1)),null!==i&&n.append(i);null!==(i=r.readLine());)n.append(a),n.append(i);l=""+n+""}finally{r.close()}e(l)}:("xpconnect"===g.env||!g.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(i=Components.classes,s=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),o="@mozilla.org/windows-registry-key;1"in i,e.get=function(t,e){var n,a,r,l={};o&&(t=t.replace(/\//g,"\\")),r=new FileUtils.File(t);try{n=i["@mozilla.org/network/file-input-stream;1"].createInstance(s.nsIFileInputStream),n.init(r,1,0,!1),a=i["@mozilla.org/intl/converter-input-stream;1"].createInstance(s.nsIConverterInputStream),a.init(n,"utf-8",n.available(),s.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),a.readString(n.available(),l),a.close(),n.close(),e(l.value)}catch(h){throw Error((r&&r.path||"")+": "+h)}}),e}),define("json",["text"],function(text){function cacheBust(t){return t=t.replace(CACHE_BUST_FLAG,""),t+=0>t.indexOf("?")?"?":"&",t+CACHE_BUST_QUERY_PARAM+"="+Math.round(2147483647*Math.random())}var CACHE_BUST_QUERY_PARAM="bust",CACHE_BUST_FLAG="!bust",jsonParse="undefined"!=typeof JSON&&"function"==typeof JSON.parse?JSON.parse:function(val){return eval("("+val+")")},buildMap={};return{load:function(t,e,n,i){!i.isBuild||i.inlineJSON!==!1&&-1===t.indexOf(CACHE_BUST_QUERY_PARAM+"=")?text.get(e.toUrl(t),function(e){i.isBuild?(buildMap[t]=e,n(e)):n(jsonParse(e))},n.error,{accept:"application/json"}):n(null)},normalize:function(t,e){return-1!==t.indexOf(CACHE_BUST_FLAG)&&(t=cacheBust(t)),e(t)},write:function(t,e,n){if(e in buildMap){var i=buildMap[e];n('define("'+t+"!"+e+'", function(){ return '+i+";});\n")}}}}),define("json!../data/kjv.json",function(){return{ot:[{name:"Genesis",abbrev:"Gen",maxChapter:50},{name:"Exodus",abbrev:"Exod",maxChapter:40},{name:"Leviticus",abbrev:"Lev",maxChapter:27},{name:"Numbers",abbrev:"Num",maxChapter:36},{name:"Deuteronomy",abbrev:"Deut",maxChapter:34},{name:"Joshua",abbrev:"Josh",maxChapter:24},{name:"Judges",abbrev:"Judg",maxChapter:21},{name:"Ruth",abbrev:"Ruth",maxChapter:4},{name:"I Samuel",abbrev:"1Sam",maxChapter:31},{name:"II Samuel",abbrev:"2Sam",maxChapter:24},{name:"I Kings",abbrev:"1Kgs",maxChapter:22},{name:"II Kings",abbrev:"2Kgs",maxChapter:25},{name:"I Chronicles",abbrev:"1Chr",maxChapter:29},{name:"II Chronicles",abbrev:"2Chr",maxChapter:36},{name:"Ezra",abbrev:"Ezra",maxChapter:10},{name:"Nehemiah",abbrev:"Neh",maxChapter:13},{name:"Esther",abbrev:"Esth",maxChapter:10},{name:"Job",abbrev:"Job",maxChapter:42},{name:"Psalms",abbrev:"Ps",maxChapter:150},{name:"Proverbs",abbrev:"Prov",maxChapter:31},{name:"Ecclesiastes",abbrev:"Eccl",maxChapter:12},{name:"Song of Solomon",abbrev:"Song",maxChapter:8},{name:"Isaiah",abbrev:"Isa",maxChapter:66},{name:"Jeremiah",abbrev:"Jer",maxChapter:52},{name:"Lamentations",abbrev:"Lam",maxChapter:5},{name:"Ezekiel",abbrev:"Ezek",maxChapter:48},{name:"Daniel",abbrev:"Dan",maxChapter:12},{name:"Hosea",abbrev:"Hos",maxChapter:14},{name:"Joel",abbrev:"Joel",maxChapter:3},{name:"Amos",abbrev:"Amos",maxChapter:9},{name:"Obadiah",abbrev:"Obad",maxChapter:1},{name:"Jonah",abbrev:"Jonah",maxChapter:4},{name:"Micah",abbrev:"Mic",maxChapter:7},{name:"Nahum",abbrev:"Nah",maxChapter:3},{name:"Habakkuk",abbrev:"Hab",maxChapter:3},{name:"Zephaniah",abbrev:"Zeph",maxChapter:3},{name:"Haggai",abbrev:"Hag",maxChapter:2},{name:"Zechariah",abbrev:"Zech",maxChapter:14},{name:"Malachi",abbrev:"Mal",maxChapter:4}],nt:[{name:"Matthew",abbrev:"Matt",maxChapter:28},{name:"Mark",abbrev:"Mark",maxChapter:16},{name:"Luke",abbrev:"Luke",maxChapter:24},{name:"John",abbrev:"John",maxChapter:21},{name:"Acts",abbrev:"Acts",maxChapter:28},{name:"Romans",abbrev:"Rom",maxChapter:16},{name:"I Corinthians",abbrev:"1Cor",maxChapter:16},{name:"II Corinthians",abbrev:"2Cor",maxChapter:13},{name:"Galatians",abbrev:"Gal",maxChapter:6},{name:"Ephesians",abbrev:"Eph",maxChapter:6},{name:"Philippians",abbrev:"Phil",maxChapter:4},{name:"Colossians",abbrev:"Col",maxChapter:4},{name:"I Thessalonians",abbrev:"1Thess",maxChapter:5},{name:"II Thessalonians",abbrev:"2Thess",maxChapter:3},{name:"I Timothy",abbrev:"1Tim",maxChapter:6},{name:"II Timothy",abbrev:"2Tim",maxChapter:4},{name:"Titus",abbrev:"Titus",maxChapter:3},{name:"Philemon",abbrev:"Phlm",maxChapter:1},{name:"Hebrews",abbrev:"Heb",maxChapter:13},{name:"James",abbrev:"Jas",maxChapter:5},{name:"I Peter",abbrev:"1Pet",maxChapter:5},{name:"II Peter",abbrev:"2Pet",maxChapter:3},{name:"I John",abbrev:"1John",maxChapter:5},{name:"II John",abbrev:"2John",maxChapter:1},{name:"III John",abbrev:"3John",maxChapter:1},{name:"Jude",abbrev:"Jude",maxChapter:1},{name:"Revelation of John",abbrev:"Rev",maxChapter:22}],osisToBookNum:{Gen:0,Exod:1,Lev:2,Num:3,Deut:4,Josh:5,Judg:6,Ruth:7,"1Sam":8,"2Sam":9,"1Kgs":10,"2Kgs":11,"1Chr":12,"2Chr":13,Ezra:14,Neh:15,Esth:16,Job:17,Ps:18,Prov:19,Eccl:20,Song:21,Isa:22,Jer:23,Lam:24,Ezek:25,Dan:26,Hos:27,Joel:28,Amos:29,Obad:30,Jonah:31,Mic:32,Nah:33,Hab:34,Zeph:35,Hag:36,Zech:37,Mal:38,Matt:39,Mark:40,Luke:41,John:42,Acts:43,Rom:44,"1Cor":45,"2Cor":46,Gal:47,Eph:48,Phil:49,Col:50,"1Thess":51,"2Thess":52,"1Tim":53,"2Tim":54,Titus:55,Phlm:56,Heb:57,Jas:58,"1Pet":59,"2Pet":60,"1John":61,"2John":62,"3John":63,Jude:64,Rev:65},versesInChapter:[[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,55,32,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],[22,25,22,31,23,30,25,32,35,29,10,51,22,31,27,36,16,27,25,26,36,31,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],[17,16,17,35,19,30,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,50,13,32,22,29,35,41,30,25,18,65,23,31,40,16,54,42,56,29,34,13],[46,37,29,49,33,25,26,20,29,22,32,32,18,29,23,22,20,22,21,20,23,30,25,22,19,19,26,68,29,20,30,52,29,12],[18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33],[36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25],[22,23,18,22],[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,15,23,29,22,44,25,12,25,11,31,13],[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,33,43,26,22,51,39,25],[53,46,28,34,18,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,53],[18,25,27,44,27,33,20,29,37,36,21,21,25,29,38,20,41,37,37,21,26,20,37,20,30],[54,55,24,43,26,81,40,40,44,14,47,40,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],[17,18,17,22,14,42,22,18,31,19,23,16,22,15,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],[11,70,13,24,17,22,28,36,15,44],[11,20,32,23,19,19,73,18,38,39,36,47,31],[22,23,15,17,14,14,10,17,32,3],[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,24,34,17],[6,12,8,8,12,10,17,9,20,18,7,8,6,7,5,11,15,50,14,9,13,31,6,10,22,12,14,9,11,12,24,11,22,22,28,12,40,22,13,17,13,11,5,26,17,11,9,14,20,23,19,9,6,7,23,13,11,11,17,12,8,12,11,10,13,20,7,35,36,5,24,20,28,23,10,12,20,72,13,19,16,8,18,12,13,17,7,18,52,17,16,15,5,23,11,13,12,9,9,5,8,28,22,35,45,48,43,13,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,13,10,7,12,15,21,10,20,14,9,6],[33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31],[18,26,22,16,20,12,29,17,18,20,10,14],[17,17,11,16,16,13,13,14],[31,22,26,6,30,13,25,22,21,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,12,25,24],[19,37,25,31,31,30,34,22,26,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],[22,22,66,22,22],[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,49,32,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],[21,49,30,37,31,28,28,27,27,21,45,13],[11,23,5,19,15,11,16,14,17,15,12,14,16,9],[20,32,21],[15,16,15,13,27,14,17,14,15],[21],[17,10,10,11],[16,13,12,13,15,16,20],[15,13,19],[17,20,19],[18,15,20],[15,23],[21,13,10,14,11,15,14,23,17,12,17,14,9,21],[14,17,18,6],[25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20],[45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20],[80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53],[51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25],[26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,41,38,40,30,35,27,27,32,44,31],[32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27],[31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24],[24,17,18,18,21,18,16,24,15,18,33,21,14],[24,21,29,31,26,18],[23,22,21,32,33,24],[30,30,21,23],[29,23,25,18],[10,20,13,18,28],[12,17,18],[20,15,16,16,25,21],[18,26,17,22],[16,15,15],[25],[14,18,19,16,14,20,28,13,28,39,40,29,25],[27,26,18,17,20],[25,25,22,19,14],[21,22,18],[10,29,24,21,21],[13],[14],[25],[20,29,22,11,14,17,17,13,21,11,19,17,18,20,8,21,18,24,21,15,27,21]]}}),define("json!../data/german.json",function(){return{ot:[{name:"Genesis",abbrev:"Gen",maxChapter:50},{name:"Exodus",abbrev:"Exod",maxChapter:40},{name:"Leviticus",abbrev:"Lev",maxChapter:27},{name:"Numbers",abbrev:"Num",maxChapter:36},{name:"Deuteronomy",abbrev:"Deut",maxChapter:34},{name:"Joshua",abbrev:"Josh",maxChapter:24},{name:"Judges",abbrev:"Judg",maxChapter:21},{name:"Ruth",abbrev:"Ruth",maxChapter:4},{name:"I Samuel",abbrev:"1Sam",maxChapter:31},{name:"II Samuel",abbrev:"2Sam",maxChapter:24},{name:"I Kings",abbrev:"1Kgs",maxChapter:22},{name:"II Kings",abbrev:"2Kgs",maxChapter:25},{name:"I Chronicles",abbrev:"1Chr",maxChapter:29},{name:"II Chronicles",abbrev:"2Chr",maxChapter:36},{name:"Ezra",abbrev:"Ezra",maxChapter:10},{name:"Nehemiah",abbrev:"Neh",maxChapter:13},{name:"Esther",abbrev:"Esth",maxChapter:10},{name:"Job",abbrev:"Job",maxChapter:42},{name:"Psalms",abbrev:"Ps",maxChapter:150},{name:"Proverbs",abbrev:"Prov",maxChapter:31},{name:"Ecclesiastes",abbrev:"Eccl",maxChapter:12},{name:"Song of Solomon",abbrev:"Song",maxChapter:8},{name:"Isaiah",abbrev:"Isa",maxChapter:66},{name:"Jeremiah",abbrev:"Jer",maxChapter:52},{name:"Lamentations",abbrev:"Lam",maxChapter:5},{name:"Ezekiel",abbrev:"Ezek",maxChapter:48},{name:"Daniel",abbrev:"Dan",maxChapter:12},{name:"Hosea",abbrev:"Hos",maxChapter:14},{name:"Joel",abbrev:"Joel",maxChapter:4},{name:"Amos",abbrev:"Amos",maxChapter:9},{name:"Obadiah",abbrev:"Obad",maxChapter:1},{name:"Jonah",abbrev:"Jonah",maxChapter:4},{name:"Micah",abbrev:"Mic",maxChapter:7},{name:"Nahum",abbrev:"Nah",maxChapter:3},{name:"Habakkuk",abbrev:"Hab",maxChapter:3},{name:"Zephaniah",abbrev:"Zeph",maxChapter:3},{name:"Haggai",abbrev:"Hag",maxChapter:2},{name:"Zechariah",abbrev:"Zech",maxChapter:14},{name:"Malachi",abbrev:"Mal",maxChapter:3}],versesInChapter:[[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,54,33,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],[22,25,22,31,23,30,29,28,35,29,10,51,22,31,27,36,16,27,25,26,37,30,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],[17,16,17,35,26,23,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,35,28,32,22,29,35,41,30,25,19,65,23,31,39,17,54,42,56,29,34,13],[46,37,29,49,33,25,26,20,29,22,32,31,19,29,23,22,20,22,21,20,23,29,26,22,19,19,26,69,28,20,30,52,29,12],[18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33],[36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25],[22,23,18,22],[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,16,23,28,23,44,25,12,25,11,31,13],[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,32,44,26,22,51,39,25],[53,46,28,20,32,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,54],[18,25,27,44,27,33,20,29,37,36,20,22,25,29,39,20,41,37,37,21,26,20,37,20,30],[54,55,24,43,41,66,40,40,44,14,47,41,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],[18,17,17,22,14,42,22,18,31,19,23,16,23,14,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],[11,70,13,24,17,22,28,36,15,44],[11,20,38,17,19,19,73,18,37,40,36,47,31],[22,23,15,17,14,14,10,17,32,3],[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,32,26,17],[6,12,9,9,13,11,18,10,21,18,7,9,6,7,5,11,15,51,15,10,14,32,6,10,22,12,14,9,11,13,25,11,22,23,28,13,40,23,14,18,14,12,5,27,18,12,10,15,21,23,21,11,7,9,24,14,12,12,18,14,9,13,12,11,14,20,8,36,37,6,24,20,28,23,11,13,21,72,13,20,17,8,19,13,14,17,7,19,53,17,16,16,5,23,11,13,12,9,9,5,8,29,22,35,45,48,43,14,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,14,10,8,12,15,21,10,20,14,9,6],[33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31],[18,26,22,17,19,12,29,17,18,20,10,14],[17,17,11,16,16,12,14,14],[31,22,26,6,30,13,25,23,20,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,11,25,24],[19,37,25,31,31,30,34,23,25,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],[22,22,66,22,22],[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,44,37,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],[21,49,33,34,30,29,28,27,27,21,45,13],[9,25,5,19,15,11,16,14,17,15,11,15,15,10],[20,27,5,21],[15,16,15,13,27,14,17,14,15],[21],[16,11,10,11],[16,13,12,14,14,16,20],[14,14,19],[17,20,19],[18,15,20],[15,23],[17,17,10,14,11,15,14,23,17,12,17,14,9,21],[14,17,24],[25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20],[45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20],[80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53],[51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25],[26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,40,38,40,30,35,27,27,32,44,31],[32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27],[31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24],[24,17,18,18,21,18,16,24,15,18,33,21,13],[24,21,29,31,26,18],[23,22,21,32,33,24],[30,30,21,23],[29,23,25,18],[10,20,13,18,28],[12,17,18],[20,15,16,16,25,21],[18,26,17,22],[16,15,15],[25],[14,18,19,16,14,20,28,13,28,39,40,29,25],[27,26,18,17,20],[25,25,22,19,14],[21,22,18],[10,29,24,21,21],[13],[15],[25],[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21]]}}),define("versificationMgr",["json!../data/kjv.json","json!../data/german.json"],function(t,e){function n(t){return void 0!==t&&h[t]?h[t].ot.length:h.kjv.ot.length}function i(t){return void 0!==t&&h[t]?h[t].nt.length:h.kjv.nt.length}function s(t,e){t=0>t?0:t;var i=n(e),s=i>t?"ot":"nt";return t=i>t?t:t-i,void 0!==e&&h[e]?h[e][s][t].maxChapter:h.kjv[s][t].maxChapter}function o(t,e,n){return void 0!==n&&h[n]?h[n].versesInChapter[t][e]:h.kjv.versesInChapter[t][e]}function a(t,e){t=0>t?0:t;var i=n(e),s=i>t?"ot":"nt";return t=i>t?t:t-i,void 0!==e&&h[e]?h[e][s][t]:h.kjv[s][t]}function r(t,e){return void 0!==e&&h[e]?h[e].osisToBookNum[t]:h.kjv.osisToBookNum[t]}function l(t){var e=[];return void 0!==t&&h[t]?e.concat(h[t].ot,h[t].nt):e.concat(h.kjv.ot,h.kjv.nt) -}var h={};return h.kjv=t,e.nt=t.nt,e.osisToBookNum=t.osisToBookNum,h.german=e,{getBooksInOT:n,getBooksInNT:i,getChapterMax:s,getVersesInChapter:o,getBook:a,getBookNum:r,getAllBooks:l}}),define("installMgr",["unzip","dataMgr","zText","versificationMgr","async","tools"],function(t,e,n,i,s,o){function a(t){l("http://crosswire.org/ftpmirror/pub/sword/masterRepoList.conf","text",function(e,n){if(""!==n||e)if(e)t(e);else{var i=[],s=null,o="",a="";n.split(/[\r\n]+/g).forEach(function(t){if(s=t.split("|"),s.length>1&&-1!==s[0].search("CrossWire")){switch(a=s[0].split("=")[2]){case"CrossWire":o="main";break;case"CrossWire Beta":o="beta";break;case"CrossWire av11n":o="av";break;case"CrossWire Attic":o="attic";break;case"CrossWire Wycliffe":o="wycliffe";break;case"CrossWire av11n Attic":o="avattic"}i.push({name:a,type:o,url:"http://crosswire.org/ftpmirror"+s[2].replace("raw","packages")+"/rawzip/",confUrl:"http://crosswire.org/ftpmirror"+s[2]+"/mods.d"})}}),t(e,i)}else t("Couldn't download master repo list!")})}function r(t,e){l(t.confUrl,"document",function(n,i){if(n)e(n);else{for(var a=[],r="",h=i.getElementsByTagName("a"),u=0;h.length>u;u++)-1!==h[u].href.search(".conf")&&(r=h[u].baseURI+"/"+h[u].textContent,a.push(function(e){return function(n){l(e,"text",function(e,i){var s=o.readConf(i);"zText"===s.ModDrv?(s.url="http://www.crosswire.org/sword/servlet/SwordMod.Verify?modName="+s.moduleKey+"&"+t.type+"=true&pkgType=raw",n(e,s)):n(e)})}}(r)));s.parallel(a,function(t,n){e(t,o.cleanArray(n).sort(o.dynamicSortMultiple("Lang","moduleKey")))})}})}function l(t,e,n,i){var s=new XMLHttpRequest({mozSystem:!0,mozAnon:!0});s.open("GET",t,!0),s.responseType=e,s.onreadystatechange=function(){4==s.readyState&&(200===s.status?n(null,s.response):n({message:"Couldn't download module.",error:s.status}))},s.onprogress=i,s.onerror=function(t){n(t)},s.send(null)}function h(t,e,n){"string"==typeof t?l(t,"document",function(t,i){if(t)e(t);else{var s=i.getElementsByTagName("a")[0].href;l(s,"blob",function(t,n){t?e(t):u(n,e)},n)}}):u(t,e)}function u(n,i){var s=new FileReader;s.onload=function(n){var s=new t.Unzip(new Uint8Array(n.target.result)),o=s.getFilenames();o.forEach(function(t){-1!==t.search(".conf")&&e.saveConfig(new Blob([s.decompress(t)]),function(t,e){t?i(t):c(s,e.v11n,e,i)})})},s.readAsArrayBuffer(n)}function c(t,n,i,o){var a={};a.bin=[];var r=t.getFilenames();r.forEach(function(e){-1!==e.search("nt.bzs")?a.ntB=e:-1!==e.search("nt.bzv")?a.ntCV=e:-1!==e.search("ot.bzs")?a.otB=e:-1!==e.search("ot.bzv")?a.otCV=e:-1===e.search(".conf")&&a.bin.push({blob:new Blob([t.decompress(e)]),name:e})}),s.series([function(t){e.saveModule(a.bin,i,function(e){e?t(e):t(null)})},function(s){var o=null,r=null,l=null,h=null;a.otB&&(o=d(t.decompress(a.otB)),r=g(t.decompress(a.otCV),o,"ot",n)),a.ntB&&(l=d(t.decompress(a.ntB)),h=g(t.decompress(a.ntCV),l,"nt",n)),e.saveBCVPos(r,h,i,function(t){t?s(t):s(null)})}],function(t){t?(e.remove(i.id,function(){}),o(t)):o(null,i.id)})}function d(t){var e=0,n=0,i=0,s=null,o=!1,a=[];for(y=0;!o;)if(s=f(t),e=s[0],o=s[1],!o&&(s=f(t),n=s[0],o=s[1],!o)){if(s=f(t),i=s[0],o=s[1],o)break;a.push({startPos:e,length:n,unused:i})}return a}function p(t){y=0;for(var e=0;4>e;e++)m(t),v(t),m(t)}function g(t,e,n,s){p(t);for(var o="ot"===n?0:i.getBooksInOT(s),a="ot"===n?i.getBooksInOT(s):i.getBooksInOT(s)+i.getBooksInNT(s),r=0,l=0,h=0,u=0,c=0,d=null,g=0,f={},y={},b=o;a>b;b++){d=i.getBook(b,s),y[d.abbrev]=[];for(var x=0;d.maxChapter>x;x++){r=0,l=0,f={},f.verses=[],h=0;for(var C=0;i.getVersesInChapter(b,x,s)>C;C++)c=m(t)[0],g=v(t)[0],0!==g&&(l=g),h=m(t)[0],0===C&&(r=g,u=0,e.length>c&&(u=e[c].startPos),f.startPos=r,f.booknum=b,f.bookStartPos=u),0===c&&0===g&&0===h?f!=={}&&f.verses.push({startPos:0,length:0}):f!=={}&&f.verses.push({startPos:g-r,length:h});f!={}&&(f.length=l-r+h,y[d.abbrev].push(f)),m(t),v(t),m(t)}m(t),v(t),m(t)}return y}function f(t,e){return b=t.subarray(y,y+4),x=!1,y+=4,4!==b.length&&(x=!0),e&&e(1048576*b[3]+65536*b[2]+256*b[1]+b[0],x),[1048576*b[3]+65536*b[2]+256*b[1]+b[0],x]}function m(t,e){return b=t.subarray(y,y+2),x=!1,y+=2,2!==b.length&&(x=!0),e&&e(256*b[1]+b[0],x),[256*b[1]+b[0],x]}function v(t,e){return b=t.subarray(y,y+6),x=!1,y+=6,6!==b.length&&(x=!0),e&&e(17592186044416*b[1]+4294967296*b[0]+16777216*b[5]+65536*b[4]+256*b[3]+b[2],x),[17592186044416*b[1]+4294967296*b[0]+16777216*b[5]+65536*b[4]+256*b[3]+b[2],x]}var y=0,b=null,x=!1;return{getRepositories:a,getModules:r,installModule:h}}),function(){var t,e,n,i={}.hasOwnProperty,s=function(){var t,e,n;this.options={},n=s.prototype.options;for(t in n)i.call(n,t)&&(e=n[t],this.options[t]=e);this.versification_system(this.options.versification_system)};s.prototype.s="",s.prototype.entities=[],s.prototype.passage=null,s.prototype.regexps={},s.prototype.options={consecutive_combination_strategy:"combine",osis_compaction_strategy:"b",book_sequence_strategy:"ignore",invalid_sequence_strategy:"ignore",sequence_combination_strategy:"combine",invalid_passage_strategy:"ignore",zero_chapter_strategy:"error",zero_verse_strategy:"error",non_latin_digits_strategy:"ignore",book_alone_strategy:"ignore",captive_end_digits_strategy:"delete",end_range_digits_strategy:"verse",include_apocrypha:!1,ps151_strategy:"c",versification_system:"default",case_sensitive:"none"},s.prototype.parse=function(t){var e,n,i;for(this.reset(),this.s=t,t=this.replace_control_characters(t),n=this.match_books(t),t=n[0],this.passage.books=n[1],t=this.match_passages(t),this.entities=[],n=0,i=t.length;i>n;n++)e=t[n],e=this.passage.handle_array([e])[0],this.entities=this.entities.concat(e);return this},s.prototype.reset=function(){return this.s="",this.entities=[],this.passage?(this.passage.books=[],this.passage.indices={}):(this.passage=new e,this.passage.options=this.options,this.passage.translations=this.translations)},s.prototype.set_options=function(t){var e,n;for(e in t)i.call(t,e)&&(n=t[e],"include_apocrypha"===e||"versification_system"===e||"case_sensitive"===e?this[e](n):this.options[e]=n);return this},s.prototype.include_apocrypha=function(t){return null==t||!0!==t&&!1!==t?this:(this.options.include_apocrypha=t,this.regexps.books=this.regexps.get_books(t,this.options.case_sensitive),!0===t?this.translations["default"].chapters.Ps[150]=this.translations["default"].chapters.Ps151[0]:!1===t&&151===this.translations["default"].chapters.Ps.length&&this.translations["default"].chapters.Ps.pop(),this)},s.prototype.versification_system=function(t){var e,s;if(null==t||null==this.translations.alternates[t])return this;if(this.options.versification_system=t,null==(s=this.translations.alternates)["default"]&&(s["default"]={order:null,chapters:{}}),null!=this.translations.alternates[t].order&&(null==this.translations.alternates["default"].order&&(this.translations.alternates["default"].order=n.shallow_clone(this.translations["default"].order)),this.translations["default"].order=n.shallow_clone(this.translations.alternates[t].order)),null!=this.translations.alternates[t].chapters)for(e in s=this.translations.alternates[t].chapters)i.call(s,e)&&(t=s[e],null==this.translations.alternates["default"].chapters[e]&&(this.translations.alternates["default"].chapters[e]=n.shallow_clone_array(this.translations["default"].chapters[e])),this.translations["default"].chapters[e]=n.shallow_clone_array(t));return this.include_apocrypha(this.options.include_apocrypha),this},s.prototype.case_sensitive=function(t){return null==t||"none"!==t&&"books"!==t||t===this.options.case_sensitive?this:(this.options.case_sensitive=t,this.regexps.books=this.regexps.get_books(this.options.include_apocrypha,t),this)},s.prototype.replace_control_characters=function(t){return t=t.replace(this.regexps.control," "),"replace"===this.options.non_latin_digits_strategy&&(t=t.replace(/[\u0660\u06f0\u07c0\u0966\u09e6\u0a66\u0ae6\u0b660\u0c66\u0ce6\u0d66\u0e50\u0ed0\u0f20\u1040\u1090\u17e0\u1810\u1946\u19d0\u1a80\u1a90\u1b50\u1bb0\u1c40\u1c50\ua620\ua8d0\ua900\ua9d0\uaa50\uabf0\uff10]/g,"0"),t=t.replace(/[\u0661\u06f1\u07c1\u0967\u09e7\u0a67\u0ae7\u0b67\u0be7\u0c67\u0ce7\u0d67\u0e51\u0ed1\u0f21\u1041\u1091\u17e1\u1811\u1947\u19d1\u1a81\u1a91\u1b51\u1bb1\u1c41\u1c51\ua621\ua8d1\ua901\ua9d1\uaa51\uabf1\uff11]/g,"1"),t=t.replace(/[\u0662\u06f2\u07c2\u0968\u09e8\u0a68\u0ae8\u0b68\u0be8\u0c68\u0ce8\u0d68\u0e52\u0ed2\u0f22\u1042\u1092\u17e2\u1812\u1948\u19d2\u1a82\u1a92\u1b52\u1bb2\u1c42\u1c52\ua622\ua8d2\ua902\ua9d2\uaa52\uabf2\uff12]/g,"2"),t=t.replace(/[\u0663\u06f3\u07c3\u0969\u09e9\u0a69\u0ae9\u0b69\u0be9\u0c69\u0ce9\u0d69\u0e53\u0ed3\u0f23\u1043\u1093\u17e3\u1813\u1949\u19d3\u1a83\u1a93\u1b53\u1bb3\u1c43\u1c53\ua623\ua8d3\ua903\ua9d3\uaa53\uabf3\uff13]/g,"3"),t=t.replace(/[\u0664\u06f4\u07c4\u096a\u09ea\u0a6a\u0aea\u0b6a\u0bea\u0c6a\u0cea\u0d6a\u0e54\u0ed4\u0f24\u1044\u1094\u17e4\u1814\u194a\u19d4\u1a84\u1a94\u1b54\u1bb4\u1c44\u1c54\ua624\ua8d4\ua904\ua9d4\uaa54\uabf4\uff14]/g,"4"),t=t.replace(/[\u0665\u06f5\u07c5\u096b\u09eb\u0a6b\u0aeb\u0b6b\u0beb\u0c6b\u0ceb\u0d6b\u0e55\u0ed5\u0f25\u1045\u1095\u17e5\u1815\u194b\u19d5\u1a85\u1a95\u1b55\u1bb5\u1c45\u1c55\ua625\ua8d5\ua905\ua9d5\uaa55\uabf5\uff15]/g,"5"),t=t.replace(/[\u0666\u06f6\u07c6\u096c\u09ec\u0a6c\u0aec\u0b6c\u0bec\u0c6c\u0cec\u0d6c\u0e56\u0ed6\u0f26\u1046\u1096\u17e6\u1816\u194c\u19d6\u1a86\u1a96\u1b56\u1bb6\u1c46\u1c56\ua626\ua8d6\ua906\ua9d6\uaa56\uabf6\uff16]/g,"6"),t=t.replace(/[\u0667\u06f7\u07c7\u096d\u09ed\u0a6d\u0aed\u0b6d\u0bed\u0c6d\u0ced\u0d6d\u0e57\u0ed7\u0f27\u1047\u1097\u17e7\u1817\u194d\u19d7\u1a87\u1a97\u1b57\u1bb7\u1c47\u1c57\ua627\ua8d7\ua907\ua9d7\uaa57\uabf7\uff17]/g,"7"),t=t.replace(/[\u0668\u06f8\u07c8\u096e\u09ee\u0a6e\u0aee\u0b6e\u0bee\u0c6e\u0cee\u0d6e\u0e58\u0ed8\u0f28\u1048\u1098\u17e8\u1818\u194e\u19d8\u1a88\u1a98\u1b58\u1bb8\u1c48\u1c58\ua628\ua8d8\ua908\ua9d8\uaa58\uabf8\uff18]/g,"8"),t=t.replace(/[\u0669\u06f9\u07c9\u096f\u09ef\u0a6f\u0aef\u0b6f\u0bef\u0c6f\u0cef\u0d6f\u0e59\u0ed9\u0f29\u1049\u1099\u17e9\u1819\u194f\u19d9\u1a89\u1a99\u1b59\u1bb9\u1c49\u1c59\ua629\ua8d9\ua909\ua9d9\uaa59\uabf9\uff19]/g,"9")),t},s.prototype.match_books=function(t){var e,n,i,s,o;for(n=[],o=this.regexps.books,i=0,s=o.length;s>i;i++)e=o[i],t=t.replace(e.regexp,function(t,i,s){return n.push({value:s,parsed:e.osis}),""+i+""+(n.length-1)+(null!=e.extra?"/"+e.extra:"")+""});return t=t.replace(this.regexps.translations,function(t){return n.push({value:t,parsed:t.toLowerCase()}),""+(n.length-1)+""}),[t,this.get_book_indices(n,t)]},s.prototype.get_book_indices=function(t,e){var n,i,s;for(n=0,s=/([\x1f\x1e])(\d+)(?:\/[a-z])?\1/g;i=s.exec(e);)t[i[2]].start_index=i.index+n,n+=t[i[2]].value.length-i[0].length;return t},s.prototype.match_passages=function(t){var e,n,i,s,o;for(o=[];i=this.regexps.escaped_passage.exec(t);)n=i[0],s=i[1],e=i[2],i.index+=n.length-s.length,/\s[2-9]\d\d\s*$|\s\d{4,}\s*$/.test(s)&&(n=/\s+\d+\s*$/,s=s.replace(n,"")),/[\d\x1f\x1e)]$/.test(s)||(s=this.replace_match_end(s)),"delete"===this.options.captive_end_digits_strategy&&(i=i.index+s.length,t.length>i&&/^\w/.test(t.substr(i,1))&&(s=s.replace(/[\s*]+\d+$/,"")),s=s.replace(/(\x1e[)\]]?)[\s*]*\d+$/,"$1")),s=s.replace(/[A-Z]+/g,function(t){return t.toLowerCase()}),i=s.substr(0,!1)?0:s.split("")[0].length,s={value:a.parse(s),type:"base",start_index:this.passage.books[e].start_index-i,match:s},"full"===this.options.book_alone_strategy&&1===s.value.length&&"b"===s.value[0].type&&0===i&&1===this.passage.books[e].parsed.length&&/^[234]/.test(this.passage.books[e].parsed[0])&&this.create_book_range(t,s,e),o.push(s);return o},s.prototype.replace_match_end=function(t){var e,n;for(n=t.length;e=this.regexps.match_end_split.exec(t);)n=e.index+e[0].length;return t.length>n&&(t=t.substr(0,n)),t},s.prototype.create_book_range=function(t,e,n){var i,o,a,r,l;for(i=[s.prototype.regexps.first,s.prototype.regexps.second,s.prototype.regexps.third],a=parseInt(this.passage.books[n].parsed[0].substr(0,1),10),o=l=1;a>=1?a>l:l>a;o=a>=1?++l:--l)if(r=o===a-1?s.prototype.regexps.range_and:s.prototype.regexps.range_only,r=t.match(RegExp("(?:^|\\W)("+i[o-1]+"\\s*"+r+"\\s*)\\x1f"+n+"\\x1f","i")),null!=r)return this.add_book_range_object(e,r,o);return!1},s.prototype.add_book_range_object=function(t,e,n){var i;return i=e[1].length,t.value[0]={type:"b_range_pre",value:[{type:"b_pre",value:""+n,indices:[e.index,e.index+i]},t.value[0]],indices:[0,t.value[0].indices[1]+i]},t.value[0].value[1].indices[0]+=i,t.value[0].value[1].indices[1]+=i,t.start_index-=i,t.match=e[1]+t.match},s.prototype.osis=function(){var t,e,n,i,s;for(e=[],s=this.parsed_entities(),n=0,i=s.length;i>n;n++)t=s[n],t.osis.length>0&&e.push(t.osis);return e.join(",")},s.prototype.osis_and_translations=function(){var t,e,n,i,s;for(e=[],s=this.parsed_entities(),n=0,i=s.length;i>n;n++)t=s[n],t.osis.length>0&&e.push([t.osis,t.translations.join(",")]);return e},s.prototype.osis_and_indices=function(){var t,e,n,i,s;for(e=[],s=this.parsed_entities(),n=0,i=s.length;i>n;n++)t=s[n],t.osis.length>0&&e.push({osis:t.osis,translations:t.translations,indices:t.indices});return e},s.prototype.parsed_entities=function(){var t,e,n,i,s,o,a,r,l,h,u,c,d;for(o=[],e=h=0,c=this.entities.length;c>=0?c>h:h>c;e=c>=0?++h:--h)if(t=this.entities[e],t.type&&"translation_sequence"===t.type&&o.length>0&&e===o[o.length-1].entity_id+1&&(o[o.length-1].indices[1]=t.absolute_indices[1]),null!=t.passages&&("b"!==t.type&&"b_range"!==t.type||"ignore"!==this.options.book_alone_strategy)){if(l=[],r=null,null!=t.passages[0].translations)for(u=t.passages[0].translations,i=0,a=u.length;a>i;i++)s=u[i],n=(null!=(d=s.osis)?d.length:void 0)>0?s.osis:"",null==r&&(r=s.alias),l.push(n);else l=[""],r="default";for(s=[],i=t.passages.length,n=u=0;i>=0?i>u:u>i;n=i>=0?++u:--u)a=t.passages[n],null==a.type&&(a.type=t.type),(!1!==a.valid.valid||("ignore"===this.options.invalid_sequence_strategy&&"sequence"===t.type&&this.snap_sequence("ignore",t,s,n,i),"ignore"!==this.options.invalid_passage_strategy))&&("b"!==a.type&&"b_range"!==a.type||"ignore"!==this.options.book_sequence_strategy||"sequence"!==t.type?(null==a.absolute_indices&&(a.absolute_indices=t.absolute_indices),s.push({osis:a.valid.valid?this.to_osis(a.start,a.end,r):"",type:a.type,indices:a.absolute_indices,translations:l,start:a.start,end:a.end,enclosed_indices:a.enclosed_absolute_indices,entity_id:e,entities:[a]})):this.snap_sequence("book",t,s,n,i));if(0!==s.length)if(s.length>1&&"combine"===this.options.consecutive_combination_strategy&&(s=this.combine_consecutive_passages(s,r)),"separate"===this.options.sequence_combination_strategy)o=o.concat(s);else{for(r=[],n=s.length-1,null!=s[n].enclosed_indices&&s[n].enclosed_indices[1]>=0&&(t.absolute_indices[1]=s[n].enclosed_indices[1]),i=0,a=s.length;a>i;i++)n=s[i],n.osis.length>0&&r.push(n.osis);o.push({osis:r.join(","),indices:t.absolute_indices,translations:l,entity_id:e,entities:s})}}return o},s.prototype.to_osis=function(t,e,n){var i;return null==e.c&&null==e.v&&t.b===e.b&&null==t.c&&null==t.v&&"first_chapter"===this.options.book_alone_strategy&&(e.c=1),null==t.c&&(t.c=1),null==t.v&&(t.v=1),null==e.c&&(e.c=this.passage.translations[n].chapters[e.b].length),null==e.v&&(e.v=this.passage.translations[n].chapters[e.b][e.c-1]),this.options.include_apocrypha&&"b"===this.options.ps151_strategy&&(151===t.c&&"Ps"===t.b||151===e.c&&"Ps"===e.b)&&this.fix_ps151(t,e,n),"b"===this.options.osis_compaction_strategy&&1===t.c&&1===t.v&&e.c===this.passage.translations[n].chapters[e.b].length&&e.v===this.passage.translations[n].chapters[e.b][e.c-1]?(n=t.b,i=e.b):2>=this.options.osis_compaction_strategy.length&&1===t.v&&e.v===this.passage.translations[n].chapters[e.b][e.c-1]?(n=t.b+"."+(""+t.c),i=e.b+"."+(""+e.c)):(n=t.b+"."+(""+t.c)+"."+(""+t.v),i=e.b+"."+(""+e.c)+"."+(""+e.v)),n=n===i?n:n+"-"+i,null!=t.extra&&(n=t.extra+","+n),null!=e.extra&&(n+=","+e.extra),n},s.prototype.fix_ps151=function(t,e,n){return 151===t.c&&"Ps"===t.b?151===e.c&&"Ps"===e.b?(t.b="Ps151",t.c=1,e.b="Ps151",e.c=1):(t.extra=this.to_osis({b:"Ps151",c:1,v:t.v},{b:"Ps151",c:1,v:this.passage.translations[n].chapters.Ps151[0]},n),t.b="Prov",t.c=1,t.v=1):(e.extra=this.to_osis({b:"Ps151",c:1,v:1},{b:"Ps151",c:1,v:e.v},n),e.c=150,e.v=this.passage.translations[n].chapters.Ps[149])},s.prototype.combine_consecutive_passages=function(t,e){var n,i,s,o,a,r,l,h,u,c;for(l=[],h={},a=t.length-1,n=-1,i=!1,s=c=0;a>=0?a>=c:c>=a;s=a>=0?++c:--c)r=t[s],r.osis.length>0?(u=l.length-1,o=!1,r.enclosed_indices[0]!==n&&(n=r.enclosed_indices[0]),n>=0&&(s===a||t[s+1].enclosed_indices[0]!==r.enclosed_indices[0])&&(i=o=!0),this.is_verse_consecutive(h,r.start,e)?(l[u].end=r.end,l[u].is_enclosed_last=o,l[u].indices[1]=r.indices[1],l[u].enclosed_indices[1]=r.enclosed_indices[1],l[u].osis=this.to_osis(l[u].start,r.end,e)):l.push(r),h={b:r.end.b,c:r.end.c,v:r.end.v}):(l.push(r),h={});return i&&this.snap_enclosed_indices(l),l},s.prototype.snap_enclosed_indices=function(t){var e,n,i;for(n=0,i=t.length;i>n;n++)e=t[n],null!=e.is_enclosed_last&&(0>e.enclosed_indices[0]&&e.is_enclosed_last&&(e.indices[1]=e.enclosed_indices[1]),delete e.is_enclosed_last);return t},s.prototype.is_verse_consecutive=function(t,e,n){var i;if(null==t.b)return!1;if(i=null!=this.passage.translations[n].order?this.passage.translations[n].order:this.passage.translations["default"].order,t.b===e.b){if(t.c===e.c){if(t.v===e.v-1)return!0}else if(1===e.v&&t.c===e.c-1&&t.v===this.passage.translations[n].chapters[t.b][t.c-1])return!0}else if(1===e.c&&1===e.v&&i[t.b]===i[e.b]-1&&t.c===this.passage.translations[n].chapters[t.b].length&&t.v===this.passage.translations[n].chapters[t.b][t.c-1])return!0;return!1},s.prototype.snap_sequence=function(t,e,n,i,s){var o;return o=e.passages[i],o.absolute_indices[0]===e.absolute_indices[0]&&s-1>i&&this.get_snap_sequence_i(e.passages,i,s)!==i?(e.absolute_indices[0]=e.passages[i+1].absolute_indices[0],this.remove_absolute_indices(e.passages,i+1)):o.absolute_indices[1]===e.absolute_indices[1]&&i>0?e.absolute_indices[1]=n.length>0?n[n.length-1].indices[1]:e.passages[i-1].absolute_indices[1]:"book"===t&&s-1>i&&!this.starts_with_book(e.passages[i+1])&&(e.passages[i+1].absolute_indices[0]=o.absolute_indices[0]),e},s.prototype.get_snap_sequence_i=function(t,e,n){var i,s,o;for(i=s=o=e+1;n>=o?n>s:s>n;i=n>=o?++s:--s){if(this.starts_with_book(t[i]))return i;if(t[i].valid.valid)break}return e},s.prototype.starts_with_book=function(t){return"b"===t.type.substr(0,1)||("range"===t.type||"ff"===t.type)&&"b"===t.start.type.substr(0,1)?!0:!1},s.prototype.remove_absolute_indices=function(t,e){var n,i,s,o,a,r;if(0>t[e].enclosed_absolute_indices[0])return!1;for(n=t[e].enclosed_absolute_indices,s=n[0],n=n[1],r=t.slice(e),o=0,a=r.length;a>o&&(i=r[o],i.enclosed_absolute_indices[0]===s&&i.enclosed_absolute_indices[1]===n);o++)i.enclosed_absolute_indices=[-1,-1];return!0},this.bcv_parser=t=s;var o=function(){};o.prototype.books=[],o.prototype.indices={},o.prototype.options={},o.prototype.translations={},o.prototype.handle_array=function(t,e,n){var i,s,o;for(null==e&&(e=[]),null==n&&(n={}),s=0,o=t.length;o>s&&(i=t[s],"stop"!==i.type);s++)n=this.handle_obj(i,e,n),e=n[0],n=n[1];return[e,n]},o.prototype.handle_obj=function(t,e,n){return null!=t.type&&null!=this[t.type]?this[t.type](t,e,n):[e,n]},o.prototype.b=function(t,e,i){var s,o,a,r,l;for(t.start_context=n.shallow_clone(i),t.passages=[],i=[],l=this.books[t.value].parsed,a=0,r=l.length;r>a;a++)s=l[a],o=this.validate_ref(t.start_context.translations,{b:s}),s={start:{b:s},end:{b:s},valid:o},0===t.passages.length&&o.valid?t.passages.push(s):i.push(s);return 0===t.passages.length&&t.passages.push(i.shift()),i.length>0&&(t.passages[0].alternates=i),null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),e.push(t),i={b:t.passages[0].start.b},null!=t.start_context.translations&&(i.translations=t.start_context.translations),[e,i]},o.prototype.b_range=function(t,e,n){return this.range(t,e,n)},o.prototype.b_range_pre=function(t,e,i){var s,o;return t.start_context=n.shallow_clone(i),t.passages=[],s=this.pluck("b",t.value),i=this.b(s,[],i),s=i[0][0],i=i[1],null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),o={b:t.value[0].value+s.passages[0].start.b.substr(1),type:"b"},t.passages=[{start:o,end:s.passages[0].end,valid:s.passages[0].valid}],null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),e.push(t),[e,i]},o.prototype.base=function(t,e,n){return this.indices=this.calculate_indices(t.match,t.start_index),this.handle_array(t.value,e,n)},o.prototype.bc=function(t,e,i){var s,o,a,r,l,h,u,c,d;for(t.start_context=n.shallow_clone(i),t.passages=[],this.reset_context(i,["b","c","v"]),a=this.pluck("c",t.value).value,s=[],d=this.books[this.pluck("b",t.value).value].parsed,u=0,c=d.length;c>u;u++)o=d[u],r="c",h=this.validate_ref(t.start_context.translations,{b:o,c:a}),l={start:{b:o},end:{b:o},valid:h},h.messages.start_chapter_not_exist_in_single_chapter_book&&(l.valid=this.validate_ref(t.start_context.translations,{b:o,v:a}),l.start.c=1,l.end.c=1,r="v"),l.start[r]=a,o=this.fix_start_zeroes(l.valid,l.start.c,l.start.v),l.start.c=o[0],l.start.v=o[1],l.end[r]=l.start[r],0===t.passages.length&&l.valid.valid?t.passages.push(l):s.push(l);return 0===t.passages.length&&t.passages.push(s.shift()),s.length>0&&(t.passages[0].alternates=s),null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),this.set_context_from_object(i,["b","c","v"],t.passages[0].start),e.push(t),[e,i]},o.prototype.bc_title=function(t,e,i){var s,o,a,r;if(t.start_context=n.shallow_clone(i),i=this.bc(this.pluck("bc",t.value),[],i),s=i[0][0],i=i[1],"Ps"!==s.passages[0].start.b.substr(0,2)&&null!=s.passages[0].alternates)for(o=a=0,r=s.passages[0].alternates.length;r>=0?r>a:a>r;o=r>=0?++a:--a)if("Ps"===s.passages[0].alternates[o].start.b.substr(0,2)){s.passages[0]=s.passages[0].alternates[o];break}return"Ps"!==s.passages[0].start.b.substr(0,2)?(e.push(s),[e,i]):(this.books[this.pluck("b",s.value).value].parsed=["Ps"],s=this.pluck("title",t.value),t.value[1]={type:"v",value:[{type:"integer",value:1,indices:s.indices}],indices:s.indices},t.original_type="bc_title",t.type="bcv",this.bcv(t,e,t.start_context))},o.prototype.bcv=function(t,e,i){var s,o,a,r,l,h,u,c;for(t.start_context=n.shallow_clone(i),t.passages=[],this.reset_context(i,["b","c","v"]),a=this.pluck("bc",t.value),r=this.pluck("c",a.value).value,l=this.pluck("v",t.value).value,s=[],c=this.books[this.pluck("b",a.value).value].parsed,h=0,u=c.length;u>h;h++)o=c[h],a=this.validate_ref(t.start_context.translations,{b:o,c:r,v:l}),l=this.fix_start_zeroes(a,r,l),r=l[0],l=l[1],o={start:{b:o,c:r,v:l},end:{b:o,c:r,v:l},valid:a},0===t.passages.length&&a.valid?t.passages.push(o):s.push(o);return 0===t.passages.length&&t.passages.push(s.shift()),s.length>0&&(t.passages[0].alternates=s),null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),this.set_context_from_object(i,["b","c","v"],t.passages[0].start),e.push(t),[e,i]},o.prototype.bv=function(t,e,i){var s;return t.start_context=n.shallow_clone(i),s=t.value,s={indices:t.indices,value:[{type:"bc",value:[s[0],{type:"c",value:[{type:"integer",value:1}]}]},s[1]]},i=this.bcv(s,[],i),s=i[0][0],i=i[1],t.passages=s.passages,null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),e.push(t),[e,i]},o.prototype.c=function(t,e,i){var s,o;return t.start_context=n.shallow_clone(i),s="integer"===t.type?t.value:this.pluck("integer",t.value).value,o=this.validate_ref(t.start_context.translations,{b:i.b,c:s}),!o.valid&&o.messages.start_chapter_not_exist_in_single_chapter_book?this.v(t,e,i):(s=this.fix_start_zeroes(o,s)[0],t.passages=[{start:{b:i.b,c:s},end:{b:i.b,c:s},valid:o}],null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),e.push(t),i.c=s,this.reset_context(i,["v"]),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),[e,i])},o.prototype.c_psalm=function(t,e,n){var i;return t.original_type=t.type,t.original_value=t.value,t.type="bc",i=parseInt(this.books[t.value].value.match(/^\d+/)[0],10),t.value=[{type:"b",value:t.original_value,indices:t.indices},{type:"c",value:[{type:"integer",value:i,indices:t.indices}],indices:t.indices}],this.bc(t,e,n)},o.prototype.c_title=function(t,e,i){return t.start_context=n.shallow_clone(i),"Ps"!==i.b?this.c(t.value[0],e,i):(i=this.pluck("title",t.value),t.value[1]={type:"v",value:[{type:"integer",value:1,indices:i.indices}],indices:i.indices},t.original_type="c_title",t.type="cv",this.cv(t,e,t.start_context))},o.prototype.cv=function(t,e,i){var s,o,a;return t.start_context=n.shallow_clone(i),s=this.pluck("c",t.value).value,o=this.pluck("v",t.value).value,a=this.validate_ref(t.start_context.translations,{b:i.b,c:s,v:o}),o=this.fix_start_zeroes(a,s,o),s=o[0],o=o[1],t.passages=[{start:{b:i.b,c:s,v:o},end:{b:i.b,c:s,v:o},valid:a}],null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),e.push(t),i.c=s,i.v=o,null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),[e,i]},o.prototype.cb_range=function(t,e,n){var i,s,o;return t.original_type=t.type,t.type="range",s=t.value,i=s[0],o=s[1],s=s[2],t.original_value=[i,o,s],t.value=[{type:"bc",value:[i,o],indices:t.indices},s],s.indices[1]=t.indices[1],this.range(t,e,n)},o.prototype.cv_psalm=function(t,e,i){var s,o;return t.start_context=n.shallow_clone(i),t.original_type=t.type,o=t.original_value=t.value,s=o[0],o=o[1],t.type="bcv",s=this.c_psalm(s,[],t.start_context)[0][0],t.value=[s,o],this.bcv(t,e,i)},o.prototype.ff=function(t,e,i){return t.start_context=n.shallow_clone(i),t.value.push({type:"integer",indices:t.indices,value:999}),i=this.range(t,[],t.start_context),t=i[0][0],i=i[1],t.value.pop(),null!=t.passages[0].valid.end_verse_not_exist&&delete t.passages[0].valid.end_verse_not_exist,null!=t.passages[0].valid.end_chapter_not_exist&&delete t.passages[0].valid.end_chapter_not_exist,null!=t.passages[0].end.original_c&&delete t.passages[0].end.original_c,e.push(t),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),[e,i]},o.prototype.integer_title=function(t,e,i){return t.start_context=n.shallow_clone(i),"Ps"!==i.b?this.integer(t.value[0],e,i):(t.value[0]={type:"c",value:[t.value[0]],indices:[t.value[0].indices[0],t.value[0].indices[1]]},i=[t.indices[1]-5,t.indices[1]],t.value[1]={type:"v",value:[{type:"integer",value:1,indices:i}],indices:i},t.original_type="integer_title",t.type="cv",this.cv(t,e,t.start_context))},o.prototype.integer=function(t,e,n){return null!=n.v?this.v(t,e,n):this.c(t,e,n)},o.prototype.sequence=function(t,e,i){var s,o,a,r,l,h,u,c;for(t.start_context=n.shallow_clone(i),t.passages=[],u=t.value,a=0,l=u.length;l>a;a++)for(s=u[a],i=this.handle_array(s,[],i),s=i[0],s=s[0],i=i[1],c=s.passages,r=0,h=c.length;h>r;r++)o=c[r],null==o.type&&(o.type=s.type),null==o.absolute_indices&&(o.absolute_indices=s.absolute_indices),null!=s.start_context.translations&&(o.translations=s.start_context.translations),o.enclosed_absolute_indices="sequence_post_enclosed"===s.type?s.absolute_indices:[-1,-1],t.passages.push(o);return null==t.absolute_indices&&(t.absolute_indices=t.passages.length>0&&"sequence"===t.type?[t.passages[0].absolute_indices[0],t.passages[t.passages.length-1].absolute_indices[1]]:this.get_absolute_indices(t.indices)),e.push(t),[e,i]},o.prototype.sequence_post_enclosed=function(t,e,n){return this.sequence(t,e,n)},o.prototype.v=function(t,e,i){var s,o,a;return o="integer"===t.type?t.value:this.pluck("integer",t.value).value,t.start_context=n.shallow_clone(i),s=null!=i.c?i.c:1,a=this.validate_ref(t.start_context.translations,{b:i.b,c:s,v:o}),o=this.fix_start_zeroes(a,0,o)[1],t.passages=[{start:{b:i.b,c:s,v:o},end:{b:i.b,c:s,v:o},valid:a}],null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),e.push(t),i.v=o,[e,i]},o.prototype.range=function(t,e,i){var s,o,a,r,l;return t.start_context=n.shallow_clone(i),o=t.value,a=o[0],s=o[1],"v"!==s.type||"bc"!==a.type&&"c"!==a.type||"verse"!==this.options.end_range_digits_strategy?(i=this.handle_obj(a,[],i),a=i[0][0],i=i[1],i=this.handle_obj(s,[],i),s=i[0][0],i=i[1],t.value=[a,s],t.indices=[a.indices[0],s.indices[1]],delete t.absolute_indices,r={b:a.passages[0].start.b,c:a.passages[0].start.c,v:a.passages[0].start.v,type:a.type},o={b:s.passages[0].end.b,c:s.passages[0].end.c,v:s.passages[0].end.v,type:s.type},s.passages[0].valid.messages.start_chapter_is_zero&&(o.c=0),s.passages[0].valid.messages.start_verse_is_zero&&(o.v=0),l=this.validate_ref(t.start_context.translations,r,o),l.valid?(s=this.range_handle_valid(l,t,a,r,s,o,e),a=s[0],s=s[1],a?s:(null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),t.passages=[{start:r,end:o,valid:l}],null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),e.push(t),[e,i])):this.range_handle_invalid(l,t,a,r,s,o,e)):this.range_change_integer_end(t,e)},o.prototype.range_change_end=function(t,e,n){var i;return i=t.value[1],"integer"===i.type?(i.original_value=i.value,i.value=n):"v"===i.type?(i=this.pluck("integer",i.value),i.original_value=i.value,i.value=n):"cv"===i.type&&(i=this.pluck("c",i.value),i.original_value=i.value,i.value=n),this.handle_obj(t,e,t.start_context)},o.prototype.range_change_integer_end=function(t,e){var n,i;return n=t.value,i=n[0],n=n[1],t.original_type=t.type,t.original_value=[i,n],t.type="integer"===i.type?"cv":i.type+"v","integer"===i.type&&(t.value[0]={type:"c",value:[i],indices:i.indices}),"integer"===n.type&&(t.value[1]={type:"v",value:[n],indices:n.indices}),this.handle_obj(t,e,t.start_context)},o.prototype.range_change_cv_end=function(t,e){var i,s,o;return i=t.value,o=i[0],i=i[1],t.original_type=t.type,t.original_value=[o,i],t.type="sequence",s=i.value,i=s[0],s=s[1],i=n.shallow_clone(i),i.original_type=i.type,i.type="v",t.value=[[{type:"range",value:[o,i],indices:[o.indices[0],i.indices[1]]}],[s]],this.sequence(t,e,t.start_context)},o.prototype.range_validate=function(t,e,n,i){return t.messages.end_chapter_not_exist?(n.original_c=n.c,n.c=t.messages.end_chapter_not_exist,null!=n.v&&(n.v=this.validate_ref(i.start_context.translations,{b:n.b,c:n.c,v:999}).messages.end_verse_not_exist)):t.messages.end_verse_not_exist&&(n.original_v=n.v,n.v=t.messages.end_verse_not_exist),t.messages.end_verse_is_zero&&"allow"!==this.options.zero_verse_strategy&&(n.v=t.messages.end_verse_is_zero),t.messages.end_chapter_is_zero&&(n.c=t.messages.end_chapter_is_zero),t=this.fix_start_zeroes(t,e.c,e.v),e.c=t[0],e.v=t[1],!0},o.prototype.range_check_new_end=function(t,e,n,i){var s,o;return s=0,o=null,i.messages.end_chapter_before_start?o="c":i.messages.end_verse_before_start&&(o="v"),null!=o&&(s=this.range_get_new_end_value(e,n,i,o)),s>0&&(e={b:n.b,c:n.c,v:n.v},e[o]=s,t=this.validate_ref(t,e),t.valid||(s=0)),s},o.prototype.range_get_new_end_value=function(t,e,n,i){var s;return s=0,"c"===i&&n.messages.end_chapter_is_zero||"v"===i&&n.messages.end_verse_is_zero?s:(t[i]>=10&&10>e[i]&&t[i]-10*Math.floor(t[i]/10)<e[i]?s=e[i]+10*Math.floor(t[i]/10):t[i]>=100&&100>e[i]&&t[i]-100<e[i]&&(s=e[i]+100),s)},o.prototype.range_handle_valid=function(t,e,n,i,s,o,a){return t.messages.end_chapter_not_exist&&"verse"===this.options.end_range_digits_strategy&&null==i.v&&("integer"===s.type||"v"===s.type)&&(n="v"===s.type?this.pluck("integer",s.value):s.value,n=this.validate_ref(e.start_context.translations,{b:i.b,c:i.c,v:n}),n.valid)?[!0,this.range_change_integer_end(e,a)]:t.messages.end_chapter_not_exist&&"verse"===this.options.end_range_digits_strategy&&null!=i.v&&"cv"===s.type&&(n=this.validate_ref(e.start_context.translations,{b:o.b,c:i.c,v:o.c}),n.valid&&(n=this.validate_ref(e.start_context.translations,{b:o.b,c:i.c,v:o.v})),n.valid)?[!0,this.range_change_cv_end(e,a)]:(this.range_validate(t,i,o,e),[!1,null]) +},e.onerror=s,r},batch:function(e,n,s){s||(s=t),n||(n=i),"[object Array]"!=Object.prototype.toString.call(e)&&s(Error("dataArray argument must be of type Array."));var o=this.db.transaction([this.storeName],this.consts.READ_WRITE);o.oncomplete=function(){(l?n:s)(l)},o.onabort=s,o.onerror=s;var a=e.length,r=!1,l=!1,h=function(){a--,0===a&&!r&&(l=r=!0)};return e.forEach(function(t){var e=t.type,n=t.key,i=t.value,t=function(t){o.abort(),r||(r=!0,s(t,e,n))};"remove"==e?(i=o.objectStore(this.storeName)["delete"](n),i.onsuccess=h,i.onerror=t):"put"==e&&(null!==this.keyPath?(this._addIdPropertyIfNeeded(i),i=o.objectStore(this.storeName).put(i)):i=o.objectStore(this.storeName).put(i,n),i.onsuccess=h,i.onerror=t)},this),o},putBatch:function(t,e,n){return this.batch(t.map(function(t){return{type:"put",value:t}}),e,n)},removeBatch:function(t,e,n){return this.batch(t.map(function(t){return{type:"remove",key:t}}),e,n)},getBatch:function(e,n,s,o){s||(s=t),n||(n=i),o||(o="sparse"),"[object Array]"!=Object.prototype.toString.call(e)&&s(Error("keyArray argument must be of type Array."));var a=this.db.transaction([this.storeName],this.consts.READ_ONLY);a.oncomplete=function(){(h?n:s)(u)},a.onabort=s,a.onerror=s;var r=[],l=e.length,h=!1,u=null,c=function(t){t.target.result||"dense"==o?r.push(t.target.result):"sparse"==o&&r.length++,l--,0===l&&(h=!0,u=r)};return e.forEach(function(t){t=a.objectStore(this.storeName).get(t),t.onsuccess=c,t.onerror=function(t){u=t,s(t),a.abort()}},this),a},getAll:function(e,n){n||(n=t),e||(e=i);var s=this.db.transaction([this.storeName],this.consts.READ_ONLY),o=s.objectStore(this.storeName);return o.getAll?this._getAllNative(s,o,e,n):this._getAllCursor(s,o,e,n),s},_getAllNative:function(t,e,n,i){var s=!1,o=null;t.oncomplete=function(){(s?n:i)(o)},t.onabort=i,t.onerror=i,t=e.getAll(),t.onsuccess=function(t){s=!0,o=t.target.result},t.onerror=i},_getAllCursor:function(t,e,n,i){var s=[],o=!1,a=null;t.oncomplete=function(){(o?n:i)(a)},t.onabort=i,t.onerror=i,t=e.openCursor(),t.onsuccess=function(t){(t=t.target.result)?(s.push(t.value),t["continue"]()):(o=!0,a=s)},t.onError=i},clear:function(e,n){n||(n=t),e||(e=i);var s=!1,o=null,a=this.db.transaction([this.storeName],this.consts.READ_WRITE);a.oncomplete=function(){(s?e:n)(o)},a.onabort=n,a.onerror=n;var r=a.objectStore(this.storeName).clear();return r.onsuccess=function(t){s=!0,o=t.target.result},r.onerror=n,a},_addIdPropertyIfNeeded:function(t){!this.features.hasAutoIncrement&&t[this.keyPath]===void 0&&(t[this.keyPath]=this._insertIdCount++ +Date.now())},getIndexList:function(){return this.store.indexNames},hasIndex:function(t){return this.store.indexNames.contains(t)},normalizeIndexData:function(t){t.keyPath=t.keyPath||t.name,t.unique=!!t.unique,t.multiEntry=!!t.multiEntry},indexComplies:function(t,e){return["keyPath","unique","multiEntry"].every(function(n){return"multiEntry"==n&&void 0===t[n]&&!1===e[n]?!0:e[n]==t[n]})},iterate:function(e,n){var n=o({index:null,order:"ASC",autoContinue:!0,filterDuplicates:!1,keyRange:null,writeAccess:!1,onEnd:null,onError:t},n||{}),i="desc"==n.order.toLowerCase()?"PREV":"NEXT";n.filterDuplicates&&(i+="_NO_DUPLICATE");var s=!1,a=this.db.transaction([this.storeName],this.consts[n.writeAccess?"READ_WRITE":"READ_ONLY"]),r=a.objectStore(this.storeName);return n.index&&(r=r.index(n.index)),a.oncomplete=function(){s?n.onEnd?n.onEnd():e(null):n.onError(null)},a.onabort=n.onError,a.onerror=n.onError,i=r.openCursor(n.keyRange,this.consts[i]),i.onerror=n.onError,i.onsuccess=function(t){(t=t.target.result)?(e(t.value,t,a),n.autoContinue&&t["continue"]()):s=!0},a},query:function(t,e){var n=[],e=e||{};return e.onEnd=function(){t(n)},this.iterate(function(t){n.push(t)},e)},count:function(e,n){var n=o({index:null,keyRange:null},n||{}),i=n.onError||t,s=!1,a=null,r=this.db.transaction([this.storeName],this.consts.READ_ONLY);r.oncomplete=function(){(s?e:i)(a)},r.onabort=i,r.onerror=i;var l=r.objectStore(this.storeName);return n.index&&(l=l.index(n.index)),l=l.count(n.keyRange),l.onsuccess=function(t){s=!0,a=t.target.result},l.onError=i,r},makeKeyRange:function(t){var e=t.lower!==void 0,n=t.upper!==void 0,i=t.only!==void 0;switch(!0){case i:t=this.keyRange.only(t.only);break;case e&&n:t=this.keyRange.bound(t.lower,t.upper,t.excludeLower,t.excludeUpper);break;case e:t=this.keyRange.lowerBound(t.lower,t.excludeLower);break;case n:t=this.keyRange.upperBound(t.upper,t.excludeUpper);break;default:throw Error('Cannot create KeyRange. Provide one or both of "lower" or "upper" value, or an "only" value.')}return t}};var i=function(){},s={},o=function(t,e){var n,i;for(n in e)i=e[n],i!==s[n]&&i!==t[n]&&(t[n]=i);return t};return n.version=n.prototype.version,n},this),define("idbPluginWrapper",["idb"],function(t){function e(e){i?e(null,s):s=new t({storeName:"swordjs",dbVersion:4,indexes:[{name:"modules",keyPath:"moduleKey",unique:!0}],onStoreReady:function(){i=!0,e(null,s)},onError:function(t){i=!1,e(t)}})}function n(){return t}var i=!1,s=null;return{getDB:e,getIDBWrapper:n}}),define("dataMgr",["async","tools","idbPluginWrapper"],function(t,e,n){function i(t,e){n.getDB(function(n,i){n?e(n):i.get(t,function(t){e(null,t)},function(t){e(t)})})}function s(t,i){var s=new FileReader;s.readAsText(t),s.onload=function(t){var s=e.readConf(t.target.result);n.getDB(function(t,e){t?i(t):e.put(s,function(t){i(null,{id:t,modKey:s.moduleKey,v11n:s.Versification})},function(t){i(t)})})}}function o(e,i,s){var o=(e.length,{});o.docId=i.id,t.eachSeries(e,function(t,e){var a=t.name.split("/"),r=a[a.length-3];n.getDB(function(n,l){n?s(n):l.put({fileName:a[a.length-1],modKey:i.modKey,driver:r,blob:t.blob},function(t){o[a[a.length-1].split(".")[0]]=t,e(null)},function(t){e(t)})})},function(t){t?s(t):a(o,s)})}function a(t,e){n.getDB(function(n,i){n?e(n):i.get(t.docId,function(n){n.nt=t.nt,n.ot=t.ot,i.put(n,function(){e(null)},function(t){e(t)})},function(t){e(t)})})}function r(t,e){n.getDB(function(n,i){n?e(n):i.get(t,function(t){e(null,t.blob)},function(t){e(t)})})}function l(t,e,i,s){n.getDB(function(n,o){n?s(n):o.put({modKey:i.modKey,ot:t,nt:e},function(t){o.get(i.id,function(e){e.bcvPosID=t,o.put(e,function(){s(null)},function(t){s(t)})},function(t){s(t)})},function(t){s(t)})})}function h(t){n.getDB(function(e,n){e?t(e):n.query(function(e){t(null,e)},{onError:function(e){t(e)},index:"modules"})})}function u(t,e){n.getDB(function(n,i){n?e(n):i.remove(t,e(null),function(t){e(t)})})}function c(){n.getDB(function(t,e){t?inCallback(t):e.clear(function(){},function(t){console.log(t)})})}function d(){return n.getIDBWrapper()}return{clearDatabase:c,saveConfig:s,saveModule:o,saveBCVPos:l,getBlob:r,get:i,remove:u,getModules:h,getIDBWrapper:d}}),function(){function t(t,e){var n=t.split("."),i=p;!(n[0]in i)&&i.execScript&&i.execScript("var "+n[0]);for(var s;n.length&&(s=n.shift());)n.length||e===c?i=i[s]?i[s]:i[s]={}:i[s]=e}function e(t){var e,n,i,s,o,a,r,l,h,u=t.length,c=0,d=Number.POSITIVE_INFINITY;for(l=0;u>l;++l)t[l]>c&&(c=t[l]),d>t[l]&&(d=t[l]);for(e=1<<c,n=new(g?Uint32Array:Array)(e),i=1,s=0,o=2;c>=i;){for(l=0;u>l;++l)if(t[l]===i){for(a=0,r=s,h=0;i>h;++h)a=a<<1|1&r,r>>=1;for(h=a;e>h;h+=o)n[h]=i<<16|l;++s}++i,s<<=1,o<<=1}return[n,c,d]}function n(t,e,n){this.t=[],this.q=n?n:32768,this.u=0,this.a=e===c?0:e,this.d=this.e=0,this.input=g?new Uint8Array(t):t,this.c=new(g?Uint8Array:Array)(this.q),this.b=0,this.s=this.l=!1,this.f=0,this.status=f}function i(t,e){for(var n,i=t.e,s=t.d,o=t.input,a=t.a;e>s;){if(a>=o.length)return-1;n=o[a++],i|=n<<s,s+=8}return n=i&(1<<e)-1,t.e=i>>>e,t.d=s-e,t.a=a,n}function s(t,e){for(var n,i,s,o=t.e,a=t.d,r=t.input,l=t.a,h=e[0],u=e[1];u>a;){if(l>=r.length)return-1;n=r[l++],o|=n<<a,a+=8}return i=h[o&(1<<u)-1],s=i>>>16,t.e=o>>s,t.d=a-s,t.a=l,65535&i}function o(t){t.r=t.a,t.p=t.d,t.o=t.e}function a(t){t.a=t.r,t.d=t.p,t.e=t.o}function r(t){function n(){function t(t,e,n){for(var o,a,r,l,h=0,h=0;t>h;){if(o=s(this,e),0>o)throw Error("not enough input");switch(o){case 16:if(0>(l=i(this,2)))throw Error("not enough input");for(r=3+l;r--;)n[h++]=a;break;case 17:if(0>(l=i(this,3)))throw Error("not enough input");for(r=3+l;r--;)n[h++]=0;a=0;break;case 18:if(0>(l=i(this,7)))throw Error("not enough input");for(r=11+l;r--;)n[h++]=0;a=0;break;default:a=n[h++]=o}}return n}var n;for(f=0;h>f;++f){if(0>(n=i(this,3)))throw Error("not enough input");p[b[f]]=n}u=e(p),c=new(g?Uint8Array:Array)(r),d=new(g?Uint8Array:Array)(l),this.k=e(t.call(this,r,u,c)),this.n=e(t.call(this,l,u,d))}var r,l,h,u,c,d,p=new(g?Uint8Array:Array)(b.length),f=0;if(t.status=3,o(t),r=i(t,5)+257,l=i(t,5)+1,h=i(t,4)+4,0>r||0>l||0>h)return a(t),-1;try{n.call(t)}catch(m){return a(t),-1}return t.status=4,0}function l(t){var e,n,r,l,u,c=t.c,d=t.b,p=t.k,g=t.n,f=c.length;for(t.status=5;;){if(o(t),e=s(t,p),0>e)return t.b=d,a(t),-1;if(256===e)break;if(256>e)d===f&&(c=h(t),f=c.length),c[d++]=e;else{if(n=e-257,l=C[n],_[n]>0){if(u=i(t,_[n]),0>u)return t.b=d,a(t),-1;l+=u}if(e=s(t,g),0>e)return t.b=d,a(t),-1;if(r=P[e],k[e]>0){if(u=i(t,k[e]),0>u)return t.b=d,a(t),-1;r+=u}for(d+l>=f&&(c=h(t),f=c.length);l--;)c[d]=c[d++-r];if(t.a===t.input.length)return t.b=d,-1}}for(;t.d>=8;)t.d-=8,t.a--;t.b=d,t.status=6}function h(t){var e,n,i,s,o=0|t.input.length/t.a+1,a=t.input,r=t.c;return 2>o?(n=(a.length-t.a)/t.k[2],s=0|258*(n/2),i=r.length>s?r.length+s:r.length<<1):i=r.length*o,g?(e=new Uint8Array(i),e.set(r)):e=r,t.c=e,t.c}function u(t){this.input=t===c?new(g?Uint8Array:Array):t,this.a=0,this.h=new n(this.input,this.a),this.c=this.h.c}var c=void 0,d=!0,p=this,g="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,f=0;n.prototype.i=function(t,e){var n=!1;for(t!==c&&(this.input=t),e!==c&&(this.a=e);!n;)switch(this.status){case f:case 1:var s,u=c;if(this.status=1,o(this),0>(u=i(this,3)))a(this),s=-1;else{switch(1&u&&(this.l=d),u>>>=1){case 0:this.g=0;break;case 1:this.g=1;break;case 2:this.g=2;break;default:throw Error("unknown BTYPE: "+u)}this.status=2,s=c}0>s&&(n=d);break;case 2:case 3:switch(this.g){case 0:var p,m=c,v=c,y=this.input,b=this.a;if(this.status=3,b+4>=y.length)p=-1;else{if(m=y[b++]|y[b++]<<8,v=y[b++]|y[b++]<<8,m===~v)throw Error("invalid uncompressed block header: length verify");this.d=this.e=0,this.a=b,this.m=m,this.status=4,p=c}0>p&&(n=d);break;case 1:this.status=3,this.k=N,this.n=M,this.status=4;break;case 2:0>r(this)&&(n=d)}break;case 4:case 5:switch(this.g){case 0:var x;t:{var C=this.input,w=this.a,_=this.c,S=this.b,P=this.m;for(this.status=5;P--;){if(S===_.length&&(_=h(this)),w>=C.length){this.a=w,this.b=S,this.m=P+1,x=-1;break t}_[S++]=C[w++]}0>P&&(this.status=6),this.a=w,this.b=S,x=0}0>x&&(n=d);break;case 1:case 2:0>l(this)&&(n=d)}break;case 6:this.l?n=d:this.status=f}var T,k=this.b;return this.s?g?(T=new Uint8Array(k),T.set(this.c.subarray(this.f,k))):T=this.c.slice(this.f,k):T=g?this.c.subarray(this.f,k):this.c.slice(this.f,k),this.buffer=T,this.f=k,this.buffer};var m,v,y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],b=g?new Uint16Array(y):y,x=[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,258,258],C=g?new Uint16Array(x):x,w=[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,0,0],_=g?new Uint8Array(w):w,S=[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],P=g?new Uint16Array(S):S,T=[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],k=g?new Uint8Array(T):T,I=new(g?Uint8Array:Array)(288);for(m=0,v=I.length;v>m;++m)I[m]=143>=m?8:255>=m?9:279>=m?7:8;var R,A,N=e(I),E=new(g?Uint8Array:Array)(30);for(R=0,A=E.length;A>R;++R)E[R]=5;var M=e(E);n.prototype.j=function(){return g?this.c.subarray(0,this.b):this.c.slice(0,this.b)},u.prototype.i=function(t){var e;if(t!==c)if(g){var n=new Uint8Array(this.input.length+t.length);n.set(this.input,0),n.set(t,this.input.length),this.input=n}else this.input=this.input.concat(t);var i;if(i=this.method===c){var s,o=this.a,a=this.input,r=a[o++],l=a[o++];if(r===c||l===c)s=-1;else{switch(15&r){case 8:this.method=8;break;default:throw Error("unsupported compression method")}if(0!==((r<<8)+l)%31)throw Error("invalid fcheck flag:"+((r<<8)+l)%31);if(32&l)throw Error("fdict flag is not supported");this.a=o,s=c}i=0>s}return i?new(g?Uint8Array:Array):(e=this.h.i(this.input,this.a),this.a=this.h.a,e)},u.prototype.j=function(){return this.h.j()},t("Zlib.InflateStream",u),t("Zlib.InflateStream.prototype.decompress",u.prototype.i),t("Zlib.InflateStream.prototype.getBytes",u.prototype.j)}.call(this),define("inflateStream",function(t){return function(){var e;return e||t.Zlib}}(this)),define("zText",["inflateStream","async"],function(t,e){var n={},i=new FileReader,s=new FileReader;return n.getRawEntry=function(n,o,a,r,l){if(o[a[0].chapter-1]){var h=o[a[0].chapter-1].bookStartPos,u=o[a[0].chapter-1].startPos,c=o[a[0].chapter-1].length,d=h+u,p=d+c,g=n.slice(h,p);i.readAsArrayBuffer(g),i.onload=function(n){var i=new Uint8Array(n.target.result),h=new t.InflateStream,c=new Blob([h.decompress(i)]),d=[],p=0,g=0,f=0;e.whilst(function(){return a.length>f},function(t){p=u+o[a[f].chapter-1].verses[a[f].verse-1].startPos,g=p+o[a[f].chapter-1].verses[a[f].verse-1].length,r?s.readAsText(c.slice(p,g),r):s.readAsText(c.slice(p,g),"CP1252"),s.onload=function(e){d.push({text:e.target.result,osis:a[f].osis,verse:a[f].verse}),f++,t()}},function(t){l(t,d)})}}else l({message:"Wrong passage. The requested chapter is not available in this module."})},n}),define("text",["module"],function(t){var e,n,i,s,o,a=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],r=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,l=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,h="undefined"!=typeof location&&location.href,u=h&&location.protocol&&location.protocol.replace(/\:/,""),c=h&&location.hostname,d=h&&(location.port||void 0),p={},g=t.config&&t.config()||{};return e={version:"2.0.10",strip:function(t){if(t){t=t.replace(r,"");var e=t.match(l);e&&(t=e[1])}else t="";return t},jsEscape:function(t){return t.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:g.createXhr||function(){var t,e,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(e=0;3>e;e+=1){n=a[e];try{t=new ActiveXObject(n)}catch(i){}if(t){a=[n];break}}return t},parseName:function(t){var e,n,i,s=!1,o=t.indexOf("."),a=0===t.indexOf("./")||0===t.indexOf("../");return-1!==o&&(!a||o>1)?(e=t.substring(0,o),n=t.substring(o+1,t.length)):e=t,i=n||e,o=i.indexOf("!"),-1!==o&&(s="strip"===i.substring(o+1),i=i.substring(0,o),n?n=i:e=i),{moduleName:e,ext:n,strip:s}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(t,n,i,s){var o,a,r,l=e.xdRegExp.exec(t);return l?(o=l[2],a=l[3],a=a.split(":"),r=a[1],a=a[0],!(o&&o!==n||a&&a.toLowerCase()!==i.toLowerCase()||(r||a)&&r!==s)):!0},finishLoad:function(t,n,i,s){i=n?e.strip(i):i,g.isBuild&&(p[t]=i),s(i)},load:function(t,n,i,s){if(s.isBuild&&!s.inlineText)return i(),void 0;g.isBuild=s.isBuild;var o=e.parseName(t),a=o.moduleName+(o.ext?"."+o.ext:""),r=n.toUrl(a),l=g.useXhr||e.useXhr;return 0===r.indexOf("empty:")?(i(),void 0):(!h||l(r,u,c,d)?e.get(r,function(n){e.finishLoad(t,o.strip,n,i)},function(t){i.error&&i.error(t)}):n([a],function(t){e.finishLoad(o.moduleName+"."+o.ext,o.strip,t,i)}),void 0)},write:function(t,n,i){if(p.hasOwnProperty(n)){var s=e.jsEscape(p[n]);i.asModule(t+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(t,n,i,s,o){var a=e.parseName(n),r=a.ext?"."+a.ext:"",l=a.moduleName+r,h=i.toUrl(a.moduleName+r)+".js";e.load(l,i,function(){var n=function(t){return s(h,t)};n.asModule=function(t,e){return s.asModule(t,h,e)},e.write(t,l,n,o)},o)}},"node"===g.env||!g.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(n=require.nodeRequire("fs"),e.get=function(t,e,i){try{var s=n.readFileSync(t,"utf8");0===s.indexOf("")&&(s=s.substring(1)),e(s)}catch(o){i(o)}}):"xhr"===g.env||!g.env&&e.createXhr()?e.get=function(t,n,i,s){var o,a=e.createXhr();if(a.open("GET",t,!0),s)for(o in s)s.hasOwnProperty(o)&&a.setRequestHeader(o.toLowerCase(),s[o]);g.onXhr&&g.onXhr(a,t),a.onreadystatechange=function(){var e,s;4===a.readyState&&(e=a.status,e>399&&600>e?(s=Error(t+" HTTP status: "+e),s.xhr=a,i(s)):n(a.responseText),g.onXhrComplete&&g.onXhrComplete(a,t))},a.send(null)}:"rhino"===g.env||!g.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?e.get=function(t,e){var n,i,s="utf-8",o=new java.io.File(t),a=java.lang.System.getProperty("line.separator"),r=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(o),s)),l="";try{for(n=new java.lang.StringBuffer,i=r.readLine(),i&&i.length()&&65279===i.charAt(0)&&(i=i.substring(1)),null!==i&&n.append(i);null!==(i=r.readLine());)n.append(a),n.append(i);l=""+n+""}finally{r.close()}e(l)}:("xpconnect"===g.env||!g.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(i=Components.classes,s=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),o="@mozilla.org/windows-registry-key;1"in i,e.get=function(t,e){var n,a,r,l={};o&&(t=t.replace(/\//g,"\\")),r=new FileUtils.File(t);try{n=i["@mozilla.org/network/file-input-stream;1"].createInstance(s.nsIFileInputStream),n.init(r,1,0,!1),a=i["@mozilla.org/intl/converter-input-stream;1"].createInstance(s.nsIConverterInputStream),a.init(n,"utf-8",n.available(),s.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),a.readString(n.available(),l),a.close(),n.close(),e(l.value)}catch(h){throw Error((r&&r.path||"")+": "+h)}}),e}),define("json",["text"],function(text){function cacheBust(t){return t=t.replace(CACHE_BUST_FLAG,""),t+=0>t.indexOf("?")?"?":"&",t+CACHE_BUST_QUERY_PARAM+"="+Math.round(2147483647*Math.random())}var CACHE_BUST_QUERY_PARAM="bust",CACHE_BUST_FLAG="!bust",jsonParse="undefined"!=typeof JSON&&"function"==typeof JSON.parse?JSON.parse:function(val){return eval("("+val+")")},buildMap={};return{load:function(t,e,n,i){!i.isBuild||i.inlineJSON!==!1&&-1===t.indexOf(CACHE_BUST_QUERY_PARAM+"=")?text.get(e.toUrl(t),function(e){i.isBuild?(buildMap[t]=e,n(e)):n(jsonParse(e))},n.error,{accept:"application/json"}):n(null)},normalize:function(t,e){return-1!==t.indexOf(CACHE_BUST_FLAG)&&(t=cacheBust(t)),e(t)},write:function(t,e,n){if(e in buildMap){var i=buildMap[e];n('define("'+t+"!"+e+'", function(){ return '+i+";});\n")}}}}),define("json!../data/kjv.json",function(){return{ot:[{name:"Genesis",abbrev:"Gen",maxChapter:50},{name:"Exodus",abbrev:"Exod",maxChapter:40},{name:"Leviticus",abbrev:"Lev",maxChapter:27},{name:"Numbers",abbrev:"Num",maxChapter:36},{name:"Deuteronomy",abbrev:"Deut",maxChapter:34},{name:"Joshua",abbrev:"Josh",maxChapter:24},{name:"Judges",abbrev:"Judg",maxChapter:21},{name:"Ruth",abbrev:"Ruth",maxChapter:4},{name:"I Samuel",abbrev:"1Sam",maxChapter:31},{name:"II Samuel",abbrev:"2Sam",maxChapter:24},{name:"I Kings",abbrev:"1Kgs",maxChapter:22},{name:"II Kings",abbrev:"2Kgs",maxChapter:25},{name:"I Chronicles",abbrev:"1Chr",maxChapter:29},{name:"II Chronicles",abbrev:"2Chr",maxChapter:36},{name:"Ezra",abbrev:"Ezra",maxChapter:10},{name:"Nehemiah",abbrev:"Neh",maxChapter:13},{name:"Esther",abbrev:"Esth",maxChapter:10},{name:"Job",abbrev:"Job",maxChapter:42},{name:"Psalms",abbrev:"Ps",maxChapter:150},{name:"Proverbs",abbrev:"Prov",maxChapter:31},{name:"Ecclesiastes",abbrev:"Eccl",maxChapter:12},{name:"Song of Solomon",abbrev:"Song",maxChapter:8},{name:"Isaiah",abbrev:"Isa",maxChapter:66},{name:"Jeremiah",abbrev:"Jer",maxChapter:52},{name:"Lamentations",abbrev:"Lam",maxChapter:5},{name:"Ezekiel",abbrev:"Ezek",maxChapter:48},{name:"Daniel",abbrev:"Dan",maxChapter:12},{name:"Hosea",abbrev:"Hos",maxChapter:14},{name:"Joel",abbrev:"Joel",maxChapter:3},{name:"Amos",abbrev:"Amos",maxChapter:9},{name:"Obadiah",abbrev:"Obad",maxChapter:1},{name:"Jonah",abbrev:"Jonah",maxChapter:4},{name:"Micah",abbrev:"Mic",maxChapter:7},{name:"Nahum",abbrev:"Nah",maxChapter:3},{name:"Habakkuk",abbrev:"Hab",maxChapter:3},{name:"Zephaniah",abbrev:"Zeph",maxChapter:3},{name:"Haggai",abbrev:"Hag",maxChapter:2},{name:"Zechariah",abbrev:"Zech",maxChapter:14},{name:"Malachi",abbrev:"Mal",maxChapter:4}],nt:[{name:"Matthew",abbrev:"Matt",maxChapter:28},{name:"Mark",abbrev:"Mark",maxChapter:16},{name:"Luke",abbrev:"Luke",maxChapter:24},{name:"John",abbrev:"John",maxChapter:21},{name:"Acts",abbrev:"Acts",maxChapter:28},{name:"Romans",abbrev:"Rom",maxChapter:16},{name:"I Corinthians",abbrev:"1Cor",maxChapter:16},{name:"II Corinthians",abbrev:"2Cor",maxChapter:13},{name:"Galatians",abbrev:"Gal",maxChapter:6},{name:"Ephesians",abbrev:"Eph",maxChapter:6},{name:"Philippians",abbrev:"Phil",maxChapter:4},{name:"Colossians",abbrev:"Col",maxChapter:4},{name:"I Thessalonians",abbrev:"1Thess",maxChapter:5},{name:"II Thessalonians",abbrev:"2Thess",maxChapter:3},{name:"I Timothy",abbrev:"1Tim",maxChapter:6},{name:"II Timothy",abbrev:"2Tim",maxChapter:4},{name:"Titus",abbrev:"Titus",maxChapter:3},{name:"Philemon",abbrev:"Phlm",maxChapter:1},{name:"Hebrews",abbrev:"Heb",maxChapter:13},{name:"James",abbrev:"Jas",maxChapter:5},{name:"I Peter",abbrev:"1Pet",maxChapter:5},{name:"II Peter",abbrev:"2Pet",maxChapter:3},{name:"I John",abbrev:"1John",maxChapter:5},{name:"II John",abbrev:"2John",maxChapter:1},{name:"III John",abbrev:"3John",maxChapter:1},{name:"Jude",abbrev:"Jude",maxChapter:1},{name:"Revelation of John",abbrev:"Rev",maxChapter:22}],osisToBookNum:{Gen:0,Exod:1,Lev:2,Num:3,Deut:4,Josh:5,Judg:6,Ruth:7,"1Sam":8,"2Sam":9,"1Kgs":10,"2Kgs":11,"1Chr":12,"2Chr":13,Ezra:14,Neh:15,Esth:16,Job:17,Ps:18,Prov:19,Eccl:20,Song:21,Isa:22,Jer:23,Lam:24,Ezek:25,Dan:26,Hos:27,Joel:28,Amos:29,Obad:30,Jonah:31,Mic:32,Nah:33,Hab:34,Zeph:35,Hag:36,Zech:37,Mal:38,Matt:39,Mark:40,Luke:41,John:42,Acts:43,Rom:44,"1Cor":45,"2Cor":46,Gal:47,Eph:48,Phil:49,Col:50,"1Thess":51,"2Thess":52,"1Tim":53,"2Tim":54,Titus:55,Phlm:56,Heb:57,Jas:58,"1Pet":59,"2Pet":60,"1John":61,"2John":62,"3John":63,Jude:64,Rev:65},versesInChapter:[[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,55,32,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],[22,25,22,31,23,30,25,32,35,29,10,51,22,31,27,36,16,27,25,26,36,31,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],[17,16,17,35,19,30,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,50,13,32,22,29,35,41,30,25,18,65,23,31,40,16,54,42,56,29,34,13],[46,37,29,49,33,25,26,20,29,22,32,32,18,29,23,22,20,22,21,20,23,30,25,22,19,19,26,68,29,20,30,52,29,12],[18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33],[36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25],[22,23,18,22],[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,15,23,29,22,44,25,12,25,11,31,13],[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,33,43,26,22,51,39,25],[53,46,28,34,18,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,53],[18,25,27,44,27,33,20,29,37,36,21,21,25,29,38,20,41,37,37,21,26,20,37,20,30],[54,55,24,43,26,81,40,40,44,14,47,40,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],[17,18,17,22,14,42,22,18,31,19,23,16,22,15,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],[11,70,13,24,17,22,28,36,15,44],[11,20,32,23,19,19,73,18,38,39,36,47,31],[22,23,15,17,14,14,10,17,32,3],[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,24,34,17],[6,12,8,8,12,10,17,9,20,18,7,8,6,7,5,11,15,50,14,9,13,31,6,10,22,12,14,9,11,12,24,11,22,22,28,12,40,22,13,17,13,11,5,26,17,11,9,14,20,23,19,9,6,7,23,13,11,11,17,12,8,12,11,10,13,20,7,35,36,5,24,20,28,23,10,12,20,72,13,19,16,8,18,12,13,17,7,18,52,17,16,15,5,23,11,13,12,9,9,5,8,28,22,35,45,48,43,13,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,13,10,7,12,15,21,10,20,14,9,6],[33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31],[18,26,22,16,20,12,29,17,18,20,10,14],[17,17,11,16,16,13,13,14],[31,22,26,6,30,13,25,22,21,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,12,25,24],[19,37,25,31,31,30,34,22,26,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],[22,22,66,22,22],[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,49,32,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],[21,49,30,37,31,28,28,27,27,21,45,13],[11,23,5,19,15,11,16,14,17,15,12,14,16,9],[20,32,21],[15,16,15,13,27,14,17,14,15],[21],[17,10,10,11],[16,13,12,13,15,16,20],[15,13,19],[17,20,19],[18,15,20],[15,23],[21,13,10,14,11,15,14,23,17,12,17,14,9,21],[14,17,18,6],[25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20],[45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20],[80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53],[51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25],[26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,41,38,40,30,35,27,27,32,44,31],[32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27],[31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24],[24,17,18,18,21,18,16,24,15,18,33,21,14],[24,21,29,31,26,18],[23,22,21,32,33,24],[30,30,21,23],[29,23,25,18],[10,20,13,18,28],[12,17,18],[20,15,16,16,25,21],[18,26,17,22],[16,15,15],[25],[14,18,19,16,14,20,28,13,28,39,40,29,25],[27,26,18,17,20],[25,25,22,19,14],[21,22,18],[10,29,24,21,21],[13],[14],[25],[20,29,22,11,14,17,17,13,21,11,19,17,18,20,8,21,18,24,21,15,27,21]]}}),define("json!../data/german.json",function(){return{ot:[{name:"Genesis",abbrev:"Gen",maxChapter:50},{name:"Exodus",abbrev:"Exod",maxChapter:40},{name:"Leviticus",abbrev:"Lev",maxChapter:27},{name:"Numbers",abbrev:"Num",maxChapter:36},{name:"Deuteronomy",abbrev:"Deut",maxChapter:34},{name:"Joshua",abbrev:"Josh",maxChapter:24},{name:"Judges",abbrev:"Judg",maxChapter:21},{name:"Ruth",abbrev:"Ruth",maxChapter:4},{name:"I Samuel",abbrev:"1Sam",maxChapter:31},{name:"II Samuel",abbrev:"2Sam",maxChapter:24},{name:"I Kings",abbrev:"1Kgs",maxChapter:22},{name:"II Kings",abbrev:"2Kgs",maxChapter:25},{name:"I Chronicles",abbrev:"1Chr",maxChapter:29},{name:"II Chronicles",abbrev:"2Chr",maxChapter:36},{name:"Ezra",abbrev:"Ezra",maxChapter:10},{name:"Nehemiah",abbrev:"Neh",maxChapter:13},{name:"Esther",abbrev:"Esth",maxChapter:10},{name:"Job",abbrev:"Job",maxChapter:42},{name:"Psalms",abbrev:"Ps",maxChapter:150},{name:"Proverbs",abbrev:"Prov",maxChapter:31},{name:"Ecclesiastes",abbrev:"Eccl",maxChapter:12},{name:"Song of Solomon",abbrev:"Song",maxChapter:8},{name:"Isaiah",abbrev:"Isa",maxChapter:66},{name:"Jeremiah",abbrev:"Jer",maxChapter:52},{name:"Lamentations",abbrev:"Lam",maxChapter:5},{name:"Ezekiel",abbrev:"Ezek",maxChapter:48},{name:"Daniel",abbrev:"Dan",maxChapter:12},{name:"Hosea",abbrev:"Hos",maxChapter:14},{name:"Joel",abbrev:"Joel",maxChapter:4},{name:"Amos",abbrev:"Amos",maxChapter:9},{name:"Obadiah",abbrev:"Obad",maxChapter:1},{name:"Jonah",abbrev:"Jonah",maxChapter:4},{name:"Micah",abbrev:"Mic",maxChapter:7},{name:"Nahum",abbrev:"Nah",maxChapter:3},{name:"Habakkuk",abbrev:"Hab",maxChapter:3},{name:"Zephaniah",abbrev:"Zeph",maxChapter:3},{name:"Haggai",abbrev:"Hag",maxChapter:2},{name:"Zechariah",abbrev:"Zech",maxChapter:14},{name:"Malachi",abbrev:"Mal",maxChapter:3}],versesInChapter:[[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,54,33,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],[22,25,22,31,23,30,29,28,35,29,10,51,22,31,27,36,16,27,25,26,37,30,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],[17,16,17,35,26,23,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,35,28,32,22,29,35,41,30,25,19,65,23,31,39,17,54,42,56,29,34,13],[46,37,29,49,33,25,26,20,29,22,32,31,19,29,23,22,20,22,21,20,23,29,26,22,19,19,26,69,28,20,30,52,29,12],[18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33],[36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25],[22,23,18,22],[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,16,23,28,23,44,25,12,25,11,31,13],[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,32,44,26,22,51,39,25],[53,46,28,20,32,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,54],[18,25,27,44,27,33,20,29,37,36,20,22,25,29,39,20,41,37,37,21,26,20,37,20,30],[54,55,24,43,41,66,40,40,44,14,47,41,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],[18,17,17,22,14,42,22,18,31,19,23,16,23,14,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],[11,70,13,24,17,22,28,36,15,44],[11,20,38,17,19,19,73,18,37,40,36,47,31],[22,23,15,17,14,14,10,17,32,3],[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,32,26,17],[6,12,9,9,13,11,18,10,21,18,7,9,6,7,5,11,15,51,15,10,14,32,6,10,22,12,14,9,11,13,25,11,22,23,28,13,40,23,14,18,14,12,5,27,18,12,10,15,21,23,21,11,7,9,24,14,12,12,18,14,9,13,12,11,14,20,8,36,37,6,24,20,28,23,11,13,21,72,13,20,17,8,19,13,14,17,7,19,53,17,16,16,5,23,11,13,12,9,9,5,8,29,22,35,45,48,43,14,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,14,10,8,12,15,21,10,20,14,9,6],[33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31],[18,26,22,17,19,12,29,17,18,20,10,14],[17,17,11,16,16,12,14,14],[31,22,26,6,30,13,25,23,20,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,11,25,24],[19,37,25,31,31,30,34,23,25,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],[22,22,66,22,22],[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,44,37,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],[21,49,33,34,30,29,28,27,27,21,45,13],[9,25,5,19,15,11,16,14,17,15,11,15,15,10],[20,27,5,21],[15,16,15,13,27,14,17,14,15],[21],[16,11,10,11],[16,13,12,14,14,16,20],[14,14,19],[17,20,19],[18,15,20],[15,23],[17,17,10,14,11,15,14,23,17,12,17,14,9,21],[14,17,24],[25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20],[45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20],[80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53],[51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25],[26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,40,38,40,30,35,27,27,32,44,31],[32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27],[31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24],[24,17,18,18,21,18,16,24,15,18,33,21,13],[24,21,29,31,26,18],[23,22,21,32,33,24],[30,30,21,23],[29,23,25,18],[10,20,13,18,28],[12,17,18],[20,15,16,16,25,21],[18,26,17,22],[16,15,15],[25],[14,18,19,16,14,20,28,13,28,39,40,29,25],[27,26,18,17,20],[25,25,22,19,14],[21,22,18],[10,29,24,21,21],[13],[15],[25],[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21]]}}),define("versificationMgr",["json!../data/kjv.json","json!../data/german.json"],function(t,e){function n(t){return void 0!==t&&h[t]?h[t].ot.length:h.kjv.ot.length}function i(t){return void 0!==t&&h[t]?h[t].nt.length:h.kjv.nt.length}function s(t,e){t=0>t?0:t;var i=n(e),s=i>t?"ot":"nt";return t=i>t?t:t-i,void 0!==e&&h[e]?h[e][s][t].maxChapter:h.kjv[s][t].maxChapter}function o(t,e,n){return void 0!==n&&h[n]?h[n].versesInChapter[t][parseInt(e,10)-1]:h.kjv.versesInChapter[t][parseInt(e,10)-1]}function a(t,e){t=0>t?0:t;var i=n(e),s=i>t?"ot":"nt";return t=i>t?t:t-i,void 0!==e&&h[e]?h[e][s][t]:h.kjv[s][t]}function r(t,e){return void 0!==e&&h[e]?h[e].osisToBookNum[t]:h.kjv.osisToBookNum[t]}function l(t){var e=[];return void 0!==t&&h[t]?e.concat(h[t].ot,h[t].nt):e.concat(h.kjv.ot,h.kjv.nt) +}var h={};return h.kjv=t,e.nt=t.nt,e.osisToBookNum=t.osisToBookNum,h.german=e,{getBooksInOT:n,getBooksInNT:i,getChapterMax:s,getVersesInChapter:o,getBook:a,getBookNum:r,getAllBooks:l}}),define("installMgr",["unzip","dataMgr","zText","versificationMgr","async","tools"],function(t,e,n,i,s,o){function a(t){l("http://crosswire.org/ftpmirror/pub/sword/masterRepoList.conf","text",function(e,n){if(""!==n||e)if(e)t(e);else{var i=[],s=null,o="",a="";n.split(/[\r\n]+/g).forEach(function(t){if(s=t.split("|"),s.length>1&&-1!==s[0].search("CrossWire")){switch(a=s[0].split("=")[2]){case"CrossWire":o="main";break;case"CrossWire Beta":o="beta";break;case"CrossWire av11n":o="av";break;case"CrossWire Attic":o="attic";break;case"CrossWire Wycliffe":o="wycliffe";break;case"CrossWire av11n Attic":o="avattic"}i.push({name:a,type:o,url:"http://crosswire.org/ftpmirror"+s[2].replace("raw","packages")+"/rawzip/",confUrl:"http://crosswire.org/ftpmirror"+s[2]+"/mods.d"})}}),t(e,i)}else t("Couldn't download master repo list!")})}function r(t,e){l(t.confUrl,"document",function(n,i){if(n)e(n);else{for(var a=[],r="",h=i.getElementsByTagName("a"),u=0;h.length>u;u++)-1!==h[u].href.search(".conf")&&(r=h[u].baseURI+"/"+h[u].textContent,a.push(function(e){return function(n){l(e,"text",function(e,i){var s=o.readConf(i);"zText"===s.ModDrv?(s.url="http://www.crosswire.org/sword/servlet/SwordMod.Verify?modName="+s.moduleKey+"&"+t.type+"=true&pkgType=raw",n(e,s)):n(e)})}}(r)));s.parallel(a,function(t,n){e(t,o.cleanArray(n).sort(o.dynamicSortMultiple("Lang","moduleKey")))})}})}function l(t,e,n,i){var s=new XMLHttpRequest({mozSystem:!0,mozAnon:!0});s.open("GET",t,!0),s.responseType=e,s.onreadystatechange=function(){4==s.readyState&&(200===s.status?n(null,s.response):n({message:"Couldn't download module.",error:s.status}))},s.onprogress=i,s.onerror=function(t){n(t)},s.send(null)}function h(t,e,n){"string"==typeof t?l(t,"document",function(t,i){if(t)e(t);else{var s=i.getElementsByTagName("a")[0].href;l(s,"blob",function(t,n){t?e(t):u(n,e)},n)}}):u(t,e)}function u(n,i){var s=new FileReader;s.onload=function(n){var s=new t.Unzip(new Uint8Array(n.target.result)),o=s.getFilenames();o.forEach(function(t){-1!==t.search(".conf")&&e.saveConfig(new Blob([s.decompress(t)]),function(t,e){t?i(t):c(s,e.v11n,e,i)})})},s.readAsArrayBuffer(n)}function c(t,n,i,o){var a={};a.bin=[];var r=t.getFilenames();r.forEach(function(e){-1!==e.search("nt.bzs")?a.ntB=e:-1!==e.search("nt.bzv")?a.ntCV=e:-1!==e.search("ot.bzs")?a.otB=e:-1!==e.search("ot.bzv")?a.otCV=e:-1===e.search(".conf")&&a.bin.push({blob:new Blob([t.decompress(e)]),name:e})}),s.series([function(t){e.saveModule(a.bin,i,function(e){e?t(e):t(null)})},function(s){var o=null,r=null,l=null,h=null;a.otB&&(o=d(t.decompress(a.otB)),r=g(t.decompress(a.otCV),o,"ot",n)),a.ntB&&(l=d(t.decompress(a.ntB)),h=g(t.decompress(a.ntCV),l,"nt",n)),e.saveBCVPos(r,h,i,function(t){t?s(t):s(null)})}],function(t){t?(e.remove(i.id,function(){}),o(t)):o(null,i.id)})}function d(t){var e=0,n=0,i=0,s=null,o=!1,a=[];for(y=0;!o;)if(s=f(t),e=s[0],o=s[1],!o&&(s=f(t),n=s[0],o=s[1],!o)){if(s=f(t),i=s[0],o=s[1],o)break;a.push({startPos:e,length:n,unused:i})}return a}function p(t){y=0;for(var e=0;4>e;e++)m(t),v(t),m(t)}function g(t,e,n,s){p(t);for(var o="ot"===n?0:i.getBooksInOT(s),a="ot"===n?i.getBooksInOT(s):i.getBooksInOT(s)+i.getBooksInNT(s),r=0,l=0,h=0,u=0,c=0,d=0,g=null,f=0,y={},b={},x=o;a>x;x++){g=i.getBook(x,s),b[g.abbrev]=[];for(var C=0;g.maxChapter>C;C++){r=0,l=0,y={},y.verses=[],h=0,d=i.getVersesInChapter(x,C+1,s);for(var w=0;d>w;w++)c=m(t)[0],f=v(t)[0],0!==f&&(l=f),h=m(t)[0],0===w&&(r=f,u=0,e.length>c&&(u=e[c].startPos),y.startPos=r,y.booknum=x,y.bookStartPos=u),0===c&&0===f&&0===h?y!=={}&&y.verses.push({startPos:0,length:0}):y!=={}&&y.verses.push({startPos:f-r,length:h});y!={}&&(y.length=l-r+h,b[g.abbrev].push(y)),m(t),v(t),m(t)}m(t),v(t),m(t)}return b}function f(t,e){return b=t.subarray(y,y+4),x=!1,y+=4,4!==b.length&&(x=!0),e&&e(1048576*b[3]+65536*b[2]+256*b[1]+b[0],x),[1048576*b[3]+65536*b[2]+256*b[1]+b[0],x]}function m(t,e){return b=t.subarray(y,y+2),x=!1,y+=2,2!==b.length&&(x=!0),e&&e(256*b[1]+b[0],x),[256*b[1]+b[0],x]}function v(t,e){return b=t.subarray(y,y+6),x=!1,y+=6,6!==b.length&&(x=!0),e&&e(17592186044416*b[1]+4294967296*b[0]+16777216*b[5]+65536*b[4]+256*b[3]+b[2],x),[17592186044416*b[1]+4294967296*b[0]+16777216*b[5]+65536*b[4]+256*b[3]+b[2],x]}var y=0,b=null,x=!1;return{getRepositories:a,getModules:r,installModule:h}}),function(){var t,e,n,i={}.hasOwnProperty,s=function(){var t,e,n;this.options={},n=s.prototype.options;for(t in n)i.call(n,t)&&(e=n[t],this.options[t]=e);this.versification_system(this.options.versification_system)};s.prototype.s="",s.prototype.entities=[],s.prototype.passage=null,s.prototype.regexps={},s.prototype.options={consecutive_combination_strategy:"combine",osis_compaction_strategy:"b",book_sequence_strategy:"ignore",invalid_sequence_strategy:"ignore",sequence_combination_strategy:"combine",invalid_passage_strategy:"ignore",zero_chapter_strategy:"error",zero_verse_strategy:"error",non_latin_digits_strategy:"ignore",book_alone_strategy:"ignore",captive_end_digits_strategy:"delete",end_range_digits_strategy:"verse",include_apocrypha:!1,ps151_strategy:"c",versification_system:"default",case_sensitive:"none"},s.prototype.parse=function(t){var e,n,i;for(this.reset(),this.s=t,t=this.replace_control_characters(t),n=this.match_books(t),t=n[0],this.passage.books=n[1],t=this.match_passages(t),this.entities=[],n=0,i=t.length;i>n;n++)e=t[n],e=this.passage.handle_array([e])[0],this.entities=this.entities.concat(e);return this},s.prototype.reset=function(){return this.s="",this.entities=[],this.passage?(this.passage.books=[],this.passage.indices={}):(this.passage=new e,this.passage.options=this.options,this.passage.translations=this.translations)},s.prototype.set_options=function(t){var e,n;for(e in t)i.call(t,e)&&(n=t[e],"include_apocrypha"===e||"versification_system"===e||"case_sensitive"===e?this[e](n):this.options[e]=n);return this},s.prototype.include_apocrypha=function(t){return null==t||!0!==t&&!1!==t?this:(this.options.include_apocrypha=t,this.regexps.books=this.regexps.get_books(t,this.options.case_sensitive),!0===t?this.translations["default"].chapters.Ps[150]=this.translations["default"].chapters.Ps151[0]:!1===t&&151===this.translations["default"].chapters.Ps.length&&this.translations["default"].chapters.Ps.pop(),this)},s.prototype.versification_system=function(t){var e,s;if(null==t||null==this.translations.alternates[t])return this;if(this.options.versification_system=t,null==(s=this.translations.alternates)["default"]&&(s["default"]={order:null,chapters:{}}),null!=this.translations.alternates[t].order&&(null==this.translations.alternates["default"].order&&(this.translations.alternates["default"].order=n.shallow_clone(this.translations["default"].order)),this.translations["default"].order=n.shallow_clone(this.translations.alternates[t].order)),null!=this.translations.alternates[t].chapters)for(e in s=this.translations.alternates[t].chapters)i.call(s,e)&&(t=s[e],null==this.translations.alternates["default"].chapters[e]&&(this.translations.alternates["default"].chapters[e]=n.shallow_clone_array(this.translations["default"].chapters[e])),this.translations["default"].chapters[e]=n.shallow_clone_array(t));return this.include_apocrypha(this.options.include_apocrypha),this},s.prototype.case_sensitive=function(t){return null==t||"none"!==t&&"books"!==t||t===this.options.case_sensitive?this:(this.options.case_sensitive=t,this.regexps.books=this.regexps.get_books(this.options.include_apocrypha,t),this)},s.prototype.replace_control_characters=function(t){return t=t.replace(this.regexps.control," "),"replace"===this.options.non_latin_digits_strategy&&(t=t.replace(/[\u0660\u06f0\u07c0\u0966\u09e6\u0a66\u0ae6\u0b660\u0c66\u0ce6\u0d66\u0e50\u0ed0\u0f20\u1040\u1090\u17e0\u1810\u1946\u19d0\u1a80\u1a90\u1b50\u1bb0\u1c40\u1c50\ua620\ua8d0\ua900\ua9d0\uaa50\uabf0\uff10]/g,"0"),t=t.replace(/[\u0661\u06f1\u07c1\u0967\u09e7\u0a67\u0ae7\u0b67\u0be7\u0c67\u0ce7\u0d67\u0e51\u0ed1\u0f21\u1041\u1091\u17e1\u1811\u1947\u19d1\u1a81\u1a91\u1b51\u1bb1\u1c41\u1c51\ua621\ua8d1\ua901\ua9d1\uaa51\uabf1\uff11]/g,"1"),t=t.replace(/[\u0662\u06f2\u07c2\u0968\u09e8\u0a68\u0ae8\u0b68\u0be8\u0c68\u0ce8\u0d68\u0e52\u0ed2\u0f22\u1042\u1092\u17e2\u1812\u1948\u19d2\u1a82\u1a92\u1b52\u1bb2\u1c42\u1c52\ua622\ua8d2\ua902\ua9d2\uaa52\uabf2\uff12]/g,"2"),t=t.replace(/[\u0663\u06f3\u07c3\u0969\u09e9\u0a69\u0ae9\u0b69\u0be9\u0c69\u0ce9\u0d69\u0e53\u0ed3\u0f23\u1043\u1093\u17e3\u1813\u1949\u19d3\u1a83\u1a93\u1b53\u1bb3\u1c43\u1c53\ua623\ua8d3\ua903\ua9d3\uaa53\uabf3\uff13]/g,"3"),t=t.replace(/[\u0664\u06f4\u07c4\u096a\u09ea\u0a6a\u0aea\u0b6a\u0bea\u0c6a\u0cea\u0d6a\u0e54\u0ed4\u0f24\u1044\u1094\u17e4\u1814\u194a\u19d4\u1a84\u1a94\u1b54\u1bb4\u1c44\u1c54\ua624\ua8d4\ua904\ua9d4\uaa54\uabf4\uff14]/g,"4"),t=t.replace(/[\u0665\u06f5\u07c5\u096b\u09eb\u0a6b\u0aeb\u0b6b\u0beb\u0c6b\u0ceb\u0d6b\u0e55\u0ed5\u0f25\u1045\u1095\u17e5\u1815\u194b\u19d5\u1a85\u1a95\u1b55\u1bb5\u1c45\u1c55\ua625\ua8d5\ua905\ua9d5\uaa55\uabf5\uff15]/g,"5"),t=t.replace(/[\u0666\u06f6\u07c6\u096c\u09ec\u0a6c\u0aec\u0b6c\u0bec\u0c6c\u0cec\u0d6c\u0e56\u0ed6\u0f26\u1046\u1096\u17e6\u1816\u194c\u19d6\u1a86\u1a96\u1b56\u1bb6\u1c46\u1c56\ua626\ua8d6\ua906\ua9d6\uaa56\uabf6\uff16]/g,"6"),t=t.replace(/[\u0667\u06f7\u07c7\u096d\u09ed\u0a6d\u0aed\u0b6d\u0bed\u0c6d\u0ced\u0d6d\u0e57\u0ed7\u0f27\u1047\u1097\u17e7\u1817\u194d\u19d7\u1a87\u1a97\u1b57\u1bb7\u1c47\u1c57\ua627\ua8d7\ua907\ua9d7\uaa57\uabf7\uff17]/g,"7"),t=t.replace(/[\u0668\u06f8\u07c8\u096e\u09ee\u0a6e\u0aee\u0b6e\u0bee\u0c6e\u0cee\u0d6e\u0e58\u0ed8\u0f28\u1048\u1098\u17e8\u1818\u194e\u19d8\u1a88\u1a98\u1b58\u1bb8\u1c48\u1c58\ua628\ua8d8\ua908\ua9d8\uaa58\uabf8\uff18]/g,"8"),t=t.replace(/[\u0669\u06f9\u07c9\u096f\u09ef\u0a6f\u0aef\u0b6f\u0bef\u0c6f\u0cef\u0d6f\u0e59\u0ed9\u0f29\u1049\u1099\u17e9\u1819\u194f\u19d9\u1a89\u1a99\u1b59\u1bb9\u1c49\u1c59\ua629\ua8d9\ua909\ua9d9\uaa59\uabf9\uff19]/g,"9")),t},s.prototype.match_books=function(t){var e,n,i,s,o;for(n=[],o=this.regexps.books,i=0,s=o.length;s>i;i++)e=o[i],t=t.replace(e.regexp,function(t,i,s){return n.push({value:s,parsed:e.osis}),""+i+""+(n.length-1)+(null!=e.extra?"/"+e.extra:"")+""});return t=t.replace(this.regexps.translations,function(t){return n.push({value:t,parsed:t.toLowerCase()}),""+(n.length-1)+""}),[t,this.get_book_indices(n,t)]},s.prototype.get_book_indices=function(t,e){var n,i,s;for(n=0,s=/([\x1f\x1e])(\d+)(?:\/[a-z])?\1/g;i=s.exec(e);)t[i[2]].start_index=i.index+n,n+=t[i[2]].value.length-i[0].length;return t},s.prototype.match_passages=function(t){var e,n,i,s,o;for(o=[];i=this.regexps.escaped_passage.exec(t);)n=i[0],s=i[1],e=i[2],i.index+=n.length-s.length,/\s[2-9]\d\d\s*$|\s\d{4,}\s*$/.test(s)&&(n=/\s+\d+\s*$/,s=s.replace(n,"")),/[\d\x1f\x1e)]$/.test(s)||(s=this.replace_match_end(s)),"delete"===this.options.captive_end_digits_strategy&&(i=i.index+s.length,t.length>i&&/^\w/.test(t.substr(i,1))&&(s=s.replace(/[\s*]+\d+$/,"")),s=s.replace(/(\x1e[)\]]?)[\s*]*\d+$/,"$1")),s=s.replace(/[A-Z]+/g,function(t){return t.toLowerCase()}),i=s.substr(0,!1)?0:s.split("")[0].length,s={value:a.parse(s),type:"base",start_index:this.passage.books[e].start_index-i,match:s},"full"===this.options.book_alone_strategy&&1===s.value.length&&"b"===s.value[0].type&&0===i&&1===this.passage.books[e].parsed.length&&/^[234]/.test(this.passage.books[e].parsed[0])&&this.create_book_range(t,s,e),o.push(s);return o},s.prototype.replace_match_end=function(t){var e,n;for(n=t.length;e=this.regexps.match_end_split.exec(t);)n=e.index+e[0].length;return t.length>n&&(t=t.substr(0,n)),t},s.prototype.create_book_range=function(t,e,n){var i,o,a,r,l;for(i=[s.prototype.regexps.first,s.prototype.regexps.second,s.prototype.regexps.third],a=parseInt(this.passage.books[n].parsed[0].substr(0,1),10),o=l=1;a>=1?a>l:l>a;o=a>=1?++l:--l)if(r=o===a-1?s.prototype.regexps.range_and:s.prototype.regexps.range_only,r=t.match(RegExp("(?:^|\\W)("+i[o-1]+"\\s*"+r+"\\s*)\\x1f"+n+"\\x1f","i")),null!=r)return this.add_book_range_object(e,r,o);return!1},s.prototype.add_book_range_object=function(t,e,n){var i;return i=e[1].length,t.value[0]={type:"b_range_pre",value:[{type:"b_pre",value:""+n,indices:[e.index,e.index+i]},t.value[0]],indices:[0,t.value[0].indices[1]+i]},t.value[0].value[1].indices[0]+=i,t.value[0].value[1].indices[1]+=i,t.start_index-=i,t.match=e[1]+t.match},s.prototype.osis=function(){var t,e,n,i,s;for(e=[],s=this.parsed_entities(),n=0,i=s.length;i>n;n++)t=s[n],t.osis.length>0&&e.push(t.osis);return e.join(",")},s.prototype.osis_and_translations=function(){var t,e,n,i,s;for(e=[],s=this.parsed_entities(),n=0,i=s.length;i>n;n++)t=s[n],t.osis.length>0&&e.push([t.osis,t.translations.join(",")]);return e},s.prototype.osis_and_indices=function(){var t,e,n,i,s;for(e=[],s=this.parsed_entities(),n=0,i=s.length;i>n;n++)t=s[n],t.osis.length>0&&e.push({osis:t.osis,translations:t.translations,indices:t.indices});return e},s.prototype.parsed_entities=function(){var t,e,n,i,s,o,a,r,l,h,u,c,d;for(o=[],e=h=0,c=this.entities.length;c>=0?c>h:h>c;e=c>=0?++h:--h)if(t=this.entities[e],t.type&&"translation_sequence"===t.type&&o.length>0&&e===o[o.length-1].entity_id+1&&(o[o.length-1].indices[1]=t.absolute_indices[1]),null!=t.passages&&("b"!==t.type&&"b_range"!==t.type||"ignore"!==this.options.book_alone_strategy)){if(l=[],r=null,null!=t.passages[0].translations)for(u=t.passages[0].translations,i=0,a=u.length;a>i;i++)s=u[i],n=(null!=(d=s.osis)?d.length:void 0)>0?s.osis:"",null==r&&(r=s.alias),l.push(n);else l=[""],r="default";for(s=[],i=t.passages.length,n=u=0;i>=0?i>u:u>i;n=i>=0?++u:--u)a=t.passages[n],null==a.type&&(a.type=t.type),(!1!==a.valid.valid||("ignore"===this.options.invalid_sequence_strategy&&"sequence"===t.type&&this.snap_sequence("ignore",t,s,n,i),"ignore"!==this.options.invalid_passage_strategy))&&("b"!==a.type&&"b_range"!==a.type||"ignore"!==this.options.book_sequence_strategy||"sequence"!==t.type?(null==a.absolute_indices&&(a.absolute_indices=t.absolute_indices),s.push({osis:a.valid.valid?this.to_osis(a.start,a.end,r):"",type:a.type,indices:a.absolute_indices,translations:l,start:a.start,end:a.end,enclosed_indices:a.enclosed_absolute_indices,entity_id:e,entities:[a]})):this.snap_sequence("book",t,s,n,i));if(0!==s.length)if(s.length>1&&"combine"===this.options.consecutive_combination_strategy&&(s=this.combine_consecutive_passages(s,r)),"separate"===this.options.sequence_combination_strategy)o=o.concat(s);else{for(r=[],n=s.length-1,null!=s[n].enclosed_indices&&s[n].enclosed_indices[1]>=0&&(t.absolute_indices[1]=s[n].enclosed_indices[1]),i=0,a=s.length;a>i;i++)n=s[i],n.osis.length>0&&r.push(n.osis);o.push({osis:r.join(","),indices:t.absolute_indices,translations:l,entity_id:e,entities:s})}}return o},s.prototype.to_osis=function(t,e,n){var i;return null==e.c&&null==e.v&&t.b===e.b&&null==t.c&&null==t.v&&"first_chapter"===this.options.book_alone_strategy&&(e.c=1),null==t.c&&(t.c=1),null==t.v&&(t.v=1),null==e.c&&(e.c=this.passage.translations[n].chapters[e.b].length),null==e.v&&(e.v=this.passage.translations[n].chapters[e.b][e.c-1]),this.options.include_apocrypha&&"b"===this.options.ps151_strategy&&(151===t.c&&"Ps"===t.b||151===e.c&&"Ps"===e.b)&&this.fix_ps151(t,e,n),"b"===this.options.osis_compaction_strategy&&1===t.c&&1===t.v&&e.c===this.passage.translations[n].chapters[e.b].length&&e.v===this.passage.translations[n].chapters[e.b][e.c-1]?(n=t.b,i=e.b):2>=this.options.osis_compaction_strategy.length&&1===t.v&&e.v===this.passage.translations[n].chapters[e.b][e.c-1]?(n=t.b+"."+(""+t.c),i=e.b+"."+(""+e.c)):(n=t.b+"."+(""+t.c)+"."+(""+t.v),i=e.b+"."+(""+e.c)+"."+(""+e.v)),n=n===i?n:n+"-"+i,null!=t.extra&&(n=t.extra+","+n),null!=e.extra&&(n+=","+e.extra),n},s.prototype.fix_ps151=function(t,e,n){return 151===t.c&&"Ps"===t.b?151===e.c&&"Ps"===e.b?(t.b="Ps151",t.c=1,e.b="Ps151",e.c=1):(t.extra=this.to_osis({b:"Ps151",c:1,v:t.v},{b:"Ps151",c:1,v:this.passage.translations[n].chapters.Ps151[0]},n),t.b="Prov",t.c=1,t.v=1):(e.extra=this.to_osis({b:"Ps151",c:1,v:1},{b:"Ps151",c:1,v:e.v},n),e.c=150,e.v=this.passage.translations[n].chapters.Ps[149])},s.prototype.combine_consecutive_passages=function(t,e){var n,i,s,o,a,r,l,h,u,c;for(l=[],h={},a=t.length-1,n=-1,i=!1,s=c=0;a>=0?a>=c:c>=a;s=a>=0?++c:--c)r=t[s],r.osis.length>0?(u=l.length-1,o=!1,r.enclosed_indices[0]!==n&&(n=r.enclosed_indices[0]),n>=0&&(s===a||t[s+1].enclosed_indices[0]!==r.enclosed_indices[0])&&(i=o=!0),this.is_verse_consecutive(h,r.start,e)?(l[u].end=r.end,l[u].is_enclosed_last=o,l[u].indices[1]=r.indices[1],l[u].enclosed_indices[1]=r.enclosed_indices[1],l[u].osis=this.to_osis(l[u].start,r.end,e)):l.push(r),h={b:r.end.b,c:r.end.c,v:r.end.v}):(l.push(r),h={});return i&&this.snap_enclosed_indices(l),l},s.prototype.snap_enclosed_indices=function(t){var e,n,i;for(n=0,i=t.length;i>n;n++)e=t[n],null!=e.is_enclosed_last&&(0>e.enclosed_indices[0]&&e.is_enclosed_last&&(e.indices[1]=e.enclosed_indices[1]),delete e.is_enclosed_last);return t},s.prototype.is_verse_consecutive=function(t,e,n){var i;if(null==t.b)return!1;if(i=null!=this.passage.translations[n].order?this.passage.translations[n].order:this.passage.translations["default"].order,t.b===e.b){if(t.c===e.c){if(t.v===e.v-1)return!0}else if(1===e.v&&t.c===e.c-1&&t.v===this.passage.translations[n].chapters[t.b][t.c-1])return!0}else if(1===e.c&&1===e.v&&i[t.b]===i[e.b]-1&&t.c===this.passage.translations[n].chapters[t.b].length&&t.v===this.passage.translations[n].chapters[t.b][t.c-1])return!0;return!1},s.prototype.snap_sequence=function(t,e,n,i,s){var o;return o=e.passages[i],o.absolute_indices[0]===e.absolute_indices[0]&&s-1>i&&this.get_snap_sequence_i(e.passages,i,s)!==i?(e.absolute_indices[0]=e.passages[i+1].absolute_indices[0],this.remove_absolute_indices(e.passages,i+1)):o.absolute_indices[1]===e.absolute_indices[1]&&i>0?e.absolute_indices[1]=n.length>0?n[n.length-1].indices[1]:e.passages[i-1].absolute_indices[1]:"book"===t&&s-1>i&&!this.starts_with_book(e.passages[i+1])&&(e.passages[i+1].absolute_indices[0]=o.absolute_indices[0]),e},s.prototype.get_snap_sequence_i=function(t,e,n){var i,s,o;for(i=s=o=e+1;n>=o?n>s:s>n;i=n>=o?++s:--s){if(this.starts_with_book(t[i]))return i;if(t[i].valid.valid)break}return e},s.prototype.starts_with_book=function(t){return"b"===t.type.substr(0,1)||("range"===t.type||"ff"===t.type)&&"b"===t.start.type.substr(0,1)?!0:!1},s.prototype.remove_absolute_indices=function(t,e){var n,i,s,o,a,r;if(0>t[e].enclosed_absolute_indices[0])return!1;for(n=t[e].enclosed_absolute_indices,s=n[0],n=n[1],r=t.slice(e),o=0,a=r.length;a>o&&(i=r[o],i.enclosed_absolute_indices[0]===s&&i.enclosed_absolute_indices[1]===n);o++)i.enclosed_absolute_indices=[-1,-1];return!0},this.bcv_parser=t=s;var o=function(){};o.prototype.books=[],o.prototype.indices={},o.prototype.options={},o.prototype.translations={},o.prototype.handle_array=function(t,e,n){var i,s,o;for(null==e&&(e=[]),null==n&&(n={}),s=0,o=t.length;o>s&&(i=t[s],"stop"!==i.type);s++)n=this.handle_obj(i,e,n),e=n[0],n=n[1];return[e,n]},o.prototype.handle_obj=function(t,e,n){return null!=t.type&&null!=this[t.type]?this[t.type](t,e,n):[e,n]},o.prototype.b=function(t,e,i){var s,o,a,r,l;for(t.start_context=n.shallow_clone(i),t.passages=[],i=[],l=this.books[t.value].parsed,a=0,r=l.length;r>a;a++)s=l[a],o=this.validate_ref(t.start_context.translations,{b:s}),s={start:{b:s},end:{b:s},valid:o},0===t.passages.length&&o.valid?t.passages.push(s):i.push(s);return 0===t.passages.length&&t.passages.push(i.shift()),i.length>0&&(t.passages[0].alternates=i),null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),e.push(t),i={b:t.passages[0].start.b},null!=t.start_context.translations&&(i.translations=t.start_context.translations),[e,i]},o.prototype.b_range=function(t,e,n){return this.range(t,e,n)},o.prototype.b_range_pre=function(t,e,i){var s,o;return t.start_context=n.shallow_clone(i),t.passages=[],s=this.pluck("b",t.value),i=this.b(s,[],i),s=i[0][0],i=i[1],null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),o={b:t.value[0].value+s.passages[0].start.b.substr(1),type:"b"},t.passages=[{start:o,end:s.passages[0].end,valid:s.passages[0].valid}],null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),e.push(t),[e,i]},o.prototype.base=function(t,e,n){return this.indices=this.calculate_indices(t.match,t.start_index),this.handle_array(t.value,e,n)},o.prototype.bc=function(t,e,i){var s,o,a,r,l,h,u,c,d;for(t.start_context=n.shallow_clone(i),t.passages=[],this.reset_context(i,["b","c","v"]),a=this.pluck("c",t.value).value,s=[],d=this.books[this.pluck("b",t.value).value].parsed,u=0,c=d.length;c>u;u++)o=d[u],r="c",h=this.validate_ref(t.start_context.translations,{b:o,c:a}),l={start:{b:o},end:{b:o},valid:h},h.messages.start_chapter_not_exist_in_single_chapter_book&&(l.valid=this.validate_ref(t.start_context.translations,{b:o,v:a}),l.start.c=1,l.end.c=1,r="v"),l.start[r]=a,o=this.fix_start_zeroes(l.valid,l.start.c,l.start.v),l.start.c=o[0],l.start.v=o[1],l.end[r]=l.start[r],0===t.passages.length&&l.valid.valid?t.passages.push(l):s.push(l);return 0===t.passages.length&&t.passages.push(s.shift()),s.length>0&&(t.passages[0].alternates=s),null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),this.set_context_from_object(i,["b","c","v"],t.passages[0].start),e.push(t),[e,i]},o.prototype.bc_title=function(t,e,i){var s,o,a,r;if(t.start_context=n.shallow_clone(i),i=this.bc(this.pluck("bc",t.value),[],i),s=i[0][0],i=i[1],"Ps"!==s.passages[0].start.b.substr(0,2)&&null!=s.passages[0].alternates)for(o=a=0,r=s.passages[0].alternates.length;r>=0?r>a:a>r;o=r>=0?++a:--a)if("Ps"===s.passages[0].alternates[o].start.b.substr(0,2)){s.passages[0]=s.passages[0].alternates[o];break}return"Ps"!==s.passages[0].start.b.substr(0,2)?(e.push(s),[e,i]):(this.books[this.pluck("b",s.value).value].parsed=["Ps"],s=this.pluck("title",t.value),t.value[1]={type:"v",value:[{type:"integer",value:1,indices:s.indices}],indices:s.indices},t.original_type="bc_title",t.type="bcv",this.bcv(t,e,t.start_context))},o.prototype.bcv=function(t,e,i){var s,o,a,r,l,h,u,c;for(t.start_context=n.shallow_clone(i),t.passages=[],this.reset_context(i,["b","c","v"]),a=this.pluck("bc",t.value),r=this.pluck("c",a.value).value,l=this.pluck("v",t.value).value,s=[],c=this.books[this.pluck("b",a.value).value].parsed,h=0,u=c.length;u>h;h++)o=c[h],a=this.validate_ref(t.start_context.translations,{b:o,c:r,v:l}),l=this.fix_start_zeroes(a,r,l),r=l[0],l=l[1],o={start:{b:o,c:r,v:l},end:{b:o,c:r,v:l},valid:a},0===t.passages.length&&a.valid?t.passages.push(o):s.push(o);return 0===t.passages.length&&t.passages.push(s.shift()),s.length>0&&(t.passages[0].alternates=s),null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),this.set_context_from_object(i,["b","c","v"],t.passages[0].start),e.push(t),[e,i]},o.prototype.bv=function(t,e,i){var s;return t.start_context=n.shallow_clone(i),s=t.value,s={indices:t.indices,value:[{type:"bc",value:[s[0],{type:"c",value:[{type:"integer",value:1}]}]},s[1]]},i=this.bcv(s,[],i),s=i[0][0],i=i[1],t.passages=s.passages,null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),e.push(t),[e,i]},o.prototype.c=function(t,e,i){var s,o;return t.start_context=n.shallow_clone(i),s="integer"===t.type?t.value:this.pluck("integer",t.value).value,o=this.validate_ref(t.start_context.translations,{b:i.b,c:s}),!o.valid&&o.messages.start_chapter_not_exist_in_single_chapter_book?this.v(t,e,i):(s=this.fix_start_zeroes(o,s)[0],t.passages=[{start:{b:i.b,c:s},end:{b:i.b,c:s},valid:o}],null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),e.push(t),i.c=s,this.reset_context(i,["v"]),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),[e,i])},o.prototype.c_psalm=function(t,e,n){var i;return t.original_type=t.type,t.original_value=t.value,t.type="bc",i=parseInt(this.books[t.value].value.match(/^\d+/)[0],10),t.value=[{type:"b",value:t.original_value,indices:t.indices},{type:"c",value:[{type:"integer",value:i,indices:t.indices}],indices:t.indices}],this.bc(t,e,n)},o.prototype.c_title=function(t,e,i){return t.start_context=n.shallow_clone(i),"Ps"!==i.b?this.c(t.value[0],e,i):(i=this.pluck("title",t.value),t.value[1]={type:"v",value:[{type:"integer",value:1,indices:i.indices}],indices:i.indices},t.original_type="c_title",t.type="cv",this.cv(t,e,t.start_context))},o.prototype.cv=function(t,e,i){var s,o,a;return t.start_context=n.shallow_clone(i),s=this.pluck("c",t.value).value,o=this.pluck("v",t.value).value,a=this.validate_ref(t.start_context.translations,{b:i.b,c:s,v:o}),o=this.fix_start_zeroes(a,s,o),s=o[0],o=o[1],t.passages=[{start:{b:i.b,c:s,v:o},end:{b:i.b,c:s,v:o},valid:a}],null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),e.push(t),i.c=s,i.v=o,null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),[e,i]},o.prototype.cb_range=function(t,e,n){var i,s,o;return t.original_type=t.type,t.type="range",s=t.value,i=s[0],o=s[1],s=s[2],t.original_value=[i,o,s],t.value=[{type:"bc",value:[i,o],indices:t.indices},s],s.indices[1]=t.indices[1],this.range(t,e,n)},o.prototype.cv_psalm=function(t,e,i){var s,o;return t.start_context=n.shallow_clone(i),t.original_type=t.type,o=t.original_value=t.value,s=o[0],o=o[1],t.type="bcv",s=this.c_psalm(s,[],t.start_context)[0][0],t.value=[s,o],this.bcv(t,e,i)},o.prototype.ff=function(t,e,i){return t.start_context=n.shallow_clone(i),t.value.push({type:"integer",indices:t.indices,value:999}),i=this.range(t,[],t.start_context),t=i[0][0],i=i[1],t.value.pop(),null!=t.passages[0].valid.end_verse_not_exist&&delete t.passages[0].valid.end_verse_not_exist,null!=t.passages[0].valid.end_chapter_not_exist&&delete t.passages[0].valid.end_chapter_not_exist,null!=t.passages[0].end.original_c&&delete t.passages[0].end.original_c,e.push(t),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),[e,i]},o.prototype.integer_title=function(t,e,i){return t.start_context=n.shallow_clone(i),"Ps"!==i.b?this.integer(t.value[0],e,i):(t.value[0]={type:"c",value:[t.value[0]],indices:[t.value[0].indices[0],t.value[0].indices[1]]},i=[t.indices[1]-5,t.indices[1]],t.value[1]={type:"v",value:[{type:"integer",value:1,indices:i}],indices:i},t.original_type="integer_title",t.type="cv",this.cv(t,e,t.start_context))},o.prototype.integer=function(t,e,n){return null!=n.v?this.v(t,e,n):this.c(t,e,n)},o.prototype.sequence=function(t,e,i){var s,o,a,r,l,h,u,c;for(t.start_context=n.shallow_clone(i),t.passages=[],u=t.value,a=0,l=u.length;l>a;a++)for(s=u[a],i=this.handle_array(s,[],i),s=i[0],s=s[0],i=i[1],c=s.passages,r=0,h=c.length;h>r;r++)o=c[r],null==o.type&&(o.type=s.type),null==o.absolute_indices&&(o.absolute_indices=s.absolute_indices),null!=s.start_context.translations&&(o.translations=s.start_context.translations),o.enclosed_absolute_indices="sequence_post_enclosed"===s.type?s.absolute_indices:[-1,-1],t.passages.push(o);return null==t.absolute_indices&&(t.absolute_indices=t.passages.length>0&&"sequence"===t.type?[t.passages[0].absolute_indices[0],t.passages[t.passages.length-1].absolute_indices[1]]:this.get_absolute_indices(t.indices)),e.push(t),[e,i]},o.prototype.sequence_post_enclosed=function(t,e,n){return this.sequence(t,e,n)},o.prototype.v=function(t,e,i){var s,o,a;return o="integer"===t.type?t.value:this.pluck("integer",t.value).value,t.start_context=n.shallow_clone(i),s=null!=i.c?i.c:1,a=this.validate_ref(t.start_context.translations,{b:i.b,c:s,v:o}),o=this.fix_start_zeroes(a,0,o)[1],t.passages=[{start:{b:i.b,c:s,v:o},end:{b:i.b,c:s,v:o},valid:a}],null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),e.push(t),i.v=o,[e,i]},o.prototype.range=function(t,e,i){var s,o,a,r,l;return t.start_context=n.shallow_clone(i),o=t.value,a=o[0],s=o[1],"v"!==s.type||"bc"!==a.type&&"c"!==a.type||"verse"!==this.options.end_range_digits_strategy?(i=this.handle_obj(a,[],i),a=i[0][0],i=i[1],i=this.handle_obj(s,[],i),s=i[0][0],i=i[1],t.value=[a,s],t.indices=[a.indices[0],s.indices[1]],delete t.absolute_indices,r={b:a.passages[0].start.b,c:a.passages[0].start.c,v:a.passages[0].start.v,type:a.type},o={b:s.passages[0].end.b,c:s.passages[0].end.c,v:s.passages[0].end.v,type:s.type},s.passages[0].valid.messages.start_chapter_is_zero&&(o.c=0),s.passages[0].valid.messages.start_verse_is_zero&&(o.v=0),l=this.validate_ref(t.start_context.translations,r,o),l.valid?(s=this.range_handle_valid(l,t,a,r,s,o,e),a=s[0],s=s[1],a?s:(null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),t.passages=[{start:r,end:o,valid:l}],null!=t.start_context.translations&&(t.passages[0].translations=t.start_context.translations),e.push(t),[e,i])):this.range_handle_invalid(l,t,a,r,s,o,e)):this.range_change_integer_end(t,e)},o.prototype.range_change_end=function(t,e,n){var i;return i=t.value[1],"integer"===i.type?(i.original_value=i.value,i.value=n):"v"===i.type?(i=this.pluck("integer",i.value),i.original_value=i.value,i.value=n):"cv"===i.type&&(i=this.pluck("c",i.value),i.original_value=i.value,i.value=n),this.handle_obj(t,e,t.start_context)},o.prototype.range_change_integer_end=function(t,e){var n,i;return n=t.value,i=n[0],n=n[1],t.original_type=t.type,t.original_value=[i,n],t.type="integer"===i.type?"cv":i.type+"v","integer"===i.type&&(t.value[0]={type:"c",value:[i],indices:i.indices}),"integer"===n.type&&(t.value[1]={type:"v",value:[n],indices:n.indices}),this.handle_obj(t,e,t.start_context)},o.prototype.range_change_cv_end=function(t,e){var i,s,o;return i=t.value,o=i[0],i=i[1],t.original_type=t.type,t.original_value=[o,i],t.type="sequence",s=i.value,i=s[0],s=s[1],i=n.shallow_clone(i),i.original_type=i.type,i.type="v",t.value=[[{type:"range",value:[o,i],indices:[o.indices[0],i.indices[1]]}],[s]],this.sequence(t,e,t.start_context)},o.prototype.range_validate=function(t,e,n,i){return t.messages.end_chapter_not_exist?(n.original_c=n.c,n.c=t.messages.end_chapter_not_exist,null!=n.v&&(n.v=this.validate_ref(i.start_context.translations,{b:n.b,c:n.c,v:999}).messages.end_verse_not_exist)):t.messages.end_verse_not_exist&&(n.original_v=n.v,n.v=t.messages.end_verse_not_exist),t.messages.end_verse_is_zero&&"allow"!==this.options.zero_verse_strategy&&(n.v=t.messages.end_verse_is_zero),t.messages.end_chapter_is_zero&&(n.c=t.messages.end_chapter_is_zero),t=this.fix_start_zeroes(t,e.c,e.v),e.c=t[0],e.v=t[1],!0},o.prototype.range_check_new_end=function(t,e,n,i){var s,o;return s=0,o=null,i.messages.end_chapter_before_start?o="c":i.messages.end_verse_before_start&&(o="v"),null!=o&&(s=this.range_get_new_end_value(e,n,i,o)),s>0&&(e={b:n.b,c:n.c,v:n.v},e[o]=s,t=this.validate_ref(t,e),t.valid||(s=0)),s},o.prototype.range_get_new_end_value=function(t,e,n,i){var s;return s=0,"c"===i&&n.messages.end_chapter_is_zero||"v"===i&&n.messages.end_verse_is_zero?s:(t[i]>=10&&10>e[i]&&t[i]-10*Math.floor(t[i]/10)<e[i]?s=e[i]+10*Math.floor(t[i]/10):t[i]>=100&&100>e[i]&&t[i]-100<e[i]&&(s=e[i]+100),s)},o.prototype.range_handle_valid=function(t,e,n,i,s,o,a){return t.messages.end_chapter_not_exist&&"verse"===this.options.end_range_digits_strategy&&null==i.v&&("integer"===s.type||"v"===s.type)&&(n="v"===s.type?this.pluck("integer",s.value):s.value,n=this.validate_ref(e.start_context.translations,{b:i.b,c:i.c,v:n}),n.valid)?[!0,this.range_change_integer_end(e,a)]:t.messages.end_chapter_not_exist&&"verse"===this.options.end_range_digits_strategy&&null!=i.v&&"cv"===s.type&&(n=this.validate_ref(e.start_context.translations,{b:o.b,c:i.c,v:o.c}),n.valid&&(n=this.validate_ref(e.start_context.translations,{b:o.b,c:i.c,v:o.v})),n.valid)?[!0,this.range_change_cv_end(e,a)]:(this.range_validate(t,i,o,e),[!1,null]) },o.prototype.range_handle_invalid=function(t,e,n,i,s,o,a){return((t.messages.end_chapter_before_start||t.messages.end_verse_before_start)&&("integer"===s.type||"v"===s.type)||t.messages.end_chapter_before_start&&"cv"===s.type)&&(t=this.range_check_new_end(e.start_context.translations,i,o,t),t>0)?this.range_change_end(e,a,t):"verse"!==this.options.end_range_digits_strategy||void 0!==i.v||"integer"!==s.type&&"v"!==s.type||(t="v"===s.type?this.pluck("integer",s.value):s.value,i=this.validate_ref(e.start_context.translations,{b:i.b,c:i.c,v:t}),!i.valid)?(i=[e.type,"sequence"],e.original_type=i[0],e.type=i[1],n=[[n,s],[[n],[s]]],e.original_value=n[0],e.value=n[1],this.handle_obj(e,a,e.start_context)):this.range_change_integer_end(e,a)},o.prototype.translation_sequence=function(t,e,n){var i,s,o,a,r;for(s=[],s.push({translation:this.books[t.value[0].value].parsed}),r=t.value[1],o=0,a=r.length;a>o;o++)i=r[o],i=this.books[this.pluck("translation",i).value].parsed,null!=i&&s.push({translation:i});for(o=0,a=s.length;a>o;o++)i=s[o],null!=this.translations.aliases[i.translation]?(i.alias=this.translations.aliases[i.translation].alias,i.osis=this.translations.aliases[i.translation].osis):(i.alias="default",i.osis=i.translation.toUpperCase());if(e.length>0){for(o=0,i=a=r=e.length-1;0>=r?0>=a:a>=0;i=0>=r?++a:--a)if(null!=e[i].original_type&&(e[i].type=e[i].original_type),null!=e[i].original_value&&(e[i].value=e[i].original_value),"translation_sequence"===e[i].type){o=i+1;break}e.length>o&&(e[o].start_context.translations=s,n=this.handle_array(e.slice(o),[],e[o].start_context),n=n[1])}return null==t.absolute_indices&&(t.absolute_indices=this.get_absolute_indices(t.indices)),e.push(t),this.reset_context(n,["translations"]),[e,n]},o.prototype.pluck=function(t,e){var n,i,s;for(i=0,s=e.length;s>i;i++)if(n=e[i],null!=n.type&&n.type===t)return"c"===t||"v"===t?this.pluck("integer",n.value):n;return null},o.prototype.set_context_from_object=function(t,e,n){var i,s,o,a;for(a=[],s=0,o=e.length;o>s;s++)i=e[s],null!=n[i]&&a.push(t[i]=n[i]);return a},o.prototype.reset_context=function(t,e){var n,i,s,o;for(o=[],i=0,s=e.length;s>i;i++)n=e[i],o.push(delete t[n]);return o},o.prototype.fix_start_zeroes=function(t,e,n){return t.valid&&(t.messages.start_chapter_is_zero&&(e=t.messages.start_chapter_is_zero),t.messages.start_verse_is_zero&&"allow"!==this.options.zero_verse_strategy&&(n=t.messages.start_verse_is_zero)),[e,n]},o.prototype.calculate_indices=function(t,e){var n,i,s,o,a,r,l,h,u,c,d,p;for(l="book",i=[],s=0,e=parseInt(e,10),r=[t],p=["",""],h=0,c=p.length;c>h;h++){for(n=p[h],a=[],u=0,d=r.length;d>u;u++)o=r[u],a=a.concat(o.split(n));r=a}for(h=0,u=r.length;u>h;h++)o=r[h],l="book"===l?"rest":"book",a=o.length,0!==a&&("book"===l?(o=o.replace(/\/[a-z]$/,""),n=s+a,i.length>0&&i[i.length-1].index===e?i[i.length-1].end=n:i.push({start:s,end:n,index:e}),s+=a+2,e=this.books[o].start_index+this.books[o].value.length-s,i.push({start:n+1,end:n+1,index:e})):(n=s+a-1,i.length>0&&i[i.length-1].index===e?i[i.length-1].end=n:i.push({start:s,end:n,index:e}),s+=a));return i},o.prototype.get_absolute_indices=function(t){var e,n,i,s,o,a,r;for(i=t[0],t=t[1],e=s=null,r=this.indices,o=0,a=r.length;a>o;o++)if(n=r[o],null===s&&i>=n.start&&n.end>=i&&(s=i+n.index),t>=n.start&&n.end>=t){e=t+n.index+1;break}return[s,e]},o.prototype.validate_ref=function(t,e,n){var i,s;return t||(t=[{translation:"default",osis:"",alias:"default"}]),s=t[0],null==s?{valid:!1,messages:{translation_invalid:!0}}:(i={},null==s.alias&&(s.alias="default"),null==s.alias?{valid:!1,messages:{translation_invalid:!0}}:(null==this.translations.aliases[s.alias]&&(s.alias="default",i.translation_unknown=!0),i=this.validate_start_ref(s.alias,e,!0,i),t=i[0],i=i[1],n&&(e=this.validate_end_ref(s.alias,e,n,t,i),t=e[0],i=e[1]),{valid:t,messages:i}))},o.prototype.validate_start_ref=function(t,e,n,i){var s,o;if("default"!==t&&null==(null!=(s=this.translations[t])?s.chapters[e.b]:void 0)&&this.promote_book_to_translation(e.b,t),s=null!=(null!=(o=this.translations[t])?o.order:void 0)?t:"default",null!=this.translations[s].order[e.b]){if(null==e.c&&(e.c=1),e.c=parseInt(e.c,10),isNaN(e.c))return i.start_chapter_not_numeric=!0,[!1,i];0===e.c&&(i.start_chapter_is_zero=1,"error"===this.options.zero_chapter_strategy?n=!1:e.c=1),e.c>0&&null!=this.translations[t].chapters[e.b][e.c-1]?null!=e.v&&(e.v=parseInt(e.v,10),isNaN(e.v)?(n=!1,i.start_verse_not_numeric=!0):0===e.v?(i.start_verse_is_zero=1,"error"===this.options.zero_verse_strategy?n=!1:"upgrade"===this.options.zero_verse_strategy&&(e.v=1)):e.v>this.translations[t].chapters[e.b][e.c-1]&&(n=!1,i.start_verse_not_exist=this.translations[t].chapters[e.b][e.c-1])):(n=!1,1!==e.c&&1===this.translations[t].chapters[e.b].length?i.start_chapter_not_exist_in_single_chapter_book=1:e.c>0&&(i.start_chapter_not_exist=this.translations[t].chapters[e.b].length))}else n=!1,i.start_book_not_exist=!0;return[n,i]},o.prototype.validate_end_ref=function(t,e,n,i,s){var o,a;return"default"!==t&&null==(null!=(o=this.translations[t])?o.chapters[n.b]:void 0)&&this.promote_book_to_translation(n.b,t),o=null!=(null!=(a=this.translations[t])?a.order:void 0)?t:"default",null!=n.c&&(n.c=parseInt(n.c,10)),null!=n.v&&(n.v=parseInt(n.v,10)),null!=n.c&&!isNaN(n.c)&&0===n.c&&(s.end_chapter_is_zero=1,"error"===this.options.zero_chapter_strategy?i=!1:n.c=1),null!=this.translations[o].order[n.b]?(null!=this.translations[o].order[e.b]&&this.translations[o].order[e.b]>this.translations[o].order[n.b]&&(i=!1,s.end_book_before_start=!0),e.b===n.b&&null!=n.c&&!isNaN(n.c)&&(null==e.c&&(e.c=1),!isNaN(parseInt(e.c,10))&&e.c>n.c?(i=!1,s.end_chapter_before_start=!0):e.c===n.c&&null!=n.v&&!isNaN(n.v)&&(null==e.v&&(e.v=1),!isNaN(parseInt(e.v,10))&&e.v>n.v&&(i=!1,s.end_verse_before_start=!0))),null!=n.c&&!isNaN(n.c)&&null==this.translations[t].chapters[n.b][n.c-1]&&(1===this.translations[t].chapters[n.b].length?s.end_chapter_not_exist_in_single_chapter_book=1:n.c>0&&(s.end_chapter_not_exist=this.translations[t].chapters[n.b].length)),null!=n.v&&!isNaN(n.v)&&(null==n.c&&(n.c=this.translations[t].chapters[n.b].length),n.v>this.translations[t].chapters[n.b][n.c-1]?s.end_verse_not_exist=this.translations[t].chapters[n.b][n.c-1]:0===n.v&&(s.end_verse_is_zero=1,"error"===this.options.zero_verse_strategy?i=!1:"upgrade"===this.options.zero_verse_strategy&&(n.v=1)))):(i=!1,s.end_book_not_exist=!0),null!=n.c&&isNaN(n.c)&&(i=!1,s.end_chapter_not_numeric=!0),null!=n.v&&isNaN(n.v)&&(i=!1,s.end_verse_not_numeric=!0),[i,s]},o.prototype.promote_book_to_translation=function(t,e){var i,s,o;return null==(i=this.translations)[e]&&(i[e]={}),null==(i=this.translations[e]).chapters&&(i.chapters={}),this.translations[e].chapters[t]=null!=(null!=(s=this.translations.alternates[e])?null!=(o=s.chapters)?o[t]:void 0:void 0)?this.translations.alternates[e].chapters[t]:n.shallow_clone_array(this.translations["default"].chapters[t])},e=o,n={shallow_clone:function(t){var e,n,s;if(null==t)return t;n={};for(e in t)i.call(t,e)&&(s=t[e],n[e]=s);return n},shallow_clone_array:function(t){var e,n,i,s;if(null==t)return t;for(n=[],e=i=0,s=t.length;s>=0?s>=i:i>=s;e=s>=0?++i:--i)t[e]!==void 0&&(n[e]=t[e]);return n}},t.prototype.regexps.translations=/(?:AMP|ASV|CE[BV]|E[RS]V|HCSB|N?KJV|MSG|NAB(?:RE)?|NASB?|NIR?V|NLT|N?RSV|TNIV)\b/gi,t.prototype.translations={aliases:{ceb:{osis:"CEB",alias:"ceb"},kjv:{osis:"KJV",alias:"kjv"},nab:{osis:"NAB",alias:"nab"},nas:{osis:"NASB",alias:"default"},nirv:{osis:"NIrV",alias:"kjv"},niv:{osis:"NIV",alias:"kjv"},nkjv:{osis:"NKJV",alias:"nkjv"},nlt:{osis:"NLT",alias:"nlt"},nrsv:{osis:"NRSV",alias:"nrsv"},"default":{osis:"",alias:"default"}},"default":{order:{Gen:1,Exod:2,Lev:3,Num:4,Deut:5,Josh:6,Judg:7,Ruth:8,"1Sam":9,"2Sam":10,"1Kgs":11,"2Kgs":12,"1Chr":13,"2Chr":14,Ezra:15,Neh:16,Esth:17,Job:18,Ps:19,Prov:20,Eccl:21,Song:22,Isa:23,Jer:24,Lam:25,Ezek:26,Dan:27,Hos:28,Joel:29,Amos:30,Obad:31,Jonah:32,Mic:33,Nah:34,Hab:35,Zeph:36,Hag:37,Zech:38,Mal:39,Matt:40,Mark:41,Luke:42,John:43,Acts:44,Rom:45,"1Cor":46,"2Cor":47,Gal:48,Eph:49,Phil:50,Col:51,"1Thess":52,"2Thess":53,"1Tim":54,"2Tim":55,Titus:56,Phlm:57,Heb:58,Jas:59,"1Pet":60,"2Pet":61,"1John":62,"2John":63,"3John":64,Jude:65,Rev:66,Tob:67,Jdt:68,GkEsth:69,Wis:70,Sir:71,Bar:72,PrAzar:73,Sus:74,Bel:75,SgThree:76,EpJer:77,"1Macc":78,"2Macc":79,"3Macc":80,"4Macc":81,"1Esd":82,"2Esd":83,PrMan:84,Ps151:85},chapters:{Gen:[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,55,32,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],Exod:[22,25,22,31,23,30,25,32,35,29,10,51,22,31,27,36,16,27,25,26,36,31,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],Lev:[17,16,17,35,19,30,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],Num:[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,50,13,32,22,29,35,41,30,25,18,65,23,31,40,16,54,42,56,29,34,13],Deut:[46,37,29,49,33,25,26,20,29,22,32,32,18,29,23,22,20,22,21,20,23,30,25,22,19,19,26,68,29,20,30,52,29,12],Josh:[18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33],Judg:[36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25],Ruth:[22,23,18,22],"1Sam":[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,15,23,29,22,44,25,12,25,11,31,13],"2Sam":[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,33,43,26,22,51,39,25],"1Kgs":[53,46,28,34,18,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,53],"2Kgs":[18,25,27,44,27,33,20,29,37,36,21,21,25,29,38,20,41,37,37,21,26,20,37,20,30],"1Chr":[54,55,24,43,26,81,40,40,44,14,47,40,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],"2Chr":[17,18,17,22,14,42,22,18,31,19,23,16,22,15,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],Ezra:[11,70,13,24,17,22,28,36,15,44],Neh:[11,20,32,23,19,19,73,18,38,39,36,47,31],Esth:[22,23,15,17,14,14,10,17,32,3],Job:[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,24,34,17],Ps:[6,12,8,8,12,10,17,9,20,18,7,8,6,7,5,11,15,50,14,9,13,31,6,10,22,12,14,9,11,12,24,11,22,22,28,12,40,22,13,17,13,11,5,26,17,11,9,14,20,23,19,9,6,7,23,13,11,11,17,12,8,12,11,10,13,20,7,35,36,5,24,20,28,23,10,12,20,72,13,19,16,8,18,12,13,17,7,18,52,17,16,15,5,23,11,13,12,9,9,5,8,28,22,35,45,48,43,13,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,13,10,7,12,15,21,10,20,14,9,6],Prov:[33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31],Eccl:[18,26,22,16,20,12,29,17,18,20,10,14],Song:[17,17,11,16,16,13,13,14],Isa:[31,22,26,6,30,13,25,22,21,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,12,25,24],Jer:[19,37,25,31,31,30,34,22,26,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],Lam:[22,22,66,22,22],Ezek:[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,49,32,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],Dan:[21,49,30,37,31,28,28,27,27,21,45,13],Hos:[11,23,5,19,15,11,16,14,17,15,12,14,16,9],Joel:[20,32,21],Amos:[15,16,15,13,27,14,17,14,15],Obad:[21],Jonah:[17,10,10,11],Mic:[16,13,12,13,15,16,20],Nah:[15,13,19],Hab:[17,20,19],Zeph:[18,15,20],Hag:[15,23],Zech:[21,13,10,14,11,15,14,23,17,12,17,14,9,21],Mal:[14,17,18,6],Matt:[25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20],Mark:[45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20],Luke:[80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53],John:[51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25],Acts:[26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,41,38,40,30,35,27,27,32,44,31],Rom:[32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27],"1Cor":[31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24],"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,14],Gal:[24,21,29,31,26,18],Eph:[23,22,21,32,33,24],Phil:[30,30,21,23],Col:[29,23,25,18],"1Thess":[10,20,13,18,28],"2Thess":[12,17,18],"1Tim":[20,15,16,16,25,21],"2Tim":[18,26,17,22],Titus:[16,15,15],Phlm:[25],Heb:[14,18,19,16,14,20,28,13,28,39,40,29,25],Jas:[27,26,18,17,20],"1Pet":[25,25,22,19,14],"2Pet":[21,22,18],"1John":[10,29,24,21,21],"2John":[13],"3John":[15],Jude:[25],Rev:[20,29,22,11,14,17,17,13,21,11,19,17,18,20,8,21,18,24,21,15,27,21],Tob:[22,14,17,21,22,18,16,21,6,13,18,22,17,15],Jdt:[16,28,10,15,24,21,32,36,14,23,23,20,20,19,14,25],GkEsth:[22,23,15,17,14,14,10,17,32,13,12,6,18,19,16,24],Wis:[16,24,19,20,23,25,30,21,18,21,26,27,19,31,19,29,21,25,22],Sir:[30,18,31,31,15,37,36,19,18,31,34,18,26,27,20,30,32,33,30,31,28,27,27,34,26,29,30,26,28,25,31,24,33,31,26,31,31,34,35,30,22,25,33,23,26,20,25,25,16,29,30],Bar:[22,35,37,37,9],PrAzar:[68],Sus:[64],Bel:[42],SgThree:[39],EpJer:[73],"1Macc":[64,70,60,61,68,63,50,32,73,89,74,53,53,49,41,24],"2Macc":[36,32,40,50,27,31,42,36,29,38,38,45,26,46,39],"3Macc":[29,33,30,21,51,41,23],"4Macc":[35,24,21,26,38,35,23,29,32,21,27,19,27,20,32,25,24,24],"1Esd":[58,30,24,63,73,34,15,96,55],"2Esd":[40,48,36,52,56,59,70,63,47,59,46,51,58,48,63,78],PrMan:[15],Ps151:[7]}},alternates:{ceb:{chapters:{"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,13],Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21],Tob:[22,14,17,21,22,18,16,21,6,13,18,22,18,15],PrAzar:[67],EpJer:[72],"1Esd":[55,26,24,63,71,33,15,92,55]}},kjv:{chapters:{"3John":[14]}},nab:{chapters:{Gen:[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,54,33,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],Exod:[22,25,22,31,23,30,29,28,35,29,10,51,22,31,27,36,16,27,25,26,37,30,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],Lev:[17,16,17,35,26,23,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],Num:[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,35,28,32,22,29,35,41,30,25,19,65,23,31,39,17,54,42,56,29,34,13],Deut:[46,37,29,49,33,25,26,20,29,22,32,31,19,29,23,22,20,22,21,20,23,29,26,22,19,19,26,69,28,20,30,52,29,12],"1Sam":[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,16,23,28,23,44,25,12,25,11,31,13],"2Sam":[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,32,44,26,22,51,39,25],"1Kgs":[53,46,28,20,32,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,54],"2Kgs":[18,25,27,44,27,33,20,29,37,36,20,22,25,29,38,20,41,37,37,21,26,20,37,20,30],"1Chr":[54,55,24,43,41,66,40,40,44,14,47,41,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],"2Chr":[18,17,17,22,14,42,22,18,31,19,23,16,23,14,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],Neh:[11,20,38,17,19,19,72,18,37,40,36,47,31],Job:[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,32,26,17],Ps:[6,11,9,9,13,11,18,10,21,18,7,9,6,7,5,11,15,51,15,10,14,32,6,10,22,12,14,9,11,13,25,11,22,23,28,13,40,23,14,18,14,12,5,27,18,12,10,15,21,23,21,11,7,9,24,14,12,12,18,14,9,13,12,11,14,20,8,36,37,6,24,20,28,23,11,13,21,72,13,20,17,8,19,13,14,17,7,19,53,17,16,16,5,23,11,13,12,9,9,5,8,29,22,35,45,48,43,14,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,14,10,8,12,15,21,10,20,14,9,6],Eccl:[18,26,22,17,19,12,29,17,18,20,10,14],Song:[17,17,11,16,16,12,14,14],Isa:[31,22,26,6,30,13,25,23,20,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,11,25,24],Jer:[19,37,25,31,31,30,34,23,25,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],Ezek:[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,44,37,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],Dan:[21,49,100,34,30,29,28,27,27,21,45,13,64,42],Hos:[9,25,5,19,15,11,16,14,17,15,11,15,15,10],Joel:[20,27,5,21],Jonah:[16,11,10,11],Mic:[16,13,12,14,14,16,20],Nah:[14,14,19],Zech:[17,17,10,14,11,15,14,23,17,12,17,14,9,21],Mal:[14,17,24],Acts:[26,47,26,37,42,15,60,40,43,49,30,25,52,28,41,40,34,28,40,38,40,30,35,27,27,32,44,31],"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,13],Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21],Tob:[22,14,17,21,22,18,17,21,6,13,18,22,18,15],Sir:[30,18,31,31,15,37,36,19,18,31,34,18,26,27,20,30,32,33,30,31,28,27,27,33,26,29,30,26,28,25,31,24,33,31,26,31,31,34,35,30,22,25,33,23,26,20,25,25,16,29,30],Bar:[22,35,38,37,9,72],"2Macc":[36,32,40,50,27,31,42,36,29,38,38,46,26,46,39]}},nlt:{chapters:{Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21]}},nrsv:{chapters:{"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,13],Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21]}},vulgate:{chapters:{Ps:[6,13,9,10,13,11,18,10,39,8,9,6,7,5,10,15,51,15,10,14,32,6,10,22,12,14,9,11,13,25,11,22,23,28,13,40,23,14,18,14,12,5,26,18,12,10,15,21,23,21,11,7,9,24,13,12,12,18,14,9,13,12,11,14,20,8,36,37,6,24,20,28,23,11,13,21,72,13,20,17,8,19,13,14,17,7,19,53,17,16,16,5,23,11,13,12,9,9,5,8,29,22,35,45,48,43,14,31,7,10,10,9,26,9,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,14,10,8,12,15,21,10,11,20,14,9,7]}}}},t.prototype.regexps.escaped_passage=/(?:^|[^\w\x1f\x1e])((?:(?:ch(?:apters?|a?pts?\.?|a?p?s?\.?)?\s*\d+\s*(?:[\u2013\u2014\-]|through|thru|to)\s*\d+\s*(?:from|of|in)(?:\s+the\s+book\s+of)?\s*)|(?:ch(?:apters?|a?pts?\.?|a?p?s?\.?)?\s*\d+\s*(?:from|of|in)(?:\s+the\s+book\s+of)?\s*)|(?:\d+(?:th|nd|st)\s*ch(?:apter|a?pt\.?|a?p?\.?)?\s*(?:from|of|in)(?:\s+the\s+book\s+of)?\s*))?\x1f(\d+)(?:\/[a-z])?\x1f(?:c(?:f|ompare|h(?:apters?|a?pts?|a?p?s?))|a(?:nd|lso)|\/[pq]\x1f|[\d.:,;\x1e\x1f&\(\)\[\]\/"'\*=~\-\u2013\u2014\s\xa0]|[a-e](?!\w)|ff?\b|see|title(?![a-z])|thr(?:ough|u)|to|v(?:erses?|er|ss?|v)?|$)+)/gi,t.prototype.regexps.match_end_split=/\d+\W*title|\d+\W*ff?(?:[\s\xa0*]*\.)?|\d+[\s\xa0*]*[a-e](?!\w)|\x1e(?:[\s\xa0*]*[)\]])?|[\d\x1f]+/gi,t.prototype.regexps.space="[\\s\\xa0]",t.prototype.regexps.control=/[\x1e\x1f]/g,t.prototype.regexps.first="(?:1st|1|I|First)\\.?"+t.prototype.regexps.space+"*",t.prototype.regexps.second="(?:2nd|2|II|Second)\\.?"+t.prototype.regexps.space+"*",t.prototype.regexps.third="(?:3rd|3|III|Third)\\.?"+t.prototype.regexps.space+"*",t.prototype.regexps.fourth="(?:4th|4|IV|Fourth)\\.?"+t.prototype.regexps.space+"*",t.prototype.regexps.gospel="(?:(?:The[.\\s\\xa0-]*)?Gospel[.\\s\\xa0-]?(?:of[.\\s\\xa0-]*|according[\\s\\xa0-]*?to[.\\s\\xa0-]*)(?:[.\\s\\xa0-]*?(?:Saint|St)[.\\s\\xa0-]*)?|(?:(?:Saint|St)[.\\s\\xa0-]*))?",t.prototype.regexps.range_and="(?:[&\u2013\u2014-]|and|through|to)",t.prototype.regexps.range_only="(?:[\u2013\u2014-]|through|to)",t.prototype.regexps.get_books=function(e,n){var i,s,o,a,r;if(s=[{osis:["Gen"],regexp:/(\d|\b)(Ge(?:nn?[ei][ei]?s[eiu]s|nn?[es]is|nes[ei]|n)|G[en])(?:\b|(?=\d))/gi},{osis:["Exod"],regexp:/(\d|\b)(Ex(?:od[ui]s|od[se]|od|[do]?))(?:\b|(?=\d))/gi},{osis:["Lev"],regexp:/(\d|\b)(L(?:[ei]v[ei]t[ei]?cus|evi|ev|[ev]))(?:\b|(?=\d))/gi},{osis:["Num"],regexp:/(\d|\b)(N(?:umbers?|umb?|[um]))(?:\b|(?=\d))/gi},{osis:["Deut"],regexp:/(\d|\b)(D(?:eut[eo]?rono?my|ueteronomy|eut?|uet|t))(?:\b|(?=\d))/gi},{osis:["Josh"],regexp:/(\d|\b)(J(?:ou?sh?ua|o?sh|os))(?:\b|(?=\d))/gi},{osis:["Judg"],regexp:/(\d|\b)(J(?:udges|udg|d?gs?))(?:\b|(?=\d))/gi},{osis:["Ruth"],regexp:/(\d|\b)(R(?:uth?|th|u))(?:\b|(?=\d))/gi},{osis:["Isa"],regexp:/(\d|\b)(I(?:saiah|sais?ha?|s[ai]{2,}ha?|s[is]ah|sa[hi]?|sa?|a))(?:\b|(?=\d))/gi},{osis:["2Sam"],regexp:RegExp("(\\b)("+t.prototype.regexps.second+"(?:Samu[ae]l[ls]?|Sam|Sma|S[am]|Kingdoms)|2"+t.prototype.regexps.space+"*S)(?:\\b|(?=\\d))","gi")},{osis:["1Sam"],regexp:RegExp("(\\b)((?:"+t.prototype.regexps.first+")?Samu[ae]l[ls]?|"+t.prototype.regexps.first+"(?:Sam|Sma|S[am]|Kingdoms)|1"+t.prototype.regexps.space+"*S)(?:\\b|(?=\\d))","gi")},{osis:["2Kgs"],regexp:RegExp("(\\b)("+t.prototype.regexps.second+"Ki?n?g?s?|"+t.prototype.regexps.fourth+"Kingdoms)(?:\\b|(?=\\d))","gi")},{osis:["1Kgs"],regexp:RegExp("(\\b)((?:"+t.prototype.regexps.first+")?K(?:i?ngs|in|gs)|"+t.prototype.regexps.first+"Ki?n?g?s?|"+t.prototype.regexps.third+"Kingdoms)(?:\\b|(?=\\d))","gi")},{osis:["2Chr"],regexp:RegExp("(\\b)("+t.prototype.regexps.second+"(?:Ch?o?ron[io]cles?|Chronicals|Chro?n?|Cron|Paralipomenon)|2"+t.prototype.regexps.space+"*Ch)(?:\\b|(?=\\d))","gi")},{osis:["1Chr"],regexp:RegExp("(\\b)((?:"+t.prototype.regexps.first+")?(?:Ch?o?ron[io]cles?|Chronicals|Paralipomenon)|"+t.prototype.regexps.first+"(?:Chro?n?|Cron)|1"+t.prototype.regexps.space+"*Ch)(?:\\b|(?=\\d))","gi")},{osis:["Ezra"],regexp:/(\d|\b)(E(?:zra?|sra))(?:\b|(?=\d))/gi},{osis:["Neh"],regexp:/(\d|\b)(N(?:eh[ei]m[ai]{1,3}h|eh?))(?:\b|(?=\d))/gi},{osis:["GkEsth"],apocrypha:!0,regexp:RegExp("(\\d|\\b)(Greek"+t.prototype.regexps.space+"*Esther|Esther"+t.prototype.regexps.space+"*\\(Greek\\)|G(?:ree)?k"+t.prototype.regexps.space+"*Esth?)(?:\\b|(?=\\d))","gi")},{osis:["Esth"],regexp:/(\d|\b)(E(?:sth?er|sth?|s))(?:\b|(?=\d))/gi},{osis:["Job"],regexp:/(\d|\b)(Jo?b)(?:\b|(?=\d))/gi},{osis:["Ps"],extra:"p",regexp:RegExp("(\\b)((?:(?:(?:1[02-5]|[2-9])?(?:1"+t.prototype.regexps.space+"*st|2"+t.prototype.regexps.space+"*nd|3"+t.prototype.regexps.space+"*rd))|1?1[123]"+t.prototype.regexps.space+"*th|(?:150|1[0-4][04-9]|[1-9][04-9]|[4-9])"+t.prototype.regexps.space+"*th)"+t.prototype.regexps.space+"*Psalm)\\b","gi")},{osis:["Ps"],apocrypha:!0,extra:"q",regexp:/(\b)(Ps151)(?=\.1)/g},{osis:["Ps"],regexp:/(\d|\b)(P(?:s[alm]{2,4}s?|a[slm]{3,4}s?|l[sam]{2,4}s?|s[as]?m?))(?:\b|(?=\d))/gi},{osis:["Prov"],regexp:/(\d|\b)(P(?:r[eo]?verbs?|robv?erbs|or?verbs|rovebs|rvbs?|ro?v?|v)|Oroverbs)(?:\b|(?=\d))/gi},{osis:["Eccl"],regexp:/(\d|\b)(E(?:cc?less?[ia]{1,4}s?tes?|cclesiastic?es|ccles|ccl?|cl?))(?:\b|(?=\d))/gi},{osis:["SgThree"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+t.prototype.regexps.space+"*)?Song"+t.prototype.regexps.space+"*of"+t.prototype.regexps.space+"*(?:the"+t.prototype.regexps.space+"*)?(?:3|Three)"+t.prototype.regexps.space+"*(?:Holy"+t.prototype.regexps.space+"*Children|Young"+t.prototype.regexps.space+"*Men|Youths|Jews)|S\\.?"+t.prototype.regexps.space+"*(?:of)?"+t.prototype.regexps.space+"*(?:Three|Th|3)\\.?"+t.prototype.regexps.space+"*(?:Ch|Y)|So?n?gThree)(?:\\b|(?=\\d))","gi")},{osis:["Song"],regexp:RegExp("(\\d|\\b)((?:The"+t.prototype.regexps.space+"*)?Songs?"+t.prototype.regexps.space+"*of"+t.prototype.regexps.space+"*(?:S[ao]lom[ao]ns?|Songs?)|(?:S(?:n?gs?|ongs?|"+t.prototype.regexps.space+"*of"+t.prototype.regexps.space+"*S|o?S|o[ln]?)))(?:\\b|(?=\\d))","gi")},{osis:["EpJer"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+t.prototype.regexps.space+"*)?(?:Ep(?:istle)?|Let(?:ter))\\.?"+t.prototype.regexps.space+"*of"+t.prototype.regexps.space+"*Jeremiah|EpJer)(?:\\b|(?=\\d))","gi")},{osis:["Jer"],regexp:/(\d|\b)(Jer(?:emaiah|[ae]maih|[ae]miha|[aei]mi[ai]h|[ei]mi?ah|[ai]mih|[ae]mia|[am][im]ah|emi[he]?|e?)|J[er])(?:\b|(?=\d))/gi},{osis:["Lam"],regexp:/(\d|\b)(L(?:am[ei]ntations?|am?|m))(?:\b|(?=\d))/gi},{osis:["Ezek"],regexp:/(\d|\b)(E(?:[zx][ei]{1,2}ki?el|zekial|zek|z[ek]))(?:\b|(?=\d))/gi},{osis:["Dan"],regexp:/(\d|\b)(D(?:aniel|a?n|[al]))(?:\b|(?=\d))/gi},{osis:["Hos"],regexp:/(\d|\b)(H(?:osea|o?s|os?))(?:\b|(?=\d))/gi},{osis:["Joel"],regexp:/(\d|\b)(J(?:oel?|l))(?:\b|(?=\d))/gi},{osis:["Amos"],regexp:/(\d|\b)(Amo?s?)(?:\b|(?=\d))/gi},{osis:["Obad"],regexp:/(\d|\b)(O(?:badiah?|bidah|ba?d?))(?:\b|(?=\d))/gi},{osis:["Jonah"],regexp:/(\d|\b)(J(?:onah|on|nh))(?:\b|(?=\d))/gi},{osis:["Mic"],regexp:/(\d|\b)(M(?:ich?ah?|ic?))(?:\b|(?=\d))/gi},{osis:["Nah"],regexp:/(\d|\b)(N(?:ahum?|ah?))(?:\b|(?=\d))/gi},{osis:["Hab"],regexp:/(\d|\b)(H(?:abb?akk?[au]kk?|abk?))(?:\b|(?=\d))/gi},{osis:["Zeph"],regexp:/(\d|\b)(Z(?:ephana?iah?|e?ph?))(?:\b|(?=\d))/gi},{osis:["Hag"],regexp:/(\d|\b)(H(?:agg?ai|aggia[ih]|a?gg?))(?:\b|(?=\d))/gi},{osis:["Zech"],regexp:/(\d|\b)(Z(?:[ae]ch[ae]r[ai]{1,2}h|ach?|e?ch?))(?:\b|(?=\d))/gi},{osis:["Mal"],regexp:/(\d|\b)(M(?:alachi?|alichi|alaci|al))(?:\b|(?=\d))/gi},{osis:["Matt"],regexp:RegExp("(\\d|\\b)("+t.prototype.regexps.gospel+"M(?:at[th]{1,3}i?ew|atthwe|a?tt?))(?:\\b|(?=\\d))","gi")},{osis:["Mark"],regexp:RegExp("(\\d|\\b)("+t.prototype.regexps.gospel+"M(?:a?rk?|k))(?:\\b|(?=\\d))","gi")},{osis:["Luke"],regexp:RegExp("(\\d|\\b)("+t.prototype.regexps.gospel+"L(?:uke?|[uk]))(?:\\b|(?=\\d))","gi")},{osis:["1John"],regexp:RegExp("(\\b)("+t.prototype.regexps.first+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|o[hn]?|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["2John"],regexp:RegExp("(\\b)("+t.prototype.regexps.second+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|o[hn]?|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["3John"],regexp:RegExp("(\\b)("+t.prototype.regexps.third+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|o[hn]?|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["John"],regexp:RegExp("([04-9]|\\b)("+t.prototype.regexps.gospel+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|oh|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["Acts"],regexp:RegExp("(\\d|\\b)(A(?:cts"+t.prototype.regexps.space+"*of"+t.prototype.regexps.space+"*the"+t.prototype.regexps.space+"*Apostles|cts*|ct?))(?:\\b|(?=\\d))","gi")},{osis:["Rom"],regexp:/(\d|\b)(R(?:omans?|pmans|oamns|omands|omasn|om?s?|mn?s?))(?:\b|(?=\d))/gi},{osis:["2Cor"],regexp:RegExp("(\\b)("+t.prototype.regexps.second+"C(?:h?orr?[in]{1,3}th[aio]{1,3}ns|orin[ai]?th[ai]{1,3}n[aio]{0,3}s|orinti[ao]ns|orinthian|orthians?|orint?h?|orth|or?))(?:\\b|(?=\\d))","gi")},{osis:["1Cor"],regexp:RegExp("(\\b)((?:"+t.prototype.regexps.first+")?C(?:h?orr?[in]{1,3}th[aio]{1,3}ns|orin[ai]?th[ai]{1,3}n[aio]{0,3}s|orinti[ao]ns)|"+t.prototype.regexps.first+"C(?:orinthian|orthians?|orint?h?|orth|or?))(?:\\b|(?=\\d))","gi")},{osis:["Gal"],regexp:/(\d|\b)(G(?:alatians?|all?at[aino]{1,4}s|alat?|al?|l))(?:\b|(?=\d))/gi},{osis:["Eph"],regexp:/(\d|\b)(E(?:phesians?|phi?sians?|phesains?|sphesians|pehesians|h?pesians|phesiand|phesions|alat?|phe?s?|ph?|hp))(?:\b|(?=\d))/gi},{osis:["Phil"],regexp:/(\d|\b)(P(?:hil{1,}i?p{1,}[aei]{1,3}ns?|hi?li?p{0,2}|hil?|hp))(?:\b|(?=\d))/gi},{osis:["Col"],regexp:/(\d|\b)(C(?:[ao]ll?[ao]ss?i[ao]ns|olossi?ans?|ol?))(?:\b|(?=\d))/gi},{osis:["2Thess"],regexp:RegExp("(\\b)("+t.prototype.regexps.second+"T(?:hess?[aeo]lon[ieaoc]{1,4}ns?|he?s{1,3}|h))(?:\\b|(?=\\d))","gi")},{osis:["1Thess"],regexp:RegExp("(\\b)((?:"+t.prototype.regexps.first+")?Thess?[aeo]lon[ieaoc]{1,4}ns?|"+t.prototype.regexps.first+"T(?:he?s{1,3}|h))(?:\\b|(?=\\d))","gi")},{osis:["2Tim"],regexp:RegExp("(\\b)("+t.prototype.regexps.second+"T(?:imothy?|himoth?y|omothy|imoty|im?|m))(?:\\b|(?=\\d))","gi")},{osis:["1Tim"],regexp:RegExp("(\\b)((?:"+t.prototype.regexps.first+")?Timothy?|"+t.prototype.regexps.first+"T(?:himoth?y|omothy|imoty|im?|m))(?:\\b|(?=\\d))","gi")},{osis:["Titus"],regexp:/(\d|\b)(T(?:itus|it?))(?:\b|(?=\d))/gi},{osis:["Phlm"],regexp:/(\d|\b)(Ph(?:ilemon|l?mn?|ilem?))(?:\b|(?=\d))/gi},{osis:["Heb"],regexp:/(\d|\b)(H(?:eb[rew]{1,3}s|[ew]{0,2}brew{1,2}s|ebrew|eb))(?:\b|(?=\d))/gi},{osis:["Jas"],regexp:/(\d|\b)(J(?:ames?|a[ms]?|ms?))(?:\b|(?=\d))/gi},{osis:["2Pet"],regexp:RegExp("(\\b)("+t.prototype.regexps.second+"P(?:eter?|e?t?r?))(?:\\b|(?=\\d))","gi")},{osis:["1Pet"],regexp:RegExp("(\\b)((?:"+t.prototype.regexps.first+")?Peter|"+t.prototype.regexps.first+"P(?:eter?|e?t?r?))(?:\\b|(?=\\d))","gi")},{osis:["Jude"],regexp:/(\d|\b)(Ju?de)(?:\b|(?=\d))/gi},{osis:["Rev"],regexp:/(\d|\b)(R(?:ev[aeo]?lations?|evel|e?v|e))(?:\b|(?=\d))/gi},{osis:["Tob"],apocrypha:!0,regexp:/(\d|\b)(Tobi?t?|Tb)(?:\b|(?=\d))/gi},{osis:["Jdt"],apocrypha:!0,regexp:/(\d|\b)(Ju?di?th?)(?:\b|(?=\d))/gi},{osis:["Wis"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+t.prototype.regexps.space+"*)Wisd?(?:om)?"+t.prototype.regexps.space+"*of"+t.prototype.regexps.space+"*Solomon|Wisdom|Wisd?)(?:\\b|(?=\\d))","gi")},{osis:["Sir"],apocrypha:!0,regexp:RegExp("(\\d|\\b)(Sirach|Ben"+t.prototype.regexps.space+"*Sira|Sir|Eccl[eu]siasticus|Ecclus|Eccs|(?:The"+t.prototype.regexps.space+"*)Wisdom"+t.prototype.regexps.space+"*of"+t.prototype.regexps.space+"*Jesus"+t.prototype.regexps.space+"*(?:Son"+t.prototype.regexps.space+"*of|ben)"+t.prototype.regexps.space+"*Sirach)(?:\\b|(?=\\d))","gi")},{osis:["Bar"],apocrypha:!0,regexp:/(\d|\b)(Baruch|Bar)(?:\b|(?=\d))/gi},{osis:["PrAzar"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+t.prototype.regexps.space+"*)?Pr(?:ayers?)?"+t.prototype.regexps.space+"*of"+t.prototype.regexps.space+"*Azariah?|Azariah?|PrAza?r)(?:\\b|(?=\\d))","gi")},{osis:["Sus"],apocrypha:!0,regexp:/(\d|\b)(Susannah?|Shoshana|Sus)(?:\b|(?=\d))/gi},{osis:["Bel"],apocrypha:!0,regexp:RegExp("(\\d|\\b)(Bel"+t.prototype.regexps.space+"*(?:and|&)"+t.prototype.regexps.space+"*(?:the"+t.prototype.regexps.space+"*)?(?:Dragon|Serpent|Snake)|Bel)(?:\\b|(?=\\d))","gi")},{osis:["2Macc"],apocrypha:!0,regexp:RegExp("(\\b)("+t.prototype.regexps.second+"Mac{1,3}(?:ab{1,3}e{1,3}s?)?|2"+t.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["3Macc"],apocrypha:!0,regexp:RegExp("(\\b)("+t.prototype.regexps.third+"Mac{1,3}(?:ab{1,3}e{1,3}s?)?|3"+t.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["4Macc"],apocrypha:!0,regexp:RegExp("(\\b)("+t.prototype.regexps.fourth+t.prototype.regexps.space+"*Mac{1,3}(?:ab{1,3}e{1,3}s?)?|4"+t.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["1Macc"],apocrypha:!0,regexp:RegExp("(\\b)((?:"+t.prototype.regexps.first+")?Mac{1,3}ab{1,3}e{1,3}s?|"+t.prototype.regexps.first+"Mac{1,3}|1"+t.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["1Esd"],apocrypha:!0,regexp:RegExp("(\\b)("+t.prototype.regexps.first+"Esdras|1"+t.prototype.regexps.space+"*Esdr?)(?:\\b|(?=\\d))","gi")},{osis:["2Esd"],apocrypha:!0,regexp:RegExp("(\\b)("+t.prototype.regexps.second+"Esdras|2"+t.prototype.regexps.space+"*Esdr?)(?:\\b|(?=\\d))","gi")},{osis:["PrMan"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:(?:The"+t.prototype.regexps.space+"*)Pr(?:ayers?)?"+t.prototype.regexps.space+"*(?:of"+t.prototype.regexps.space+"*)?M[ae]n{1,2}[ae]s{1,2}[ae]h)|PrMan)(?:\\b|(?=\\d))","gi")},{osis:["Ezek","Ezra"],regexp:/(\d|\b)(Ez)(?:\b|(?=\d))/gi},{osis:["Hab","Hag"],regexp:/(\d|\b)(Ha)(?:\b|(?=\d))/gi},{osis:["Heb","Hab"],regexp:/(\d|\b)(Hb)(?:\b|(?=\d))/gi},{osis:["John","Jonah","Job","Josh","Joel"],regexp:/(\d|\b)(Jo)(?:\b|(?=\d))/gi},{osis:["Jude","Judg"],regexp:/(\d|\b)(Jd)(?:\b|(?=\d))/gi},{osis:["Jude","Judg"],regexp:/(\d|\b)(Jud)(?:\b|(?=\d))/gi},{osis:["Jude","Judg"],regexp:/(\d|\b)(Ju)(?:\b|(?=\d))/gi},{osis:["Matt","Mark","Mal"],regexp:/(\d|\b)(Ma)(?:\b|(?=\d))/gi},{osis:["Phil","Phlm"],regexp:/(\d|\b)(Ph)(?:\b|(?=\d))/gi},{osis:["Zeph","Zech"],regexp:/(\d|\b)(Ze)(?:\b|(?=\d))/gi}],!0===e&&"none"===n)return s;for(o=[],a=0,r=s.length;r>a;a++)i=s[a],null!=i.apocrypha&&!0===i.apocrypha||("books"===n&&(i.regexp=RegExp(i.regexp.source,"g")),o.push(i));return o},t.prototype.regexps.books=t.prototype.regexps.get_books(!1,"none");var a,r=function(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'},o={parse:function(t,e){function n(t){se>ne||(ne>se&&(se=ne,oe=[]),oe.push(t))}function i(){var t,e,n,i,s,r,c;if(r=s=ne,t=b(),null===t&&(t=m(),null===t&&(t=a(),null===t&&(t=R(),null===t&&(t=f(),null===t&&(t=d(),null===t&&(t=M(),null===t&&(t=p(),null===t&&(t=g(),null===t&&(t=E(),null===t&&(t=u(),null===t&&(t=S(),null===t&&(t=v(),null===t&&(t=h(),null===t&&(t=_(),null===t&&(t=l(),null===t&&(t=x(),null===t&&(t=w(),null===t&&(t=y(),null===t&&(t=C()))))))))))))))))))),null!==t){if(c=ne,n=L(),n=null!==n?n:"",null!==n?(i=o(),null!==i?n=[n,i]:(n=null,ne=c)):(n=null,ne=c),null!==n)for(e=[];null!==n;)e.push(n),c=ne,n=L(),n=null!==n?n:"",null!==n?(i=o(),null!==i?n=[n,i]:(n=null,ne=c)):(n=null,ne=c);else e=null;null!==e?t=[t,e]:(t=null,ne=r)}else t=null,ne=r;return null!==t&&(e=t[1],e.unshift([t[0]]),t={type:"sequence",value:e,indices:[s,ne-1]}),null===t&&(ne=s),t}function s(){var e,i,s,a,r,l,h,u,c,d;if(c=u=ne,40===t.charCodeAt(ne)?(e="(",ne++):(e=null,0===ie&&n('"("')),null!==e)if(i=X(),null!==i)if(s=L(),s=null!==s?s:"",null!==s)if(a=o(),null!==a){for(r=[],d=ne,l=L(),l=null!==l?l:"",null!==l?(h=o(),null!==h?l=[l,h]:(l=null,ne=d)):(l=null,ne=d);null!==l;)r.push(l),d=ne,l=L(),l=null!==l?l:"",null!==l?(h=o(),null!==h?l=[l,h]:(l=null,ne=d)):(l=null,ne=d); -null!==r?(l=X(),null!==l?(41===t.charCodeAt(ne)?(h=")",ne++):(h=null,0===ie&&n('")"')),null!==h?e=[e,i,s,a,r,l,h]:(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)}else e=null,ne=c;else e=null,ne=c;else e=null,ne=c;else e=null,ne=c;return null!==e&&(i=e[4],i===void 0&&(i=[]),i.unshift([e[3]]),e={type:"sequence_post_enclosed",value:i,indices:[u,ne-1]}),null===e&&(ne=u),e}function o(){var t;return t=s(),null===t&&(t=b(),null===t&&(t=m(),null===t&&(t=a(),null===t&&(t=R(),null===t&&(t=f(),null===t&&(t=d(),null===t&&(t=M(),null===t&&(t=p(),null===t&&(t=g(),null===t&&(t=E(),null===t&&(t=u(),null===t&&(t=S(),null===t&&(t=v(),null===t&&(t=h(),null===t&&(t=_(),null===t&&(t=l(),null===t&&(t=x(),null===t&&(t=w(),null===t&&(t=y(),null===t&&(t=C(),null===t&&(t=P(),null===t&&(t=A(),null===t&&(t=T(),null===t&&(t=k(),null===t&&(t=D(),null===t&&(t=J(),null===t&&(t=I(),null===t&&(t=B())))))))))))))))))))))))))))),t}function a(){var t,e,n,i,s;return s=i=ne,t=f(),null===t&&(t=d(),null===t&&(t=M(),null===t&&(t=p(),null===t&&(t=g(),null===t&&(t=E(),null===t&&(t=u(),null===t&&(t=S(),null===t&&(t=v(),null===t&&(t=x(),null===t&&(t=w(),null===t&&(t=_(),null===t&&(t=y(),null===t&&(t=C(),null===t&&(t=P(),null===t&&(t=A(),null===t&&(t=T(),null===t&&(t=k(),null===t&&(t=D(),null===t&&(t=J(),null===t&&(t=I(),null===t&&(t=B()))))))))))))))))))))),null!==t?(e=F(),null!==e?(n=R(),null===n&&(n=f(),null===n&&(n=d(),null===n&&(n=M(),null===n&&(n=p(),null===n&&(n=g(),null===n&&(n=E(),null===n&&(n=u(),null===n&&(n=S(),null===n&&(n=v(),null===n&&(n=x(),null===n&&(n=w(),null===n&&(n=_(),null===n&&(n=y(),null===n&&(n=C(),null===n&&(n=P(),null===n&&(n=A(),null===n&&(n=T(),null===n&&(n=D(),null===n&&(n=J(),null===n&&(n=k(),null===n&&(n=I(),null===n&&(n=B())))))))))))))))))))))),null!==n?t=[t,e,n]:(t=null,ne=s)):(t=null,ne=s)):(t=null,ne=s),null!==t&&(t={type:"range",value:[t[0],t[2]],indices:[i,ne-1]}),null===t&&(ne=i),t}function l(){var e,i,s,o,a,r,l;return r=a=ne,31===t.charCodeAt(ne)?(e="",ne++):(e=null,0===ie&&n('"\\x1F"')),null!==e?(i=Y(),null!==i?(l=ne,47===t.charCodeAt(ne)?(s="/",ne++):(s=null,0===ie&&n('"/"')),null!==s?(/^[a-z]/.test(t.charAt(ne))?(o=t.charAt(ne),ne++):(o=null,0===ie&&n("[a-z]")),null!==o?s=[s,o]:(s=null,ne=l)):(s=null,ne=l),s=null!==s?s:"",null!==s?(31===t.charCodeAt(ne)?(o="",ne++):(o=null,0===ie&&n('"\\x1F"')),null!==o?e=[e,i,s,o]:(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r),null!==e&&(e={type:"b",value:e[1].value,indices:[a,ne-1]}),null===e&&(ne=a),e}function h(){var t,e,n,i,s,o;return o=s=ne,t=l(),null!==t?(e=F(),null!==e?(i=ne,ie++,n=a(),null===n&&(n=R(),null===n&&(n=M(),null===n&&(n=p(),null===n&&(n=g(),null===n&&(n=E(),null===n&&(n=u(),null===n&&(n=v()))))))),ie--,null===n?n="":(n=null,ne=i),null!==n?(i=l(),null!==i?t=[t,e,n,i]:(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o),null!==t&&(t={type:"b_range",value:[t[0],t[3]],indices:[s,ne-1]}),null===t&&(ne=s),t}function u(){var t,e,n,i,s,o,a,r,h,u;if(a=o=ne,t=l(),null!==t){if(r=ne,e=$(),null!==e?(h=ne,ie++,u=ne,n=I(),null!==n?(i=z(),null!==i?(s=B(),null!==s?n=[n,i,s]:(n=null,ne=u)):(n=null,ne=u)):(n=null,ne=u),ie--,null!==n?(n="",ne=h):n=null,null!==n?e=[e,n]:(e=null,ne=r)):(e=null,ne=r),null===e){if(n=z(),null!==n)for(e=[];null!==n;)e.push(n),n=z();else e=null;if(null===e){if(n=H(),null!==n)for(e=[];null!==n;)e.push(n),n=H();else e=null;if(null===e){if(n=F(),null!==n)for(e=[];null!==n;)e.push(n),n=F();else e=null;null===e&&(e=X())}}}null!==e?(n=I(),null!==n?t=[t,e,n]:(t=null,ne=a)):(t=null,ne=a)}else t=null,ne=a;return null!==t&&(t={type:"bc",value:[t[0],t[2]],indices:[o,ne-1]}),null===t&&(ne=o),t}function c(){var e,i,s,o,a,r,h;return h=r=ne,e=l(),null!==e?(i=X(),null!==i?(44===t.charCodeAt(ne)?(s=",",ne++):(s=null,0===ie&&n('","')),null!==s?(o=X(),null!==o?(a=I(),null!==a?e=[e,i,s,o,a]:(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h),null!==e&&(e={type:"bc",value:[e[0],e[4]],indices:[r,ne-1]}),null===e&&(ne=r),e}function d(){var t,e,n,i;return i=n=ne,t=E(),null===t&&(t=u()),null!==t?(e=V(),null!==e?t=[t,e]:(t=null,ne=i)):(t=null,ne=i),null!==t&&(t={type:"bc_title",value:[t[0],t[1]],indices:[n,ne-1]}),null===t&&(ne=n),t}function p(){var e,i,s,o,a,r,l,h;return r=a=ne,e=E(),null===e&&(e=u()),null!==e?(l=ne,ie++,h=ne,46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(s=$(),null!==s?(o=B(),null!==o?i=[i,s,o]:(i=null,ne=h)):(i=null,ne=h)):(i=null,ne=h),ie--,null===i?i="":(i=null,ne=l),null!==i?(l=ne,s=z(),null===s&&(s=L()),s=null!==s?s:"",null!==s?(o=$(),null!==o?s=[s,o]:(s=null,ne=l)):(s=null,ne=l),null===s&&(s=z()),null!==s?(o=D(),null===o&&(o=B()),null!==o?e=[e,i,s,o]:(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r),null!==e&&(e={type:"bcv",value:[e[0],e[3]],indices:[a,ne-1]}),null===e&&(ne=a),e}function g(){var t,e,n,i,s,o,a,r,l;return a=o=ne,t=E(),null===t&&(t=u()),null!==t?(e=H(),null!==e?(n=D(),null===n&&(n=B()),null!==n?(r=ne,ie++,l=ne,i=z(),null!==i?(s=B(),null!==s?i=[i,s]:(i=null,ne=l)):(i=null,ne=l),ie--,null===i?i="":(i=null,ne=r),null!==i?t=[t,e,n,i]:(t=null,ne=a)):(t=null,ne=a)):(t=null,ne=a)):(t=null,ne=a),null!==t&&(t={type:"bcv",value:[t[0],t[2]],indices:[o,ne-1]}),null===t&&(ne=o),t}function f(){var e,i,s,o,a,r,l,h,u,d,p;return u=h=ne,e=c(),null!==e?(i=X(),null!==i?(44===t.charCodeAt(ne)?(s=",",ne++):(s=null,0===ie&&n('","')),null!==s?(o=X(),null!==o?(a=D(),null===a&&(a=B()),null!==a?(d=ne,ie++,p=ne,r=z(),null!==r?(l=B(),null!==l?r=[r,l]:(r=null,ne=p)):(r=null,ne=p),ie--,null===r?r="":(r=null,ne=d),null!==r?e=[e,i,s,o,a,r]:(e=null,ne=u)):(e=null,ne=u)):(e=null,ne=u)):(e=null,ne=u)):(e=null,ne=u)):(e=null,ne=u),null!==e&&(e={type:"bcv",value:[e[0],e[4]],indices:[h,ne-1]}),null===e&&(ne=h),e}function m(){var e,i,s,o,a,r,h,u,c;return c=u=ne,e=l(),null!==e?(45===t.charCodeAt(ne)?(i="-",ne++):(i=null,0===ie&&n('"-"')),null===i&&(i=Q()),i=null!==i?i:"",null!==i?(s=I(),null!==s?(45===t.charCodeAt(ne)?(o="-",ne++):(o=null,0===ie&&n('"-"')),null!==o?(a=B(),null!==a?(45===t.charCodeAt(ne)?(r="-",ne++):(r=null,0===ie&&n('"-"')),null!==r?(h=B(),null!==h?e=[e,i,s,o,a,r,h]:(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c),null!==e&&(e={type:"range",value:[{type:"bcv",value:[{type:"bc",value:[e[0],e[2]],indices:[e[0].indices[0],e[2].indices[1]]},e[4]],indices:[e[0].indices[0],e[4].indices[1]]},e[6]],indices:[u,ne-1]}),null===e&&(ne=u),e}function v(){var t,e,n,i,s,o,a;if(s=i=ne,t=l(),null!==t){if(n=z(),null!==n)for(e=[];null!==n;)e.push(n),n=z();else e=null;if(null===e){if(n=H(),null!==n)for(e=[];null!==n;)e.push(n),n=H();else e=null;if(null===e){if(n=F(),null!==n)for(e=[];null!==n;)e.push(n),n=F();else e=null;if(null===e){if(o=ne,n=L(),null!==n)for(e=[];null!==n;)e.push(n),n=L();else e=null;null!==e?(a=ne,ie++,n=$(),ie--,null!==n?(n="",ne=a):n=null,null!==n?e=[e,n]:(e=null,ne=o)):(e=null,ne=o),null===e&&(e=X())}}}null!==e?(n=D(),null===n&&(n=B()),null!==n?t=[t,e,n]:(t=null,ne=s)):(t=null,ne=s)}else t=null,ne=s;return null!==t&&(t={type:"bv",value:[t[0],t[2]],indices:[i,ne-1]}),null===t&&(ne=i),t}function y(){var t,e,n,i,s,o;return o=s=ne,t=O(),null!==t?(e=I(),null!==e?(n=W(),n=null!==n?n:"",null!==n?(i=l(),null!==i?t=[t,e,n,i]:(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o),null!==t&&(t={type:"bc",value:[t[3],t[1]],indices:[s,ne-1]}),null===t&&(ne=s),t}function b(){var t,e,n,i,s,o,a,r;return r=a=ne,t=O(),null!==t?(e=I(),null!==e?(n=F(),null!==n?(i=I(),null!==i?(s=W(),s=null!==s?s:"",null!==s?(o=l(),null!==o?t=[t,e,n,i,s,o]:(t=null,ne=r)):(t=null,ne=r)):(t=null,ne=r)):(t=null,ne=r)):(t=null,ne=r)):(t=null,ne=r),null!==t&&(t={type:"cb_range",value:[t[5],t[1],t[3]],indices:[a,ne-1]}),null===t&&(ne=a),t}function x(){var t,e,n,i,s,o;return o=s=ne,t=y(),null!==t?(e=L(),e=null!==e?e:"",null!==e?(n=$(),null!==n?(i=B(),null!==i?t=[t,e,n,i]:(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o),null!==t&&(t={type:"bcv",value:[t[0],t[3]],indices:[s,ne-1]}),null===t&&(ne=s),t}function C(){var e,i,s,o,a,r,h;return h=r=ne,e=I(),null!==e?("th"===t.substr(ne,2)?(i="th",ne+=2):(i=null,0===ie&&n('"th"')),null===i&&("nd"===t.substr(ne,2)?(i="nd",ne+=2):(i=null,0===ie&&n('"nd"')),null===i&&("st"===t.substr(ne,2)?(i="st",ne+=2):(i=null,0===ie&&n('"st"')))),null!==i?(s=O(),null!==s?(o=W(),o=null!==o?o:"",null!==o?(a=l(),null!==a?e=[e,i,s,o,a]:(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h),null!==e&&(e={type:"bc",value:[e[4],e[0]],indices:[r,ne-1]}),null===e&&(ne=r),e}function w(){var t,e,n,i,s,o;return o=s=ne,t=C(),null!==t?(e=L(),e=null!==e?e:"",null!==e?(n=$(),null!==n?(i=B(),null!==i?t=[t,e,n,i]:(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o),null!==t&&(t={type:"bcv",value:[t[0],t[3]],indices:[s,ne-1]}),null===t&&(ne=s),t}function _(){var e,i,s,o,a;return a=o=ne,31===t.charCodeAt(ne)?(e="",ne++):(e=null,0===ie&&n('"\\x1F"')),null!==e?(i=Y(),null!==i?("/p"===t.substr(ne,3)?(s="/p",ne+=3):(s=null,0===ie&&n('"/p\\x1F"')),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"c_psalm",value:e[1].value,indices:[o,ne-1]}),null===e&&(ne=o),e}function S(){var t,e,n,i,s,o;return o=s=ne,t=_(),null!==t?(e=L(),e=null!==e?e:"",null!==e?(n=$(),null!==n?(i=B(),null!==i?t=[t,e,n,i]:(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o),null!==t&&(t={type:"cv_psalm",value:[t[0],t[3]],indices:[s,ne-1]}),null===t&&(ne=s),t}function P(){var t,e,n,i,s;return s=i=ne,t=O(),null!==t?(e=I(),null!==e?(n=V(),null!==n?t=[t,e,n]:(t=null,ne=s)):(t=null,ne=s)):(t=null,ne=s),null!==t&&(t={type:"c_title",value:[t[1],t[2]],indices:[i,ne-1]}),null===t&&(ne=i),t}function T(){var e,i,s,o,a,r,l,h;return r=a=ne,e=I(),null!==e?(l=ne,ie++,h=ne,46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(s=$(),null!==s?(o=B(),null!==o?i=[i,s,o]:(i=null,ne=h)):(i=null,ne=h)):(i=null,ne=h),ie--,null===i?i="":(i=null,ne=l),null!==i?(l=ne,s=z(),s=null!==s?s:"",null!==s?(o=$(),null!==o?s=[s,o]:(s=null,ne=l)):(s=null,ne=l),null===s&&(s=z()),null!==s?(o=D(),null===o&&(o=B()),null!==o?e=[e,i,s,o]:(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r),null!==e&&(e={type:"cv",value:[e[0],e[3]],indices:[a,ne-1]}),null===e&&(ne=a),e}function k(){var t,e,n,i,s,o,a,r,l;return a=o=ne,t=I(),null!==t?(e=H(),null!==e?(n=D(),null===n&&(n=B()),null!==n?(r=ne,ie++,l=ne,i=z(),null!==i?(s=B(),null!==s?i=[i,s]:(i=null,ne=l)):(i=null,ne=l),ie--,null===i?i="":(i=null,ne=r),null!==i?t=[t,e,n,i]:(t=null,ne=a)):(t=null,ne=a)):(t=null,ne=a)):(t=null,ne=a),null!==t&&(t={type:"cv",value:[t[0],t[2]],indices:[o,ne-1]}),null===t&&(ne=o),t}function I(){var t,e,n,i;return i=n=ne,t=O(),t=null!==t?t:"",null!==t?(e=J(),null!==e?t=[t,e]:(t=null,ne=i)):(t=null,ne=i),null!==t&&(t={type:"c",value:[t[1]],indices:[n,ne-1]}),null===t&&(ne=n),t}function R(){var e,i,s,o,a,r,l,h,c;return h=l=ne,e=p(),null===e&&(e=g(),null===e&&(e=u(),null===e&&(e=T(),null===e&&(e=k(),null===e&&(e=J(),null===e&&(e=I(),null===e&&(e=B()))))))),null!==e?(i=X(),null!==i?(102===t.charCodeAt(ne)?(s="f",ne++):(s=null,0===ie&&n('"f"')),null!==s?(102===t.charCodeAt(ne)?(o="f",ne++):(o=null,0===ie&&n('"f"')),o=null!==o?o:"",null!==o?(a=U(),a=null!==a?a:"",null!==a?(c=ne,ie++,/^[a-z]/.test(t.charAt(ne))?(r=t.charAt(ne),ne++):(r=null,0===ie&&n("[a-z]")),ie--,null===r?r="":(r=null,ne=c),null!==r?e=[e,i,s,o,a,r]:(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h),null!==e&&(e={type:"ff",value:[e[0]],indices:[l,ne-1]}),null===e&&(ne=l),e}function A(){var e,i,s,o,a;return a=o=ne,e=J(),null!==e?(i=z(),null===i&&(i=L()),i=null!==i?i:"",null!==i?("title"===t.substr(ne,5)?(s="title",ne+=5):(s=null,0===ie&&n('"title"')),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"integer_title",value:[e[0]],indices:[o,ne-1]}),null===e&&(ne=o),e}function N(){var e,i,s,o,a;return a=o=ne,31===t.charCodeAt(ne)?(e="",ne++):(e=null,0===ie&&n('"\\x1F"')),null!==e?(i=Y(),null!==i?("/q"===t.substr(ne,3)?(s="/q",ne+=3):(s=null,0===ie&&n('"/q\\x1F"')),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"b",value:e[1].value,indices:[o,ne-1]}),null===e&&(ne=o),e}function E(){var e,i,s,o,a,r;return a=o=ne,e=N(),null!==e?(".1"===t.substr(ne,2)?(i=".1",ne+=2):(i=null,0===ie&&n('".1"')),null!==i?(r=ne,ie++,/^[0-9]/.test(t.charAt(ne))?(s=t.charAt(ne),ne++):(s=null,0===ie&&n("[0-9]")),ie--,null===s?s="":(s=null,ne=r),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"bc",value:[e[0],{type:"c",value:[{type:"integer",value:151,indices:[ne-2,ne-1]}],indices:[ne-2,ne-1]}],indices:[o,ne-1]}),null===e&&(ne=o),e}function M(){var e,i,s,o,a;return a=o=ne,e=E(),null!==e?(46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(s=J(),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"bcv",value:[e[0],{type:"v",value:[e[2]],indices:[e[2].indices[0],e[2].indices[1]]}],indices:[o,ne-1]}),null===e&&(ne=o),e}function D(){var e,i,s,o,a,r,l,h;return l=r=ne,e=$(),e=null!==e?e:"",null!==e?(i=J(),null!==i?(s=X(),null!==s?(/^[a-e]/.test(t.charAt(ne))?(o=t.charAt(ne),ne++):(o=null,0===ie&&n("[a-e]")),null!==o?(h=ne,ie++,/^[a-z]/.test(t.charAt(ne))?(a=t.charAt(ne),ne++):(a=null,0===ie&&n("[a-z]")),ie--,null===a?a="":(a=null,ne=h),null!==a?e=[e,i,s,o,a]:(e=null,ne=l)):(e=null,ne=l)):(e=null,ne=l)):(e=null,ne=l)):(e=null,ne=l),null!==e&&(e={type:"v",value:[e[1]],indices:[r,ne-1]}),null===e&&(ne=r),e}function B(){var t,e,n,i;return i=n=ne,t=$(),t=null!==t?t:"",null!==t?(e=J(),null!==e?t=[t,e]:(t=null,ne=i)):(t=null,ne=i),null!==t&&(t={type:"v",value:[t[1]],indices:[n,ne-1]}),null===t&&(ne=n),t}function O(){var e,i,s,o,a,r,l,h,u;return h=l=ne,e=X(),null!==e?(u=ne,"chapter"===t.substr(ne,7)?(i="chapter",ne+=7):(i=null,0===ie&&n('"chapter"')),null!==i?(115===t.charCodeAt(ne)?(s="s",ne++):(s=null,0===ie&&n('"s"')),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=u)):(i=null,ne=u),null===i&&(u=ne,"ch"===t.substr(ne,2)?(i="ch",ne+=2):(i=null,0===ie&&n('"ch"')),null!==i?(97===t.charCodeAt(ne)?(s="a",ne++):(s=null,0===ie&&n('"a"')),s=null!==s?s:"",null!==s?("pt"===t.substr(ne,2)?(o="pt",ne+=2):(o=null,0===ie&&n('"pt"')),null!==o?(115===t.charCodeAt(ne)?(a="s",ne++):(a=null,0===ie&&n('"s"')),a=null!==a?a:"",null!==a?(r=U(),r=null!==r?r:"",null!==r?i=[i,s,o,a,r]:(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u),null===i&&(u=ne,"ch"===t.substr(ne,2)?(i="ch",ne+=2):(i=null,0===ie&&n('"ch"')),null!==i?(97===t.charCodeAt(ne)?(s="a",ne++):(s=null,0===ie&&n('"a"')),s=null!==s?s:"",null!==s?(112===t.charCodeAt(ne)?(o="p",ne++):(o=null,0===ie&&n('"p"')),o=null!==o?o:"",null!==o?(115===t.charCodeAt(ne)?(a="s",ne++):(a=null,0===ie&&n('"s"')),a=null!==a?a:"",null!==a?(r=U(),r=null!==r?r:"",null!==r?i=[i,s,o,a,r]:(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u))),null!==i?(s=X(),null!==s?e=[e,i,s]:(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h),null!==e&&(e={type:"c_explicit"}),null===e&&(ne=l),e}function $(){var e,i,s,o,a,r,l,h;return l=r=ne,e=X(),null!==e?(h=ne,"verse"===t.substr(ne,5)?(i="verse",ne+=5):(i=null,0===ie&&n('"verse"')),null!==i?(115===t.charCodeAt(ne)?(s="s",ne++):(s=null,0===ie&&n('"s"')),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&(h=ne,"vv"===t.substr(ne,2)?(i="vv",ne+=2):(i=null,0===ie&&n('"vv"')),null!==i?(s=U(),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&(h=ne,"ver"===t.substr(ne,3)?(i="ver",ne+=3):(i=null,0===ie&&n('"ver"')),null!==i?(s=U(),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&(h=ne,118===t.charCodeAt(ne)?(i="v",ne++):(i=null,0===ie&&n('"v"')),null!==i?(115===t.charCodeAt(ne)?(s="s",ne++):(s=null,0===ie&&n('"s"')),s=null!==s?s:"",null!==s?(115===t.charCodeAt(ne)?(o="s",ne++):(o=null,0===ie&&n('"s"')),o=null!==o?o:"",null!==o?(a=U(),a=null!==a?a:"",null!==a?i=[i,s,o,a]:(i=null,ne=h)):(i=null,ne=h)):(i=null,ne=h)):(i=null,ne=h)))),null!==i?(s=X(),null!==s?e=[e,i,s]:(e=null,ne=l)):(e=null,ne=l)):(e=null,ne=l),null!==e&&(e={type:"v_explicit"}),null===e&&(ne=r),e}function z(){var e,i,s,o,a,r,l,h,u,c;if(l=ne,e=X(),null!==e){if(58===t.charCodeAt(ne)?(s=":",ne++):(s=null,0===ie&&n('":"')),null!==s)for(i=[];null!==s;)i.push(s),58===t.charCodeAt(ne)?(s=":",ne++):(s=null,0===ie&&n('":"'));else i=null;null===i&&(h=ne,46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(u=ne,ie++,c=ne,s=X(),null!==s?(46===t.charCodeAt(ne)?(o=".",ne++):(o=null,0===ie&&n('"."')),null!==o?(a=X(),null!==a?(46===t.charCodeAt(ne)?(r=".",ne++):(r=null,0===ie&&n('"."')),null!==r?s=[s,o,a,r]:(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c),ie--,null===s?s="":(s=null,ne=u),null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h)),null!==i?(s=X(),null!==s?e=[e,i,s]:(e=null,ne=l)):(e=null,ne=l)}else e=null,ne=l;return e}function H(){var e,i,s,o;return o=ne,e=X(),null!==e?(/^["']/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[\"']")),null!==i?(s=X(),null!==s?e=[e,i,s]:(e=null,ne=o)):(e=null,ne=o)):(e=null,ne=o),null===e&&(e=Q()),e}function L(){var e,i,s,o,a,r,l,h,u,c;if(l=ne,/^[,;\/:&\-\u2013\u2014~]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[,;\\/:&\\-\\u2013\\u2014~]")),null===i&&(h=ne,46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(u=ne,ie++,c=ne,s=X(),null!==s?(46===t.charCodeAt(ne)?(o=".",ne++):(o=null,0===ie&&n('"."')),null!==o?(a=X(),null!==a?(46===t.charCodeAt(ne)?(r=".",ne++):(r=null,0===ie&&n('"."')),null!==r?s=[s,o,a,r]:(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c),ie--,null===s?s="":(s=null,ne=u),null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&("see"===t.substr(ne,3)?(i="see",ne+=3):(i=null,0===ie&&n('"see"')),null===i&&("compare"===t.substr(ne,7)?(i="compare",ne+=7):(i=null,0===ie&&n('"compare"')),null===i&&(h=ne,"cf"===t.substr(ne,2)?(i="cf",ne+=2):(i=null,0===ie&&n('"cf"')),null!==i?(s=U(),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&("and"===t.substr(ne,3)?(i="and",ne+=3):(i=null,0===ie&&n('"and"')),null===i&&("also"===t.substr(ne,4)?(i="also",ne+=4):(i=null,0===ie&&n('"also"')),null===i&&(i=Q()))))))),null!==i)for(e=[];null!==i;)e.push(i),/^[,;\/:&\-\u2013\u2014~]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[,;\\/:&\\-\\u2013\\u2014~]")),null===i&&(h=ne,46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(u=ne,ie++,c=ne,s=X(),null!==s?(46===t.charCodeAt(ne)?(o=".",ne++):(o=null,0===ie&&n('"."')),null!==o?(a=X(),null!==a?(46===t.charCodeAt(ne)?(r=".",ne++):(r=null,0===ie&&n('"."')),null!==r?s=[s,o,a,r]:(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c),ie--,null===s?s="":(s=null,ne=u),null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&("see"===t.substr(ne,3)?(i="see",ne+=3):(i=null,0===ie&&n('"see"')),null===i&&("compare"===t.substr(ne,7)?(i="compare",ne+=7):(i=null,0===ie&&n('"compare"')),null===i&&(h=ne,"cf"===t.substr(ne,2)?(i="cf",ne+=2):(i=null,0===ie&&n('"cf"')),null!==i?(s=U(),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&("and"===t.substr(ne,3)?(i="and",ne+=3):(i=null,0===ie&&n('"and"')),null===i&&("also"===t.substr(ne,4)?(i="also",ne+=4):(i=null,0===ie&&n('"also"')),null===i&&(i=Q())))))));else e=null;return null!==e&&(e=""),null===e&&(ne=l),e}function F(){var e,i,s,o,a,r;if(a=ne,e=X(),null!==e){if(r=ne,/^[\-\u2013\u2014]/.test(t.charAt(ne))?(s=t.charAt(ne),ne++):(s=null,0===ie&&n("[\\-\\u2013\\u2014]")),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"through"===t.substr(ne,7)?(s="through",ne+=7):(s=null,0===ie&&n('"through"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"thru"===t.substr(ne,4)?(s="thru",ne+=4):(s=null,0===ie&&n('"thru"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"to"===t.substr(ne,2)?(s="to",ne+=2):(s=null,0===ie&&n('"to"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r)))),null!==s)for(i=[];null!==s;)i.push(s),r=ne,/^[\-\u2013\u2014]/.test(t.charAt(ne))?(s=t.charAt(ne),ne++):(s=null,0===ie&&n("[\\-\\u2013\\u2014]")),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"through"===t.substr(ne,7)?(s="through",ne+=7):(s=null,0===ie&&n('"through"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"thru"===t.substr(ne,4)?(s="thru",ne+=4):(s=null,0===ie&&n('"thru"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"to"===t.substr(ne,2)?(s="to",ne+=2):(s=null,0===ie&&n('"to"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r))));else i=null;null!==i?e=[e,i]:(e=null,ne=a)}else e=null,ne=a;return e}function V(){var e,i,s,o;return o=s=ne,e=z(),null===e&&(e=L()),e=null!==e?e:"",null!==e?("title"===t.substr(ne,5)?(i="title",ne+=5):(i=null,0===ie&&n('"title"')),null!==i?e=[e,i]:(e=null,ne=o)):(e=null,ne=o),null!==e&&(e={type:"title",value:[e[1]],indices:[s,ne-1]}),null===e&&(ne=s),e}function W(){var e,i,s,o,a,r,l,h,u,c,d;return c=ne,e=X(),null!==e?("from"===t.substr(ne,4)?(i="from",ne+=4):(i=null,0===ie&&n('"from"')),null===i&&("of"===t.substr(ne,2)?(i="of",ne+=2):(i=null,0===ie&&n('"of"')),null===i&&("in"===t.substr(ne,2)?(i="in",ne+=2):(i=null,0===ie&&n('"in"')))),null!==i?(s=X(),null!==s?(d=ne,"the"===t.substr(ne,3)?(o="the",ne+=3):(o=null,0===ie&&n('"the"')),null!==o?(a=X(),null!==a?("book"===t.substr(ne,4)?(r="book",ne+=4):(r=null,0===ie&&n('"book"')),null!==r?(l=X(),null!==l?("of"===t.substr(ne,2)?(h="of",ne+=2):(h=null,0===ie&&n('"of"')),null!==h?(u=X(),null!==u?o=[o,a,r,l,h,u]:(o=null,ne=d)):(o=null,ne=d)):(o=null,ne=d)):(o=null,ne=d)):(o=null,ne=d)):(o=null,ne=d),o=null!==o?o:"",null!==o?e=[e,i,s,o]:(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c),e}function U(){var e,i,s,o,a,r,l,h,u;return l=ne,e=X(),null!==e?(46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(h=ne,ie++,u=ne,s=X(),null!==s?(46===t.charCodeAt(ne)?(o=".",ne++):(o=null,0===ie&&n('"."')),null!==o?(a=X(),null!==a?(46===t.charCodeAt(ne)?(r=".",ne++):(r=null,0===ie&&n('"."')),null!==r?s=[s,o,a,r]:(s=null,ne=u)):(s=null,ne=u)):(s=null,ne=u)):(s=null,ne=u),ie--,null===s?s="":(s=null,ne=h),null!==s?e=[e,i,s]:(e=null,ne=l)):(e=null,ne=l)):(e=null,ne=l),e}function j(){var e,i,s,o,a,r,l,h,u,c,d;if(u=h=ne,e=X(),null!==e)if(/^[([]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[([]")),null!==i)if(s=X(),null!==s){if(c=ne,o=q(),null!==o){for(a=[],d=ne,r=L(),null!==r?(l=q(),null!==l?r=[r,l]:(r=null,ne=d)):(r=null,ne=d);null!==r;)a.push(r),d=ne,r=L(),null!==r?(l=q(),null!==l?r=[r,l]:(r=null,ne=d)):(r=null,ne=d);null!==a?o=[o,a]:(o=null,ne=c)}else o=null,ne=c;null!==o?(a=X(),null!==a?(/^[)\]]/.test(t.charAt(ne))?(r=t.charAt(ne),ne++):(r=null,0===ie&&n("[)\\]]")),null!==r?e=[e,i,s,o,a,r]:(e=null,ne=u)):(e=null,ne=u)):(e=null,ne=u)}else e=null,ne=u;else e=null,ne=u;else e=null,ne=u;return null!==e&&(e={type:"translation_sequence",value:e[3],indices:[h,ne-1]}),null===e&&(ne=h),e}function K(){var e,i,s,o,a,r,l,h,u,c;if(h=l=ne,e=X(),null!==e)if(u=ne,44===t.charCodeAt(ne)?(i=",",ne++):(i=null,0===ie&&n('","')),null!==i?(s=X(),null!==s?i=[i,s]:(i=null,ne=u)):(i=null,ne=u),i=null!==i?i:"",null!==i){if(u=ne,s=q(),null!==s){for(o=[],c=ne,a=L(),null!==a?(r=q(),null!==r?a=[a,r]:(a=null,ne=c)):(a=null,ne=c);null!==a;)o.push(a),c=ne,a=L(),null!==a?(r=q(),null!==r?a=[a,r]:(a=null,ne=c)):(a=null,ne=c);null!==o?s=[s,o]:(s=null,ne=u)}else s=null,ne=u;null!==s?e=[e,i,s]:(e=null,ne=h)}else e=null,ne=h;else e=null,ne=h;return null!==e&&(e={type:"translation_sequence",value:e[2],indices:[l,ne-1]}),null===e&&(ne=l),e}function q(){var e,i,s,o,a;return a=o=ne,30===t.charCodeAt(ne)?(e="",ne++):(e=null,0===ie&&n('"\\x1E"')),null!==e?(i=Y(),null!==i?(30===t.charCodeAt(ne)?(s="",ne++):(s=null,0===ie&&n('"\\x1E"')),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"translation",value:e[1].value,indices:[o,ne-1]}),null===e&&(ne=o),e}function J(){var e,i,s,o,a,r;return r=a=o=ne,/^[0-9]/.test(t.charAt(ne))?(e=t.charAt(ne),ne++):(e=null,0===ie&&n("[0-9]")),null!==e?(/^[0-9]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[0-9]")),i=null!==i?i:"",null!==i?(/^[0-9]/.test(t.charAt(ne))?(s=t.charAt(ne),ne++):(s=null,0===ie&&n("[0-9]")),s=null!==s?s:"",null!==s?e=[e,i,s]:(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r),null!==e?(r=ne,ie++,/^[0-9]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[0-9]")),null===i&&(",000"===t.substr(ne,4)?(i=",000",ne+=4):(i=null,0===ie&&n('",000"'))),ie--,null===i?i="":(i=null,ne=r),null!==i?e=[e,i]:(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"integer",value:parseInt(e[0].join(""),10),indices:[o,ne-1]}),null===e&&(ne=o),e}function Y(){var e,i,s;if(s=ne,/^[0-9]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[0-9]")),null!==i)for(e=[];null!==i;)e.push(i),/^[0-9]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[0-9]"));else e=null;return null!==e&&(e={type:"integer",value:parseInt(e.join(""),10),indices:[s,ne-1]}),null===e&&(ne=s),e}function G(){var e,i,s;if(s=ne,/^[^\x1F\x1E([]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[^\\x1F\\x1E([]")),null!==i)for(e=[];null!==i;)e.push(i),/^[^\x1F\x1E([]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[^\\x1F\\x1E([]"));else e=null;return null!==e&&(e={type:"word",value:e.join(""),indices:[s,ne-1]}),null===e&&(ne=s),e}function Z(){var e,i;return i=ne,/^[([]/.test(t.charAt(ne))?(e=t.charAt(ne),ne++):(e=null,0===ie&&n("[([]")),null!==e&&(e={type:"stop",value:e,indices:[i,ne-1]}),null===e&&(ne=i),e}function X(){var t;return t=Q(),null!==t?t:""}function Q(){var e,i;if(/^[\s\xa0*]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[\\s\\xa0*]")),null!==i)for(e=[];null!==i;)e.push(i),/^[\s\xa0*]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[\\s\\xa0*]"));else e=null;return e}function te(t){t.sort();for(var e=null,n=[],i=0;t.length>i;i++)t[i]!==e&&(n.push(t[i]),e=t[i]);return n}var ee={start:function(){var t,e;if(e=m(),null===e&&(e=i(),null===e&&(e=b(),null===e&&(e=a(),null===e&&(e=R(),null===e&&(e=f(),null===e&&(e=d(),null===e&&(e=M(),null===e&&(e=p(),null===e&&(e=g(),null===e&&(e=E(),null===e&&(e=u(),null===e&&(e=S(),null===e&&(e=v(),null===e&&(e=h(),null===e&&(e=_(),null===e&&(e=l(),null===e&&(e=x(),null===e&&(e=w(),null===e&&(e=y(),null===e&&(e=C(),null===e&&(e=j(),null===e&&(e=K(),null===e&&(e=L(),null===e&&(e=P(),null===e&&(e=A(),null===e&&(e=T(),null===e&&(e=k(),null===e&&(e=D(),null===e&&(e=J(),null===e&&(e=I(),null===e&&(e=B(),null===e&&(e=G(),null===e&&(e=Z()))))))))))))))))))))))))))))))))),null!==e)for(t=[];null!==e;)t.push(e),e=m(),null===e&&(e=i(),null===e&&(e=b(),null===e&&(e=a(),null===e&&(e=R(),null===e&&(e=f(),null===e&&(e=d(),null===e&&(e=M(),null===e&&(e=p(),null===e&&(e=g(),null===e&&(e=E(),null===e&&(e=u(),null===e&&(e=S(),null===e&&(e=v(),null===e&&(e=h(),null===e&&(e=_(),null===e&&(e=l(),null===e&&(e=x(),null===e&&(e=w(),null===e&&(e=y(),null===e&&(e=C(),null===e&&(e=j(),null===e&&(e=K(),null===e&&(e=L(),null===e&&(e=P(),null===e&&(e=A(),null===e&&(e=T(),null===e&&(e=k(),null===e&&(e=D(),null===e&&(e=J(),null===e&&(e=I(),null===e&&(e=B(),null===e&&(e=G(),null===e&&(e=Z())))))))))))))))))))))))))))))))));else t=null;return t},sequence:i,sequence_post_enclosed:s,sequence_post:o,range:a,b:l,b_range:h,bc:u,bc_comma:c,bc_title:d,bcv:p,bcv_weak:g,bcv_comma:f,bcv_hyphen_range:m,bv:v,cb:y,cb_range:b,cbv:x,cb_ordinal:C,cbv_ordinal:w,c_psalm:_,cv_psalm:S,c_title:P,cv:T,cv_weak:k,c:I,ff:R,integer_title:A,ps151_b:N,ps151_bc:E,ps151_bcv:M,v_letter:D,v:B,c_explicit:O,v_explicit:$,cv_sep:z,cv_sep_weak:H,sequence_sep:L,range_sep:F,title:V,in_book_of:W,abbrev:U,translation_sequence_enclosed:j,translation_sequence:K,translation:q,integer:J,any_integer:Y,word:G,word_parenthesis:Z,sp:X,space:Q};if(void 0!==e){if(void 0===ee[e])throw Error("Invalid rule name: "+r(e)+".")}else e="start";var ne=0,ie=0,se=0,oe=[],ee=ee[e]();if(null===ee||ne!==t.length){for(var ee=Math.max(ne,se),ae=t.length>ee?t.charAt(ee):null,re=1,le=1,he=!1,ue=0;Math.max(ne,se)>ue;ue++){var ce=t.charAt(ue);"\n"===ce?(he||re++,le=1,he=!1):"\r"===ce||"\u2028"===ce||"\u2029"===ce?(re++,le=1,he=!0):(le++,he=!1)}throw new this.SyntaxError(te(oe),ae,ee,re,le)}return ee},toSource:function(){return this._source},SyntaxError:function(t,e,n,i,s){switch(this.name="SyntaxError",this.expected=t,this.found=e,t.length){case 0:t="end of input";break;case 1:t=t[0];break;default:t=t.slice(0,t.length-1).join(", ")+" or "+t[t.length-1]}e=e?r(e):"end of input",this.message="Expected "+t+" but "+e+" found.",this.offset=n,this.line=i,this.column=s}};o.SyntaxError.prototype=Error.prototype,a=o}.call(this),define("bcv",function(t){return function(){var e,n;return n=function(){return new this.bcv_parser},e=n.apply(t,arguments),e||t.bcv_parser}}(this)),define("verseKey",["bcv","versificationMgr"],function(t,e){function n(n,i){var s={};s.osis=t.parse(n).osis(),""===s.osis&&(s.osis="Matt.1");var o=s.osis.split("-")[0].split(".");return s.book=o[0],s.chapter=isNaN(parseInt(o[1],10))?1:parseInt(o[1],10),s.verse=parseInt(o[2],10),s.bookNum=e.getBookNum(s.book,i),s}function i(t,i){var s=[],o=t;if("string"==typeof t&&(o=n(t)),!(o.osis.split("-").length>1))if(isNaN(o.verse))for(var a=e.getBookNum(o.book),r=0;e.getVersesInChapter(a,o.chapter-1,i)>r;r++)s.push({osis:o.book+"."+o.chapter+"."+(r+1),book:o.book,bookNum:a,chapter:o.chapter,verse:r+1});else s.push(o);return s}function s(t,i){var s=n(t,i),o=e.getChapterMax(s.bookNum,i);return o>s.chapter?s.chapter++:(s.bookNum=65>s.bookNum?++s.bookNum:65,s.chapter=65>s.bookNum?1:o,s.book=e.getBook(s.bookNum,i).abbrev),s.osis=s.book+"."+s.chapter,s}function o(t,i){var s=n(t,i),o=e.getChapterMax(s.bookNum-1,i);return s.chapter>1?--s.chapter:(s.bookNum=s.bookNum>0?--s.bookNum:0,s.chapter=0===s.bookNum?1:o,s.book=e.getBook(s.bookNum,i).abbrev),s.osis=s.book+"."+s.chapter,s}return{parse:n,parseVerseList:i,next:s,previous:o}}),function(t){function e(n,s){if(!(this instanceof e))return new e(n,s);var o=this;i(o),o.q=o.c="",o.bufferCheckPosition=t.MAX_BUFFER_LENGTH,o.opt=s||{},o.opt.lowercase=o.opt.lowercase||o.opt.lowercasetags,o.looseCase=o.opt.lowercase?"toLowerCase":"toUpperCase",o.tags=[],o.closed=o.closedRoot=o.sawRoot=!1,o.tag=o.error=null,o.strict=!!n,o.noscript=!!n||!!o.opt.noscript,o.state=F.BEGIN,o.ENTITIES=Object.create(t.ENTITIES),o.attribList=[],o.opt.xmlns&&(o.ns=Object.create(z)),o.trackPosition=o.opt.position!==!1,o.trackPosition&&(o.position=o.line=o.column=0),u(o,"onready")}function n(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),i=0,s=0,o=S.length;o>s;s++){var a=e[S[s]].length;if(a>n)switch(S[s]){case"textNode":d(e);break;case"cdata":c(e,"oncdata",e.cdata),e.cdata="";break;case"script":c(e,"onscript",e.script),e.script="";break;default:g(e,"Max buffer length exceeded: "+S[s])}i=Math.max(i,a)}e.bufferCheckPosition=t.MAX_BUFFER_LENGTH-i+e.position}function i(t){for(var e=0,n=S.length;n>e;e++)t[S[e]]=""}function s(t,e){return new o(t,e)}function o(t,n){if(!(this instanceof o))return new o(t,n);P.apply(this),this._parser=new e(t,n),this.writable=!0,this.readable=!0;var i=this;this._parser.onend=function(){i.emit("end")},this._parser.onerror=function(t){i.emit("error",t),i._parser.error=null},this._decoder=null,k.forEach(function(t){Object.defineProperty(i,"on"+t,{get:function(){return i._parser["on"+t]},set:function(e){return e?(i.on(t,e),void 0):(i.removeAllListeners(t),i._parser["on"+t]=e)},enumerable:!0,configurable:!1})})}function a(t){return t.split("").reduce(function(t,e){return t[e]=!0,t},{})}function r(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function l(t,e){return r(t)?!!e.match(t):t[e]}function h(t,e){return!l(t,e)}function u(t,e,n){t[e]&&t[e](n)}function c(t,e,n){t.textNode&&d(t),u(t,e,n)}function d(t){t.textNode=p(t.opt,t.textNode),t.textNode&&u(t,"ontext",t.textNode),t.textNode="" -}function p(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function g(t,e){return d(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=Error(e),t.error=e,u(t,"onerror",e),t}function f(t){return t.closedRoot||m(t,"Unclosed root tag"),t.state!==F.TEXT&&g(t,"Unexpected end"),d(t),t.c="",t.closed=!0,u(t,"onend"),e.call(t,t.strict,t.opt),t}function m(t,n){if(!("object"==typeof t&&t instanceof e))throw Error("bad call to strictFail");t.strict&&g(t,n)}function v(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0}function y(t){var e=t.indexOf(":"),n=0>e?["",t]:t.split(":"),i=n[0],s=n[1];return"xmlns"===t&&(i="xmlns",s=""),{prefix:i,local:s}}function b(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))return t.attribName=t.attribValue="";if(t.opt.xmlns){var e=y(t.attribName),n=e.prefix,i=e.local;if("xmlns"===n)if("xml"===i&&t.attribValue!==O)m(t,"xml: prefix must be bound to "+O+"\n"+"Actual: "+t.attribValue);else if("xmlns"===i&&t.attribValue!==$)m(t,"xmlns: prefix must be bound to "+$+"\n"+"Actual: "+t.attribValue);else{var s=t.tag,o=t.tags[t.tags.length-1]||t;s.ns===o.ns&&(s.ns=Object.create(o.ns)),s.ns[i]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,c(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}function x(t,e){if(t.opt.xmlns){var n=t.tag,i=y(t.tagName);n.prefix=i.prefix,n.local=i.local,n.uri=n.ns[i.prefix]||"",n.prefix&&!n.uri&&(m(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=i.prefix);var s=t.tags[t.tags.length-1]||t;n.ns&&s.ns!==n.ns&&Object.keys(n.ns).forEach(function(e){c(t,"onopennamespace",{prefix:e,uri:n.ns[e]})});for(var o=0,a=t.attribList.length;a>o;o++){var r=t.attribList[o],l=r[0],h=r[1],u=y(l),d=u.prefix,p=u.local,g=""==d?"":n.ns[d]||"",f={name:l,value:h,prefix:d,local:p,uri:g};d&&"xmlns"!=d&&!g&&(m(t,"Unbound namespace prefix: "+JSON.stringify(d)),f.uri=d),t.tag.attributes[l]=f,c(t,"onattribute",f)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),c(t,"onopentag",t.tag),e||(t.state=t.noscript||"script"!==t.tagName.toLowerCase()?F.TEXT:F.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function C(t){if(!t.tagName)return m(t,"Weird empty close tag."),t.textNode+="</>",t.state=F.TEXT,void 0;if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",t.state=F.SCRIPT,void 0;c(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var i=n;e--;){var s=t.tags[e];if(s.name===i)break;m(t,"Unexpected close tag")}if(0>e)return m(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",t.state=F.TEXT,void 0;t.tagName=n;for(var o=t.tags.length;o-->e;){var a=t.tag=t.tags.pop();t.tagName=t.tag.name,c(t,"onclosetag",t.tagName);var r={};for(var l in a.ns)r[l]=a.ns[l];var h=t.tags[t.tags.length-1]||t;t.opt.xmlns&&a.ns!==h.ns&&Object.keys(a.ns).forEach(function(e){var n=a.ns[e];c(t,"onclosenamespace",{prefix:e,uri:n})})}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=F.TEXT}function w(t){var e,n=t.entity,i=n.toLowerCase(),s="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[i]?t.ENTITIES[i]:(n=i,"#"===n.charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),e=parseInt(n,16),s=e.toString(16)):(n=n.slice(1),e=parseInt(n,10),s=e.toString(10))),n=n.replace(/^0+/,""),s.toLowerCase()!==n?(m(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCharCode(e))}function _(t){var e=this;if(this.error)throw this.error;if(e.closed)return g(e,"Cannot write after close. Assign an onready handler.");if(null===t)return f(e);for(var i=0,s="";e.c=s=t.charAt(i++);)switch(e.trackPosition&&(e.position++,"\n"===s?(e.line++,e.column=0):e.column++),e.state){case F.BEGIN:"<"===s?(e.state=F.OPEN_WAKA,e.startTagPosition=e.position):h(I,s)&&(m(e,"Non-whitespace before first tag."),e.textNode=s,e.state=F.TEXT);continue;case F.TEXT:if(e.sawRoot&&!e.closedRoot){for(var o=i-1;s&&"<"!==s&&"&"!==s;)s=t.charAt(i++),s&&e.trackPosition&&(e.position++,"\n"===s?(e.line++,e.column=0):e.column++);e.textNode+=t.substring(o,i-1)}"<"===s?(e.state=F.OPEN_WAKA,e.startTagPosition=e.position):(h(I,s)&&(!e.sawRoot||e.closedRoot)&&m(e,"Text data outside of root node."),"&"===s?e.state=F.TEXT_ENTITY:e.textNode+=s);continue;case F.SCRIPT:"<"===s?e.state=F.SCRIPT_ENDING:e.script+=s;continue;case F.SCRIPT_ENDING:"/"===s?e.state=F.CLOSE_TAG:(e.script+="<"+s,e.state=F.SCRIPT);continue;case F.OPEN_WAKA:if("!"===s)e.state=F.SGML_DECL,e.sgmlDecl="";else if(!l(I,s))if(l(H,s))e.state=F.OPEN_TAG,e.tagName=s;else if("/"===s)e.state=F.CLOSE_TAG,e.tagName="";else if("?"===s)e.state=F.PROC_INST,e.procInstName=e.procInstBody="";else{if(m(e,"Unencoded <"),e.startTagPosition+1<e.position){var a=e.position-e.startTagPosition;s=Array(a).join(" ")+s}e.textNode+="<"+s,e.state=F.TEXT}continue;case F.SGML_DECL:(e.sgmlDecl+s).toUpperCase()===D?(c(e,"onopencdata"),e.state=F.CDATA,e.sgmlDecl="",e.cdata=""):"--"===e.sgmlDecl+s?(e.state=F.COMMENT,e.comment="",e.sgmlDecl=""):(e.sgmlDecl+s).toUpperCase()===B?(e.state=F.DOCTYPE,(e.doctype||e.sawRoot)&&m(e,"Inappropriately located doctype declaration"),e.doctype="",e.sgmlDecl=""):">"===s?(c(e,"onsgmldeclaration",e.sgmlDecl),e.sgmlDecl="",e.state=F.TEXT):l(N,s)?(e.state=F.SGML_DECL_QUOTED,e.sgmlDecl+=s):e.sgmlDecl+=s;continue;case F.SGML_DECL_QUOTED:s===e.q&&(e.state=F.SGML_DECL,e.q=""),e.sgmlDecl+=s;continue;case F.DOCTYPE:">"===s?(e.state=F.TEXT,c(e,"ondoctype",e.doctype),e.doctype=!0):(e.doctype+=s,"["===s?e.state=F.DOCTYPE_DTD:l(N,s)&&(e.state=F.DOCTYPE_QUOTED,e.q=s));continue;case F.DOCTYPE_QUOTED:e.doctype+=s,s===e.q&&(e.q="",e.state=F.DOCTYPE);continue;case F.DOCTYPE_DTD:e.doctype+=s,"]"===s?e.state=F.DOCTYPE:l(N,s)&&(e.state=F.DOCTYPE_DTD_QUOTED,e.q=s);continue;case F.DOCTYPE_DTD_QUOTED:e.doctype+=s,s===e.q&&(e.state=F.DOCTYPE_DTD,e.q="");continue;case F.COMMENT:"-"===s?e.state=F.COMMENT_ENDING:e.comment+=s;continue;case F.COMMENT_ENDING:"-"===s?(e.state=F.COMMENT_ENDED,e.comment=p(e.opt,e.comment),e.comment&&c(e,"oncomment",e.comment),e.comment=""):(e.comment+="-"+s,e.state=F.COMMENT);continue;case F.COMMENT_ENDED:">"!==s?(m(e,"Malformed comment"),e.comment+="--"+s,e.state=F.COMMENT):e.state=F.TEXT;continue;case F.CDATA:"]"===s?e.state=F.CDATA_ENDING:e.cdata+=s;continue;case F.CDATA_ENDING:"]"===s?e.state=F.CDATA_ENDING_2:(e.cdata+="]"+s,e.state=F.CDATA);continue;case F.CDATA_ENDING_2:">"===s?(e.cdata&&c(e,"oncdata",e.cdata),c(e,"onclosecdata"),e.cdata="",e.state=F.TEXT):"]"===s?e.cdata+="]":(e.cdata+="]]"+s,e.state=F.CDATA);continue;case F.PROC_INST:"?"===s?e.state=F.PROC_INST_ENDING:l(I,s)?e.state=F.PROC_INST_BODY:e.procInstName+=s;continue;case F.PROC_INST_BODY:if(!e.procInstBody&&l(I,s))continue;"?"===s?e.state=F.PROC_INST_ENDING:e.procInstBody+=s;continue;case F.PROC_INST_ENDING:">"===s?(c(e,"onprocessinginstruction",{name:e.procInstName,body:e.procInstBody}),e.procInstName=e.procInstBody="",e.state=F.TEXT):(e.procInstBody+="?"+s,e.state=F.PROC_INST_BODY);continue;case F.OPEN_TAG:l(L,s)?e.tagName+=s:(v(e),">"===s?x(e):"/"===s?e.state=F.OPEN_TAG_SLASH:(h(I,s)&&m(e,"Invalid character in tag name"),e.state=F.ATTRIB));continue;case F.OPEN_TAG_SLASH:">"===s?(x(e,!0),C(e)):(m(e,"Forward-slash in opening tag not followed by >"),e.state=F.ATTRIB);continue;case F.ATTRIB:if(l(I,s))continue;">"===s?x(e):"/"===s?e.state=F.OPEN_TAG_SLASH:l(H,s)?(e.attribName=s,e.attribValue="",e.state=F.ATTRIB_NAME):m(e,"Invalid attribute name");continue;case F.ATTRIB_NAME:"="===s?e.state=F.ATTRIB_VALUE:">"===s?(m(e,"Attribute without value"),e.attribValue=e.attribName,b(e),x(e)):l(I,s)?e.state=F.ATTRIB_NAME_SAW_WHITE:l(L,s)?e.attribName+=s:m(e,"Invalid attribute name");continue;case F.ATTRIB_NAME_SAW_WHITE:if("="===s)e.state=F.ATTRIB_VALUE;else{if(l(I,s))continue;m(e,"Attribute without value"),e.tag.attributes[e.attribName]="",e.attribValue="",c(e,"onattribute",{name:e.attribName,value:""}),e.attribName="",">"===s?x(e):l(H,s)?(e.attribName=s,e.state=F.ATTRIB_NAME):(m(e,"Invalid attribute name"),e.state=F.ATTRIB)}continue;case F.ATTRIB_VALUE:if(l(I,s))continue;l(N,s)?(e.q=s,e.state=F.ATTRIB_VALUE_QUOTED):(m(e,"Unquoted attribute value"),e.state=F.ATTRIB_VALUE_UNQUOTED,e.attribValue=s);continue;case F.ATTRIB_VALUE_QUOTED:if(s!==e.q){"&"===s?e.state=F.ATTRIB_VALUE_ENTITY_Q:e.attribValue+=s;continue}b(e),e.q="",e.state=F.ATTRIB;continue;case F.ATTRIB_VALUE_UNQUOTED:if(h(M,s)){"&"===s?e.state=F.ATTRIB_VALUE_ENTITY_U:e.attribValue+=s;continue}b(e),">"===s?x(e):e.state=F.ATTRIB;continue;case F.CLOSE_TAG:if(e.tagName)">"===s?C(e):l(L,s)?e.tagName+=s:e.script?(e.script+="</"+e.tagName,e.tagName="",e.state=F.SCRIPT):(h(I,s)&&m(e,"Invalid tagname in closing tag"),e.state=F.CLOSE_TAG_SAW_WHITE);else{if(l(I,s))continue;h(H,s)?e.script?(e.script+="</"+s,e.state=F.SCRIPT):m(e,"Invalid tagname in closing tag."):e.tagName=s}continue;case F.CLOSE_TAG_SAW_WHITE:if(l(I,s))continue;">"===s?C(e):m(e,"Invalid characters in closing tag");continue;case F.TEXT_ENTITY:case F.ATTRIB_VALUE_ENTITY_Q:case F.ATTRIB_VALUE_ENTITY_U:switch(e.state){case F.TEXT_ENTITY:var r=F.TEXT,u="textNode";break;case F.ATTRIB_VALUE_ENTITY_Q:var r=F.ATTRIB_VALUE_QUOTED,u="attribValue";break;case F.ATTRIB_VALUE_ENTITY_U:var r=F.ATTRIB_VALUE_UNQUOTED,u="attribValue"}";"===s?(e[u]+=w(e),e.entity="",e.state=r):l(E,s)?e.entity+=s:(m(e,"Invalid character entity"),e[u]+="&"+e.entity+s,e.entity="",e.state=r);continue;default:throw Error(e,"Unknown state: "+e.state)}return e.position>=e.bufferCheckPosition&&n(e),e}t.parser=function(t,n){return new e(t,n)},t.SAXParser=e,t.SAXStream=o,t.createStream=s,t.MAX_BUFFER_LENGTH=65536;var S=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){this.__proto__=t}return e.prototype=t,new e}),Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),e.prototype={end:function(){f(this)},write:_,resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{var P=require("stream").Stream}catch(T){var P=function(){}}var k=t.EVENTS.filter(function(t){return"error"!==t&&"end"!==t});o.prototype=Object.create(P.prototype,{constructor:{value:o}}),o.prototype.write=function(t){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(t)){if(!this._decoder){var e=require("string_decoder").StringDecoder;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(""+t),this.emit("data",t),!0},o.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},o.prototype.on=function(t,e){var n=this;return!n._parser["on"+t]&&-1!==k.indexOf(t)&&(n._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),n.emit.apply(n,e)}),P.prototype.on.call(n,t,e)};var I="\r\n ",R="0124356789",A="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",N="'\"",E=R+A+"#",M=I+">",D="[CDATA[",B="DOCTYPE",O="http://www.w3.org/XML/1998/namespace",$="http://www.w3.org/2000/xmlns/",z={xml:O,xmlns:$};I=a(I),R=a(R),A=a(A);var H=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,L=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;N=a(N),E=a(E),M=a(M);var F=0;t.STATE={BEGIN:F++,TEXT:F++,TEXT_ENTITY:F++,OPEN_WAKA:F++,SGML_DECL:F++,SGML_DECL_QUOTED:F++,DOCTYPE:F++,DOCTYPE_QUOTED:F++,DOCTYPE_DTD:F++,DOCTYPE_DTD_QUOTED:F++,COMMENT_STARTING:F++,COMMENT:F++,COMMENT_ENDING:F++,COMMENT_ENDED:F++,CDATA:F++,CDATA_ENDING:F++,CDATA_ENDING_2:F++,PROC_INST:F++,PROC_INST_BODY:F++,PROC_INST_ENDING:F++,OPEN_TAG:F++,OPEN_TAG_SLASH:F++,ATTRIB:F++,ATTRIB_NAME:F++,ATTRIB_NAME_SAW_WHITE:F++,ATTRIB_VALUE:F++,ATTRIB_VALUE_QUOTED:F++,ATTRIB_VALUE_UNQUOTED:F++,ATTRIB_VALUE_ENTITY_Q:F++,ATTRIB_VALUE_ENTITY_U:F++,CLOSE_TAG:F++,CLOSE_TAG_SAW_WHITE:F++,SCRIPT:F++,SCRIPT_ENDING:F++},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(e){var n=t.ENTITIES[e],i="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=i});for(var F in t.STATE)t.STATE[t.STATE[F]]=F;F=t.STATE}("undefined"==typeof exports?sax={}:exports),define("sax",function(t){return function(){var e;return e||t.sax}}(this)),define("filters/osis",["sax","bcv"],function(t,e){function n(t,n){var i="";return i=""!==e.parse(t).osis()?'<a href="?type=crossReference&osisRef='+e.parse(t).osis()+"&n="+n.attributes.n+'">'+t+"</a>":t}var i={},s=t.parser(!0),o={headings:!1,footnotes:!1,strongsNumbers:!1,wordsOfChristInRed:!1,oneVersePerLine:!1};return i.processText=function(t,e,i){i&&i!=={}?(i.headings=i.headings?i.headings:o.headings,i.footnotes=i.footnotes?i.footnotes:o.footnotes,i.strongsNumbers=i.strongsNumbers?i.strongsNumbers:o.strongsNumbers,i.wordsOfChristInRed=i.wordsOfChristInRed?i.wordsOfChristInRed:o.wordsOfChristInRed,i.oneVersePerLine=i.oneVersePerLine?i.oneVersePerLine:o.oneVersePerLine):i=o;var a="",r=null,l=null,h=null,u=null,c="",d="",p="";s.onerror=function(){s.resume()},s.ontext=function(t){if(l)i.footnotes&&"crossReference"===l.attributes.type&&(d+="reference"!==a?n(t,l):'<a href="?type=crossReference&osisRef='+h.attributes.osisRef+"&n="+l.attributes.n+'">'+t+"</a>");else if(r)switch(r.name){case"title":d="section"===r.attributes.type?"<h3>"+t+"</h3>"+d:"<h1>"+t+"</h1>"+d;break;default:d+=t}else d+=t},s.onopentag=function(t){switch(r=t,a=t.name,t.name){case"xml":u={osisRef:t.attributes.osisRef,verseNum:t.attributes.verseNum},d+="RtoL"===e?"<span dir='rtl'><a href=\"?type=verseNum&osisRef="+u.osisRef+"\" class='verse-number'> "+u.verseNum+" </a><span dir='rtl'>":'<a href="?type=verseNum&osisRef='+u.osisRef+"\" class='verse-number'> "+u.verseNum+" </a>";break;case"note":"crossReference"===t.attributes.type&&i.footnotes&&(d+="["),l=t;break;case"reference":h=t}},s.onclosetag=function(t){switch(t){case"title":r=null;break;case"note":"crossReference"===l.attributes.type&&i.footnotes&&(d+="] "),c="",l=null;break;case"reference":h=null;break;case"xml":"RtoL"===e&&(d+="</span>")}a=""},s.onattribute=function(){},s.onend=function(){};for(var g="",f=0;t.length>f;f++)g="<xml osisRef='"+t[f].osis+"' verseNum = '"+t[f].verse+"'>"+t[f].text+"</xml>",s.write(g),s.close(),p+=i.oneVersePerLine?"<div class='verse' id = 'verse"+t[f].verse+"'>"+d+"</div>":"<span class='verse' id = 'verse"+t[f].verse+"'>"+d+"</span>",d="";return"RtoL"===e&&(p="<div style='text-align: right;'>"+p+"</div>"),p},i}),define("filters/plain",[],function(){var t={},e={oneVersePerLine:!1};return t.processText=function(t,n,i){var s="";i&&i!=={}?i.oneVersePerLine=i.oneVersePerLine?i.oneVersePerLine:e.oneVersePerLine:i=e;for(var o=0;t.length>o;o++)outText="RtoL"!==n?'<a href="?type=verseNum&osisRef='+t[o].verse+"\" class='verse-number'> "+verseData.verseNum+" </a>":"<span dir='rtl'><a href=\"?type=verseNum&osisRef="+t[o].verse+"\" class='verse-number'> "+verseData.verseNum+" </a></span>",outText+="RtoL"!==n?t[o].text:"<span dir='rtl'>"+t[o].text+"</span>",s+=i.oneVersePerLine?"<div class='verse' id = 'verse"+t[o].verse+"'>"+outText+"</div>":"<span class='verse' id = 'verse"+t[o].verse+"'>"+outText+"</span>",outText="";return"RtoL"===n&&(s="<div style='text-align: right;'>"+s+"</div>"),s},t}),define("filterMgr",["filters/osis","filters/plain"],function(t,e){function n(n,i,s,o){return"osis"===i.toLowerCase()?t.processText(n,s,o):e.processText(n,s,o)}return{processText:n}}),define("swmodule",["dataMgr","verseKey","zText","filterMgr","versificationMgr"],function(t,e,n,i,s){function o(t,e,n){if(!(this instanceof o))throw new TypeError("Module constructor cannot be called as a function.");this.modKey=t,this.id=e,this.config=n}function a(e,n){t.getBlob(e,n)}return o.create=function(t,e,n){return new o(t,e,n)},o.prototype={constructor:o,self:this,renderText:function(s,o,r){var l=null,h=null,u=this;"function"==typeof o&&(r=o);var c=e.parseVerseList(s,this.config.Versification);0!==c.length&&""!==c[0].osis?t.get(u.config.bcvPosID,function(t,e){t?r(t):(e.nt&&e.nt.hasOwnProperty(c[0].book)?(l=e.nt[c[0].book],h=u.config.nt):e.ot&&e.ot.hasOwnProperty(c[0].book)&&(l=e.ot[c[0].book],h=u.config.ot),null===l&&r({message:"Wrong passage. The requested chapter is not available in this module."}),a(h,function(t,e){t||n.getRawEntry(e,l,c,u.config.Encoding,function(t,e){t?r(t):r(null,i.processText(e,u.config.SourceType,u.config.Direction,o))})}))}):r({message:"Wrong passage. The requested chapter is not available in this module."})},getAllBooks:function(){return s.getAllBooks(this.config.Versification)}},o}),define("moduleMgr",["dataMgr","swmodule"],function(t,e){var n={};return n.getModules=function(n){var i=[];t.getModules(function(t,s){t?n(t):(s.forEach(function(t){i.push(new e(t.moduleKey,t.id,t))}),n(null,i))})},n.getModule=function(n,i){t.get(n,function(t,s){t?i(null):i(null,new e(s.moduleKey,n,s))})},n}),require.config({paths:{text:"libs/text/text",json:"libs/json/src/json",async:"libs/async/lib/async",bcv:"libs/bible-reference-parser/js/en_bcv_parser.min",unzip:"libs/zlib/bin/unzip.min",inflateStream:"libs/zlib/bin/inflate_stream.min",sax:"libs/sax/lib/sax",idb:"libs/IDBWrapper/idbstore.min"},shim:{bcv:{exports:"bcv_parser",init:function(){return new this.bcv_parser}},unzip:{exports:"Zlib"},inflateStream:{exports:"Zlib"},sax:{exports:"sax"}}}),define("sword",["installMgr","moduleMgr","dataMgr","versificationMgr","verseKey"],function(t,e,n,i,s){var o={};return o.installMgr=t,o.moduleMgr=e,o.versificationMgr=i,o.dataMgr=n,o.verseKey=s,o.isSupported=function(){var t={}.toString,e=[],n="[object Function]";return window.FileReader&&t.call(e.forEach)==n?!0:!1},o}),require("sword")}); +null!==r?(l=X(),null!==l?(41===t.charCodeAt(ne)?(h=")",ne++):(h=null,0===ie&&n('")"')),null!==h?e=[e,i,s,a,r,l,h]:(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)}else e=null,ne=c;else e=null,ne=c;else e=null,ne=c;else e=null,ne=c;return null!==e&&(i=e[4],i===void 0&&(i=[]),i.unshift([e[3]]),e={type:"sequence_post_enclosed",value:i,indices:[u,ne-1]}),null===e&&(ne=u),e}function o(){var t;return t=s(),null===t&&(t=b(),null===t&&(t=m(),null===t&&(t=a(),null===t&&(t=R(),null===t&&(t=f(),null===t&&(t=d(),null===t&&(t=M(),null===t&&(t=p(),null===t&&(t=g(),null===t&&(t=E(),null===t&&(t=u(),null===t&&(t=S(),null===t&&(t=v(),null===t&&(t=h(),null===t&&(t=_(),null===t&&(t=l(),null===t&&(t=x(),null===t&&(t=w(),null===t&&(t=y(),null===t&&(t=C(),null===t&&(t=P(),null===t&&(t=A(),null===t&&(t=T(),null===t&&(t=k(),null===t&&(t=D(),null===t&&(t=J(),null===t&&(t=I(),null===t&&(t=B())))))))))))))))))))))))))))),t}function a(){var t,e,n,i,s;return s=i=ne,t=f(),null===t&&(t=d(),null===t&&(t=M(),null===t&&(t=p(),null===t&&(t=g(),null===t&&(t=E(),null===t&&(t=u(),null===t&&(t=S(),null===t&&(t=v(),null===t&&(t=x(),null===t&&(t=w(),null===t&&(t=_(),null===t&&(t=y(),null===t&&(t=C(),null===t&&(t=P(),null===t&&(t=A(),null===t&&(t=T(),null===t&&(t=k(),null===t&&(t=D(),null===t&&(t=J(),null===t&&(t=I(),null===t&&(t=B()))))))))))))))))))))),null!==t?(e=F(),null!==e?(n=R(),null===n&&(n=f(),null===n&&(n=d(),null===n&&(n=M(),null===n&&(n=p(),null===n&&(n=g(),null===n&&(n=E(),null===n&&(n=u(),null===n&&(n=S(),null===n&&(n=v(),null===n&&(n=x(),null===n&&(n=w(),null===n&&(n=_(),null===n&&(n=y(),null===n&&(n=C(),null===n&&(n=P(),null===n&&(n=A(),null===n&&(n=T(),null===n&&(n=D(),null===n&&(n=J(),null===n&&(n=k(),null===n&&(n=I(),null===n&&(n=B())))))))))))))))))))))),null!==n?t=[t,e,n]:(t=null,ne=s)):(t=null,ne=s)):(t=null,ne=s),null!==t&&(t={type:"range",value:[t[0],t[2]],indices:[i,ne-1]}),null===t&&(ne=i),t}function l(){var e,i,s,o,a,r,l;return r=a=ne,31===t.charCodeAt(ne)?(e="",ne++):(e=null,0===ie&&n('"\\x1F"')),null!==e?(i=Y(),null!==i?(l=ne,47===t.charCodeAt(ne)?(s="/",ne++):(s=null,0===ie&&n('"/"')),null!==s?(/^[a-z]/.test(t.charAt(ne))?(o=t.charAt(ne),ne++):(o=null,0===ie&&n("[a-z]")),null!==o?s=[s,o]:(s=null,ne=l)):(s=null,ne=l),s=null!==s?s:"",null!==s?(31===t.charCodeAt(ne)?(o="",ne++):(o=null,0===ie&&n('"\\x1F"')),null!==o?e=[e,i,s,o]:(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r),null!==e&&(e={type:"b",value:e[1].value,indices:[a,ne-1]}),null===e&&(ne=a),e}function h(){var t,e,n,i,s,o;return o=s=ne,t=l(),null!==t?(e=F(),null!==e?(i=ne,ie++,n=a(),null===n&&(n=R(),null===n&&(n=M(),null===n&&(n=p(),null===n&&(n=g(),null===n&&(n=E(),null===n&&(n=u(),null===n&&(n=v()))))))),ie--,null===n?n="":(n=null,ne=i),null!==n?(i=l(),null!==i?t=[t,e,n,i]:(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o),null!==t&&(t={type:"b_range",value:[t[0],t[3]],indices:[s,ne-1]}),null===t&&(ne=s),t}function u(){var t,e,n,i,s,o,a,r,h,u;if(a=o=ne,t=l(),null!==t){if(r=ne,e=$(),null!==e?(h=ne,ie++,u=ne,n=I(),null!==n?(i=z(),null!==i?(s=B(),null!==s?n=[n,i,s]:(n=null,ne=u)):(n=null,ne=u)):(n=null,ne=u),ie--,null!==n?(n="",ne=h):n=null,null!==n?e=[e,n]:(e=null,ne=r)):(e=null,ne=r),null===e){if(n=z(),null!==n)for(e=[];null!==n;)e.push(n),n=z();else e=null;if(null===e){if(n=H(),null!==n)for(e=[];null!==n;)e.push(n),n=H();else e=null;if(null===e){if(n=F(),null!==n)for(e=[];null!==n;)e.push(n),n=F();else e=null;null===e&&(e=X())}}}null!==e?(n=I(),null!==n?t=[t,e,n]:(t=null,ne=a)):(t=null,ne=a)}else t=null,ne=a;return null!==t&&(t={type:"bc",value:[t[0],t[2]],indices:[o,ne-1]}),null===t&&(ne=o),t}function c(){var e,i,s,o,a,r,h;return h=r=ne,e=l(),null!==e?(i=X(),null!==i?(44===t.charCodeAt(ne)?(s=",",ne++):(s=null,0===ie&&n('","')),null!==s?(o=X(),null!==o?(a=I(),null!==a?e=[e,i,s,o,a]:(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h),null!==e&&(e={type:"bc",value:[e[0],e[4]],indices:[r,ne-1]}),null===e&&(ne=r),e}function d(){var t,e,n,i;return i=n=ne,t=E(),null===t&&(t=u()),null!==t?(e=V(),null!==e?t=[t,e]:(t=null,ne=i)):(t=null,ne=i),null!==t&&(t={type:"bc_title",value:[t[0],t[1]],indices:[n,ne-1]}),null===t&&(ne=n),t}function p(){var e,i,s,o,a,r,l,h;return r=a=ne,e=E(),null===e&&(e=u()),null!==e?(l=ne,ie++,h=ne,46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(s=$(),null!==s?(o=B(),null!==o?i=[i,s,o]:(i=null,ne=h)):(i=null,ne=h)):(i=null,ne=h),ie--,null===i?i="":(i=null,ne=l),null!==i?(l=ne,s=z(),null===s&&(s=L()),s=null!==s?s:"",null!==s?(o=$(),null!==o?s=[s,o]:(s=null,ne=l)):(s=null,ne=l),null===s&&(s=z()),null!==s?(o=D(),null===o&&(o=B()),null!==o?e=[e,i,s,o]:(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r),null!==e&&(e={type:"bcv",value:[e[0],e[3]],indices:[a,ne-1]}),null===e&&(ne=a),e}function g(){var t,e,n,i,s,o,a,r,l;return a=o=ne,t=E(),null===t&&(t=u()),null!==t?(e=H(),null!==e?(n=D(),null===n&&(n=B()),null!==n?(r=ne,ie++,l=ne,i=z(),null!==i?(s=B(),null!==s?i=[i,s]:(i=null,ne=l)):(i=null,ne=l),ie--,null===i?i="":(i=null,ne=r),null!==i?t=[t,e,n,i]:(t=null,ne=a)):(t=null,ne=a)):(t=null,ne=a)):(t=null,ne=a),null!==t&&(t={type:"bcv",value:[t[0],t[2]],indices:[o,ne-1]}),null===t&&(ne=o),t}function f(){var e,i,s,o,a,r,l,h,u,d,p;return u=h=ne,e=c(),null!==e?(i=X(),null!==i?(44===t.charCodeAt(ne)?(s=",",ne++):(s=null,0===ie&&n('","')),null!==s?(o=X(),null!==o?(a=D(),null===a&&(a=B()),null!==a?(d=ne,ie++,p=ne,r=z(),null!==r?(l=B(),null!==l?r=[r,l]:(r=null,ne=p)):(r=null,ne=p),ie--,null===r?r="":(r=null,ne=d),null!==r?e=[e,i,s,o,a,r]:(e=null,ne=u)):(e=null,ne=u)):(e=null,ne=u)):(e=null,ne=u)):(e=null,ne=u)):(e=null,ne=u),null!==e&&(e={type:"bcv",value:[e[0],e[4]],indices:[h,ne-1]}),null===e&&(ne=h),e}function m(){var e,i,s,o,a,r,h,u,c;return c=u=ne,e=l(),null!==e?(45===t.charCodeAt(ne)?(i="-",ne++):(i=null,0===ie&&n('"-"')),null===i&&(i=Q()),i=null!==i?i:"",null!==i?(s=I(),null!==s?(45===t.charCodeAt(ne)?(o="-",ne++):(o=null,0===ie&&n('"-"')),null!==o?(a=B(),null!==a?(45===t.charCodeAt(ne)?(r="-",ne++):(r=null,0===ie&&n('"-"')),null!==r?(h=B(),null!==h?e=[e,i,s,o,a,r,h]:(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c),null!==e&&(e={type:"range",value:[{type:"bcv",value:[{type:"bc",value:[e[0],e[2]],indices:[e[0].indices[0],e[2].indices[1]]},e[4]],indices:[e[0].indices[0],e[4].indices[1]]},e[6]],indices:[u,ne-1]}),null===e&&(ne=u),e}function v(){var t,e,n,i,s,o,a;if(s=i=ne,t=l(),null!==t){if(n=z(),null!==n)for(e=[];null!==n;)e.push(n),n=z();else e=null;if(null===e){if(n=H(),null!==n)for(e=[];null!==n;)e.push(n),n=H();else e=null;if(null===e){if(n=F(),null!==n)for(e=[];null!==n;)e.push(n),n=F();else e=null;if(null===e){if(o=ne,n=L(),null!==n)for(e=[];null!==n;)e.push(n),n=L();else e=null;null!==e?(a=ne,ie++,n=$(),ie--,null!==n?(n="",ne=a):n=null,null!==n?e=[e,n]:(e=null,ne=o)):(e=null,ne=o),null===e&&(e=X())}}}null!==e?(n=D(),null===n&&(n=B()),null!==n?t=[t,e,n]:(t=null,ne=s)):(t=null,ne=s)}else t=null,ne=s;return null!==t&&(t={type:"bv",value:[t[0],t[2]],indices:[i,ne-1]}),null===t&&(ne=i),t}function y(){var t,e,n,i,s,o;return o=s=ne,t=O(),null!==t?(e=I(),null!==e?(n=W(),n=null!==n?n:"",null!==n?(i=l(),null!==i?t=[t,e,n,i]:(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o),null!==t&&(t={type:"bc",value:[t[3],t[1]],indices:[s,ne-1]}),null===t&&(ne=s),t}function b(){var t,e,n,i,s,o,a,r;return r=a=ne,t=O(),null!==t?(e=I(),null!==e?(n=F(),null!==n?(i=I(),null!==i?(s=W(),s=null!==s?s:"",null!==s?(o=l(),null!==o?t=[t,e,n,i,s,o]:(t=null,ne=r)):(t=null,ne=r)):(t=null,ne=r)):(t=null,ne=r)):(t=null,ne=r)):(t=null,ne=r),null!==t&&(t={type:"cb_range",value:[t[5],t[1],t[3]],indices:[a,ne-1]}),null===t&&(ne=a),t}function x(){var t,e,n,i,s,o;return o=s=ne,t=y(),null!==t?(e=L(),e=null!==e?e:"",null!==e?(n=$(),null!==n?(i=B(),null!==i?t=[t,e,n,i]:(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o),null!==t&&(t={type:"bcv",value:[t[0],t[3]],indices:[s,ne-1]}),null===t&&(ne=s),t}function C(){var e,i,s,o,a,r,h;return h=r=ne,e=I(),null!==e?("th"===t.substr(ne,2)?(i="th",ne+=2):(i=null,0===ie&&n('"th"')),null===i&&("nd"===t.substr(ne,2)?(i="nd",ne+=2):(i=null,0===ie&&n('"nd"')),null===i&&("st"===t.substr(ne,2)?(i="st",ne+=2):(i=null,0===ie&&n('"st"')))),null!==i?(s=O(),null!==s?(o=W(),o=null!==o?o:"",null!==o?(a=l(),null!==a?e=[e,i,s,o,a]:(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h),null!==e&&(e={type:"bc",value:[e[4],e[0]],indices:[r,ne-1]}),null===e&&(ne=r),e}function w(){var t,e,n,i,s,o;return o=s=ne,t=C(),null!==t?(e=L(),e=null!==e?e:"",null!==e?(n=$(),null!==n?(i=B(),null!==i?t=[t,e,n,i]:(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o),null!==t&&(t={type:"bcv",value:[t[0],t[3]],indices:[s,ne-1]}),null===t&&(ne=s),t}function _(){var e,i,s,o,a;return a=o=ne,31===t.charCodeAt(ne)?(e="",ne++):(e=null,0===ie&&n('"\\x1F"')),null!==e?(i=Y(),null!==i?("/p"===t.substr(ne,3)?(s="/p",ne+=3):(s=null,0===ie&&n('"/p\\x1F"')),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"c_psalm",value:e[1].value,indices:[o,ne-1]}),null===e&&(ne=o),e}function S(){var t,e,n,i,s,o;return o=s=ne,t=_(),null!==t?(e=L(),e=null!==e?e:"",null!==e?(n=$(),null!==n?(i=B(),null!==i?t=[t,e,n,i]:(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o)):(t=null,ne=o),null!==t&&(t={type:"cv_psalm",value:[t[0],t[3]],indices:[s,ne-1]}),null===t&&(ne=s),t}function P(){var t,e,n,i,s;return s=i=ne,t=O(),null!==t?(e=I(),null!==e?(n=V(),null!==n?t=[t,e,n]:(t=null,ne=s)):(t=null,ne=s)):(t=null,ne=s),null!==t&&(t={type:"c_title",value:[t[1],t[2]],indices:[i,ne-1]}),null===t&&(ne=i),t}function T(){var e,i,s,o,a,r,l,h;return r=a=ne,e=I(),null!==e?(l=ne,ie++,h=ne,46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(s=$(),null!==s?(o=B(),null!==o?i=[i,s,o]:(i=null,ne=h)):(i=null,ne=h)):(i=null,ne=h),ie--,null===i?i="":(i=null,ne=l),null!==i?(l=ne,s=z(),s=null!==s?s:"",null!==s?(o=$(),null!==o?s=[s,o]:(s=null,ne=l)):(s=null,ne=l),null===s&&(s=z()),null!==s?(o=D(),null===o&&(o=B()),null!==o?e=[e,i,s,o]:(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r),null!==e&&(e={type:"cv",value:[e[0],e[3]],indices:[a,ne-1]}),null===e&&(ne=a),e}function k(){var t,e,n,i,s,o,a,r,l;return a=o=ne,t=I(),null!==t?(e=H(),null!==e?(n=D(),null===n&&(n=B()),null!==n?(r=ne,ie++,l=ne,i=z(),null!==i?(s=B(),null!==s?i=[i,s]:(i=null,ne=l)):(i=null,ne=l),ie--,null===i?i="":(i=null,ne=r),null!==i?t=[t,e,n,i]:(t=null,ne=a)):(t=null,ne=a)):(t=null,ne=a)):(t=null,ne=a),null!==t&&(t={type:"cv",value:[t[0],t[2]],indices:[o,ne-1]}),null===t&&(ne=o),t}function I(){var t,e,n,i;return i=n=ne,t=O(),t=null!==t?t:"",null!==t?(e=J(),null!==e?t=[t,e]:(t=null,ne=i)):(t=null,ne=i),null!==t&&(t={type:"c",value:[t[1]],indices:[n,ne-1]}),null===t&&(ne=n),t}function R(){var e,i,s,o,a,r,l,h,c;return h=l=ne,e=p(),null===e&&(e=g(),null===e&&(e=u(),null===e&&(e=T(),null===e&&(e=k(),null===e&&(e=J(),null===e&&(e=I(),null===e&&(e=B()))))))),null!==e?(i=X(),null!==i?(102===t.charCodeAt(ne)?(s="f",ne++):(s=null,0===ie&&n('"f"')),null!==s?(102===t.charCodeAt(ne)?(o="f",ne++):(o=null,0===ie&&n('"f"')),o=null!==o?o:"",null!==o?(a=U(),a=null!==a?a:"",null!==a?(c=ne,ie++,/^[a-z]/.test(t.charAt(ne))?(r=t.charAt(ne),ne++):(r=null,0===ie&&n("[a-z]")),ie--,null===r?r="":(r=null,ne=c),null!==r?e=[e,i,s,o,a,r]:(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h),null!==e&&(e={type:"ff",value:[e[0]],indices:[l,ne-1]}),null===e&&(ne=l),e}function A(){var e,i,s,o,a;return a=o=ne,e=J(),null!==e?(i=z(),null===i&&(i=L()),i=null!==i?i:"",null!==i?("title"===t.substr(ne,5)?(s="title",ne+=5):(s=null,0===ie&&n('"title"')),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"integer_title",value:[e[0]],indices:[o,ne-1]}),null===e&&(ne=o),e}function N(){var e,i,s,o,a;return a=o=ne,31===t.charCodeAt(ne)?(e="",ne++):(e=null,0===ie&&n('"\\x1F"')),null!==e?(i=Y(),null!==i?("/q"===t.substr(ne,3)?(s="/q",ne+=3):(s=null,0===ie&&n('"/q\\x1F"')),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"b",value:e[1].value,indices:[o,ne-1]}),null===e&&(ne=o),e}function E(){var e,i,s,o,a,r;return a=o=ne,e=N(),null!==e?(".1"===t.substr(ne,2)?(i=".1",ne+=2):(i=null,0===ie&&n('".1"')),null!==i?(r=ne,ie++,/^[0-9]/.test(t.charAt(ne))?(s=t.charAt(ne),ne++):(s=null,0===ie&&n("[0-9]")),ie--,null===s?s="":(s=null,ne=r),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"bc",value:[e[0],{type:"c",value:[{type:"integer",value:151,indices:[ne-2,ne-1]}],indices:[ne-2,ne-1]}],indices:[o,ne-1]}),null===e&&(ne=o),e}function M(){var e,i,s,o,a;return a=o=ne,e=E(),null!==e?(46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(s=J(),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"bcv",value:[e[0],{type:"v",value:[e[2]],indices:[e[2].indices[0],e[2].indices[1]]}],indices:[o,ne-1]}),null===e&&(ne=o),e}function D(){var e,i,s,o,a,r,l,h;return l=r=ne,e=$(),e=null!==e?e:"",null!==e?(i=J(),null!==i?(s=X(),null!==s?(/^[a-e]/.test(t.charAt(ne))?(o=t.charAt(ne),ne++):(o=null,0===ie&&n("[a-e]")),null!==o?(h=ne,ie++,/^[a-z]/.test(t.charAt(ne))?(a=t.charAt(ne),ne++):(a=null,0===ie&&n("[a-z]")),ie--,null===a?a="":(a=null,ne=h),null!==a?e=[e,i,s,o,a]:(e=null,ne=l)):(e=null,ne=l)):(e=null,ne=l)):(e=null,ne=l)):(e=null,ne=l),null!==e&&(e={type:"v",value:[e[1]],indices:[r,ne-1]}),null===e&&(ne=r),e}function B(){var t,e,n,i;return i=n=ne,t=$(),t=null!==t?t:"",null!==t?(e=J(),null!==e?t=[t,e]:(t=null,ne=i)):(t=null,ne=i),null!==t&&(t={type:"v",value:[t[1]],indices:[n,ne-1]}),null===t&&(ne=n),t}function O(){var e,i,s,o,a,r,l,h,u;return h=l=ne,e=X(),null!==e?(u=ne,"chapter"===t.substr(ne,7)?(i="chapter",ne+=7):(i=null,0===ie&&n('"chapter"')),null!==i?(115===t.charCodeAt(ne)?(s="s",ne++):(s=null,0===ie&&n('"s"')),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=u)):(i=null,ne=u),null===i&&(u=ne,"ch"===t.substr(ne,2)?(i="ch",ne+=2):(i=null,0===ie&&n('"ch"')),null!==i?(97===t.charCodeAt(ne)?(s="a",ne++):(s=null,0===ie&&n('"a"')),s=null!==s?s:"",null!==s?("pt"===t.substr(ne,2)?(o="pt",ne+=2):(o=null,0===ie&&n('"pt"')),null!==o?(115===t.charCodeAt(ne)?(a="s",ne++):(a=null,0===ie&&n('"s"')),a=null!==a?a:"",null!==a?(r=U(),r=null!==r?r:"",null!==r?i=[i,s,o,a,r]:(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u),null===i&&(u=ne,"ch"===t.substr(ne,2)?(i="ch",ne+=2):(i=null,0===ie&&n('"ch"')),null!==i?(97===t.charCodeAt(ne)?(s="a",ne++):(s=null,0===ie&&n('"a"')),s=null!==s?s:"",null!==s?(112===t.charCodeAt(ne)?(o="p",ne++):(o=null,0===ie&&n('"p"')),o=null!==o?o:"",null!==o?(115===t.charCodeAt(ne)?(a="s",ne++):(a=null,0===ie&&n('"s"')),a=null!==a?a:"",null!==a?(r=U(),r=null!==r?r:"",null!==r?i=[i,s,o,a,r]:(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u)):(i=null,ne=u))),null!==i?(s=X(),null!==s?e=[e,i,s]:(e=null,ne=h)):(e=null,ne=h)):(e=null,ne=h),null!==e&&(e={type:"c_explicit"}),null===e&&(ne=l),e}function $(){var e,i,s,o,a,r,l,h;return l=r=ne,e=X(),null!==e?(h=ne,"verse"===t.substr(ne,5)?(i="verse",ne+=5):(i=null,0===ie&&n('"verse"')),null!==i?(115===t.charCodeAt(ne)?(s="s",ne++):(s=null,0===ie&&n('"s"')),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&(h=ne,"vv"===t.substr(ne,2)?(i="vv",ne+=2):(i=null,0===ie&&n('"vv"')),null!==i?(s=U(),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&(h=ne,"ver"===t.substr(ne,3)?(i="ver",ne+=3):(i=null,0===ie&&n('"ver"')),null!==i?(s=U(),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&(h=ne,118===t.charCodeAt(ne)?(i="v",ne++):(i=null,0===ie&&n('"v"')),null!==i?(115===t.charCodeAt(ne)?(s="s",ne++):(s=null,0===ie&&n('"s"')),s=null!==s?s:"",null!==s?(115===t.charCodeAt(ne)?(o="s",ne++):(o=null,0===ie&&n('"s"')),o=null!==o?o:"",null!==o?(a=U(),a=null!==a?a:"",null!==a?i=[i,s,o,a]:(i=null,ne=h)):(i=null,ne=h)):(i=null,ne=h)):(i=null,ne=h)))),null!==i?(s=X(),null!==s?e=[e,i,s]:(e=null,ne=l)):(e=null,ne=l)):(e=null,ne=l),null!==e&&(e={type:"v_explicit"}),null===e&&(ne=r),e}function z(){var e,i,s,o,a,r,l,h,u,c;if(l=ne,e=X(),null!==e){if(58===t.charCodeAt(ne)?(s=":",ne++):(s=null,0===ie&&n('":"')),null!==s)for(i=[];null!==s;)i.push(s),58===t.charCodeAt(ne)?(s=":",ne++):(s=null,0===ie&&n('":"'));else i=null;null===i&&(h=ne,46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(u=ne,ie++,c=ne,s=X(),null!==s?(46===t.charCodeAt(ne)?(o=".",ne++):(o=null,0===ie&&n('"."')),null!==o?(a=X(),null!==a?(46===t.charCodeAt(ne)?(r=".",ne++):(r=null,0===ie&&n('"."')),null!==r?s=[s,o,a,r]:(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c),ie--,null===s?s="":(s=null,ne=u),null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h)),null!==i?(s=X(),null!==s?e=[e,i,s]:(e=null,ne=l)):(e=null,ne=l)}else e=null,ne=l;return e}function H(){var e,i,s,o;return o=ne,e=X(),null!==e?(/^["']/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[\"']")),null!==i?(s=X(),null!==s?e=[e,i,s]:(e=null,ne=o)):(e=null,ne=o)):(e=null,ne=o),null===e&&(e=Q()),e}function L(){var e,i,s,o,a,r,l,h,u,c;if(l=ne,/^[,;\/:&\-\u2013\u2014~]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[,;\\/:&\\-\\u2013\\u2014~]")),null===i&&(h=ne,46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(u=ne,ie++,c=ne,s=X(),null!==s?(46===t.charCodeAt(ne)?(o=".",ne++):(o=null,0===ie&&n('"."')),null!==o?(a=X(),null!==a?(46===t.charCodeAt(ne)?(r=".",ne++):(r=null,0===ie&&n('"."')),null!==r?s=[s,o,a,r]:(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c),ie--,null===s?s="":(s=null,ne=u),null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&("see"===t.substr(ne,3)?(i="see",ne+=3):(i=null,0===ie&&n('"see"')),null===i&&("compare"===t.substr(ne,7)?(i="compare",ne+=7):(i=null,0===ie&&n('"compare"')),null===i&&(h=ne,"cf"===t.substr(ne,2)?(i="cf",ne+=2):(i=null,0===ie&&n('"cf"')),null!==i?(s=U(),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&("and"===t.substr(ne,3)?(i="and",ne+=3):(i=null,0===ie&&n('"and"')),null===i&&("also"===t.substr(ne,4)?(i="also",ne+=4):(i=null,0===ie&&n('"also"')),null===i&&(i=Q()))))))),null!==i)for(e=[];null!==i;)e.push(i),/^[,;\/:&\-\u2013\u2014~]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[,;\\/:&\\-\\u2013\\u2014~]")),null===i&&(h=ne,46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(u=ne,ie++,c=ne,s=X(),null!==s?(46===t.charCodeAt(ne)?(o=".",ne++):(o=null,0===ie&&n('"."')),null!==o?(a=X(),null!==a?(46===t.charCodeAt(ne)?(r=".",ne++):(r=null,0===ie&&n('"."')),null!==r?s=[s,o,a,r]:(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c)):(s=null,ne=c),ie--,null===s?s="":(s=null,ne=u),null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&("see"===t.substr(ne,3)?(i="see",ne+=3):(i=null,0===ie&&n('"see"')),null===i&&("compare"===t.substr(ne,7)?(i="compare",ne+=7):(i=null,0===ie&&n('"compare"')),null===i&&(h=ne,"cf"===t.substr(ne,2)?(i="cf",ne+=2):(i=null,0===ie&&n('"cf"')),null!==i?(s=U(),s=null!==s?s:"",null!==s?i=[i,s]:(i=null,ne=h)):(i=null,ne=h),null===i&&("and"===t.substr(ne,3)?(i="and",ne+=3):(i=null,0===ie&&n('"and"')),null===i&&("also"===t.substr(ne,4)?(i="also",ne+=4):(i=null,0===ie&&n('"also"')),null===i&&(i=Q())))))));else e=null;return null!==e&&(e=""),null===e&&(ne=l),e}function F(){var e,i,s,o,a,r;if(a=ne,e=X(),null!==e){if(r=ne,/^[\-\u2013\u2014]/.test(t.charAt(ne))?(s=t.charAt(ne),ne++):(s=null,0===ie&&n("[\\-\\u2013\\u2014]")),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"through"===t.substr(ne,7)?(s="through",ne+=7):(s=null,0===ie&&n('"through"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"thru"===t.substr(ne,4)?(s="thru",ne+=4):(s=null,0===ie&&n('"thru"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"to"===t.substr(ne,2)?(s="to",ne+=2):(s=null,0===ie&&n('"to"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r)))),null!==s)for(i=[];null!==s;)i.push(s),r=ne,/^[\-\u2013\u2014]/.test(t.charAt(ne))?(s=t.charAt(ne),ne++):(s=null,0===ie&&n("[\\-\\u2013\\u2014]")),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"through"===t.substr(ne,7)?(s="through",ne+=7):(s=null,0===ie&&n('"through"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"thru"===t.substr(ne,4)?(s="thru",ne+=4):(s=null,0===ie&&n('"thru"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r),null===s&&(r=ne,"to"===t.substr(ne,2)?(s="to",ne+=2):(s=null,0===ie&&n('"to"')),null!==s?(o=X(),null!==o?s=[s,o]:(s=null,ne=r)):(s=null,ne=r))));else i=null;null!==i?e=[e,i]:(e=null,ne=a)}else e=null,ne=a;return e}function V(){var e,i,s,o;return o=s=ne,e=z(),null===e&&(e=L()),e=null!==e?e:"",null!==e?("title"===t.substr(ne,5)?(i="title",ne+=5):(i=null,0===ie&&n('"title"')),null!==i?e=[e,i]:(e=null,ne=o)):(e=null,ne=o),null!==e&&(e={type:"title",value:[e[1]],indices:[s,ne-1]}),null===e&&(ne=s),e}function W(){var e,i,s,o,a,r,l,h,u,c,d;return c=ne,e=X(),null!==e?("from"===t.substr(ne,4)?(i="from",ne+=4):(i=null,0===ie&&n('"from"')),null===i&&("of"===t.substr(ne,2)?(i="of",ne+=2):(i=null,0===ie&&n('"of"')),null===i&&("in"===t.substr(ne,2)?(i="in",ne+=2):(i=null,0===ie&&n('"in"')))),null!==i?(s=X(),null!==s?(d=ne,"the"===t.substr(ne,3)?(o="the",ne+=3):(o=null,0===ie&&n('"the"')),null!==o?(a=X(),null!==a?("book"===t.substr(ne,4)?(r="book",ne+=4):(r=null,0===ie&&n('"book"')),null!==r?(l=X(),null!==l?("of"===t.substr(ne,2)?(h="of",ne+=2):(h=null,0===ie&&n('"of"')),null!==h?(u=X(),null!==u?o=[o,a,r,l,h,u]:(o=null,ne=d)):(o=null,ne=d)):(o=null,ne=d)):(o=null,ne=d)):(o=null,ne=d)):(o=null,ne=d),o=null!==o?o:"",null!==o?e=[e,i,s,o]:(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c)):(e=null,ne=c),e}function U(){var e,i,s,o,a,r,l,h,u;return l=ne,e=X(),null!==e?(46===t.charCodeAt(ne)?(i=".",ne++):(i=null,0===ie&&n('"."')),null!==i?(h=ne,ie++,u=ne,s=X(),null!==s?(46===t.charCodeAt(ne)?(o=".",ne++):(o=null,0===ie&&n('"."')),null!==o?(a=X(),null!==a?(46===t.charCodeAt(ne)?(r=".",ne++):(r=null,0===ie&&n('"."')),null!==r?s=[s,o,a,r]:(s=null,ne=u)):(s=null,ne=u)):(s=null,ne=u)):(s=null,ne=u),ie--,null===s?s="":(s=null,ne=h),null!==s?e=[e,i,s]:(e=null,ne=l)):(e=null,ne=l)):(e=null,ne=l),e}function j(){var e,i,s,o,a,r,l,h,u,c,d;if(u=h=ne,e=X(),null!==e)if(/^[([]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[([]")),null!==i)if(s=X(),null!==s){if(c=ne,o=q(),null!==o){for(a=[],d=ne,r=L(),null!==r?(l=q(),null!==l?r=[r,l]:(r=null,ne=d)):(r=null,ne=d);null!==r;)a.push(r),d=ne,r=L(),null!==r?(l=q(),null!==l?r=[r,l]:(r=null,ne=d)):(r=null,ne=d);null!==a?o=[o,a]:(o=null,ne=c)}else o=null,ne=c;null!==o?(a=X(),null!==a?(/^[)\]]/.test(t.charAt(ne))?(r=t.charAt(ne),ne++):(r=null,0===ie&&n("[)\\]]")),null!==r?e=[e,i,s,o,a,r]:(e=null,ne=u)):(e=null,ne=u)):(e=null,ne=u)}else e=null,ne=u;else e=null,ne=u;else e=null,ne=u;return null!==e&&(e={type:"translation_sequence",value:e[3],indices:[h,ne-1]}),null===e&&(ne=h),e}function K(){var e,i,s,o,a,r,l,h,u,c;if(h=l=ne,e=X(),null!==e)if(u=ne,44===t.charCodeAt(ne)?(i=",",ne++):(i=null,0===ie&&n('","')),null!==i?(s=X(),null!==s?i=[i,s]:(i=null,ne=u)):(i=null,ne=u),i=null!==i?i:"",null!==i){if(u=ne,s=q(),null!==s){for(o=[],c=ne,a=L(),null!==a?(r=q(),null!==r?a=[a,r]:(a=null,ne=c)):(a=null,ne=c);null!==a;)o.push(a),c=ne,a=L(),null!==a?(r=q(),null!==r?a=[a,r]:(a=null,ne=c)):(a=null,ne=c);null!==o?s=[s,o]:(s=null,ne=u)}else s=null,ne=u;null!==s?e=[e,i,s]:(e=null,ne=h)}else e=null,ne=h;else e=null,ne=h;return null!==e&&(e={type:"translation_sequence",value:e[2],indices:[l,ne-1]}),null===e&&(ne=l),e}function q(){var e,i,s,o,a;return a=o=ne,30===t.charCodeAt(ne)?(e="",ne++):(e=null,0===ie&&n('"\\x1E"')),null!==e?(i=Y(),null!==i?(30===t.charCodeAt(ne)?(s="",ne++):(s=null,0===ie&&n('"\\x1E"')),null!==s?e=[e,i,s]:(e=null,ne=a)):(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"translation",value:e[1].value,indices:[o,ne-1]}),null===e&&(ne=o),e}function J(){var e,i,s,o,a,r;return r=a=o=ne,/^[0-9]/.test(t.charAt(ne))?(e=t.charAt(ne),ne++):(e=null,0===ie&&n("[0-9]")),null!==e?(/^[0-9]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[0-9]")),i=null!==i?i:"",null!==i?(/^[0-9]/.test(t.charAt(ne))?(s=t.charAt(ne),ne++):(s=null,0===ie&&n("[0-9]")),s=null!==s?s:"",null!==s?e=[e,i,s]:(e=null,ne=r)):(e=null,ne=r)):(e=null,ne=r),null!==e?(r=ne,ie++,/^[0-9]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[0-9]")),null===i&&(",000"===t.substr(ne,4)?(i=",000",ne+=4):(i=null,0===ie&&n('",000"'))),ie--,null===i?i="":(i=null,ne=r),null!==i?e=[e,i]:(e=null,ne=a)):(e=null,ne=a),null!==e&&(e={type:"integer",value:parseInt(e[0].join(""),10),indices:[o,ne-1]}),null===e&&(ne=o),e}function Y(){var e,i,s;if(s=ne,/^[0-9]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[0-9]")),null!==i)for(e=[];null!==i;)e.push(i),/^[0-9]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[0-9]"));else e=null;return null!==e&&(e={type:"integer",value:parseInt(e.join(""),10),indices:[s,ne-1]}),null===e&&(ne=s),e}function G(){var e,i,s;if(s=ne,/^[^\x1F\x1E([]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[^\\x1F\\x1E([]")),null!==i)for(e=[];null!==i;)e.push(i),/^[^\x1F\x1E([]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[^\\x1F\\x1E([]"));else e=null;return null!==e&&(e={type:"word",value:e.join(""),indices:[s,ne-1]}),null===e&&(ne=s),e}function Z(){var e,i;return i=ne,/^[([]/.test(t.charAt(ne))?(e=t.charAt(ne),ne++):(e=null,0===ie&&n("[([]")),null!==e&&(e={type:"stop",value:e,indices:[i,ne-1]}),null===e&&(ne=i),e}function X(){var t;return t=Q(),null!==t?t:""}function Q(){var e,i;if(/^[\s\xa0*]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[\\s\\xa0*]")),null!==i)for(e=[];null!==i;)e.push(i),/^[\s\xa0*]/.test(t.charAt(ne))?(i=t.charAt(ne),ne++):(i=null,0===ie&&n("[\\s\\xa0*]"));else e=null;return e}function te(t){t.sort();for(var e=null,n=[],i=0;t.length>i;i++)t[i]!==e&&(n.push(t[i]),e=t[i]);return n}var ee={start:function(){var t,e;if(e=m(),null===e&&(e=i(),null===e&&(e=b(),null===e&&(e=a(),null===e&&(e=R(),null===e&&(e=f(),null===e&&(e=d(),null===e&&(e=M(),null===e&&(e=p(),null===e&&(e=g(),null===e&&(e=E(),null===e&&(e=u(),null===e&&(e=S(),null===e&&(e=v(),null===e&&(e=h(),null===e&&(e=_(),null===e&&(e=l(),null===e&&(e=x(),null===e&&(e=w(),null===e&&(e=y(),null===e&&(e=C(),null===e&&(e=j(),null===e&&(e=K(),null===e&&(e=L(),null===e&&(e=P(),null===e&&(e=A(),null===e&&(e=T(),null===e&&(e=k(),null===e&&(e=D(),null===e&&(e=J(),null===e&&(e=I(),null===e&&(e=B(),null===e&&(e=G(),null===e&&(e=Z()))))))))))))))))))))))))))))))))),null!==e)for(t=[];null!==e;)t.push(e),e=m(),null===e&&(e=i(),null===e&&(e=b(),null===e&&(e=a(),null===e&&(e=R(),null===e&&(e=f(),null===e&&(e=d(),null===e&&(e=M(),null===e&&(e=p(),null===e&&(e=g(),null===e&&(e=E(),null===e&&(e=u(),null===e&&(e=S(),null===e&&(e=v(),null===e&&(e=h(),null===e&&(e=_(),null===e&&(e=l(),null===e&&(e=x(),null===e&&(e=w(),null===e&&(e=y(),null===e&&(e=C(),null===e&&(e=j(),null===e&&(e=K(),null===e&&(e=L(),null===e&&(e=P(),null===e&&(e=A(),null===e&&(e=T(),null===e&&(e=k(),null===e&&(e=D(),null===e&&(e=J(),null===e&&(e=I(),null===e&&(e=B(),null===e&&(e=G(),null===e&&(e=Z())))))))))))))))))))))))))))))))));else t=null;return t},sequence:i,sequence_post_enclosed:s,sequence_post:o,range:a,b:l,b_range:h,bc:u,bc_comma:c,bc_title:d,bcv:p,bcv_weak:g,bcv_comma:f,bcv_hyphen_range:m,bv:v,cb:y,cb_range:b,cbv:x,cb_ordinal:C,cbv_ordinal:w,c_psalm:_,cv_psalm:S,c_title:P,cv:T,cv_weak:k,c:I,ff:R,integer_title:A,ps151_b:N,ps151_bc:E,ps151_bcv:M,v_letter:D,v:B,c_explicit:O,v_explicit:$,cv_sep:z,cv_sep_weak:H,sequence_sep:L,range_sep:F,title:V,in_book_of:W,abbrev:U,translation_sequence_enclosed:j,translation_sequence:K,translation:q,integer:J,any_integer:Y,word:G,word_parenthesis:Z,sp:X,space:Q};if(void 0!==e){if(void 0===ee[e])throw Error("Invalid rule name: "+r(e)+".")}else e="start";var ne=0,ie=0,se=0,oe=[],ee=ee[e]();if(null===ee||ne!==t.length){for(var ee=Math.max(ne,se),ae=t.length>ee?t.charAt(ee):null,re=1,le=1,he=!1,ue=0;Math.max(ne,se)>ue;ue++){var ce=t.charAt(ue);"\n"===ce?(he||re++,le=1,he=!1):"\r"===ce||"\u2028"===ce||"\u2029"===ce?(re++,le=1,he=!0):(le++,he=!1)}throw new this.SyntaxError(te(oe),ae,ee,re,le)}return ee},toSource:function(){return this._source},SyntaxError:function(t,e,n,i,s){switch(this.name="SyntaxError",this.expected=t,this.found=e,t.length){case 0:t="end of input";break;case 1:t=t[0];break;default:t=t.slice(0,t.length-1).join(", ")+" or "+t[t.length-1]}e=e?r(e):"end of input",this.message="Expected "+t+" but "+e+" found.",this.offset=n,this.line=i,this.column=s}};o.SyntaxError.prototype=Error.prototype,a=o}.call(this),define("bcv",function(t){return function(){var e,n;return n=function(){return new this.bcv_parser},e=n.apply(t,arguments),e||t.bcv_parser}}(this)),define("verseKey",["bcv","versificationMgr"],function(t,e){function n(n,i){var s={};s.osis=t.parse(n).osis(),""===s.osis&&(s.osis="Matt.1");var o=s.osis.split("-")[0].split(".");return s.book=o[0],s.chapter=isNaN(parseInt(o[1],10))?1:parseInt(o[1],10),s.verse=parseInt(o[2],10),s.bookNum=e.getBookNum(s.book,i),s}function i(t,i){var s=[],o=t;if("string"==typeof t&&(o=n(t)),!(o.osis.split("-").length>1))if(isNaN(o.verse))for(var a=e.getBookNum(o.book),r=e.getVersesInChapter(a,o.chapter,i),l=0;r>l;l++)s.push({osis:o.book+"."+o.chapter+"."+(l+1),book:o.book,bookNum:a,chapter:o.chapter,verse:l+1});else s.push(o);return s}function s(t,i){var s=n(t,i),o=e.getChapterMax(s.bookNum,i);return o>s.chapter?s.chapter++:(s.bookNum=65>s.bookNum?++s.bookNum:65,s.chapter=65>s.bookNum?1:o,s.book=e.getBook(s.bookNum,i).abbrev),s.osis=s.book+"."+s.chapter,s}function o(t,i){var s=n(t,i),o=e.getChapterMax(s.bookNum-1,i);return s.chapter>1?--s.chapter:(s.bookNum=s.bookNum>0?--s.bookNum:0,s.chapter=0===s.bookNum?1:o,s.book=e.getBook(s.bookNum,i).abbrev),s.osis=s.book+"."+s.chapter,s}return{parse:n,parseVerseList:i,next:s,previous:o}}),function(t){function e(n,s){if(!(this instanceof e))return new e(n,s);var o=this;i(o),o.q=o.c="",o.bufferCheckPosition=t.MAX_BUFFER_LENGTH,o.opt=s||{},o.opt.lowercase=o.opt.lowercase||o.opt.lowercasetags,o.looseCase=o.opt.lowercase?"toLowerCase":"toUpperCase",o.tags=[],o.closed=o.closedRoot=o.sawRoot=!1,o.tag=o.error=null,o.strict=!!n,o.noscript=!!n||!!o.opt.noscript,o.state=F.BEGIN,o.ENTITIES=Object.create(t.ENTITIES),o.attribList=[],o.opt.xmlns&&(o.ns=Object.create(z)),o.trackPosition=o.opt.position!==!1,o.trackPosition&&(o.position=o.line=o.column=0),u(o,"onready")}function n(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),i=0,s=0,o=S.length;o>s;s++){var a=e[S[s]].length;if(a>n)switch(S[s]){case"textNode":d(e);break;case"cdata":c(e,"oncdata",e.cdata),e.cdata="";break;case"script":c(e,"onscript",e.script),e.script="";break;default:g(e,"Max buffer length exceeded: "+S[s])}i=Math.max(i,a)}e.bufferCheckPosition=t.MAX_BUFFER_LENGTH-i+e.position}function i(t){for(var e=0,n=S.length;n>e;e++)t[S[e]]=""}function s(t,e){return new o(t,e)}function o(t,n){if(!(this instanceof o))return new o(t,n);P.apply(this),this._parser=new e(t,n),this.writable=!0,this.readable=!0;var i=this;this._parser.onend=function(){i.emit("end")},this._parser.onerror=function(t){i.emit("error",t),i._parser.error=null},this._decoder=null,k.forEach(function(t){Object.defineProperty(i,"on"+t,{get:function(){return i._parser["on"+t]},set:function(e){return e?(i.on(t,e),void 0):(i.removeAllListeners(t),i._parser["on"+t]=e)},enumerable:!0,configurable:!1})})}function a(t){return t.split("").reduce(function(t,e){return t[e]=!0,t},{})}function r(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function l(t,e){return r(t)?!!e.match(t):t[e]}function h(t,e){return!l(t,e)}function u(t,e,n){t[e]&&t[e](n)}function c(t,e,n){t.textNode&&d(t),u(t,e,n)}function d(t){t.textNode=p(t.opt,t.textNode),t.textNode&&u(t,"ontext",t.textNode),t.textNode="" +}function p(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function g(t,e){return d(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=Error(e),t.error=e,u(t,"onerror",e),t}function f(t){return t.closedRoot||m(t,"Unclosed root tag"),t.state!==F.TEXT&&g(t,"Unexpected end"),d(t),t.c="",t.closed=!0,u(t,"onend"),e.call(t,t.strict,t.opt),t}function m(t,n){if(!("object"==typeof t&&t instanceof e))throw Error("bad call to strictFail");t.strict&&g(t,n)}function v(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0}function y(t){var e=t.indexOf(":"),n=0>e?["",t]:t.split(":"),i=n[0],s=n[1];return"xmlns"===t&&(i="xmlns",s=""),{prefix:i,local:s}}function b(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))return t.attribName=t.attribValue="";if(t.opt.xmlns){var e=y(t.attribName),n=e.prefix,i=e.local;if("xmlns"===n)if("xml"===i&&t.attribValue!==O)m(t,"xml: prefix must be bound to "+O+"\n"+"Actual: "+t.attribValue);else if("xmlns"===i&&t.attribValue!==$)m(t,"xmlns: prefix must be bound to "+$+"\n"+"Actual: "+t.attribValue);else{var s=t.tag,o=t.tags[t.tags.length-1]||t;s.ns===o.ns&&(s.ns=Object.create(o.ns)),s.ns[i]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,c(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}function x(t,e){if(t.opt.xmlns){var n=t.tag,i=y(t.tagName);n.prefix=i.prefix,n.local=i.local,n.uri=n.ns[i.prefix]||"",n.prefix&&!n.uri&&(m(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=i.prefix);var s=t.tags[t.tags.length-1]||t;n.ns&&s.ns!==n.ns&&Object.keys(n.ns).forEach(function(e){c(t,"onopennamespace",{prefix:e,uri:n.ns[e]})});for(var o=0,a=t.attribList.length;a>o;o++){var r=t.attribList[o],l=r[0],h=r[1],u=y(l),d=u.prefix,p=u.local,g=""==d?"":n.ns[d]||"",f={name:l,value:h,prefix:d,local:p,uri:g};d&&"xmlns"!=d&&!g&&(m(t,"Unbound namespace prefix: "+JSON.stringify(d)),f.uri=d),t.tag.attributes[l]=f,c(t,"onattribute",f)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),c(t,"onopentag",t.tag),e||(t.state=t.noscript||"script"!==t.tagName.toLowerCase()?F.TEXT:F.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function C(t){if(!t.tagName)return m(t,"Weird empty close tag."),t.textNode+="</>",t.state=F.TEXT,void 0;if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",t.state=F.SCRIPT,void 0;c(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var i=n;e--;){var s=t.tags[e];if(s.name===i)break;m(t,"Unexpected close tag")}if(0>e)return m(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",t.state=F.TEXT,void 0;t.tagName=n;for(var o=t.tags.length;o-->e;){var a=t.tag=t.tags.pop();t.tagName=t.tag.name,c(t,"onclosetag",t.tagName);var r={};for(var l in a.ns)r[l]=a.ns[l];var h=t.tags[t.tags.length-1]||t;t.opt.xmlns&&a.ns!==h.ns&&Object.keys(a.ns).forEach(function(e){var n=a.ns[e];c(t,"onclosenamespace",{prefix:e,uri:n})})}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=F.TEXT}function w(t){var e,n=t.entity,i=n.toLowerCase(),s="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[i]?t.ENTITIES[i]:(n=i,"#"===n.charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),e=parseInt(n,16),s=e.toString(16)):(n=n.slice(1),e=parseInt(n,10),s=e.toString(10))),n=n.replace(/^0+/,""),s.toLowerCase()!==n?(m(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCharCode(e))}function _(t){var e=this;if(this.error)throw this.error;if(e.closed)return g(e,"Cannot write after close. Assign an onready handler.");if(null===t)return f(e);for(var i=0,s="";e.c=s=t.charAt(i++);)switch(e.trackPosition&&(e.position++,"\n"===s?(e.line++,e.column=0):e.column++),e.state){case F.BEGIN:"<"===s?(e.state=F.OPEN_WAKA,e.startTagPosition=e.position):h(I,s)&&(m(e,"Non-whitespace before first tag."),e.textNode=s,e.state=F.TEXT);continue;case F.TEXT:if(e.sawRoot&&!e.closedRoot){for(var o=i-1;s&&"<"!==s&&"&"!==s;)s=t.charAt(i++),s&&e.trackPosition&&(e.position++,"\n"===s?(e.line++,e.column=0):e.column++);e.textNode+=t.substring(o,i-1)}"<"===s?(e.state=F.OPEN_WAKA,e.startTagPosition=e.position):(h(I,s)&&(!e.sawRoot||e.closedRoot)&&m(e,"Text data outside of root node."),"&"===s?e.state=F.TEXT_ENTITY:e.textNode+=s);continue;case F.SCRIPT:"<"===s?e.state=F.SCRIPT_ENDING:e.script+=s;continue;case F.SCRIPT_ENDING:"/"===s?e.state=F.CLOSE_TAG:(e.script+="<"+s,e.state=F.SCRIPT);continue;case F.OPEN_WAKA:if("!"===s)e.state=F.SGML_DECL,e.sgmlDecl="";else if(!l(I,s))if(l(H,s))e.state=F.OPEN_TAG,e.tagName=s;else if("/"===s)e.state=F.CLOSE_TAG,e.tagName="";else if("?"===s)e.state=F.PROC_INST,e.procInstName=e.procInstBody="";else{if(m(e,"Unencoded <"),e.startTagPosition+1<e.position){var a=e.position-e.startTagPosition;s=Array(a).join(" ")+s}e.textNode+="<"+s,e.state=F.TEXT}continue;case F.SGML_DECL:(e.sgmlDecl+s).toUpperCase()===D?(c(e,"onopencdata"),e.state=F.CDATA,e.sgmlDecl="",e.cdata=""):"--"===e.sgmlDecl+s?(e.state=F.COMMENT,e.comment="",e.sgmlDecl=""):(e.sgmlDecl+s).toUpperCase()===B?(e.state=F.DOCTYPE,(e.doctype||e.sawRoot)&&m(e,"Inappropriately located doctype declaration"),e.doctype="",e.sgmlDecl=""):">"===s?(c(e,"onsgmldeclaration",e.sgmlDecl),e.sgmlDecl="",e.state=F.TEXT):l(N,s)?(e.state=F.SGML_DECL_QUOTED,e.sgmlDecl+=s):e.sgmlDecl+=s;continue;case F.SGML_DECL_QUOTED:s===e.q&&(e.state=F.SGML_DECL,e.q=""),e.sgmlDecl+=s;continue;case F.DOCTYPE:">"===s?(e.state=F.TEXT,c(e,"ondoctype",e.doctype),e.doctype=!0):(e.doctype+=s,"["===s?e.state=F.DOCTYPE_DTD:l(N,s)&&(e.state=F.DOCTYPE_QUOTED,e.q=s));continue;case F.DOCTYPE_QUOTED:e.doctype+=s,s===e.q&&(e.q="",e.state=F.DOCTYPE);continue;case F.DOCTYPE_DTD:e.doctype+=s,"]"===s?e.state=F.DOCTYPE:l(N,s)&&(e.state=F.DOCTYPE_DTD_QUOTED,e.q=s);continue;case F.DOCTYPE_DTD_QUOTED:e.doctype+=s,s===e.q&&(e.state=F.DOCTYPE_DTD,e.q="");continue;case F.COMMENT:"-"===s?e.state=F.COMMENT_ENDING:e.comment+=s;continue;case F.COMMENT_ENDING:"-"===s?(e.state=F.COMMENT_ENDED,e.comment=p(e.opt,e.comment),e.comment&&c(e,"oncomment",e.comment),e.comment=""):(e.comment+="-"+s,e.state=F.COMMENT);continue;case F.COMMENT_ENDED:">"!==s?(m(e,"Malformed comment"),e.comment+="--"+s,e.state=F.COMMENT):e.state=F.TEXT;continue;case F.CDATA:"]"===s?e.state=F.CDATA_ENDING:e.cdata+=s;continue;case F.CDATA_ENDING:"]"===s?e.state=F.CDATA_ENDING_2:(e.cdata+="]"+s,e.state=F.CDATA);continue;case F.CDATA_ENDING_2:">"===s?(e.cdata&&c(e,"oncdata",e.cdata),c(e,"onclosecdata"),e.cdata="",e.state=F.TEXT):"]"===s?e.cdata+="]":(e.cdata+="]]"+s,e.state=F.CDATA);continue;case F.PROC_INST:"?"===s?e.state=F.PROC_INST_ENDING:l(I,s)?e.state=F.PROC_INST_BODY:e.procInstName+=s;continue;case F.PROC_INST_BODY:if(!e.procInstBody&&l(I,s))continue;"?"===s?e.state=F.PROC_INST_ENDING:e.procInstBody+=s;continue;case F.PROC_INST_ENDING:">"===s?(c(e,"onprocessinginstruction",{name:e.procInstName,body:e.procInstBody}),e.procInstName=e.procInstBody="",e.state=F.TEXT):(e.procInstBody+="?"+s,e.state=F.PROC_INST_BODY);continue;case F.OPEN_TAG:l(L,s)?e.tagName+=s:(v(e),">"===s?x(e):"/"===s?e.state=F.OPEN_TAG_SLASH:(h(I,s)&&m(e,"Invalid character in tag name"),e.state=F.ATTRIB));continue;case F.OPEN_TAG_SLASH:">"===s?(x(e,!0),C(e)):(m(e,"Forward-slash in opening tag not followed by >"),e.state=F.ATTRIB);continue;case F.ATTRIB:if(l(I,s))continue;">"===s?x(e):"/"===s?e.state=F.OPEN_TAG_SLASH:l(H,s)?(e.attribName=s,e.attribValue="",e.state=F.ATTRIB_NAME):m(e,"Invalid attribute name");continue;case F.ATTRIB_NAME:"="===s?e.state=F.ATTRIB_VALUE:">"===s?(m(e,"Attribute without value"),e.attribValue=e.attribName,b(e),x(e)):l(I,s)?e.state=F.ATTRIB_NAME_SAW_WHITE:l(L,s)?e.attribName+=s:m(e,"Invalid attribute name");continue;case F.ATTRIB_NAME_SAW_WHITE:if("="===s)e.state=F.ATTRIB_VALUE;else{if(l(I,s))continue;m(e,"Attribute without value"),e.tag.attributes[e.attribName]="",e.attribValue="",c(e,"onattribute",{name:e.attribName,value:""}),e.attribName="",">"===s?x(e):l(H,s)?(e.attribName=s,e.state=F.ATTRIB_NAME):(m(e,"Invalid attribute name"),e.state=F.ATTRIB)}continue;case F.ATTRIB_VALUE:if(l(I,s))continue;l(N,s)?(e.q=s,e.state=F.ATTRIB_VALUE_QUOTED):(m(e,"Unquoted attribute value"),e.state=F.ATTRIB_VALUE_UNQUOTED,e.attribValue=s);continue;case F.ATTRIB_VALUE_QUOTED:if(s!==e.q){"&"===s?e.state=F.ATTRIB_VALUE_ENTITY_Q:e.attribValue+=s;continue}b(e),e.q="",e.state=F.ATTRIB;continue;case F.ATTRIB_VALUE_UNQUOTED:if(h(M,s)){"&"===s?e.state=F.ATTRIB_VALUE_ENTITY_U:e.attribValue+=s;continue}b(e),">"===s?x(e):e.state=F.ATTRIB;continue;case F.CLOSE_TAG:if(e.tagName)">"===s?C(e):l(L,s)?e.tagName+=s:e.script?(e.script+="</"+e.tagName,e.tagName="",e.state=F.SCRIPT):(h(I,s)&&m(e,"Invalid tagname in closing tag"),e.state=F.CLOSE_TAG_SAW_WHITE);else{if(l(I,s))continue;h(H,s)?e.script?(e.script+="</"+s,e.state=F.SCRIPT):m(e,"Invalid tagname in closing tag."):e.tagName=s}continue;case F.CLOSE_TAG_SAW_WHITE:if(l(I,s))continue;">"===s?C(e):m(e,"Invalid characters in closing tag");continue;case F.TEXT_ENTITY:case F.ATTRIB_VALUE_ENTITY_Q:case F.ATTRIB_VALUE_ENTITY_U:switch(e.state){case F.TEXT_ENTITY:var r=F.TEXT,u="textNode";break;case F.ATTRIB_VALUE_ENTITY_Q:var r=F.ATTRIB_VALUE_QUOTED,u="attribValue";break;case F.ATTRIB_VALUE_ENTITY_U:var r=F.ATTRIB_VALUE_UNQUOTED,u="attribValue"}";"===s?(e[u]+=w(e),e.entity="",e.state=r):l(E,s)?e.entity+=s:(m(e,"Invalid character entity"),e[u]+="&"+e.entity+s,e.entity="",e.state=r);continue;default:throw Error(e,"Unknown state: "+e.state)}return e.position>=e.bufferCheckPosition&&n(e),e}t.parser=function(t,n){return new e(t,n)},t.SAXParser=e,t.SAXStream=o,t.createStream=s,t.MAX_BUFFER_LENGTH=65536;var S=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){this.__proto__=t}return e.prototype=t,new e}),Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),e.prototype={end:function(){f(this)},write:_,resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{var P=require("stream").Stream}catch(T){var P=function(){}}var k=t.EVENTS.filter(function(t){return"error"!==t&&"end"!==t});o.prototype=Object.create(P.prototype,{constructor:{value:o}}),o.prototype.write=function(t){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(t)){if(!this._decoder){var e=require("string_decoder").StringDecoder;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(""+t),this.emit("data",t),!0},o.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},o.prototype.on=function(t,e){var n=this;return!n._parser["on"+t]&&-1!==k.indexOf(t)&&(n._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),n.emit.apply(n,e)}),P.prototype.on.call(n,t,e)};var I="\r\n ",R="0124356789",A="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",N="'\"",E=R+A+"#",M=I+">",D="[CDATA[",B="DOCTYPE",O="http://www.w3.org/XML/1998/namespace",$="http://www.w3.org/2000/xmlns/",z={xml:O,xmlns:$};I=a(I),R=a(R),A=a(A);var H=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,L=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;N=a(N),E=a(E),M=a(M);var F=0;t.STATE={BEGIN:F++,TEXT:F++,TEXT_ENTITY:F++,OPEN_WAKA:F++,SGML_DECL:F++,SGML_DECL_QUOTED:F++,DOCTYPE:F++,DOCTYPE_QUOTED:F++,DOCTYPE_DTD:F++,DOCTYPE_DTD_QUOTED:F++,COMMENT_STARTING:F++,COMMENT:F++,COMMENT_ENDING:F++,COMMENT_ENDED:F++,CDATA:F++,CDATA_ENDING:F++,CDATA_ENDING_2:F++,PROC_INST:F++,PROC_INST_BODY:F++,PROC_INST_ENDING:F++,OPEN_TAG:F++,OPEN_TAG_SLASH:F++,ATTRIB:F++,ATTRIB_NAME:F++,ATTRIB_NAME_SAW_WHITE:F++,ATTRIB_VALUE:F++,ATTRIB_VALUE_QUOTED:F++,ATTRIB_VALUE_UNQUOTED:F++,ATTRIB_VALUE_ENTITY_Q:F++,ATTRIB_VALUE_ENTITY_U:F++,CLOSE_TAG:F++,CLOSE_TAG_SAW_WHITE:F++,SCRIPT:F++,SCRIPT_ENDING:F++},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(e){var n=t.ENTITIES[e],i="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=i});for(var F in t.STATE)t.STATE[t.STATE[F]]=F;F=t.STATE}("undefined"==typeof exports?sax={}:exports),define("sax",function(t){return function(){var e;return e||t.sax}}(this)),define("filters/osis",["sax","bcv"],function(t,e){function n(t,n){var i="";return i=""!==e.parse(t).osis()?'<a href="?type=crossReference&osisRef='+e.parse(t).osis()+"&n="+n.attributes.n+'">'+t+"</a>":t}var i={},s=t.parser(!0),o={headings:!1,footnotes:!1,strongsNumbers:!1,wordsOfChristInRed:!1,oneVersePerLine:!1};return i.processText=function(t,e,i){i&&i!=={}?(i.headings=i.headings?i.headings:o.headings,i.footnotes=i.footnotes?i.footnotes:o.footnotes,i.strongsNumbers=i.strongsNumbers?i.strongsNumbers:o.strongsNumbers,i.wordsOfChristInRed=i.wordsOfChristInRed?i.wordsOfChristInRed:o.wordsOfChristInRed,i.oneVersePerLine=i.oneVersePerLine?i.oneVersePerLine:o.oneVersePerLine):i=o;var a="",r=null,l=null,h=null,u=null,c="",d="",p="";s.onerror=function(){s.resume()},s.ontext=function(t){if(l)i.footnotes&&"crossReference"===l.attributes.type&&(d+="reference"!==a?n(t,l):'<a href="?type=crossReference&osisRef='+h.attributes.osisRef+"&n="+l.attributes.n+'">'+t+"</a>");else if(r)switch(r.name){case"title":d="section"===r.attributes.type?"<h3>"+t+"</h3>"+d:"<h1>"+t+"</h1>"+d;break;default:d+=t}else d+=t},s.onopentag=function(t){switch(r=t,a=t.name,t.name){case"xml":u={osisRef:t.attributes.osisRef,verseNum:t.attributes.verseNum},d+="RtoL"===e?"<span dir='rtl'><a href=\"?type=verseNum&osisRef="+u.osisRef+"\" class='verse-number'> "+u.verseNum+" </a><span dir='rtl'>":'<a href="?type=verseNum&osisRef='+u.osisRef+"\" class='verse-number'> "+u.verseNum+" </a>";break;case"note":"crossReference"===t.attributes.type&&i.footnotes&&(d+="["),l=t;break;case"reference":h=t}},s.onclosetag=function(t){switch(t){case"title":r=null;break;case"note":"crossReference"===l.attributes.type&&i.footnotes&&(d+="] "),c="",l=null;break;case"reference":h=null;break;case"xml":"RtoL"===e&&(d+="</span>")}a=""},s.onattribute=function(){},s.onend=function(){};for(var g="",f=0;t.length>f;f++)g="<xml osisRef='"+t[f].osis+"' verseNum = '"+t[f].verse+"'>"+t[f].text+"</xml>",s.write(g),s.close(),p+=i.oneVersePerLine?"<div class='verse' id = '"+t[f].osis+"'>"+d+"</div>":"<span class='verse' id = '"+t[f].osis+"'>"+d+"</span>",d="";return"RtoL"===e&&(p="<div style='text-align: right;'>"+p+"</div>"),p},i}),define("filters/plain",[],function(){var t={},e={oneVersePerLine:!1};return t.processText=function(t,n,i){var s="";i&&i!=={}?i.oneVersePerLine=i.oneVersePerLine?i.oneVersePerLine:e.oneVersePerLine:i=e;for(var o=0;t.length>o;o++)outText="RtoL"!==n?'<a href="?type=verseNum&osisRef='+t[o].osis+"\" class='verse-number'> "+t[o].verse+" </a>":"<span dir='rtl'><a href=\"?type=verseNum&osisRef="+t[o].osis+"\" class='verse-number'> "+t[o].verse+" </a></span>",outText+="RtoL"!==n?t[o].text:"<span dir='rtl'>"+t[o].text+"</span>",s+=i.oneVersePerLine?"<div class='verse' id = '"+t[o].osis+"'>"+outText+"</div>":"<span class='verse' id = '"+t[o].osis+"'>"+outText+"</span>",outText="";return"RtoL"===n&&(s="<div style='text-align: right;'>"+s+"</div>"),s},t}),define("filterMgr",["filters/osis","filters/plain"],function(t,e){function n(n,i,s,o){return"osis"===i.toLowerCase()?t.processText(n,s,o):e.processText(n,s,o)}return{processText:n}}),define("swmodule",["dataMgr","verseKey","zText","filterMgr","versificationMgr"],function(t,e,n,i,s){function o(t,e,n){if(!(this instanceof o))throw new TypeError("Module constructor cannot be called as a function.");this.modKey=t,this.id=e,this.config=n}function a(e,n){t.getBlob(e,n)}return o.create=function(t,e,n){return new o(t,e,n)},o.prototype={constructor:o,self:this,renderText:function(s,o,r){var l=null,h=null,u=this;"function"==typeof o&&(r=o);var c=e.parseVerseList(s,this.config.Versification);0!==c.length&&""!==c[0].osis?t.get(u.config.bcvPosID,function(t,e){t?r(t):(e.nt&&e.nt.hasOwnProperty(c[0].book)?(l=e.nt[c[0].book],h=u.config.nt):e.ot&&e.ot.hasOwnProperty(c[0].book)&&(l=e.ot[c[0].book],h=u.config.ot),null===l&&r({message:"Wrong passage. The requested chapter is not available in this module."}),a(h,function(t,e){t||n.getRawEntry(e,l,c,u.config.Encoding,function(t,e){t?r(t):r(null,i.processText(e,u.config.SourceType,u.config.Direction,o))})}))}):r({message:"Wrong passage. The requested chapter is not available in this module."})},getAllBooks:function(){return s.getAllBooks(this.config.Versification)},getVersesInChapter:function(t){return s.getVersesInChapter(s.getBookNum(t.split(".")[0],this.config.Versification),t.split(".")[1],this.config.Versification)}},o}),define("moduleMgr",["dataMgr","swmodule"],function(t,e){var n={};return n.getModules=function(n){var i=[];t.getModules(function(t,s){t?n(t):(s.forEach(function(t){i.push(new e(t.moduleKey,t.id,t))}),n(null,i))})},n.getModule=function(n,i){t.get(n,function(t,s){t?i(null):i(null,new e(s.moduleKey,n,s))})},n}),require.config({paths:{text:"libs/text/text",json:"libs/json/src/json",async:"libs/async/lib/async",bcv:"libs/bible-reference-parser/js/en_bcv_parser.min",unzip:"libs/zlib/bin/unzip.min",inflateStream:"libs/zlib/bin/inflate_stream.min",sax:"libs/sax/lib/sax",idb:"libs/IDBWrapper/idbstore.min"},shim:{bcv:{exports:"bcv_parser",init:function(){return new this.bcv_parser}},unzip:{exports:"Zlib"},inflateStream:{exports:"Zlib"},sax:{exports:"sax"}}}),define("sword",["installMgr","moduleMgr","dataMgr","versificationMgr","verseKey"],function(t,e,n,i,s){var o={};return o.installMgr=t,o.moduleMgr=e,o.versificationMgr=i,o.dataMgr=n,o.verseKey=s,o.isSupported=function(){var t={}.toString,e=[],n="[object Function]";return window.FileReader&&t.call(e.forEach)==n?!0:!1},o}),require("sword")}); // source/api.js -var api={isInitialized:!1,db:null,wrapper:function(t){if(this.isInitialized)t(null,db);else{var e=sword.dataMgr.getIDBWrapper(),n=this;db=new e({storeName:"biblez",dbVersion:1,onStoreReady:function(){n.isInitialized=!0,t&&t(null,db)},onError:function(e){n.isInitialized=!1,t&&t(e)}})}},put:function(t,e){this.wrapper(function(n,i){i.put(t,function(t){e&&e(null,t)},function(t){e&&e(t)})})},get:function(t,e){this.wrapper(function(n,i){i.get(t,function(t){e&&e(null,t)},function(t){e&&e(t)})})}}; +var api={isInitialized:!1,db:null,isBmInitialized:!1,bmStore:null,isNoteInitialized:!1,noteStore:null,isHlInitialized:!1,hlStore:null,wrapper:function(t){if(this.isInitialized)t(null,db);else{var e=sword.dataMgr.getIDBWrapper(),n=this;db=new e({storeName:"biblez",dbVersion:3,onStoreReady:function(){n.isInitialized=!0,t&&t(null,db)},onError:function(e){n.isInitialized=!1,t&&t(e)}})}},bmWrapper:function(t){if(this.isBmInitialized)t(null,bmStore);else{var e=sword.dataMgr.getIDBWrapper(),n=this;bmStore=new e({storeName:"bookmarks",keyPath:"id",autoIncrement:!0,dbVersion:1,onStoreReady:function(){n.isBmInitialized=!0,t&&t(null,bmStore)},onError:function(e){n.isBmInitialized=!1,t&&t(e)}})}},_put:function(t,e,n){t.put(e,function(t){n&&n(null,t)},function(t){n&&n(t)})},put:function(t,e){this.wrapper(enyo.bind(this,function(n,i){n?e(n):this._put(i,t,e)}))},putBookmark:function(t,e){this.bmWrapper(enyo.bind(this,function(n,i){n?e(n):this._put(i,t,enyo.bind(this,function(n,i){n?e(n):this.get(t.osisRef,enyo.bind(this,function(n,s){n?e(n):(void 0===s&&(s={id:t.osisRef}),s.bookmarkId=i,this.put(s,e))}))}))}))},_get:function(t,e,n){t.get(e,function(t){n&&n(null,t)},function(t){n&&n(t)})},_getAll:function(t,e){t.getAll(function(t){e&&e(null,t)},function(t){e&&e(t)})},get:function(t,e){this.wrapper(enyo.bind(this,function(n,i){n?e(n):this._get(i,t,e)}))},getAll:function(t){this.wrapper(enyo.bind(this,function(e,n){e?t(e):this._getAll(n,t)}))},getBookmark:function(t,e){this.bmWrapper(enyo.bind(this,function(n,i){n?e(n):this._get(i,t,e)}))},getAllBookmarks:function(t){this.bmWrapper(enyo.bind(this,function(e,n){e?t(e):this._getAll(n,t)}))},getUserData:function(t,e,n){var i=1,s={};t=2===t.split(".").length?t:t.split(".")[0]+"."+t.split(".")[1];for(var o=1;e+1>o;o++)this.get(t+"."+o,function(t,o){t?n(t):(o&&o.bookmarkId&&(s[o.id]=o),i===e?n(null,s):i++)})},_remove:function(t,e,n){t.remove(e,function(){n&&n(null)},function(t){n&&n(t)})},removeBookmark:function(t,e){this.bmWrapper(enyo.bind(this,function(n,i){n?e(n):this._remove(i,t.id,enyo.bind(this,function(n){n?e(n):this.get(t.osisRef,enyo.bind(this,function(t,n){t?e(t):void 0!==n?(delete n.bookmarkId,this.put(n,e)):e({message:"api.removeBookmark: Couldn't remove bookmarkId from osisObject"})}))}))}))}}; // source/mapping.js var languages={af:"Afrikaans",am:"Amharic",ang:"Old English (ca. 450-1100)",ar:"Arabic",as:"Assamese",az:"Azerbaijani",azb:"South Azerbaijani",bal:"Balochi",bar:"Bavarian",be:"Belarusian",bg:"Bulgarian",bn:"Bengali",bn_IN:"Bengali (India)",br:"Breton",bs:"Bosnian","ca@valencia":"Catalan (Valencian)",ch:"Chamorro",chr:"Cherokee",ckb:"Central Kurdish",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",de_CH:"Swiss German",dz:"Dzongkha",el:"Greek",en:"English",en_GB:"English (United Kingdom)",en_ZA:"English (South Africa)",enm:"Middle English (1100-1500)",es:"Spanish (Castilian)",et:"Estonian",eu:"Basque",fa:"Persian",fi:"Finnish",fr:"French",fur:"Friulian",fy:"Western Frisian",ga:"Irish",gl:"Galician",got:"Gothic",grc:"Ancient Greek (to 1453)",gu:"Gujarati",gv:"Manx",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hr:"Croatian",ht:"Haitian (Haitian Creole)",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ilo:"Iloko",is:"Icelandic",it:"Italian",itz:"Itz\u00e1",ja:"Japanese",ka:"Georgian",kek:"Kekch\u00ed",kn:"Kannada",ko:"Korean",ku:"Kurdish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mai:"Maithili",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",my:"Burmese",nb:"Norwegian Bokm\u00e5l",nd:"North Ndebele",ne:"Nepali",nl:"Dutch (Netherlands)",nn:"Norwegian Nynorsk",no:"Norwegian",nso:"Northern Sotho",or:"Oriya",pa:"Panjabi (Punjabi)",pl:"Polish",pot:"Potawatomi",ppk:"Uma",pt:"Portuguese",pt_BR:"Portuguese (Brazilian)",rmk:"Cal\u00f3",ro:"Romanian",ru:"Russian",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr@latin":"Serbian (Latin)",srn:"Sranan Tongo",st:"Sotho, Southern",sv:"Swedish",syr:"Syriac",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tl:"Tagalog",tlh:"Klingon",tn:"Tswana",tr:"Turkish",ty:"Tahitian",ur:"Urdu",ury:"Orya",uk:"Ukrainian",vi:"Vietnamese",wo:"Wolof",zh:"Chinese",zh_CN:"Chinese (China)",zh_HK:"Chinese (Hong Kong)",zh_TW:"Chinese (Taiwan)",zu:"Zulu",es_AR:"Spanish (Argentinian)",bo:"Tibetan",ast:"Asturian",en_US:"English (United States)",eo:"Esperanto",ks:"Kashmiri",ky:"Kirgyz",la:"Latin",xh:"Xhosa",es_MX:"Spanish (Mexican)",km:"Khmer",fo:"Faroese",kk:"Kazakh",nl_BE:"Dutch (Belgium/Flemish)",ca:"Catalan",tk:"Turkmen",uz:"Uzbek",bn_BD:"Bengali (Bangladesh)",sw:"Swahili",sco:"Scots",lb:"Luxembourgish",ln:"Lingala",tt:"Tatar",fil:"Filipino",gun:"Gun",pms:"Piemontese",arn:"Mapudungun",rm:"Romansh",wa:"Walloon",jv:"Javanese",oc:"Occitan (post 1500)",ps:"Pushto",ha:"Hausa",mg:"Malagasy",mi:"Maori",ug:"Uighur",ak:"Akan",an:"Aragonese",su:"Sundanese",pap:"Papiamento",nah:"Nahuatl",csb:"Kashubian",nap:"Neapolitan",kw:"Cornish",ve:"Venda",son:"Songhay",en_CA:" English (Canada)",rw:"Kinyarwanda",crh:"Crimean Turkish",li:"Limburgian",es_VE:"Spanish (Venezuela)",frp:"Franco-Proven\u00e7al (Arpitan)",yi:"Yiddish",es_ES:"Spanish (Spain)",fr_FR:"French (France)",de_DE:"German (Germany)",yo:"Yoruba",ig:"Igbo",es_PR:"Spanish (Puerto Rico)",nds:"Low German",nr:"Ndebele, South",gd:"Gaelic, Scottish",es_CL:"Spanish (Chile)",en_IE:"English (Ireland)",ta_LK:"Tamil (Sri-Lanka)",se:"Northern Sami",hsb:"Upper Sorbian",hne:"Chhattisgarhi",en_AU:"English (Australia)",fr_CA:"French (Canada)",ia:"Interlingua"},mappings={texts:$L("Biblical Texts"),lexdict:$L("Lexicons / Dictionaries"),genbook:$L("Generic Books"),comments:$L("Commentaries")}; // source/bcSelector.js -enyo.kind({name:"biblez.bcSelector",kind:"enyo.FittableRows",events:{onSelect:"",onBack:""},classes:"enyo-fit",published:{module:null},components:[{name:"bcPanel",kind:"Panels",arrangerKind:"CardArranger",fit:!0,components:[{name:"bookPanel",kind:"enyo.FittableRows",components:[{kind:"onyx.Toolbar",components:[{kind:"onyx.IconButton",src:"assets/back.png",ontap:"doBack"},{content:$L("Books")}]},{kind:"enyo.Scroller",fit:!0,touch:!0,components:[{name:"bookRepeater",kind:"Repeater",count:0,onSetupItem:"setBookItems",components:[{name:"bookItem",classes:"bc-item",ontap:"handleBook"}]}]}]},{name:"chapterPanel",kind:"enyo.FittableRows",components:[{kind:"onyx.Toolbar",components:[{kind:"onyx.IconButton",src:"assets/back.png",ontap:"handleBack"},{content:$L("Chapters")}]},{kind:"enyo.Scroller",fit:!0,touch:!0,components:[{name:"chapterRepeater",kind:"Repeater",count:0,onSetupItem:"setChapterItems",components:[{name:"chapterItem",classes:"bc-item",ontap:"handleChapter"}]}]}]}]}],books:[],currentBook:null,setPanel:function(t){this.$.bcPanel.setIndex(t)},handleBack:function(){this.$.bcPanel.setIndex(0)},moduleChanged:function(){this.books=this.module.getAllBooks(),this.$.bookRepeater.setCount(this.books.length)},setBookItems:function(t,e){e.item.$.bookItem.setContent(this.books[e.index].abbrev.slice(0,4))},handleBook:function(t,e){this.currentBook=this.books[e.index],this.$.chapterRepeater.setCount(this.currentBook.maxChapter),this.$.bcPanel.setIndex(1)},setChapterItems:function(t,e){e.item.$.chapterItem.setContent(e.index+1)},handleChapter:function(t,e){this.doSelect({book:this.currentBook,chapter:e.index+1,osis:this.currentBook.abbrev+"."+(e.index+1)})}}); +enyo.kind({name:"biblez.bcSelector",kind:"enyo.FittableRows",events:{onSelect:"",onBack:""},classes:"enyo-fit",published:{module:null},components:[{name:"bcPanel",kind:"Panels",arrangerKind:"CardArranger",fit:!0,components:[{name:"bookPanel",kind:"enyo.FittableRows",components:[{kind:"onyx.Toolbar",components:[{kind:"onyx.IconButton",src:"assets/back.png",ontap:"doBack"},{content:$L("Books")}]},{kind:"enyo.Scroller",fit:!0,touch:!0,components:[{name:"bookRepeater",kind:"Repeater",count:0,onSetupItem:"setBookItems",components:[{name:"bookItem",classes:"bc-item onyx-button",ontap:"handleBook"}]}]}]},{name:"chapterPanel",kind:"enyo.FittableRows",components:[{kind:"onyx.Toolbar",components:[{kind:"onyx.IconButton",src:"assets/back.png",ontap:"handleBack"},{content:$L("Chapters")}]},{kind:"enyo.Scroller",fit:!0,touch:!0,components:[{name:"chapterRepeater",kind:"Repeater",count:0,onSetupItem:"setChapterItems",components:[{name:"chapterItem",classes:"bc-item onyx-button",ontap:"handleChapter"}]}]}]}]}],books:[],currentBook:null,setPanel:function(t){this.$.bcPanel.setIndex(t)},handleBack:function(){this.$.bcPanel.setIndex(0)},moduleChanged:function(){this.books=this.module.getAllBooks(),this.$.bookRepeater.setCount(this.books.length)},setBookItems:function(t,e){39===e.index&&e.item.$.bookItem.addStyles("clear: both;"),e.index>=39?e.item.$.bookItem.addClass("books-nt"):e.item.$.bookItem.addClass("books-ot"),e.item.$.bookItem.setContent(this.books[e.index].abbrev.slice(0,4))},handleBook:function(t,e){this.currentBook=this.books[e.index],this.$.chapterRepeater.setCount(this.currentBook.maxChapter),this.$.bcPanel.setIndex(1)},setChapterItems:function(t,e){e.item.$.chapterItem.setContent(e.index+1)},handleChapter:function(t,e){this.doSelect({book:this.currentBook,chapter:e.index+1,osis:this.currentBook.abbrev+"."+(e.index+1),label:this.currentBook.abbrev+" "+(e.index+1)}),this.$.bcPanel.setIndex(0)}}); // source/main.js -enyo.kind({name:"biblez.main",kind:"FittableRows",fit:!0,events:{onOpenModuleManager:"",onModuleChanged:"",onOpenBC:""},published:{passage:""},components:[{kind:"Signals",onOrientationChange:"handleOrientation"},{kind:"biblez.versePopup",name:"versePopup"},{name:"messagePopup",kind:"onyx.Popup",centered:!0,floating:!0,classes:"message-popup"},{kind:"onyx.MoreToolbar",name:"topTB",components:[{name:"moduleSelector",kind:"onyx.MenuDecorator",onSelect:"moduleSelected",components:[{kind:"onyx.Button",name:"btnModules",style:"background-color: #934A15;"},{kind:"onyx.Menu",name:"moduleMenu"}]},{kind:"onyx.Button",name:"btnPassage",ontap:"handleBcSelector"},{fit:!0},{name:"plus",kind:"onyx.IconButton",src:"assets/add.png",style:"position:absolute;right:0;",ontap:"doOpenModuleManager"},{name:"bcPopup",classes:"biblez-bc-popup",kind:"onyx.Popup",modal:!0,floating:!0,components:[{kind:"biblez.bcSelector",name:"bcSelector",onSelect:"passageChanged",onBack:"closePopup"}]}]},{name:"mainPanel",kind:"Panels",fit:!0,ondragfinish:"handleChangeChapter",onTransitionStart:"handlePanelIndex",arrangerKind:"LeftRightArranger",margin:0,classes:"background",components:[{},{kind:"FittableColumns",noStretch:!0,components:[{fit:!0},{content:"< Previous",classes:"chapter-nav chapter-nav-left"}]},{name:"verseScroller",kind:"enyo.Scroller",touch:!0,fit:!0,components:[{classes:"center",components:[{kind:"onyx.Spinner",name:"spinner",classes:"onyx-light center"}]},{name:"main",classes:"verse-view",allowHtml:!0,onclick:"handleVerseTap"}]},{kind:"FittableColumns",noStretch:!0,components:[{content:"Next >",classes:"chapter-nav chapter-nav-right"},{fit:!0}]},{}]}],currentModule:null,currentPassage:"Matt 1",modules:[],panelIndex:2,settings:{id:"settings"},create:function(){this.inherited(arguments),this.$.spinner.stop(),api.get("settings",enyo.bind(this,function(t,e){t?this.handleError("Couldn't load settings!"):(this.settings=e?e:this.settings,this.getInstalledModules())})),this.$.mainPanel.setIndexDirect(2)},rendered:function(){this.inherited(arguments)},getInstalledModules:function(){sword.moduleMgr.getModules(enyo.bind(this,function(t,e){t?this.handleError(t):0!==e.length?(this.$.moduleSelector.show(),this.$.btnPassage.show(),this.modules=e,this.renderModuleMenu(this.modules)):(this.$.moduleSelector.hide(),this.$.btnPassage.hide(),this.$.main.setContent("<center>"+$L("You have no modules installed. Tap on the '+' to install one!</center>")))}))},renderModuleMenu:function(t){if(t||(t=this.modules),this.settings)var e=this.settings.lastModule;this.$.moduleMenu.destroyClientControls();var n=[];this.modules.forEach(enyo.bind(this,function(t,i){e&&e===t.modKey?(this.$.btnModules.setContent(e),n.push({active:!0,components:[{content:t.config.moduleKey,index:i},{kind:"onyx.IconButton",src:"assets/checkmark.png",style:"float: right;"}]}),this.currentModule=t):n.push({content:t.config.moduleKey,index:i})})),null===this.currentModule&&(this.currentModule=this.modules[0],n[0].active=!0,this.$.btnModules.setContent(this.currentModule.modKey)),this.$.moduleMenu.createComponents(n,{owner:this.$.moduleMenu}),this.$.moduleMenu.render(),this.doModuleChanged({module:this.currentModule}),enyo.platform.firefox&&this.$.bcSelector.setModule(this.currentModule),this.settings&&(this.currentPassage=this.settings.lastRead?this.settings.lastRead:this.currentPassage),this.handlePassage()},moduleSelected:function(t,e){isNaN(e.originator.index)||(this.currentModule=this.modules[e.originator.index],this.settings.lastModule=this.currentModule.modKey,this.handleUnload(),this.renderModuleMenu())},passageChanged:function(t,e){this.$.bcPopup.hide(),this.currentPassage=e.book.abbrev+" "+e.chapter,this.handlePassage(e.osis)},handlePassage:function(t){this.$.main.setContent(""),this.$.spinner.start(),this.currentPassage=t?t:this.currentPassage,this.settings.lastRead=this.currentPassage,this.handleUnload(),this.$.btnPassage.setContent(this.currentPassage.replace("."," ")),this.currentModule.renderText(this.currentPassage,{oneVersePerLine:!1},enyo.bind(this,function(t,e){this.$.spinner.stop(),t?this.handleError(t.message):(this.$.verseScroller.scrollToTop(),this.$.main.setContent(e))}))},handleBcSelector:function(t,e){enyo.platform.firefox?(this.$.bcPopup.showAtEvent(e),this.$.bcSelector.setPanel(0)):this.doOpenBC()},closePopup:function(){this.$.bcPopup.hide()},handleChangeChapter:function(){this.currentModule&&(1===this.panelIndex?this.handlePassage(sword.verseKey.previous(this.currentPassage,this.currentModule.config.Versification).osis):3===this.panelIndex&&this.handlePassage(sword.verseKey.next(this.currentPassage,this.currentModule.config.Versification).osis)),this.$.mainPanel.setIndexDirect(2)},handleVerseTap:function(t,e){e.preventDefault();var n={};if(e.target.href){var i=e.target.href;i.split("?")[1].split("&").forEach(function(t){t=t.split("="),n[t[0]]=t[1]})}return"verseNum"===n.type&&(console.log(n.osisRef),this.$.versePopup.showAtEvent(e)),!0},handlePanelIndex:function(t,e){this.panelIndex=e.toIndex},handleOrientation:function(){var t=screen.mozOrientation;"portrait-primary"===t||"portrait-secondary"===t?this.$.topTB.show():("landscape-primary"===t||"landscape-secondary"===t)&&this.$.topTB.hide()},handleUnload:function(){api.put(this.settings)},handleError:function(t){this.$.messagePopup.setContent(t),this.$.messagePopup.show()}}); +enyo.kind({name:"biblez.main",kind:"FittableRows",fit:!0,events:{onOpenModuleManager:"",onModuleChanged:"",onOpenBC:""},published:{passage:""},components:[{kind:"Signals",onOrientationChange:"handleOrientation"},{kind:"biblez.versePopup",name:"versePopup",onBookmark:"handleBookmark"},{name:"messagePopup",kind:"onyx.Popup",centered:!0,floating:!0,classes:"message-popup"},{kind:"onyx.MoreToolbar",name:"topTB",components:[{name:"moduleSelector",kind:"onyx.MenuDecorator",onSelect:"moduleSelected",components:[{kind:"onyx.Button",name:"btnModules",style:"background-color: #934A15;"},{kind:"onyx.Menu",name:"moduleMenu"}]},{kind:"onyx.Button",name:"btnPassage",ontap:"handleBcSelector"},{fit:!0},{name:"plus",kind:"onyx.IconButton",src:"assets/add.png",style:"position:absolute;right:0;",ontap:"doOpenModuleManager"},{name:"bcPopup",classes:"biblez-bc-popup",kind:"onyx.Popup",modal:!0,floating:!0,components:[{kind:"biblez.bcSelector",name:"bcSelector",onSelect:"passageChanged",onBack:"closePopup"}]}]},{name:"mainPanel",kind:"Panels",fit:!0,ondragfinish:"handleChangeChapter",onTransitionStart:"handlePanelIndex",arrangerKind:"LeftRightArranger",margin:0,classes:"background",components:[{},{kind:"FittableColumns",noStretch:!0,components:[{fit:!0},{content:"< Previous",classes:"chapter-nav chapter-nav-left"}]},{name:"verseScroller",kind:"enyo.Scroller",touch:!0,fit:!0,components:[{classes:"center",components:[{kind:"onyx.Spinner",name:"spinner",classes:"onyx-light center"}]},{name:"main",classes:"verse-view",allowHtml:!0,onclick:"handleVerseTap"}]},{kind:"FittableColumns",noStretch:!0,components:[{content:"Next >",classes:"chapter-nav chapter-nav-right"},{fit:!0}]},{}]}],currentModule:null,currentPassage:{osis:"Matt.1",label:"Matt 1"},userData:{},modules:[],panelIndex:2,settings:{id:"settings"},create:function(){this.inherited(arguments),this.$.spinner.stop(),api.get("settings",enyo.bind(this,function(t,e){t?this.handleError("Couldn't load settings!"):(this.settings=e?e:this.settings,this.getInstalledModules())})),this.$.mainPanel.setIndexDirect(2)},rendered:function(){this.inherited(arguments)},getInstalledModules:function(){sword.moduleMgr.getModules(enyo.bind(this,function(t,e){t?this.handleError(t):0!==e.length?(this.$.moduleSelector.show(),this.$.btnPassage.show(),this.modules=e,this.renderModuleMenu(this.modules)):(this.$.moduleSelector.hide(),this.$.btnPassage.hide(),this.$.main.setContent("<center>"+$L("You have no modules installed. Tap on the '+' to install one!</center>")))}))},renderModuleMenu:function(t){if(t||(t=this.modules),this.settings)var e=this.settings.lastModule;this.$.moduleMenu.destroyClientControls();var n=[];this.modules.forEach(enyo.bind(this,function(t,i){e&&e===t.modKey?(this.$.btnModules.setContent(e),n.push({active:!0,components:[{content:t.config.moduleKey,index:i},{kind:"onyx.IconButton",src:"assets/checkmark.png",style:"float: right;"}]}),this.currentModule=t):n.push({content:t.config.moduleKey,index:i})})),null===this.currentModule&&(this.currentModule=this.modules[0],n[0].active=!0,this.$.btnModules.setContent(this.currentModule.modKey)),this.$.moduleMenu.createComponents(n,{owner:this.$.moduleMenu}),this.$.moduleMenu.render(),this.doModuleChanged({module:this.currentModule}),enyo.platform.firefox&&this.$.bcSelector.setModule(this.currentModule),this.settings&&(this.currentPassage=this.settings.lastRead?this.settings.lastRead:this.currentPassage),this.handlePassage()},moduleSelected:function(t,e){isNaN(e.originator.index)||(this.currentModule=this.modules[e.originator.index],this.settings.lastModule=this.currentModule.modKey,this.handleUnload(),this.renderModuleMenu())},passageChanged:function(t,e){this.$.bcPopup.hide(),this.currentPassage.osis=e.osis,this.currentPassage.label=e.label,this.handlePassage()},handlePassage:function(t){this.$.main.setContent(""),this.$.spinner.start(),"string"==typeof t&&(this.currentPassage.osis=t.replace(" ","."),this.currentPassage.label=t.replace("."," ")),this.settings.lastRead=this.currentPassage,this.handleUnload(),this.$.btnPassage.setContent(this.currentPassage.label),this.currentModule.renderText(this.currentPassage.osis,{oneVersePerLine:!1},enyo.bind(this,function(t,e){this.$.spinner.stop(),t?this.handleError(t.message):(this.$.verseScroller.scrollToTop(),this.$.main.setContent(e),this.handleUserData(this.currentPassage.osis))}))},handleUserData:function(t){var e=this.currentModule.getVersesInChapter(t);api.getUserData(t,e,enyo.bind(this,function(t,e){t||(this.userData=e,Object.keys(e).forEach(function(t){e[t].bookmarkId&&!enyo.dom.byId("img"+t)&&enyo.dom.byId(t).insertAdjacentHTML("beforeend"," <img id='img"+t+"' src='assets/bookmark.png' />")}))}))},handleBookmark:function(t,e){if("remove"===e.action){var n=enyo.dom.byId("img"+e.osisRef);n.parentNode.removeChild(n)}this.handleUserData(this.currentPassage.osis)},handleBcSelector:function(t,e){enyo.platform.firefox?this.$.bcPopup.showAtEvent(e):this.doOpenBC()},closePopup:function(){this.$.bcPopup.hide()},handleChangeChapter:function(){this.currentModule&&(1===this.panelIndex?this.handlePassage(sword.verseKey.previous(this.currentPassage.osis,this.currentModule.config.Versification).osis):3===this.panelIndex&&this.handlePassage(sword.verseKey.next(this.currentPassage.osis,this.currentModule.config.Versification).osis)),this.$.mainPanel.setIndexDirect(2)},handleVerseTap:function(t,e){e.preventDefault();var n={};if(e.target.href){var i=e.target.href;i.split("?")[1].split("&").forEach(function(t){t=t.split("="),n[t[0]]=t[1]})}return"verseNum"===n.type&&(this.$.versePopup.setOsisRef(n.osisRef),this.userData.hasOwnProperty(n.osisRef)?this.userData[n.osisRef].bookmarkId?(this.$.versePopup.setBmExists(!0),this.$.versePopup.setBmId(this.userData[n.osisRef].bookmarkId)):this.$.versePopup.setBmExists(!1):(this.$.versePopup.setBmExists(!1),this.$.versePopup.setNoteExists(!1)),this.$.versePopup.setLabels(),this.$.versePopup.showAtEvent(e)),!0},handlePanelIndex:function(t,e){this.panelIndex=e.toIndex},handleOrientation:function(){var t=screen.mozOrientation;"portrait-primary"===t||"portrait-secondary"===t?this.$.topTB.show():("landscape-primary"===t||"landscape-secondary"===t)&&this.$.topTB.hide()},handleUnload:function(){api.put(this.settings)},handleError:function(t){this.$.messagePopup.setContent(t),this.$.messagePopup.show()}}); // source/moduleManager.js enyo.kind({name:"biblez.moduleManager",kind:"enyo.FittableRows",fit:!0,events:{onBack:"",onInstalled:""},components:[{name:"messagePopup",kind:"onyx.Popup",centered:!0,floating:!0,classes:"message-popup"},{name:"scrim",kind:"onyx.Scrim",classes:"onyx-scrim-translucent"},{kind:"onyx.MoreToolbar",components:[{kind:"onyx.IconButton",src:"assets/back.png",ontap:"handleBack"},{content:$L("Module Manager")},{fit:!0},{kind:"onyx.IconButton",src:"assets/delete.png",ontap:"clearDB"}]},{name:"panel",arrangerKind:"CollapsingArranger",fit:!0,kind:"Panels",classes:"app-panels",components:[{name:"panelLang",kind:"enyo.FittableRows",components:[{name:"langList",kind:"List",fit:!0,touch:!0,onSetupItem:"setupLangItem",components:[{classes:"item",ontap:"handleLanguage",components:[{kind:"enyo.FittableColumns",components:[{name:"langShort",classes:"item-left"},{name:"langName",style:"font-style: italic;"}]}]}]}]},{name:"panelModules",kind:"enyo.FittableRows",components:[{name:"modList",kind:"List",fit:!0,touch:!0,onSetupItem:"setupModItem",components:[{classes:"item",ontap:"handleModule",components:[{name:"modName"}]}]}]},{name:"panelDescription",kind:"enyo.FittableRows",components:[{kind:enyo.Scroller,touch:!0,fit:!0,components:[{name:"detailsContainer",showing:!1,classes:"content-container",components:[{name:"detailsName",classes:"title"},{kind:"onyx.Button",ontap:"installModule",name:"btnInstall",classes:"onyx-affirmative",content:$L("Install Module"),style:"margin-left: 10px;"},{name:"detailsDescription",allowHtml:!0,classes:"nice-padding"}]}]}]}]},{kind:"onyx.MoreToolbar",name:"bottomTB",components:[{kind:"onyx.PickerDecorator",components:[{},{name:"repoPicker",kind:"onyx.Picker",onSelect:"handleRepoChange"}]},{kind:"onyx.ProgressBar",name:"progressBar",progress:0,showing:!1,showStripes:!1,fit:!0}]}],lang:[],started:!1,repos:[],modules:[],langModules:[],currentModule:null,start:function(){this.started||(this.$.scrim.show(),api.get("repos",enyo.bind(this,function(t,e){e?this.setupRepoPicker(e.repos,e.currentRepo):this.getRepos()}))),this.started=!0},handleBack:function(){enyo.Panels.isScreenNarrow()?0!==this.$.panel.getIndex()?this.$.panel.previous():this.doBack():this.doBack()},handleRepoChange:function(t,e){this.$.detailsContainer.hide(),this.$.scrim.show(),this.$.modList.setCount(0),this.$.modList.refresh(),this.$.panel.setIndex(0),api.get("repos",enyo.bind(this,function(t,n){t?this.handleError(t):(n.currentRepo=this.repos[e.selected.index],api.put(n))})),this.getRemoteModules(this.repos[e.selected.index])},getRepos:function(){sword.installMgr.getRepositories(enyo.bind(this,function(t,e){t?this.handleError(t):api.put({id:"repos",repos:e,lastRepoUpdate:{time:(new Date).getTime()}},enyo.bind(this,function(t){t?this.handleError(t):this.setupRepoPicker(e)}))}))},setupRepoPicker:function(t,e){var n=[],i=null;t.forEach(function(t,s){e&&t.name===e.name||"CrossWire"===t.name?(n.push({content:t.name,index:s,active:!0}),i=t):n.push({content:t.name,index:s})}),this.repos=t,this.$.repoPicker.createComponents(n,{owner:this}),this.$.repoPicker.render(),e?this.getRemoteModules(e):this.getRemoteModules(i)},getRemoteModules:function(t){api.get("currentModules",enyo.bind(this,function(e,n){e?this.handleError(e):n&&t.name===n.name?(this.modules=n.modules,this.prepareLangList(this.modules)):sword.installMgr.getModules(t,enyo.bind(this,function(e,n){e?this.handleError(e.message?e.message:e):(api.put({id:"currentModules",modules:n,name:t.name},enyo.bind(this,function(t){t&&this.handleError(t)})),this.modules=n,this.prepareLangList(this.modules))}))}))},prepareLangList:function(t){this.lang=[],t.forEach(enyo.bind(this,function(e,n){0===n?this.lang.push({lang:e.Lang}):n>0&&e.Lang!==t[n-1].Lang&&this.lang.push({lang:e.Lang})})),this.$.langList.setCount(this.lang.length),this.$.langList.refresh(),this.$.scrim.hide()},setupLangItem:function(t,e){var n=this.lang[e.index];this.$.langShort.setContent(n.lang),this.$.langName.setContent(languages[n.lang])},handleLanguage:function(t,e){enyo.Panels.isScreenNarrow()&&this.$.panel.next(),this.langModules=[],this.modules.forEach(enyo.bind(this,function(t){t.Lang===this.lang[e.index].lang&&this.langModules.push(t)})),this.$.modList.setCount(this.langModules.length),this.$.modList.refresh()},setupModItem:function(t,e){var n=this.langModules[e.index];this.$.modName.setContent(n.Description)},handleModule:function(t,e){enyo.Panels.isScreenNarrow()&&this.$.panel.next(),this.$.detailsContainer.show();var n=this.langModules[e.index];this.currentModule=n,this.$.detailsName.setContent(n.Description),this.$.detailsDescription.setContent(n.About.replace(/\\par/g,"<br>"))},installModule:function(){console.log(this.currentModule.url),this.$.btnInstall.setDisabled(!0),this.$.progressBar.show(),this.$.bottomTB.render(),sword.installMgr.installModule(this.currentModule.url,enyo.bind(this,function(t){t?this.handleError(t.message?t.message:t):this.doInstalled(),this.$.progressBar.hide(),this.$.progressBar.setProgress(0),this.$.btnInstall.setDisabled(!1)}),enyo.bind(this,function(t){this.$.progressBar.animateProgressTo(100*(t.loaded/t.total))}))},clearDB:function(){sword.dataMgr.clearDatabase()},handleError:function(t){t.message&&(t=t.message),this.$.messagePopup.setContent(t),this.$.messagePopup.show()}}); @@ -227,7 +227,7 @@ enyo.kind({name:"biblez.moduleManager",kind:"enyo.FittableRows",fit:!0,events:{o enyo.kind({name:"biblez.moduleManagerDesktop",kind:"enyo.FittableRows",fit:!0,events:{onBack:"",onInstalled:""},components:[{name:"messagePopup",kind:"onyx.Popup",scrim:!0,centered:!0,floating:!0,classes:"message-popup"},{name:"scrim",kind:"onyx.Scrim",classes:"onyx-scrim-translucent"},{kind:"onyx.MoreToolbar",components:[{kind:"onyx.IconButton",src:"assets/back.png",ontap:"handleBack"},{content:$L("Module Manager")},{fit:!0},{kind:"onyx.IconButton",src:"assets/delete.png",ontap:"clearDB"}]},{classes:"center",components:[{content:$L("Download a zipped module from one of the following repositories:")},{allowHtml:!0,content:"<ul><li><a target='_blank' href='http://www.crosswire.org/sword/modules/ModDisp.jsp?modType=Bibles'>CrossWire Main</a></li><li><a target='_blank' href='http://www.crosswire.org/sword/modules/ModDisp.jsp?modType=Bibles&av=true'>CrossWire av11n</a></li><li><a target='_blank' href='http://www.crosswire.org/sword/modules/ModDisp.jsp?modType=Bibles&beta=true'>CrossWire Beta</a></li></ul>"},{content:$L("To install the module, select the module file!")},{kind:"onyx.Input",type:"file",id:"files",name:"files[]",onchange:"installModule"},{tag:"br"},{kind:"onyx.Spinner",name:"spinner",showing:!1,classes:"onyx-light center"}]}],lang:[],started:!1,repos:[],modules:[],langModules:[],currentModule:null,handleBack:function(){this.doBack()},installModule:function(t,e){this.$.spinner.start(),sword.installMgr.installModule(e.target.files[0],enyo.bind(this,function(t){t?this.handleError(t.message?t.message:t):(this.doInstalled(),this.$.spinner.stop(),this.handleError("Installed Module!"))}))},clearDB:function(){sword.dataMgr.clearDatabase()},handleError:function(t){t.message&&(t=t.message),this.$.messagePopup.setContent(t),this.$.messagePopup.show()}}); // source/popup.js -enyo.kind({name:"biblez.versePopup",kind:"onyx.Popup",classes:"verse-popup",components:[{kind:"enyo.FittableRows",components:[{kind:"enyo.FittableColumns",components:[{content:"Bookmark",classes:"verse-popup-cell cell-top-left"},{content:"Note",classes:"verse-popup-cell cell-top-right"}]},{kind:"enyo.FittableColumns",components:[{content:"Highlight",classes:"verse-popup-cell"},{content:"Copy&Share",classes:"verse-popup-cell cell-bottom-right"}]}]}]}); +enyo.kind({name:"biblez.versePopup",kind:"onyx.Popup",classes:"verse-popup",events:{onBookmark:"",onNote:"",onHighlight:""},published:{osisRef:null,bmExists:!1,noteExists:!1,bmId:null,noteId:null,hlId:null},components:[{kind:"enyo.FittableRows",components:[{kind:"enyo.FittableColumns",components:[{name:"bmLabel",content:$L("Bookmark"),classes:"verse-popup-cell cell-top-left",ontap:"handleBookmark"},{name:"noteLabel",content:$L("Note"),classes:"verse-popup-cell cell-top-right",ontap:"handleNote"}]},{kind:"enyo.FittableColumns",components:[{content:$L("Highlight"),classes:"verse-popup-cell",ontap:"handleHighlight"},{content:$L("Copy&Share"),classes:"verse-popup-cell cell-bottom-right",ontap:"handleCopyShare"}]}]}],setLabels:function(){this.bmExists?this.$.bmLabel.setContent($L("Bookmark")+" - "):this.$.bmLabel.setContent($L("Bookmark")+" + ")},handleBookmark:function(){this.hide(),this.bmExists?api.removeBookmark({id:this.bmId,osisRef:this.osisRef},enyo.bind(this,function(t){t?console.log(t):this.doBookmark({action:"remove",osisRef:this.osisRef})})):api.putBookmark({osisRef:this.osisRef},enyo.bind(this,function(t){t?console.log(t):this.doBookmark({action:"add"})}))}}); // source/App.js enyo.ready(function(){window.App||alert("No application build found, please open debug.html."),(new App).renderInto(document.body)}),enyo.kind({name:"App",kind:enyo.FittableRows,fit:!0,components:[{name:"panel",kind:"Panels",fit:!0,classes:"app-panels",arrangerKind:"CardArranger",draggable:!1,onTransitionFinish:"handlePanels",components:[{name:"main",kind:"biblez.main",onOpenModuleManager:"openModuleManager",onOpenBC:"openSelector",onModuleChanged:"handleChangeModule"},{name:"moduleManager",kind:"biblez.moduleManager",onBack:"handleBack",onInstalled:"handleInstalledModule"},{name:"bcSelector",kind:"biblez.bcSelector",onSelect:"handlePassageSelect",onBack:"handleBack"},{name:"moduleManagerDesktop",kind:"biblez.moduleManagerDesktop",onBack:"handleBack",onInstalled:"handleInstalledModule"}]}],rendered:function(){this.inherited(arguments)},handlePanels:function(t,e){return 1!==e.toIndex||enyo.platform.firefox||this.$.moduleManager.start(),!0},handleBack:function(){return this.$.panel.setIndex(0),!0},handleInstalledModule:function(){return this.$.main.getInstalledModules(),!0},openModuleManager:function(){return enyo.platform.firefox?this.$.panel.setIndex(3):this.$.panel.setIndex(1),!0},openSelector:function(){return this.$.panel.setIndex(2),this.$.bcSelector.setPanel(0),!0},handleChangeModule:function(t,e){return this.$.bcSelector.setModule(e.module),!0},handlePassageSelect:function(t,e){this.$.panel.setIndex(0),delete e.originator,this.$.main.setPassage(e)}}),window.screen.onmozorientationchange=function(){enyo.Signals.send("onOrientationChange")}; diff --git a/deploy/biblez-ng/lib/sword/sword.min.js b/deploy/biblez-ng/lib/sword/sword.min.js index d8227dc..a8a6936 100644 --- a/deploy/biblez-ng/lib/sword/sword.min.js +++ b/deploy/biblez-ng/lib/sword/sword.min.js @@ -46,4 +46,4 @@ // ### This code is based on the zTextReader class from cross-connect (https://code.google.com/p/cross-connect), Copyright (C) 2011 Thomas Dilts ### -(function(e,t){typeof define=="function"&&define.amd?define(t):e.sword=t()})(this,function(){var requirejs,require,define;return function(e){function c(e,t){return f.call(e,t)}function h(e,t){var n,r,i,s,o,a,f,l,c,h,p=t&&t.split("/"),d=u.map,v=d&&d["*"]||{};if(e&&e.charAt(0)===".")if(t){p=p.slice(0,p.length-1),e=p.concat(e.split("/"));for(l=0;l<e.length;l+=1){h=e[l];if(h===".")e.splice(l,1),l-=1;else if(h===".."){if(l===1&&(e[2]===".."||e[0]===".."))break;l>0&&(e.splice(l-1,2),l-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((p||v)&&d){n=e.split("/");for(l=n.length;l>0;l-=1){r=n.slice(0,l).join("/");if(p)for(c=p.length;c>0;c-=1){i=d[p.slice(0,c).join("/")];if(i){i=i[r];if(i){s=i,o=l;break}}}if(s)break;!a&&v&&v[r]&&(a=v[r],f=l)}!s&&a&&(s=a,o=f),s&&(n.splice(0,o,s),e=n.join("/"))}return e}function p(t,r){return function(){return n.apply(e,l.call(arguments,0).concat([t,r]))}}function d(e){return function(t){return h(t,e)}}function v(e){return function(t){s[e]=t}}function m(n){if(c(o,n)){var r=o[n];delete o[n],a[n]=!0,t.apply(e,r)}if(!c(s,n)&&!c(a,n))throw new Error("No "+n);return s[n]}function g(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function y(e){return function(){return u&&u.config&&u.config[e]||{}}}var t,n,r,i,s={},o={},u={},a={},f=Object.prototype.hasOwnProperty,l=[].slice;r=function(e,t){var n,r=g(e),i=r[0];return e=r[1],i&&(i=h(i,t),n=m(i)),i?n&&n.normalize?e=n.normalize(e,d(t)):e=h(e,t):(e=h(e,t),r=g(e),i=r[0],e=r[1],i&&(n=m(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},i={require:function(e){return p(e)},exports:function(e){var t=s[e];return typeof t!="undefined"?t:s[e]={}},module:function(e){return{id:e,uri:"",exports:s[e],config:y(e)}}},t=function(t,n,u,f){var l,h,d,g,y,b=[],w;f=f||t;if(typeof u=="function"){n=!n.length&&u.length?["require","exports","module"]:n;for(y=0;y<n.length;y+=1){g=r(n[y],f),h=g.f;if(h==="require")b[y]=i.require(t);else if(h==="exports")b[y]=i.exports(t),w=!0;else if(h==="module")l=b[y]=i.module(t);else if(c(s,h)||c(o,h)||c(a,h))b[y]=m(h);else{if(!g.p)throw new Error(t+" missing "+h);g.p.load(g.n,p(f,!0),v(h),{}),b[y]=s[h]}}d=u.apply(s[t],b);if(t)if(l&&l.exports!==e&&l.exports!==s[t])s[t]=l.exports;else if(d!==e||!w)s[t]=d}else t&&(s[t]=u)},requirejs=require=n=function(s,o,a,f,l){return typeof s=="string"?i[s]?i[s](o):m(r(s,o).f):(s.splice||(u=s,o.splice?(s=o,o=a,a=null):s=e),o=o||function(){},typeof a=="function"&&(a=f,f=l),f?t(e,s,o,a):setTimeout(function(){t(e,s,o,a)},4),n)},n.config=function(e){return u=e,u.deps&&n(u.deps,u.callback),n},define=function(e,t,n){t.splice||(n=t,t=[]),!c(s,e)&&!c(o,e)&&(o[e]=[e,t,n])},define.amd={jQuery:!0}}(),define("almond",function(){}),function(){function e(e){throw e}function i(e,n){var i=e.split("."),s=r;!(i[0]in s)&&s.execScript&&s.execScript("var "+i[0]);for(var o;i.length&&(o=i.shift());)!i.length&&n!==t?s[o]=n:s=s[o]?s[o]:s[o]={}}function c(e){var t=e.length,n=0,r=Number.POSITIVE_INFINITY,i,o,u,a,f,l,c,h,p;for(h=0;h<t;++h)e[h]>n&&(n=e[h]),e[h]<r&&(r=e[h]);i=1<<n,o=new(s?Uint32Array:Array)(i),u=1,a=0;for(f=2;u<=n;){for(h=0;h<t;++h)if(e[h]===u){l=0,c=a;for(p=0;p<u;++p)l=l<<1|c&1,c>>=1;for(p=l;p<i;p+=f)o[p]=u<<16|h;++a}++u,a<<=1,f<<=1}return[o,n,r]}function v(t,n){this.l=[],this.m=32768,this.d=this.f=this.c=this.t=0,this.input=s?new Uint8Array(t):t,this.u=!1,this.n=g,this.K=!1;if(n||!(n={}))n.index&&(this.c=n.index),n.bufferSize&&(this.m=n.bufferSize),n.bufferType&&(this.n=n.bufferType),n.resize&&(this.K=n.resize);switch(this.n){case m:this.a=32768,this.b=new(s?Uint8Array:Array)(32768+this.m+258);break;case g:this.a=0,this.b=new(s?Uint8Array:Array)(this.m),this.e=this.W,this.B=this.R,this.q=this.V;break;default:e(Error("invalid inflate mode"))}}function B(n,r){for(var i=n.f,s=n.d,o=n.input,u=n.c,a;s<r;)a=o[u++],a===t&&e(Error("input buffer is broken")),i|=a<<s,s+=8;return a=i&(1<<r)-1,n.f=i>>>r,n.d=s-r,n.c=u,a}function j(e,n){for(var r=e.f,i=e.d,s=e.input,o=e.c,u=n[0],a=n[1],f,l,c;i<a;){f=s[o++];if(f===t)break;r|=f<<i,i+=8}return l=u[r&(1<<a)-1],c=l>>>16,e.f=r>>c,e.d=i-c,e.c=o,l&65535}function F(e){function t(e,t,n){var r,i,s,o;for(o=0;o<e;)switch(r=j(this,t),r){case 16:for(s=3+B(this,2);s--;)n[o++]=i;break;case 17:for(s=3+B(this,3);s--;)n[o++]=0;i=0;break;case 18:for(s=11+B(this,7);s--;)n[o++]=0;i=0;break;default:i=n[o++]=r}return n}var n=B(e,5)+257,r=B(e,5)+1,i=B(e,4)+4,o=new(s?Uint8Array:Array)(b.length),u,a,f,l;for(l=0;l<i;++l)o[b[l]]=B(e,3);u=c(o),a=new(s?Uint8Array:Array)(n),f=new(s?Uint8Array:Array)(r),e.q(c(t.call(e,n,u,a)),c(t.call(e,r,u,f)))}function I(e){e=e||{},this.files=[],this.v=e.comment}function q(e,t){t=t||{},this.input=s&&e instanceof Array?new Uint8Array(e):e,this.c=0,this.ba=t.verify||!1,this.j=t.password}function X(e,t){this.input=e,this.offset=t}function V(e,t){this.input=e,this.offset=t}function J(n){var r=[],i={},o,u,a,f;if(!n.i){if(n.o===t){var l=n.input,c;if(!n.D)e:{var h=n.input,p;for(p=h.length-12;0<p;--p)if(h[p]===W[0]&&h[p+1]===W[1]&&h[p+2]===W[2]&&h[p+3]===W[3]){n.D=p;break e}e(Error("End of Central Directory Record not found"))}c=n.D,(l[c++]!==W[0]||l[c++]!==W[1]||l[c++]!==W[2]||l[c++]!==W[3])&&e(Error("invalid signature")),n.ha=l[c++]|l[c++]<<8,n.ja=l[c++]|l[c++]<<8,n.ka=l[c++]|l[c++]<<8,n.aa=l[c++]|l[c++]<<8,n.Q=(l[c++]|l[c++]<<8|l[c++]<<16|l[c++]<<24)>>>0,n.o=(l[c++]|l[c++]<<8|l[c++]<<16|l[c++]<<24)>>>0,n.w=l[c++]|l[c++]<<8,n.v=s?l.subarray(c,c+n.w):l.slice(c,c+n.w)}o=n.o,a=0;for(f=n.aa;a<f;++a)u=new X(n.input,o),u.parse(),o+=u.length,r[a]=u,i[u.filename]=a;n.Q<o-n.o&&e(Error("invalid file header size")),n.i=r,n.G=i}}function K(e,t,n){return n^=e.s(t),e.k(t,n),n}var t=void 0,n,r=this,s="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array;new(s?Uint8Array:Array)(256);var o;for(o=0;256>o;++o)for(var u=o,a=7,u=u>>>1;u;u>>>=1)--a;var f=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],l=s?new Uint32Array(f):f,h=[],p;for(p=0;288>p;p++)switch(!0){case 143>=p:h.push([p+48,8]);break;case 255>=p:h.push([p-144+400,9]);break;case 279>=p:h.push([p-256+0,7]);break;case 287>=p:h.push([p-280+192,8]);break;default:e("invalid literal: "+p)}var d=function(){function t(t){switch(!0){case 3===t:return[257,t-3,0];case 4===t:return[258,t-4,0];case 5===t:return[259,t-5,0];case 6===t:return[260,t-6,0];case 7===t:return[261,t-7,0];case 8===t:return[262,t-8,0];case 9===t:return[263,t-9,0];case 10===t:return[264,t-10,0];case 12>=t:return[265,t-11,1];case 14>=t:return[266,t-13,1];case 16>=t:return[267,t-15,1];case 18>=t:return[268,t-17,1];case 22>=t:return[269,t-19,2];case 26>=t:return[270,t-23,2];case 30>=t:return[271,t-27,2];case 34>=t:return[272,t-31,2];case 42>=t:return[273,t-35,3];case 50>=t:return[274,t-43,3];case 58>=t:return[275,t-51,3];case 66>=t:return[276,t-59,3];case 82>=t:return[277,t-67,4];case 98>=t:return[278,t-83,4];case 114>=t:return[279,t-99,4];case 130>=t:return[280,t-115,4];case 162>=t:return[281,t-131,5];case 194>=t:return[282,t-163,5];case 226>=t:return[283,t-195,5];case 257>=t:return[284,t-227,5];case 258===t:return[285,t-258,0];default:e("invalid length: "+t)}}var n=[],r,i;for(r=3;258>=r;r++)i=t(r),n[r]=i[2]<<24|i[1]<<16|i[0];return n}();s&&new Uint32Array(d);var m=0,g=1;v.prototype.r=function(){for(;!this.u;){var n=B(this,3);n&1&&(this.u=!0),n>>>=1;switch(n){case 0:var r=this.input,i=this.c,o=this.b,u=this.a,a=t,f=t,l=t,c=o.length,h=t;this.d=this.f=0,a=r[i++],a===t&&e(Error("invalid uncompressed block header: LEN (first byte)")),f=a,a=r[i++],a===t&&e(Error("invalid uncompressed block header: LEN (second byte)")),f|=a<<8,a=r[i++],a===t&&e(Error("invalid uncompressed block header: NLEN (first byte)")),l=a,a=r[i++],a===t&&e(Error("invalid uncompressed block header: NLEN (second byte)")),l|=a<<8,f===~l&&e(Error("invalid uncompressed block header: length verify")),i+f>r.length&&e(Error("input buffer is broken"));switch(this.n){case m:for(;u+f>o.length;){h=c-u,f-=h;if(s)o.set(r.subarray(i,i+h),u),u+=h,i+=h;else for(;h--;)o[u++]=r[i++];this.a=u,o=this.e(),u=this.a}break;case g:for(;u+f>o.length;)o=this.e({H:2});break;default:e(Error("invalid inflate mode"))}if(s)o.set(r.subarray(i,i+f),u),u+=f,i+=f;else for(;f--;)o[u++]=r[i++];this.c=i,this.a=u,this.b=o;break;case 1:this.q(M,H);break;case 2:F(this);break;default:e(Error("unknown BTYPE: "+n))}}return this.B()};var y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],b=s?new Uint16Array(y):y,w=[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,258,258],E=s?new Uint16Array(w):w,S=[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,0,0],x=s?new Uint8Array(S):S,T=[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],N=s?new Uint16Array(T):T,C=[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],k=s?new Uint8Array(C):C,L=new(s?Uint8Array:Array)(288),A,O;A=0;for(O=L.length;A<O;++A)L[A]=143>=A?8:255>=A?9:279>=A?7:8;var M=c(L),_=new(s?Uint8Array:Array)(30),D,P;D=0;for(P=_.length;D<P;++D)_[D]=5;var H=c(_);n=v.prototype,n.q=function(e,t){var n=this.b,r=this.a;this.C=e;for(var i=n.length-258,s,o,u,a;256!==(s=j(this,e));)if(256>s)r>=i&&(this.a=r,n=this.e(),r=this.a),n[r++]=s;else{o=s-257,a=E[o],0<x[o]&&(a+=B(this,x[o])),s=j(this,t),u=N[s],0<k[s]&&(u+=B(this,k[s])),r>=i&&(this.a=r,n=this.e(),r=this.a);for(;a--;)n[r]=n[r++ -u]}for(;8<=this.d;)this.d-=8,this.c--;this.a=r},n.V=function(e,t){var n=this.b,r=this.a;this.C=e;for(var i=n.length,s,o,u,a;256!==(s=j(this,e));)if(256>s)r>=i&&(n=this.e(),i=n.length),n[r++]=s;else{o=s-257,a=E[o],0<x[o]&&(a+=B(this,x[o])),s=j(this,t),u=N[s],0<k[s]&&(u+=B(this,k[s])),r+a>i&&(n=this.e(),i=n.length);for(;a--;)n[r]=n[r++ -u]}for(;8<=this.d;)this.d-=8,this.c--;this.a=r},n.e=function(){var e=new(s?Uint8Array:Array)(this.a-32768),t=this.a-32768,n,r,i=this.b;if(s)e.set(i.subarray(32768,e.length));else{n=0;for(r=e.length;n<r;++n)e[n]=i[n+32768]}this.l.push(e),this.t+=e.length;if(s)i.set(i.subarray(t,t+32768));else for(n=0;32768>n;++n)i[n]=i[t+n];return this.a=32768,i},n.W=function(e){var t,n=this.input.length/this.c+1|0,r,i,o,u=this.input,a=this.b;return e&&("number"==typeof e.H&&(n=e.H),"number"==typeof e.P&&(n+=e.P)),2>n?(r=(u.length-this.c)/this.C[2],o=258*(r/2)|0,i=o<a.length?a.length+o:a.length<<1):i=a.length*n,s?(t=new Uint8Array(i),t.set(a)):t=a,this.b=t},n.B=function(){var e=0,t=this.b,n=this.l,r,i=new(s?Uint8Array:Array)(this.t+(this.a-32768)),o,u,a,f;if(0===n.length)return s?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);o=0;for(u=n.length;o<u;++o){r=n[o],a=0;for(f=r.length;a<f;++a)i[e++]=r[a]}o=32768;for(u=this.a;o<u;++o)i[e++]=t[o];return this.l=[],this.buffer=i},n.R=function(){var e,t=this.a;return s?this.K?(e=new Uint8Array(t),e.set(this.b.subarray(0,t))):e=this.b.subarray(0,t):(this.b.length>t&&(this.b.length=t),e=this.b),this.buffer=e},I.prototype.L=function(e){this.j=e},I.prototype.s=function(e){var t=e[2]&65535|2;return t*(t^1)>>8&255},I.prototype.k=function(e,t){e[0]=(l[(e[0]^t)&255]^e[0]>>>8)>>>0,e[1]=(6681*(20173*(e[1]+(e[0]&255))>>>0)>>>0)+1>>>0,e[2]=(l[(e[2]^e[1]>>>24)&255]^e[2]>>>8)>>>0},I.prototype.T=function(e){var t=[305419896,591751049,878082192],n,r;s&&(t=new Uint32Array(t)),n=0;for(r=e.length;n<r;++n)this.k(t,e[n]&255);return t};var R={O:0,M:8},U=[80,75,1,2],z=[80,75,3,4],W=[80,75,5,6];X.prototype.parse=function(){var t=this.input,n=this.offset;(t[n++]!==U[0]||t[n++]!==U[1]||t[n++]!==U[2]||t[n++]!==U[3])&&e(Error("invalid file header signature")),this.version=t[n++],this.ia=t[n++],this.Z=t[n++]|t[n++]<<8,this.I=t[n++]|t[n++]<<8,this.A=t[n++]|t[n++]<<8,this.time=t[n++]|t[n++]<<8,this.U=t[n++]|t[n++]<<8,this.p=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.z=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.J=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.h=t[n++]|t[n++]<<8,this.g=t[n++]|t[n++]<<8,this.F=t[n++]|t[n++]<<8,this.ea=t[n++]|t[n++]<<8,this.ga=t[n++]|t[n++]<<8,this.fa=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24,this.$=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.filename=String.fromCharCode.apply(null,s?t.subarray(n,n+=this.h):t.slice(n,n+=this.h)),this.X=s?t.subarray(n,n+=this.g):t.slice(n,n+=this.g),this.v=s?t.subarray(n,n+this.F):t.slice(n,n+this.F),this.length=n-this.offset};var $={N:1,ca:8,da:2048};V.prototype.parse=function(){var t=this.input,n=this.offset;(t[n++]!==z[0]||t[n++]!==z[1]||t[n++]!==z[2]||t[n++]!==z[3])&&e(Error("invalid local file header signature")),this.Z=t[n++]|t[n++]<<8,this.I=t[n++]|t[n++]<<8,this.A=t[n++]|t[n++]<<8,this.time=t[n++]|t[n++]<<8,this.U=t[n++]|t[n++]<<8,this.p=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.z=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.J=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.h=t[n++]|t[n++]<<8,this.g=t[n++]|t[n++]<<8,this.filename=String.fromCharCode.apply(null,s?t.subarray(n,n+=this.h):t.slice(n,n+=this.h)),this.X=s?t.subarray(n,n+=this.g):t.slice(n,n+=this.g),this.length=n-this.offset},n=q.prototype,n.Y=function(){var e=[],t,n,r;this.i||J(this),r=this.i,t=0;for(n=r.length;t<n;++t)e[t]=r[t].filename;return e},n.r=function(n,r){var i;this.G||J(this),i=this.G[n],i===t&&e(Error(n+" not found"));var o;o=r||{};var u=this.input,a=this.i,f,c,h,p,d,m,g,y;a||J(this),a[i]===t&&e(Error("wrong index")),c=a[i].$,f=new V(this.input,c),f.parse(),c+=f.length,h=f.z;if(0!==(f.I&$.N)){!o.password&&!this.j&&e(Error("please set password")),m=this.S(o.password||this.j),g=c;for(y=c+12;g<y;++g)K(this,m,u[g]);c+=12,h-=12,g=c;for(y=c+h;g<y;++g)u[g]=K(this,m,u[g])}switch(f.A){case R.O:p=s?this.input.subarray(c,c+h):this.input.slice(c,c+h);break;case R.M:p=(new v(this.input,{index:c,bufferSize:f.J})).r();break;default:e(Error("unknown compression type"))}if(this.ba){var b=t,w,E="number"==typeof b?b:b=0,S=p.length;w=-1;for(E=S&7;E--;++b)w=w>>>8^l[(w^p[b])&255];for(E=S>>3;E--;b+=8)w=w>>>8^l[(w^p[b])&255],w=w>>>8^l[(w^p[b+1])&255],w=w>>>8^l[(w^p[b+2])&255],w=w>>>8^l[(w^p[b+3])&255],w=w>>>8^l[(w^p[b+4])&255],w=w>>>8^l[(w^p[b+5])&255],w=w>>>8^l[(w^p[b+6])&255],w=w>>>8^l[(w^p[b+7])&255];d=(w^4294967295)>>>0,f.p!==d&&e(Error("wrong crc: file=0x"+f.p.toString(16)+", data=0x"+d.toString(16)))}return p},n.L=function(e){this.j=e},n.k=I.prototype.k,n.S=I.prototype.T,n.s=I.prototype.s,i("Zlib.Unzip",q),i("Zlib.Unzip.prototype.decompress",q.prototype.r),i("Zlib.Unzip.prototype.getFilenames",q.prototype.Y),i("Zlib.Unzip.prototype.setPassword",q.prototype.L)}.call(this),define("unzip",function(e){return function(){var t,n;return t||e.Zlib}}(this)),function(){function r(e){var n=!1;return function(){if(n)throw new Error("Callback was already called.");n=!0,e.apply(t,arguments)}}var e={},t,n;t=this,t!=null&&(n=t.async),e.noConflict=function(){return t.async=n,e};var i=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n+=1)t(e[n],n,e)},s=function(e,t){if(e.map)return e.map(t);var n=[];return i(e,function(e,r,i){n.push(t(e,r,i))}),n},o=function(e,t,n){return e.reduce?e.reduce(t,n):(i(e,function(e,r,i){n=t(n,e,r,i)}),n)},u=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t};typeof process=="undefined"||!process.nextTick?typeof setImmediate=="function"?(e.nextTick=function(e){setImmediate(e)},e.setImmediate=e.nextTick):(e.nextTick=function(e){setTimeout(e,0)},e.setImmediate=e.nextTick):(e.nextTick=process.nextTick,typeof setImmediate!="undefined"?e.setImmediate=setImmediate:e.setImmediate=e.nextTick),e.each=function(e,t,n){n=n||function(){};if(!e.length)return n();var s=0;i(e,function(i){t(i,r(function(t){t?(n(t),n=function(){}):(s+=1,s>=e.length&&n(null))}))})},e.forEach=e.each,e.eachSeries=function(e,t,n){n=n||function(){};if(!e.length)return n();var r=0,i=function(){t(e[r],function(t){t?(n(t),n=function(){}):(r+=1,r>=e.length?n(null):i())})};i()},e.forEachSeries=e.eachSeries,e.eachLimit=function(e,t,n,r){var i=a(t);i.apply(null,[e,n,r])},e.forEachLimit=e.eachLimit;var a=function(e){return function(t,n,r){r=r||function(){};if(!t.length||e<=0)return r();var i=0,s=0,o=0;(function u(){if(i>=t.length)return r();while(o<e&&s<t.length)s+=1,o+=1,n(t[s-1],function(e){e?(r(e),r=function(){}):(i+=1,o-=1,i>=t.length?r():u())})})()}},f=function(t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[e.each].concat(n))}},l=function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[a(e)].concat(n))}},c=function(t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[e.eachSeries].concat(n))}},h=function(e,t,n,r){var i=[];t=s(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n,r){i[e.index]=r,t(n)})},function(e){r(e,i)})};e.map=f(h),e.mapSeries=c(h),e.mapLimit=function(e,t,n,r){return p(t)(e,n,r)};var p=function(e){return l(e,h)};e.reduce=function(t,n,r,i){e.eachSeries(t,function(e,t){r(n,e,function(e,r){n=r,t(e)})},function(e){i(e,n)})},e.inject=e.reduce,e.foldl=e.reduce,e.reduceRight=function(t,n,r,i){var o=s(t,function(e){return e}).reverse();e.reduce(o,n,r,i)},e.foldr=e.reduceRight;var d=function(e,t,n,r){var i=[];t=s(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n&&i.push(e),t()})},function(e){r(s(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};e.filter=f(d),e.filterSeries=c(d),e.select=e.filter,e.selectSeries=e.filterSeries;var v=function(e,t,n,r){var i=[];t=s(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n||i.push(e),t()})},function(e){r(s(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};e.reject=f(v),e.rejectSeries=c(v);var m=function(e,t,n,r){e(t,function(e,t){n(e,function(n){n?(r(e),r=function(){}):t()})},function(e){r()})};e.detect=f(m),e.detectSeries=c(m),e.some=function(t,n,r){e.each(t,function(e,t){n(e,function(e){e&&(r(!0),r=function(){}),t()})},function(e){r(!1)})},e.any=e.some,e.every=function(t,n,r){e.each(t,function(e,t){n(e,function(e){e||(r(!1),r=function(){}),t()})},function(e){r(!0)})},e.all=e.every,e.sortBy=function(t,n,r){e.map(t,function(e,t){n(e,function(n,r){n?t(n):t(null,{value:e,criteria:r})})},function(e,t){if(e)return r(e);var n=function(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0};r(null,s(t.sort(n),function(e){return e.value}))})},e.auto=function(t,n){n=n||function(){};var r=u(t);if(!r.length)return n(null);var s={},a=[],f=function(e){a.unshift(e)},l=function(e){for(var t=0;t<a.length;t+=1)if(a[t]===e){a.splice(t,1);return}},c=function(){i(a.slice(0),function(e){e()})};f(function(){u(s).length===r.length&&(n(null,s),n=function(){})}),i(r,function(r){var a=t[r]instanceof Function?[t[r]]:t[r],h=function(t){var o=Array.prototype.slice.call(arguments,1);o.length<=1&&(o=o[0]);if(t){var a={};i(u(s),function(e){a[e]=s[e]}),a[r]=o,n(t,a),n=function(){}}else s[r]=o,e.setImmediate(c)},p=a.slice(0,Math.abs(a.length-1))||[],d=function(){return o(p,function(e,t){return e&&s.hasOwnProperty(t)},!0)&&!s.hasOwnProperty(r)};if(d())a[a.length-1](h,s);else{var v=function(){d()&&(l(v),a[a.length-1](h,s))};f(v)}})},e.waterfall=function(t,n){n=n||function(){};if(t.constructor!==Array){var r=new Error("First argument to waterfall must be an array of functions");return n(r)}if(!t.length)return n();var i=function(t){return function(r){if(r)n.apply(null,arguments),n=function(){};else{var s=Array.prototype.slice.call(arguments,1),o=t.next();o?s.push(i(o)):s.push(n),e.setImmediate(function(){t.apply(null,s)})}}};i(e.iterator(t))()};var g=function(e,t,n){n=n||function(){};if(t.constructor===Array)e.map(t,function(e,t){e&&e(function(e){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),t.call(null,e,n)})},n);else{var r={};e.each(u(t),function(e,n){t[e](function(t){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),r[e]=i,n(t)})},function(e){n(e,r)})}};e.parallel=function(t,n){g({map:e.map,each:e.each},t,n)},e.parallelLimit=function(e,t,n){g({map:p(t),each:a(t)},e,n)},e.series=function(t,n){n=n||function(){};if(t.constructor===Array)e.mapSeries(t,function(e,t){e&&e(function(e){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),t.call(null,e,n)})},n);else{var r={};e.eachSeries(u(t),function(e,n){t[e](function(t){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),r[e]=i,n(t)})},function(e){n(e,r)})}},e.iterator=function(e){var t=function(n){var r=function(){return e.length&&e[n].apply(null,arguments),r.next()};return r.next=function(){return n<e.length-1?t(n+1):null},r};return t(0)},e.apply=function(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t.concat(Array.prototype.slice.call(arguments)))}};var y=function(e,t,n,r){var i=[];e(t,function(e,t){n(e,function(e,n){i=i.concat(n||[]),t(e)})},function(e){r(e,i)})};e.concat=f(y),e.concatSeries=c(y),e.whilst=function(t,n,r){t()?n(function(i){if(i)return r(i);e.whilst(t,n,r)}):r()},e.doWhilst=function(t,n,r){t(function(i){if(i)return r(i);n()?e.doWhilst(t,n,r):r()})},e.until=function(t,n,r){t()?r():n(function(i){if(i)return r(i);e.until(t,n,r)})},e.doUntil=function(t,n,r){t(function(i){if(i)return r(i);n()?r():e.doUntil(t,n,r)})},e.queue=function(t,n){function s(t,r,s,o){r.constructor!==Array&&(r=[r]),i(r,function(r){var i={data:r,callback:typeof o=="function"?o:null};s?t.tasks.unshift(i):t.tasks.push(i),t.saturated&&t.tasks.length===n&&t.saturated(),e.setImmediate(t.process)})}n===undefined&&(n=1);var o=0,u={tasks:[],concurrency:n,saturated:null,empty:null,drain:null,push:function(e,t){s(u,e,!1,t)},unshift:function(e,t){s(u,e,!0,t)},process:function(){if(o<u.concurrency&&u.tasks.length){var e=u.tasks.shift();u.empty&&u.tasks.length===0&&u.empty(),o+=1;var n=function(){o-=1,e.callback&&e.callback.apply(e,arguments),u.drain&&u.tasks.length+o===0&&u.drain(),u.process()},i=r(n);t(e.data,i)}},length:function(){return u.tasks.length},running:function(){return o}};return u},e.cargo=function(t,n){var r=!1,o=[],u={tasks:o,payload:n,saturated:null,empty:null,drain:null,push:function(t,r){t.constructor!==Array&&(t=[t]),i(t,function(e){o.push({data:e,callback:typeof r=="function"?r:null}),u.saturated&&o.length===n&&u.saturated()}),e.setImmediate(u.process)},process:function a(){if(r)return;if(o.length===0){u.drain&&u.drain();return}var e=typeof n=="number"?o.splice(0,n):o.splice(0),f=s(e,function(e){return e.data});u.empty&&u.empty(),r=!0,t(f,function(){r=!1;var t=arguments;i(e,function(e){e.callback&&e.callback.apply(null,t)}),a()})},length:function(){return o.length},running:function(){return r}};return u};var b=function(e){return function(t){var n=Array.prototype.slice.call(arguments,1);t.apply(null,n.concat([function(t){var n=Array.prototype.slice.call(arguments,1);typeof console!="undefined"&&(t?console.error&&console.error(t):console[e]&&i(n,function(t){console[e](t)}))}]))}};e.log=b("log"),e.dir=b("dir"),e.memoize=function(e,t){var n={},r={};t=t||function(e){return e};var i=function(){var i=Array.prototype.slice.call(arguments),s=i.pop(),o=t.apply(null,i);o in n?s.apply(null,n[o]):o in r?r[o].push(s):(r[o]=[s],e.apply(null,i.concat([function(){n[o]=arguments;var e=r[o];delete r[o];for(var t=0,i=e.length;t<i;t++)e[t].apply(null,arguments)}])))};return i.memo=n,i.unmemoized=e,i},e.unmemoize=function(e){return function(){return(e.unmemoized||e).apply(null,arguments)}},e.times=function(t,n,r){var i=[];for(var s=0;s<t;s++)i.push(s);return e.map(i,n,r)},e.timesSeries=function(t,n,r){var i=[];for(var s=0;s<t;s++)i.push(s);return e.mapSeries(i,n,r)},e.compose=function(){var t=Array.prototype.reverse.call(arguments);return function(){var n=this,r=Array.prototype.slice.call(arguments),i=r.pop();e.reduce(t,r,function(e,t,r){t.apply(n,e.concat([function(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);r(e,t)}]))},function(e,t){i.apply(n,[e].concat(t))})}};var w=function(e,t){var n=function(){var n=this,r=Array.prototype.slice.call(arguments),i=r.pop();return e(t,function(e,t){e.apply(n,r.concat([t]))},i)};if(arguments.length>2){var r=Array.prototype.slice.call(arguments,2);return n.apply(this,r)}return n};e.applyEach=f(w),e.applyEachSeries=c(w),e.forever=function(e,t){function n(r){if(r){if(t)return t(r);throw r}e(n)}n()},typeof define!="undefined"&&define.amd?define("async",[],function(){return e}):typeof module!="undefined"&&module.exports?module.exports=e:t.async=e}(),define("tools",[],function(){function e(e){var t=e.split(/[\r\n]+/g),n={},r=null;return n.GlobalOptionFilter=[],n.Feature=[],t.forEach(function(e,t){r=e.split(/=(.+)/),r[0]!==""&&(r[0].search(/\[.*\]/)!==-1?n.moduleKey=r[0].replace("[","").replace("]",""):r[0]==="GlobalOptionFilter"?n[r[0]].push(r[1]):r[0]==="Feature"?n[r[0]].push(r[1]):r[0]==="Versification"?n[r[0]]=r[1].toLowerCase():n[r[0]]=r[1])}),n}function t(e){return function(t,n){return t[e]>n[e]?1:t[e]<n[e]?-1:0}}function n(){var e=arguments;return function(n,r){var i=0,s=0,o=e.length;while(s===0&&i<o)s=t(e[i])(n,r),i++;return s}}function r(e){var t=[];for(var n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}return{readConf:e,dynamicSort:t,dynamicSortMultiple:n,cleanArray:r}}),function(e,t,n){"function"==typeof define?define("idb",t):"undefined"!=typeof module&&module.exports?module.exports=t():n[e]=t()}("IDBStore",function(){var e=function(e){throw e},t={storeName:"Store",storePrefix:"IDBWrapper-",dbVersion:1,keyPath:"id",autoIncrement:!0,onStoreReady:function(){},onError:e,indexes:[]},n=function(e,n){"undefined"==typeof n&&"function"==typeof e&&(n=e),"[object Object]"!=Object.prototype.toString.call(e)&&(e={});for(var r in t)this[r]="undefined"!=typeof e[r]?e[r]:t[r];this.dbName=this.storePrefix+this.storeName,this.dbVersion=parseInt(this.dbVersion,10)||1,n&&(this.onStoreReady=n),r="object"==typeof window?window:self,this.idb=r.indexedDB||r.webkitIndexedDB||r.mozIndexedDB,this.keyRange=r.IDBKeyRange||r.webkitIDBKeyRange||r.mozIDBKeyRange,this.features={hasAutoIncrement:!r.mozIndexedDB},this.consts={READ_ONLY:"readonly",READ_WRITE:"readwrite",VERSION_CHANGE:"versionchange",NEXT:"next",NEXT_NO_DUPLICATE:"nextunique",PREV:"prev",PREV_NO_DUPLICATE:"prevunique"},this.openDB()};n.prototype={constructor:n,version:"1.4.0",db:null,dbName:null,dbVersion:null,store:null,storeName:null,keyPath:null,autoIncrement:null,indexes:null,features:null,onStoreReady:null,onError:null,_insertIdCount:0,openDB:function(){var e=this.idb.open(this.dbName,this.dbVersion),t=!1;e.onerror=function(e){var t=!1;"error"in e.target?t="VersionError"==e.target.error.name:"errorCode"in e.target&&(t=12==e.target.errorCode),t?this.onError(Error("The version number provided is lower than the existing one.")):this.onError(e)}.bind(this),e.onsuccess=function(e){t||(this.db?this.onStoreReady():(this.db=e.target.result,"string"==typeof this.db.version)?this.onError(Error("The IndexedDB implementation in this browser is outdated. Please upgrade your browser.")):this.db.objectStoreNames.contains(this.storeName)?(this.store=this.db.transaction([this.storeName],this.consts.READ_ONLY).objectStore(this.storeName),this.indexes.forEach(function(e){var n=e.name;n?(this.normalizeIndexData(e),this.hasIndex(n)?this.indexComplies(this.store.index(n),e)||(t=!0,this.onError(Error('Cannot modify index "'+n+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))):(t=!0,this.onError(Error('Cannot create new index "'+n+'" for current version. Please bump version number to '+(this.dbVersion+1)+".")))):(t=!0,this.onError(Error("Cannot create index: No index name given.")))},this),t||this.onStoreReady()):this.onError(Error("Something is wrong with the IndexedDB implementation in this browser. Please upgrade your browser.")))}.bind(this),e.onupgradeneeded=function(e){this.db=e.target.result,this.store=this.db.objectStoreNames.contains(this.storeName)?e.target.transaction.objectStore(this.storeName):this.db.createObjectStore(this.storeName,{keyPath:this.keyPath,autoIncrement:this.autoIncrement}),this.indexes.forEach(function(e){var n=e.name;n||(t=!0,this.onError(Error("Cannot create index: No index name given."))),this.normalizeIndexData(e),this.hasIndex(n)?this.indexComplies(this.store.index(n),e)||(this.store.deleteIndex(n),this.store.createIndex(n,e.keyPath,{unique:e.unique,multiEntry:e.multiEntry})):this.store.createIndex(n,e.keyPath,{unique:e.unique,multiEntry:e.multiEntry})},this)}.bind(this)},deleteDatabase:function(){this.idb.deleteDatabase&&this.idb.deleteDatabase(this.dbName)},put:function(t,n,i,s){null!==this.keyPath&&(s=i,i=n,n=t),s||(s=e),i||(i=r);var o=!1,u=null,a=this.db.transaction([this.storeName],this.consts.READ_WRITE);return a.oncomplete=function(){(o?i:s)(u)},a.onabort=s,a.onerror=s,null!==this.keyPath?(this._addIdPropertyIfNeeded(n),t=a.objectStore(this.storeName).put(n)):t=a.objectStore(this.storeName).put(n,t),t.onsuccess=function(e){o=!0,u=e.target.result},t.onerror=s,a},get:function(t,n,i){i||(i=e),n||(n=r);var s=!1,o=null,u=this.db.transaction([this.storeName],this.consts.READ_ONLY);return u.oncomplete=function(){(s?n:i)(o)},u.onabort=i,u.onerror=i,t=u.objectStore(this.storeName).get(t),t.onsuccess=function(e){s=!0,o=e.target.result},t.onerror=i,u},remove:function(t,n,i){i||(i=e),n||(n=r);var s=!1,o=null,u=this.db.transaction([this.storeName],this.consts.READ_WRITE);return u.oncomplete=function(){(s?n:i)(o)},u.onabort=i,u.onerror=i,t=u.objectStore(this.storeName)["delete"](t),t.onsuccess=function(e){s=!0,o=e.target.result},t.onerror=i,u},batch:function(t,n,i){i||(i=e),n||(n=r),"[object Array]"!=Object.prototype.toString.call(t)&&i(Error("dataArray argument must be of type Array."));var s=this.db.transaction([this.storeName],this.consts.READ_WRITE);s.oncomplete=function(){(a?n:i)(a)},s.onabort=i,s.onerror=i;var o=t.length,u=!1,a=!1,f=function(){o--,0===o&&!u&&(a=u=!0)};return t.forEach(function(e){var t=e.type,n=e.key,r=e.value,e=function(e){s.abort(),u||(u=!0,i(e,t,n))};"remove"==t?(r=s.objectStore(this.storeName)["delete"](n),r.onsuccess=f,r.onerror=e):"put"==t&&(null!==this.keyPath?(this._addIdPropertyIfNeeded(r),r=s.objectStore(this.storeName).put(r)):r=s.objectStore(this.storeName).put(r,n),r.onsuccess=f,r.onerror=e)},this),s},putBatch:function(e,t,n){return this.batch(e.map(function(e){return{type:"put",value:e}}),t,n)},removeBatch:function(e,t,n){return this.batch(e.map(function(e){return{type:"remove",key:e}}),t,n)},getBatch:function(t,n,i,s){i||(i=e),n||(n=r),s||(s="sparse"),"[object Array]"!=Object.prototype.toString.call(t)&&i(Error("keyArray argument must be of type Array."));var o=this.db.transaction([this.storeName],this.consts.READ_ONLY);o.oncomplete=function(){(f?n:i)(l)},o.onabort=i,o.onerror=i;var u=[],a=t.length,f=!1,l=null,c=function(e){e.target.result||"dense"==s?u.push(e.target.result):"sparse"==s&&u.length++,a--,0===a&&(f=!0,l=u)};return t.forEach(function(e){e=o.objectStore(this.storeName).get(e),e.onsuccess=c,e.onerror=function(e){l=e,i(e),o.abort()}},this),o},getAll:function(t,n){n||(n=e),t||(t=r);var i=this.db.transaction([this.storeName],this.consts.READ_ONLY),s=i.objectStore(this.storeName);return s.getAll?this._getAllNative(i,s,t,n):this._getAllCursor(i,s,t,n),i},_getAllNative:function(e,t,n,r){var i=!1,s=null;e.oncomplete=function(){(i?n:r)(s)},e.onabort=r,e.onerror=r,e=t.getAll(),e.onsuccess=function(e){i=!0,s=e.target.result},e.onerror=r},_getAllCursor:function(e,t,n,r){var i=[],s=!1,o=null;e.oncomplete=function(){(s?n:r)(o)},e.onabort=r,e.onerror=r,e=t.openCursor(),e.onsuccess=function(e){(e=e.target.result)?(i.push(e.value),e["continue"]()):(s=!0,o=i)},e.onError=r},clear:function(t,n){n||(n=e),t||(t=r);var i=!1,s=null,o=this.db.transaction([this.storeName],this.consts.READ_WRITE);o.oncomplete=function(){(i?t:n)(s)},o.onabort=n,o.onerror=n;var u=o.objectStore(this.storeName).clear();return u.onsuccess=function(e){i=!0,s=e.target.result},u.onerror=n,o},_addIdPropertyIfNeeded:function(e){!this.features.hasAutoIncrement&&"undefined"==typeof e[this.keyPath]&&(e[this.keyPath]=this._insertIdCount++ +Date.now())},getIndexList:function(){return this.store.indexNames},hasIndex:function(e){return this.store.indexNames.contains(e)},normalizeIndexData:function(e){e.keyPath=e.keyPath||e.name,e.unique=!!e.unique,e.multiEntry=!!e.multiEntry},indexComplies:function(e,t){return["keyPath","unique","multiEntry"].every(function(n){return"multiEntry"==n&&void 0===e[n]&&!1===t[n]?!0:t[n]==e[n]})},iterate:function(t,n){var n=s({index:null,order:"ASC",autoContinue:!0,filterDuplicates:!1,keyRange:null,writeAccess:!1,onEnd:null,onError:e},n||{}),r="desc"==n.order.toLowerCase()?"PREV":"NEXT";n.filterDuplicates&&(r+="_NO_DUPLICATE");var i=!1,o=this.db.transaction([this.storeName],this.consts[n.writeAccess?"READ_WRITE":"READ_ONLY"]),u=o.objectStore(this.storeName);return n.index&&(u=u.index(n.index)),o.oncomplete=function(){i?n.onEnd?n.onEnd():t(null):n.onError(null)},o.onabort=n.onError,o.onerror=n.onError,r=u.openCursor(n.keyRange,this.consts[r]),r.onerror=n.onError,r.onsuccess=function(e){(e=e.target.result)?(t(e.value,e,o),n.autoContinue)&&e["continue"]():i=!0},o},query:function(e,t){var n=[],t=t||{};return t.onEnd=function(){e(n)},this.iterate(function(e){n.push(e)},t)},count:function(t,n){var n=s({index:null,keyRange:null},n||{}),r=n.onError||e,i=!1,o=null,u=this.db.transaction([this.storeName],this.consts.READ_ONLY);u.oncomplete=function(){(i?t:r)(o)},u.onabort=r,u.onerror=r;var a=u.objectStore(this.storeName);return n.index&&(a=a.index(n.index)),a=a.count(n.keyRange),a.onsuccess=function(e){i=!0,o=e.target.result},a.onError=r,u},makeKeyRange:function(e){var t="undefined"!=typeof e.lower,n="undefined"!=typeof e.upper,r="undefined"!=typeof e.only;switch(!0){case r:e=this.keyRange.only(e.only);break;case t&&n:e=this.keyRange.bound(e.lower,e.upper,e.excludeLower,e.excludeUpper);break;case t:e=this.keyRange.lowerBound(e.lower,e.excludeLower);break;case n:e=this.keyRange.upperBound(e.upper,e.excludeUpper);break;default:throw Error('Cannot create KeyRange. Provide one or both of "lower" or "upper" value, or an "only" value.')}return e}};var r=function(){},i={},s=function(e,t){var n,r;for(n in t)r=t[n],r!==i[n]&&r!==e[n]&&(e[n]=r);return e};return n.version=n.prototype.version,n},this),define("idbPluginWrapper",["idb"],function(e){function r(r){t?r(null,n):n=new e({storeName:"swordjs",dbVersion:4,indexes:[{name:"modules",keyPath:"moduleKey",unique:!0}],onStoreReady:function(){t=!0,r(null,n)},onError:function(e){t=!1,r(e)}})}function i(){return e}var t=!1,n=null;return{getDB:r,getIDBWrapper:i}}),define("dataMgr",["async","tools","idbPluginWrapper"],function(e,t,n){function i(e,t){n.getDB(function(n,r){n?t(n):r.get(e,function(e){t(null,e)},function(e){t(e)})})}function s(e,r){var i=new FileReader;i.readAsText(e),i.onload=function(e){var i=t.readConf(e.target.result);n.getDB(function(e,t){e?r(e):t.put(i,function(e){r(null,{id:e,modKey:i.moduleKey,v11n:i.Versification})},function(e){r(e)})})}}function o(t,r,i){var s=t.length,o={},a=null,f=null;o.docId=r.id,e.eachSeries(t,function(e,t){var s=e.name.split("/"),u=s[s.length-3];n.getDB(function(n,a){n?i(n):a.put({fileName:s[s.length-1],modKey:r.modKey,driver:u,blob:e.blob},function(e){o[s[s.length-1].split(".")[0]]=e,t(null)},function(e){t(e)})})},function(e){e?i(e):u(o,i)})}function u(e,t){n.getDB(function(n,r){n?t(n):r.get(e.docId,function(n){n.nt=e.nt,n.ot=e.ot,r.put(n,function(e){t(null)},function(e){t(e)})},function(e){t(e)})})}function a(e,t){n.getDB(function(n,r){n?t(n):r.get(e,function(e){t(null,e.blob)},function(e){t(e)})})}function f(e,t,r,i){n.getDB(function(n,s){n?i(n):s.put({modKey:r.modKey,ot:e,nt:t},function(e){s.get(r.id,function(t){t.bcvPosID=e,s.put(t,function(e){i(null)},function(e){i(e)})},function(e){i(e)})},function(e){i(e)})})}function l(e){n.getDB(function(t,n){t?e(t):n.query(function(t){e(null,t)},{onError:function(t){e(t)},index:"modules"})})}function c(e,t){n.getDB(function(n,r){n?t(n):r.remove(e,t(null),function(e){t(e)})})}function h(){n.getDB(function(e,t){e?inCallback(e):t.clear(function(){},function(e){console.log(e)})})}function p(){return n.getIDBWrapper()}function d(e,t){console.log(e,t)}var r={};return{clearDatabase:h,saveConfig:s,saveModule:o,saveBCVPos:f,getBlob:a,get:i,remove:c,getModules:l,getIDBWrapper:p}}),function(){function r(t,r){var i=t.split("."),s=n;!(i[0]in s)&&s.execScript&&s.execScript("var "+i[0]);for(var o;i.length&&(o=i.shift());)!i.length&&r!==e?s[o]=r:s=s[o]?s[o]:s[o]={}}function s(e){var t=e.length,n=0,r=Number.POSITIVE_INFINITY,s,o,u,a,f,l,c,h,p;for(h=0;h<t;++h)e[h]>n&&(n=e[h]),e[h]<r&&(r=e[h]);s=1<<n,o=new(i?Uint32Array:Array)(s),u=1,a=0;for(f=2;u<=n;){for(h=0;h<t;++h)if(e[h]===u){l=0,c=a;for(p=0;p<u;++p)l=l<<1|c&1,c>>=1;for(p=l;p<s;p+=f)o[p]=u<<16|h;++a}++u,a<<=1,f<<=1}return[o,n,r]}function o(t,n,r){this.t=[],this.q=r?r:32768,this.u=0,this.a=n===e?0:n,this.d=this.e=0,this.input=i?new Uint8Array(t):t,this.c=new(i?Uint8Array:Array)(this.q),this.b=0,this.s=this.l=!1,this.f=0,this.status=u}function C(e,t){for(var n=e.e,r=e.d,i=e.input,s=e.a,o;r<t;){if(i.length<=s)return-1;o=i[s++],n|=o<<r,r+=8}return o=n&(1<<t)-1,e.e=n>>>t,e.d=r-t,e.a=s,o}function k(e,t){for(var n=e.e,r=e.d,i=e.input,s=e.a,o=t[0],u=t[1],a,f,l;r<u;){if(i.length<=s)return-1;a=i[s++],n|=a<<r,r+=8}return f=o[n&(1<<u)-1],l=f>>>16,e.e=n>>l,e.d=r-l,e.a=s,f&65535}function L(e){e.r=e.a,e.p=e.d,e.o=e.e}function A(e){e.a=e.r,e.d=e.p,e.e=e.o}function O(e){function t(){function e(e,t,n){for(var r,i,s,o=0,u,o=0;o<e;){r=k(this,t);if(0>r)throw Error("not enough input");switch(r){case 16:if(0>(u=C(this,2)))throw Error("not enough input");for(s=3+u;s--;)n[o++]=i;break;case 17:if(0>(u=C(this,3)))throw Error("not enough input");for(s=3+u;s--;)n[o++]=0;i=0;break;case 18:if(0>(u=C(this,7)))throw Error("not enough input");for(s=11+u;s--;)n[o++]=0;i=0;break;default:i=n[o++]=r}}return n}var t;for(h=0;h<o;++h){if(0>(t=C(this,3)))throw Error("not enough input");u[f[h]]=t}a=s(u),l=new(i?Uint8Array:Array)(n),c=new(i?Uint8Array:Array)(r),this.k=s(e.call(this,n,a,l)),this.n=s(e.call(this,r,a,c))}var n,r,o,u=new(i?Uint8Array:Array)(f.length),a,l,c,h=0;e.status=3,L(e),n=C(e,5)+257,r=C(e,5)+1,o=C(e,4)+4;if(0>n||0>r||0>o)return A(e),-1;try{t.call(e)}catch(p){return A(e),-1}return e.status=4,0}function M(e){var t=e.c,n=e.b,r,i,s,o,u=e.k,a=e.n,f=t.length,l;for(e.status=5;;){L(e),r=k(e,u);if(0>r)return e.b=n,A(e),-1;if(256===r)break;if(256>r)n===f&&(t=_(e),f=t.length),t[n++]=r;else{i=r-257,o=c[i];if(0<p[i]){l=C(e,p[i]);if(0>l)return e.b=n,A(e),-1;o+=l}r=k(e,a);if(0>r)return e.b=n,A(e),-1;s=v[r];if(0<g[r]){l=C(e,g[r]);if(0>l)return e.b=n,A(e),-1;s+=l}n+o>=f&&(t=_(e),f=t.length);for(;o--;)t[n]=t[n++ -s];if(e.a===e.input.length)return e.b=n,-1}}for(;8<=e.d;)e.d-=8,e.a--;e.b=n,e.status=6}function _(e){var t,n=e.input.length/e.a+1|0,r,s,o,u=e.input,a=e.c;return 2>n?(r=(u.length-e.a)/e.k[2],o=258*(r/2)|0,s=o<a.length?a.length+o:a.length<<1):s=a.length*n,i?(t=new Uint8Array(s),t.set(a)):t=a,e.c=t,e.c}function D(t){this.input=t===e?new(i?Uint8Array:Array):t,this.a=0,this.h=new o(this.input,this.a),this.c=this.h.c}var e=void 0,t=!0,n=this,i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,u=0;o.prototype.i=function(n,r){var s=!1;n!==e&&(this.input=n),r!==e&&(this.a=r);for(;!s;)switch(this.status){case u:case 1:var o,a=e;this.status=1,L(this);if(0>(a=C(this,3)))A(this),o=-1;else{a&1&&(this.l=t),a>>>=1;switch(a){case 0:this.g=0;break;case 1:this.g=1;break;case 2:this.g=2;break;default:throw Error("unknown BTYPE: "+a)}this.status=2,o=e}0>o&&(s=t);break;case 2:case 3:switch(this.g){case 0:var f,l=e,c=e,h=this.input,p=this.a;this.status=3;if(p+4>=h.length)f=-1;else{l=h[p++]|h[p++]<<8,c=h[p++]|h[p++]<<8;if(l===~c)throw Error("invalid uncompressed block header: length verify");this.d=this.e=0,this.a=p,this.m=l,this.status=4,f=e}0>f&&(s=t);break;case 1:this.status=3,this.k=E,this.n=N,this.status=4;break;case 2:0>O(this)&&(s=t)}break;case 4:case 5:switch(this.g){case 0:var d;e:{var v=this.input,m=this.a,g=this.c,y=this.b,b=this.m;for(this.status=5;b--;){y===g.length&&(g=_(this));if(m>=v.length){this.a=m,this.b=y,this.m=b+1,d=-1;break e}g[y++]=v[m++]}0>b&&(this.status=6),this.a=m,this.b=y,d=0}0>d&&(s=t);break;case 1:case 2:0>M(this)&&(s=t)}break;case 6:this.l?s=t:this.status=u}var w,S=this.b;return this.s?i?(w=new Uint8Array(S),w.set(this.c.subarray(this.f,S))):w=this.c.slice(this.f,S):w=i?this.c.subarray(this.f,S):this.c.slice(this.f,S),this.buffer=w,this.f=S,this.buffer};var a=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=i?new Uint16Array(a):a,l=[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,258,258],c=i?new Uint16Array(l):l,h=[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,0,0],p=i?new Uint8Array(h):h,d=[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],v=i?new Uint16Array(d):d,m=[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],g=i?new Uint8Array(m):m,y=new(i?Uint8Array:Array)(288),b,w;b=0;for(w=y.length;b<w;++b)y[b]=143>=b?8:255>=b?9:279>=b?7:8;var E=s(y),S=new(i?Uint8Array:Array)(30),x,T;x=0;for(T=S.length;x<T;++x)S[x]=5;var N=s(S);o.prototype.j=function(){return i?this.c.subarray(0,this.b):this.c.slice(0,this.b)},D.prototype.i=function(t){var n;if(t!==e)if(i){var r=new Uint8Array(this.input.length+t.length);r.set(this.input,0),r.set(t,this.input.length),this.input=r}else this.input=this.input.concat(t);var s;if(s=this.method===e){var o,u=this.a,a=this.input,f=a[u++],l=a[u++];if(f===e||l===e)o=-1;else{switch(f&15){case 8:this.method=8;break;default:throw Error("unsupported compression method")}if(0!==((f<<8)+l)%31)throw Error("invalid fcheck flag:"+((f<<8)+l)%31);if(l&32)throw Error("fdict flag is not supported");this.a=u,o=e}s=0>o}return s?new(i?Uint8Array:Array):(n=this.h.i(this.input,this.a),this.a=this.h.a,n)},D.prototype.j=function(){return this.h.j()},r("Zlib.InflateStream",D),r("Zlib.InflateStream.prototype.decompress",D.prototype.i),r("Zlib.InflateStream.prototype.getBytes",D.prototype.j)}.call(this),define("inflateStream",function(e){return function(){var t,n;return t||e.Zlib}}(this)),define("zText",["inflateStream","async"],function(e,t){var n={},r=new FileReader,i=new FileReader;return n.getRawEntry=function(n,s,o,u,a){if(!s[o[0].chapter-1])a({message:"Wrong passage. The requested chapter is not available in this module."});else{var f=s[o[0].chapter-1].bookStartPos,l=s[o[0].chapter-1].startPos,c=s[o[0].chapter-1].length,h=f+l,p=h+c,d=n.slice(f,p);r.readAsArrayBuffer(d),r.onload=function(n){var r=new Uint8Array(n.target.result),f=new e.InflateStream,c=new Blob([f.decompress(r)]),h=[],p=0,d=0,v=0;t.whilst(function(){return v<o.length},function(e){p=l+s[o[v].chapter-1].verses[o[v].verse-1].startPos,d=p+s[o[v].chapter-1].verses[o[v].verse-1].length,u?i.readAsText(c.slice(p,d),u):i.readAsText(c.slice(p,d),"CP1252"),i.onload=function(t){h.push({text:t.target.result,osis:o[v].osis,verse:o[v].verse}),v++,e()}},function(e){a(e,h)})}}},n}),define("text",["module"],function(e){var t,n,r,i,s,o=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],u=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,f=typeof location!="undefined"&&location.href,l=f&&location.protocol&&location.protocol.replace(/\:/,""),c=f&&location.hostname,h=f&&(location.port||undefined),p={},d=e.config&&e.config()||{};t={version:"2.0.10",strip:function(e){if(e){e=e.replace(u,"");var t=e.match(a);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:d.createXhr||function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(t=0;t<3;t+=1){n=o[t];try{e=new ActiveXObject(n)}catch(r){}if(e){o=[n];break}}return e},parseName:function(e){var t,n,r,i=!1,s=e.indexOf("."),o=e.indexOf("./")===0||e.indexOf("../")===0;return s!==-1&&(!o||s>1)?(t=e.substring(0,s),n=e.substring(s+1,e.length)):t=e,r=n||t,s=r.indexOf("!"),s!==-1&&(i=r.substring(s+1)==="strip",r=r.substring(0,s),n?n=r:t=r),{moduleName:t,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var s,o,u,a=t.xdRegExp.exec(e);return a?(s=a[2],o=a[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===n)&&(!o||o.toLowerCase()===r.toLowerCase())&&(!u&&!o||u===i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,d.isBuild&&(p[e]=r),i(r)},load:function(e,n,r,i){if(i.isBuild&&!i.inlineText){r();return}d.isBuild=i.isBuild;var s=t.parseName(e),o=s.moduleName+(s.ext?"."+s.ext:""),u=n.toUrl(o),a=d.useXhr||t.useXhr;if(u.indexOf("empty:")===0){r();return}!f||a(u,l,c,h)?t.get(u,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([o],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)})},write:function(e,n,r,i){if(p.hasOwnProperty(n)){var s=t.jsEscape(p[n]);r.asModule(e+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(e,n,r,i,s){var o=t.parseName(n),u=o.ext?"."+o.ext:"",a=o.moduleName+u,f=r.toUrl(o.moduleName+u)+".js";t.load(a,r,function(n){var r=function(e){return i(f,e)};r.asModule=function(e,t){return i.asModule(e,f,t)},t.write(e,a,r,s)},s)}};if(d.env==="node"||!d.env&&typeof process!="undefined"&&process.versions&&!!process.versions.node&&!process.versions["node-webkit"])n=require.nodeRequire("fs"),t.get=function(e,t,r){try{var i=n.readFileSync(e,"utf8");i.indexOf("")===0&&(i=i.substring(1)),t(i)}catch(s){r(s)}};else if(d.env==="xhr"||!d.env&&t.createXhr())t.get=function(e,n,r,i){var s=t.createXhr(),o;s.open("GET",e,!0);if(i)for(o in i)i.hasOwnProperty(o)&&s.setRequestHeader(o.toLowerCase(),i[o]);d.onXhr&&d.onXhr(s,e),s.onreadystatechange=function(t){var i,o;s.readyState===4&&(i=s.status,i>399&&i<600?(o=new Error(e+" HTTP status: "+i),o.xhr=s,r(o)):n(s.responseText),d.onXhrComplete&&d.onXhrComplete(s,e))},s.send(null)};else if(d.env==="rhino"||!d.env&&typeof Packages!="undefined"&&typeof java!="undefined")t.get=function(e,t){var n,r,i="utf-8",s=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),u=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),i)),a="";try{n=new java.lang.StringBuffer,r=u.readLine(),r&&r.length()&&r.charAt(0)===65279&&(r=r.substring(1)),r!==null&&n.append(r);while((r=u.readLine())!==null)n.append(o),n.append(r);a=String(n.toString())}finally{u.close()}t(a)};else if(d.env==="xpconnect"||!d.env&&typeof Components!="undefined"&&Components.classes&&Components.interfaces)r=Components.classes,i=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),s="@mozilla.org/windows-registry-key;1"in r,t.get=function(e,t){var n,o,u,a={};s&&(e=e.replace(/\//g,"\\")),u=new FileUtils.File(e);try{n=r["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream),n.init(u,1,0,!1),o=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream),o.init(n,"utf-8",n.available(),i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),o.readString(n.available(),a),o.close(),n.close(),t(a.value)}catch(f){throw new Error((u&&u.path||"")+": "+f)}};return t}),define("json",["text"],function(text){function cacheBust(e){return e=e.replace(CACHE_BUST_FLAG,""),e+=e.indexOf("?")<0?"?":"&",e+CACHE_BUST_QUERY_PARAM+"="+Math.round(2147483647*Math.random())}var CACHE_BUST_QUERY_PARAM="bust",CACHE_BUST_FLAG="!bust",jsonParse=typeof JSON!="undefined"&&typeof JSON.parse=="function"?JSON.parse:function(val){return eval("("+val+")")},buildMap={};return{load:function(e,t,n,r){!r.isBuild||r.inlineJSON!==!1&&e.indexOf(CACHE_BUST_QUERY_PARAM+"=")===-1?text.get(t.toUrl(e),function(t){r.isBuild?(buildMap[e]=t,n(t)):n(jsonParse(t))},n.error,{accept:"application/json"}):n(null)},normalize:function(e,t){return e.indexOf(CACHE_BUST_FLAG)!==-1&&(e=cacheBust(e)),t(e)},write:function(e,t,n){if(t in buildMap){var r=buildMap[t];n('define("'+e+"!"+t+'", function(){ return '+r+";});\n")}}}}),define("json!../data/kjv.json",function(){return{ot:[{name:"Genesis",abbrev:"Gen",maxChapter:50},{name:"Exodus",abbrev:"Exod",maxChapter:40},{name:"Leviticus",abbrev:"Lev",maxChapter:27},{name:"Numbers",abbrev:"Num",maxChapter:36},{name:"Deuteronomy",abbrev:"Deut",maxChapter:34},{name:"Joshua",abbrev:"Josh",maxChapter:24},{name:"Judges",abbrev:"Judg",maxChapter:21},{name:"Ruth",abbrev:"Ruth",maxChapter:4},{name:"I Samuel",abbrev:"1Sam",maxChapter:31},{name:"II Samuel",abbrev:"2Sam",maxChapter:24},{name:"I Kings",abbrev:"1Kgs",maxChapter:22},{name:"II Kings",abbrev:"2Kgs",maxChapter:25},{name:"I Chronicles",abbrev:"1Chr",maxChapter:29},{name:"II Chronicles",abbrev:"2Chr",maxChapter:36},{name:"Ezra",abbrev:"Ezra",maxChapter:10},{name:"Nehemiah",abbrev:"Neh",maxChapter:13},{name:"Esther",abbrev:"Esth",maxChapter:10},{name:"Job",abbrev:"Job",maxChapter:42},{name:"Psalms",abbrev:"Ps",maxChapter:150},{name:"Proverbs",abbrev:"Prov",maxChapter:31},{name:"Ecclesiastes",abbrev:"Eccl",maxChapter:12},{name:"Song of Solomon",abbrev:"Song",maxChapter:8},{name:"Isaiah",abbrev:"Isa",maxChapter:66},{name:"Jeremiah",abbrev:"Jer",maxChapter:52},{name:"Lamentations",abbrev:"Lam",maxChapter:5},{name:"Ezekiel",abbrev:"Ezek",maxChapter:48},{name:"Daniel",abbrev:"Dan",maxChapter:12},{name:"Hosea",abbrev:"Hos",maxChapter:14},{name:"Joel",abbrev:"Joel",maxChapter:3},{name:"Amos",abbrev:"Amos",maxChapter:9},{name:"Obadiah",abbrev:"Obad",maxChapter:1},{name:"Jonah",abbrev:"Jonah",maxChapter:4},{name:"Micah",abbrev:"Mic",maxChapter:7},{name:"Nahum",abbrev:"Nah",maxChapter:3},{name:"Habakkuk",abbrev:"Hab",maxChapter:3},{name:"Zephaniah",abbrev:"Zeph",maxChapter:3},{name:"Haggai",abbrev:"Hag",maxChapter:2},{name:"Zechariah",abbrev:"Zech",maxChapter:14},{name:"Malachi",abbrev:"Mal",maxChapter:4}],nt:[{name:"Matthew",abbrev:"Matt",maxChapter:28},{name:"Mark",abbrev:"Mark",maxChapter:16},{name:"Luke",abbrev:"Luke",maxChapter:24},{name:"John",abbrev:"John",maxChapter:21},{name:"Acts",abbrev:"Acts",maxChapter:28},{name:"Romans",abbrev:"Rom",maxChapter:16},{name:"I Corinthians",abbrev:"1Cor",maxChapter:16},{name:"II Corinthians",abbrev:"2Cor",maxChapter:13},{name:"Galatians",abbrev:"Gal",maxChapter:6},{name:"Ephesians",abbrev:"Eph",maxChapter:6},{name:"Philippians",abbrev:"Phil",maxChapter:4},{name:"Colossians",abbrev:"Col",maxChapter:4},{name:"I Thessalonians",abbrev:"1Thess",maxChapter:5},{name:"II Thessalonians",abbrev:"2Thess",maxChapter:3},{name:"I Timothy",abbrev:"1Tim",maxChapter:6},{name:"II Timothy",abbrev:"2Tim",maxChapter:4},{name:"Titus",abbrev:"Titus",maxChapter:3},{name:"Philemon",abbrev:"Phlm",maxChapter:1},{name:"Hebrews",abbrev:"Heb",maxChapter:13},{name:"James",abbrev:"Jas",maxChapter:5},{name:"I Peter",abbrev:"1Pet",maxChapter:5},{name:"II Peter",abbrev:"2Pet",maxChapter:3},{name:"I John",abbrev:"1John",maxChapter:5},{name:"II John",abbrev:"2John",maxChapter:1},{name:"III John",abbrev:"3John",maxChapter:1},{name:"Jude",abbrev:"Jude",maxChapter:1},{name:"Revelation of John",abbrev:"Rev",maxChapter:22}],osisToBookNum:{Gen:0,Exod:1,Lev:2,Num:3,Deut:4,Josh:5,Judg:6,Ruth:7,"1Sam":8,"2Sam":9,"1Kgs":10,"2Kgs":11,"1Chr":12,"2Chr":13,Ezra:14,Neh:15,Esth:16,Job:17,Ps:18,Prov:19,Eccl:20,Song:21,Isa:22,Jer:23,Lam:24,Ezek:25,Dan:26,Hos:27,Joel:28,Amos:29,Obad:30,Jonah:31,Mic:32,Nah:33,Hab:34,Zeph:35,Hag:36,Zech:37,Mal:38,Matt:39,Mark:40,Luke:41,John:42,Acts:43,Rom:44,"1Cor":45,"2Cor":46,Gal:47,Eph:48,Phil:49,Col:50,"1Thess":51,"2Thess":52,"1Tim":53,"2Tim":54,Titus:55,Phlm:56,Heb:57,Jas:58,"1Pet":59,"2Pet":60,"1John":61,"2John":62,"3John":63,Jude:64,Rev:65},versesInChapter:[[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,55,32,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],[22,25,22,31,23,30,25,32,35,29,10,51,22,31,27,36,16,27,25,26,36,31,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],[17,16,17,35,19,30,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,50,13,32,22,29,35,41,30,25,18,65,23,31,40,16,54,42,56,29,34,13],[46,37,29,49,33,25,26,20,29,22,32,32,18,29,23,22,20,22,21,20,23,30,25,22,19,19,26,68,29,20,30,52,29,12],[18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33],[36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25],[22,23,18,22],[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,15,23,29,22,44,25,12,25,11,31,13],[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,33,43,26,22,51,39,25],[53,46,28,34,18,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,53],[18,25,27,44,27,33,20,29,37,36,21,21,25,29,38,20,41,37,37,21,26,20,37,20,30],[54,55,24,43,26,81,40,40,44,14,47,40,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],[17,18,17,22,14,42,22,18,31,19,23,16,22,15,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],[11,70,13,24,17,22,28,36,15,44],[11,20,32,23,19,19,73,18,38,39,36,47,31],[22,23,15,17,14,14,10,17,32,3],[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,24,34,17],[6,12,8,8,12,10,17,9,20,18,7,8,6,7,5,11,15,50,14,9,13,31,6,10,22,12,14,9,11,12,24,11,22,22,28,12,40,22,13,17,13,11,5,26,17,11,9,14,20,23,19,9,6,7,23,13,11,11,17,12,8,12,11,10,13,20,7,35,36,5,24,20,28,23,10,12,20,72,13,19,16,8,18,12,13,17,7,18,52,17,16,15,5,23,11,13,12,9,9,5,8,28,22,35,45,48,43,13,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,13,10,7,12,15,21,10,20,14,9,6],[33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31],[18,26,22,16,20,12,29,17,18,20,10,14],[17,17,11,16,16,13,13,14],[31,22,26,6,30,13,25,22,21,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,12,25,24],[19,37,25,31,31,30,34,22,26,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],[22,22,66,22,22],[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,49,32,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],[21,49,30,37,31,28,28,27,27,21,45,13],[11,23,5,19,15,11,16,14,17,15,12,14,16,9],[20,32,21],[15,16,15,13,27,14,17,14,15],[21],[17,10,10,11],[16,13,12,13,15,16,20],[15,13,19],[17,20,19],[18,15,20],[15,23],[21,13,10,14,11,15,14,23,17,12,17,14,9,21],[14,17,18,6],[25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20],[45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20],[80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53],[51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25],[26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,41,38,40,30,35,27,27,32,44,31],[32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27],[31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24],[24,17,18,18,21,18,16,24,15,18,33,21,14],[24,21,29,31,26,18],[23,22,21,32,33,24],[30,30,21,23],[29,23,25,18],[10,20,13,18,28],[12,17,18],[20,15,16,16,25,21],[18,26,17,22],[16,15,15],[25],[14,18,19,16,14,20,28,13,28,39,40,29,25],[27,26,18,17,20],[25,25,22,19,14],[21,22,18],[10,29,24,21,21],[13],[14],[25],[20,29,22,11,14,17,17,13,21,11,19,17,18,20,8,21,18,24,21,15,27,21]]}}),define("json!../data/german.json",function(){return{ot:[{name:"Genesis",abbrev:"Gen",maxChapter:50},{name:"Exodus",abbrev:"Exod",maxChapter:40},{name:"Leviticus",abbrev:"Lev",maxChapter:27},{name:"Numbers",abbrev:"Num",maxChapter:36},{name:"Deuteronomy",abbrev:"Deut",maxChapter:34},{name:"Joshua",abbrev:"Josh",maxChapter:24},{name:"Judges",abbrev:"Judg",maxChapter:21},{name:"Ruth",abbrev:"Ruth",maxChapter:4},{name:"I Samuel",abbrev:"1Sam",maxChapter:31},{name:"II Samuel",abbrev:"2Sam",maxChapter:24},{name:"I Kings",abbrev:"1Kgs",maxChapter:22},{name:"II Kings",abbrev:"2Kgs",maxChapter:25},{name:"I Chronicles",abbrev:"1Chr",maxChapter:29},{name:"II Chronicles",abbrev:"2Chr",maxChapter:36},{name:"Ezra",abbrev:"Ezra",maxChapter:10},{name:"Nehemiah",abbrev:"Neh",maxChapter:13},{name:"Esther",abbrev:"Esth",maxChapter:10},{name:"Job",abbrev:"Job",maxChapter:42},{name:"Psalms",abbrev:"Ps",maxChapter:150},{name:"Proverbs",abbrev:"Prov",maxChapter:31},{name:"Ecclesiastes",abbrev:"Eccl",maxChapter:12},{name:"Song of Solomon",abbrev:"Song",maxChapter:8},{name:"Isaiah",abbrev:"Isa",maxChapter:66},{name:"Jeremiah",abbrev:"Jer",maxChapter:52},{name:"Lamentations",abbrev:"Lam",maxChapter:5},{name:"Ezekiel",abbrev:"Ezek",maxChapter:48},{name:"Daniel",abbrev:"Dan",maxChapter:12},{name:"Hosea",abbrev:"Hos",maxChapter:14},{name:"Joel",abbrev:"Joel",maxChapter:4},{name:"Amos",abbrev:"Amos",maxChapter:9},{name:"Obadiah",abbrev:"Obad",maxChapter:1},{name:"Jonah",abbrev:"Jonah",maxChapter:4},{name:"Micah",abbrev:"Mic",maxChapter:7},{name:"Nahum",abbrev:"Nah",maxChapter:3},{name:"Habakkuk",abbrev:"Hab",maxChapter:3},{name:"Zephaniah",abbrev:"Zeph",maxChapter:3},{name:"Haggai",abbrev:"Hag",maxChapter:2},{name:"Zechariah",abbrev:"Zech",maxChapter:14},{name:"Malachi",abbrev:"Mal",maxChapter:3}],versesInChapter:[[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,54,33,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],[22,25,22,31,23,30,29,28,35,29,10,51,22,31,27,36,16,27,25,26,37,30,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],[17,16,17,35,26,23,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,35,28,32,22,29,35,41,30,25,19,65,23,31,39,17,54,42,56,29,34,13],[46,37,29,49,33,25,26,20,29,22,32,31,19,29,23,22,20,22,21,20,23,29,26,22,19,19,26,69,28,20,30,52,29,12],[18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33],[36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25],[22,23,18,22],[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,16,23,28,23,44,25,12,25,11,31,13],[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,32,44,26,22,51,39,25],[53,46,28,20,32,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,54],[18,25,27,44,27,33,20,29,37,36,20,22,25,29,39,20,41,37,37,21,26,20,37,20,30],[54,55,24,43,41,66,40,40,44,14,47,41,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],[18,17,17,22,14,42,22,18,31,19,23,16,23,14,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],[11,70,13,24,17,22,28,36,15,44],[11,20,38,17,19,19,73,18,37,40,36,47,31],[22,23,15,17,14,14,10,17,32,3],[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,32,26,17],[6,12,9,9,13,11,18,10,21,18,7,9,6,7,5,11,15,51,15,10,14,32,6,10,22,12,14,9,11,13,25,11,22,23,28,13,40,23,14,18,14,12,5,27,18,12,10,15,21,23,21,11,7,9,24,14,12,12,18,14,9,13,12,11,14,20,8,36,37,6,24,20,28,23,11,13,21,72,13,20,17,8,19,13,14,17,7,19,53,17,16,16,5,23,11,13,12,9,9,5,8,29,22,35,45,48,43,14,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,14,10,8,12,15,21,10,20,14,9,6],[33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31],[18,26,22,17,19,12,29,17,18,20,10,14],[17,17,11,16,16,12,14,14],[31,22,26,6,30,13,25,23,20,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,11,25,24],[19,37,25,31,31,30,34,23,25,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],[22,22,66,22,22],[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,44,37,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],[21,49,33,34,30,29,28,27,27,21,45,13],[9,25,5,19,15,11,16,14,17,15,11,15,15,10],[20,27,5,21],[15,16,15,13,27,14,17,14,15],[21],[16,11,10,11],[16,13,12,14,14,16,20],[14,14,19],[17,20,19],[18,15,20],[15,23],[17,17,10,14,11,15,14,23,17,12,17,14,9,21],[14,17,24],[25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20],[45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20],[80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53],[51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25],[26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,40,38,40,30,35,27,27,32,44,31],[32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27],[31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24],[24,17,18,18,21,18,16,24,15,18,33,21,13],[24,21,29,31,26,18],[23,22,21,32,33,24],[30,30,21,23],[29,23,25,18],[10,20,13,18,28],[12,17,18],[20,15,16,16,25,21],[18,26,17,22],[16,15,15],[25],[14,18,19,16,14,20,28,13,28,39,40,29,25],[27,26,18,17,20],[25,25,22,19,14],[21,22,18],[10,29,24,21,21],[13],[15],[25],[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21]]}}),define("versificationMgr",["json!../data/kjv.json","json!../data/german.json"],function(e,t){function r(e){return e!==undefined&&n[e]?n[e].ot.length:n.kjv.ot.length}function i(e){return e!==undefined&&n[e]?n[e].nt.length:n.kjv.nt.length}function s(e,t){e=e<0?0:e;var i=r(t),s=e<i?"ot":"nt";return e=e<i?e:e-i,t!==undefined&&n[t]?n[t][s][e].maxChapter:n.kjv[s][e].maxChapter}function o(e,t,r){return r!==undefined&&n[r]?n[r].versesInChapter[e][t]:n.kjv.versesInChapter[e][t]}function u(e,t){e=e<0?0:e;var i=r(t),s=e<i?"ot":"nt";return e=e<i?e:e-i,t!==undefined&&n[t]?n[t][s][e]:n.kjv[s][e]}function a(e,t){return t!==undefined&&n[t]?n[t].osisToBookNum[e]:n.kjv.osisToBookNum[e]}function f(e){var t=[];return e!==undefined&&n[e]?t.concat(n[e].ot,n[e].nt):t.concat(n.kjv.ot,n.kjv.nt)}var n={};return n.kjv=e,t.nt=e.nt,t.osisToBookNum=e.osisToBookNum,n.german=t,{getBooksInOT:r,getBooksInNT:i,getChapterMax:s,getVersesInChapter:o,getBook:u,getBookNum:a,getAllBooks:f}}),define("installMgr",["unzip","dataMgr","zText","versificationMgr","async","tools"],function(e,t,n,r,i,s){function f(e){c("http://crosswire.org/ftpmirror/pub/sword/masterRepoList.conf","text",function(t,n){if(n===""&&!t)e("Couldn't download master repo list!");else if(!t){var r=[],i=null,s="",o="";n.split(/[\r\n]+/g).forEach(function(e){i=e.split("|");if(i.length>1&&i[0].search("CrossWire")!==-1){o=i[0].split("=")[2];switch(o){case"CrossWire":s="main";break;case"CrossWire Beta":s="beta";break;case"CrossWire av11n":s="av";break;case"CrossWire Attic":s="attic";break;case"CrossWire Wycliffe":s="wycliffe";break;case"CrossWire av11n Attic":s="avattic"}r.push({name:o,type:s,url:"http://crosswire.org/ftpmirror"+i[2].replace("raw","packages")+"/rawzip/",confUrl:"http://crosswire.org/ftpmirror"+i[2]+"/mods.d"})}}),e(t,r)}else e(t)})}function l(e,t){c(e.confUrl,"document",function(n,r){if(!n){var o=[],u="",a=r.getElementsByTagName("a");for(var f=0;f<a.length;f++)a[f].href.search(".conf")!==-1&&(u=a[f].baseURI+"/"+a[f].textContent,o.push(function(t){return function(n){c(t,"text",function(t,r){var i=s.readConf(r);i.ModDrv==="zText"?(i.url="http://www.crosswire.org/sword/servlet/SwordMod.Verify?modName="+i.moduleKey+"&"+e.type+"=true&pkgType=raw",n(t,i)):n(t)})}}(u)));i.parallel(o,function(e,n){t(e,s.cleanArray(n).sort(s.dynamicSortMultiple("Lang","moduleKey")))})}else t(n)})}function c(e,t,n,r){var i=new XMLHttpRequest({mozSystem:!0,mozAnon:!0});i.open("GET",e,!0),i.responseType=t,i.onreadystatechange=function(e){i.readyState==4&&(i.status===200?n(null,i.response):n({message:"Couldn't download module.",error:i.status}))},i.onprogress=r,i.onerror=function(e){n(e)},i.send(null)}function h(e,t,n){typeof e=="string"?c(e,"document",function(e,r){if(!e){var i=r.getElementsByTagName("a")[0].href;c(i,"blob",function(e,n){e?t(e):p(n,t)},n)}else t(e)}):p(e,t)}function p(n,r){var i=null,s=new FileReader;s.onload=function(n){var i=new e.Unzip(new Uint8Array(n.target.result)),s=i.getFilenames();s.forEach(function(e,n){e.search(".conf")!==-1&&t.saveConfig(new Blob([i.decompress(e)]),function(e,t){e?r(e):d(i,t.v11n,t,r)})})},s.readAsArrayBuffer(n)}function d(e,n,r,s){var o={};o.bin=[];var u=e.getFilenames();u.forEach(function(t,n){t.search("nt.bzs")!==-1?o.ntB=t:t.search("nt.bzv")!==-1?o.ntCV=t:t.search("ot.bzs")!==-1?o.otB=t:t.search("ot.bzv")!==-1?o.otCV=t:t.search(".conf")===-1&&o.bin.push({blob:new Blob([e.decompress(t)]),name:t})}),i.series([function(e){t.saveModule(o.bin,r,function(t,n){t?e(t):e(null)})},function(i){var s=null,u=null,a=null,f=null;o.otB&&(s=v(e.decompress(o.otB)),u=g(e.decompress(o.otCV),s,"ot",n)),o.ntB&&(a=v(e.decompress(o.ntB)),f=g(e.decompress(o.ntCV),a,"nt",n)),t.saveBCVPos(u,f,r,function(e,t){e?i(e):i(null)})}],function(e,n){e?(t.remove(r.id,function(e){}),s(e)):s(null,r.id)})}function v(e,t){var n=0,r=0,i=0,s=null,u=!1,a=[];o=0;while(!u){s=y(e),n=s[0],u=s[1];if(!u){s=y(e),r=s[0],u=s[1];if(!u){s=y(e),i=s[0],u=s[1];if(u)break;a.push({startPos:n,length:r,unused:i})}}}return a}function m(e){o=0;for(var t=0;t<4;t++)b(e),w(e),b(e)}function g(e,t,n,i){m(e);var s=n==="ot"?0:r.getBooksInOT(i),o=n==="ot"?r.getBooksInOT(i):r.getBooksInOT(i)+r.getBooksInNT(i),u=0,a=0,f=0,l=0,c=0,h=0,p=0,d=null,v=0,g={},y={};for(var E=s;E<o;E++){d=r.getBook(E,i),y[d.abbrev]=[];for(var S=0;S<d.maxChapter;S++){f=0,l=0,g={},g.verses=[],c=0;for(var x=0;x<r.getVersesInChapter(E,S,i);x++)p=b(e)[0],v=w(e)[0],v!==0&&(l=v),c=b(e)[0],x===0&&(f=v,h=0,p<t.length&&(h=t[p].startPos),g.startPos=f,g.booknum=E,g.bookStartPos=h),p===0&&v===0&&c===0?g!=={}&&g.verses.push({startPos:0,length:0}):g!=={}&&g.verses.push({startPos:v-f,length:c});g!={}&&(g.length=l-f+c,y[d.abbrev].push(g)),b(e),w(e),b(e)}b(e),w(e),b(e)}return y}function y(e,t){return u=e.subarray(o,o+4),a=!1,o+=4,u.length!==4&&(a=!0),t&&t(u[3]*1048576+u[2]*65536+u[1]*256+u[0],a),[u[3]*1048576+u[2]*65536+u[1]*256+u[0],a]}function b(e,t){return u=e.subarray(o,o+2),a=!1,o+=2,u.length!==2&&(a=!0),t&&t(u[1]*256+u[0],a),[u[1]*256+u[0],a]}function w(e,t){return u=e.subarray(o,o+6),a=!1,o+=6,u.length!==6&&(a=!0),t&&t(u[1]*17592186044416+u[0]*4294967296+u[5]*16777216+u[4]*65536+u[3]*256+u[2],a),[u[1]*17592186044416+u[0]*4294967296+u[5]*16777216+u[4]*65536+u[3]*256+u[2],a]}var o=0,u=null,a=!1;return{getRepositories:f,getModules:l,installModule:h}}),function(){var e,t,n,r={}.hasOwnProperty,i=function(){var e,t,n;this.options={},n=i.prototype.options;for(e in n)r.call(n,e)&&(t=n[e],this.options[e]=t);this.versification_system(this.options.versification_system)};i.prototype.s="",i.prototype.entities=[],i.prototype.passage=null,i.prototype.regexps={},i.prototype.options={consecutive_combination_strategy:"combine",osis_compaction_strategy:"b",book_sequence_strategy:"ignore",invalid_sequence_strategy:"ignore",sequence_combination_strategy:"combine",invalid_passage_strategy:"ignore",zero_chapter_strategy:"error",zero_verse_strategy:"error",non_latin_digits_strategy:"ignore",book_alone_strategy:"ignore",captive_end_digits_strategy:"delete",end_range_digits_strategy:"verse",include_apocrypha:!1,ps151_strategy:"c",versification_system:"default",case_sensitive:"none"},i.prototype.parse=function(e){var t,n,r;this.reset(),this.s=e,e=this.replace_control_characters(e),n=this.match_books(e),e=n[0],this.passage.books=n[1],e=this.match_passages(e),this.entities=[],n=0;for(r=e.length;n<r;n++)t=e[n],t=this.passage.handle_array([t])[0],this.entities=this.entities.concat(t);return this},i.prototype.reset=function(){return this.s="",this.entities=[],this.passage?(this.passage.books=[],this.passage.indices={}):(this.passage=new t,this.passage.options=this.options,this.passage.translations=this.translations)},i.prototype.set_options=function(e){var t,n;for(t in e)r.call(e,t)&&((n=e[t],"include_apocrypha"===t||"versification_system"===t||"case_sensitive"===t)?this[t](n):this.options[t]=n);return this},i.prototype.include_apocrypha=function(e){return null==e||!0!==e&&!1!==e?this:(this.options.include_apocrypha=e,this.regexps.books=this.regexps.get_books(e,this.options.case_sensitive),!0===e?this.translations["default"].chapters.Ps[150]=this.translations["default"].chapters.Ps151[0]:!1===e&&151===this.translations["default"].chapters.Ps.length&&this.translations["default"].chapters.Ps.pop(),this)},i.prototype.versification_system=function(e){var t,i;if(null==e||null==this.translations.alternates[e])return this;this.options.versification_system=e,null==(i=this.translations.alternates)["default"]&&(i["default"]={order:null,chapters:{}}),null!=this.translations.alternates[e].order&&(null==this.translations.alternates["default"].order&&(this.translations.alternates["default"].order=n.shallow_clone(this.translations["default"].order)),this.translations["default"].order=n.shallow_clone(this.translations.alternates[e].order));if(null!=this.translations.alternates[e].chapters)for(t in i=this.translations.alternates[e].chapters,i)r.call(i,t)&&(e=i[t],null==this.translations.alternates["default"].chapters[t]&&(this.translations.alternates["default"].chapters[t]=n.shallow_clone_array(this.translations["default"].chapters[t])),this.translations["default"].chapters[t]=n.shallow_clone_array(e));return this.include_apocrypha(this.options.include_apocrypha),this},i.prototype.case_sensitive=function(e){return null==e||"none"!==e&&"books"!==e||e===this.options.case_sensitive?this:(this.options.case_sensitive=e,this.regexps.books=this.regexps.get_books(this.options.include_apocrypha,e),this)},i.prototype.replace_control_characters=function(e){return e=e.replace(this.regexps.control," "),"replace"===this.options.non_latin_digits_strategy&&(e=e.replace(/[\u0660\u06f0\u07c0\u0966\u09e6\u0a66\u0ae6\u0b660\u0c66\u0ce6\u0d66\u0e50\u0ed0\u0f20\u1040\u1090\u17e0\u1810\u1946\u19d0\u1a80\u1a90\u1b50\u1bb0\u1c40\u1c50\ua620\ua8d0\ua900\ua9d0\uaa50\uabf0\uff10]/g,"0"),e=e.replace(/[\u0661\u06f1\u07c1\u0967\u09e7\u0a67\u0ae7\u0b67\u0be7\u0c67\u0ce7\u0d67\u0e51\u0ed1\u0f21\u1041\u1091\u17e1\u1811\u1947\u19d1\u1a81\u1a91\u1b51\u1bb1\u1c41\u1c51\ua621\ua8d1\ua901\ua9d1\uaa51\uabf1\uff11]/g,"1"),e=e.replace(/[\u0662\u06f2\u07c2\u0968\u09e8\u0a68\u0ae8\u0b68\u0be8\u0c68\u0ce8\u0d68\u0e52\u0ed2\u0f22\u1042\u1092\u17e2\u1812\u1948\u19d2\u1a82\u1a92\u1b52\u1bb2\u1c42\u1c52\ua622\ua8d2\ua902\ua9d2\uaa52\uabf2\uff12]/g,"2"),e=e.replace(/[\u0663\u06f3\u07c3\u0969\u09e9\u0a69\u0ae9\u0b69\u0be9\u0c69\u0ce9\u0d69\u0e53\u0ed3\u0f23\u1043\u1093\u17e3\u1813\u1949\u19d3\u1a83\u1a93\u1b53\u1bb3\u1c43\u1c53\ua623\ua8d3\ua903\ua9d3\uaa53\uabf3\uff13]/g,"3"),e=e.replace(/[\u0664\u06f4\u07c4\u096a\u09ea\u0a6a\u0aea\u0b6a\u0bea\u0c6a\u0cea\u0d6a\u0e54\u0ed4\u0f24\u1044\u1094\u17e4\u1814\u194a\u19d4\u1a84\u1a94\u1b54\u1bb4\u1c44\u1c54\ua624\ua8d4\ua904\ua9d4\uaa54\uabf4\uff14]/g,"4"),e=e.replace(/[\u0665\u06f5\u07c5\u096b\u09eb\u0a6b\u0aeb\u0b6b\u0beb\u0c6b\u0ceb\u0d6b\u0e55\u0ed5\u0f25\u1045\u1095\u17e5\u1815\u194b\u19d5\u1a85\u1a95\u1b55\u1bb5\u1c45\u1c55\ua625\ua8d5\ua905\ua9d5\uaa55\uabf5\uff15]/g,"5"),e=e.replace(/[\u0666\u06f6\u07c6\u096c\u09ec\u0a6c\u0aec\u0b6c\u0bec\u0c6c\u0cec\u0d6c\u0e56\u0ed6\u0f26\u1046\u1096\u17e6\u1816\u194c\u19d6\u1a86\u1a96\u1b56\u1bb6\u1c46\u1c56\ua626\ua8d6\ua906\ua9d6\uaa56\uabf6\uff16]/g,"6"),e=e.replace(/[\u0667\u06f7\u07c7\u096d\u09ed\u0a6d\u0aed\u0b6d\u0bed\u0c6d\u0ced\u0d6d\u0e57\u0ed7\u0f27\u1047\u1097\u17e7\u1817\u194d\u19d7\u1a87\u1a97\u1b57\u1bb7\u1c47\u1c57\ua627\ua8d7\ua907\ua9d7\uaa57\uabf7\uff17]/g,"7"),e=e.replace(/[\u0668\u06f8\u07c8\u096e\u09ee\u0a6e\u0aee\u0b6e\u0bee\u0c6e\u0cee\u0d6e\u0e58\u0ed8\u0f28\u1048\u1098\u17e8\u1818\u194e\u19d8\u1a88\u1a98\u1b58\u1bb8\u1c48\u1c58\ua628\ua8d8\ua908\ua9d8\uaa58\uabf8\uff18]/g,"8"),e=e.replace(/[\u0669\u06f9\u07c9\u096f\u09ef\u0a6f\u0aef\u0b6f\u0bef\u0c6f\u0cef\u0d6f\u0e59\u0ed9\u0f29\u1049\u1099\u17e9\u1819\u194f\u19d9\u1a89\u1a99\u1b59\u1bb9\u1c49\u1c59\ua629\ua8d9\ua909\ua9d9\uaa59\uabf9\uff19]/g,"9")),e},i.prototype.match_books=function(e){var t,n,r,i,s;n=[],s=this.regexps.books,r=0;for(i=s.length;r<i;r++)t=s[r],e=e.replace(t.regexp,function(e,r,i){return n.push({value:i,parsed:t.osis}),""+r+""+(n.length-1)+(null!=t.extra?"/"+t.extra:"")+""});return e=e.replace(this.regexps.translations,function(e){return n.push({value:e,parsed:e.toLowerCase()}),""+(n.length-1)+""}),[e,this.get_book_indices(n,e)]},i.prototype.get_book_indices=function(e,t){var n,r,i;n=0;for(i=/([\x1f\x1e])(\d+)(?:\/[a-z])?\1/g;r=i.exec(t);)e[r[2]].start_index=r.index+n,n+=e[r[2]].value.length-r[0].length;return e},i.prototype.match_passages=function(e){var t,n,r,i,s;for(s=[];r=this.regexps.escaped_passage.exec(e);)n=r[0],i=r[1],t=r[2],r.index+=n.length-i.length,/\s[2-9]\d\d\s*$|\s\d{4,}\s*$/.test(i)&&(n=/\s+\d+\s*$/,i=i.replace(n,"")),/[\d\x1f\x1e)]$/.test(i)||(i=this.replace_match_end(i)),"delete"===this.options.captive_end_digits_strategy&&(r=r.index+i.length,e.length>r&&/^\w/.test(e.substr(r,1))&&(i=i.replace(/[\s*]+\d+$/,"")),i=i.replace(/(\x1e[)\]]?)[\s*]*\d+$/,"$1")),i=i.replace(/[A-Z]+/g,function(e){return e.toLowerCase()}),r=i.substr(0,!1)?0:i.split("")[0].length,i={value:o.parse(i),type:"base",start_index:this.passage.books[t].start_index-r,match:i},"full"===this.options.book_alone_strategy&&1===i.value.length&&"b"===i.value[0].type&&0===r&&1===this.passage.books[t].parsed.length&&/^[234]/.test(this.passage.books[t].parsed[0])&&this.create_book_range(e,i,t),s.push(i);return s},i.prototype.replace_match_end=function(e){var t,n;for(n=e.length;t=this.regexps.match_end_split.exec(e);)n=t.index+t[0].length;return n<e.length&&(e=e.substr(0,n)),e},i.prototype.create_book_range=function(e,t,n){var r,s,o,u,a;r=[i.prototype.regexps.first,i.prototype.regexps.second,i.prototype.regexps.third],o=parseInt(this.passage.books[n].parsed[0].substr(0,1),10);for(s=a=1;1<=o?a<o:a>o;s=1<=o?++a:--a)if(u=s===o-1?i.prototype.regexps.range_and:i.prototype.regexps.range_only,u=e.match(RegExp("(?:^|\\W)("+r[s-1]+"\\s*"+u+"\\s*)\\x1f"+n+"\\x1f","i")),null!=u)return this.add_book_range_object(t,u,s);return!1},i.prototype.add_book_range_object=function(e,t,n){var r;return r=t[1].length,e.value[0]={type:"b_range_pre",value:[{type:"b_pre",value:n.toString(),indices:[t.index,t.index+r]},e.value[0]],indices:[0,e.value[0].indices[1]+r]},e.value[0].value[1].indices[0]+=r,e.value[0].value[1].indices[1]+=r,e.start_index-=r,e.match=t[1]+e.match},i.prototype.osis=function(){var e,t,n,r,i;t=[],i=this.parsed_entities(),n=0;for(r=i.length;n<r;n++)e=i[n],0<e.osis.length&&t.push(e.osis);return t.join(",")},i.prototype.osis_and_translations=function(){var e,t,n,r,i;t=[],i=this.parsed_entities(),n=0;for(r=i.length;n<r;n++)e=i[n],0<e.osis.length&&t.push([e.osis,e.translations.join(",")]);return t},i.prototype.osis_and_indices=function(){var e,t,n,r,i;t=[],i=this.parsed_entities(),n=0;for(r=i.length;n<r;n++)e=i[n],0<e.osis.length&&t.push({osis:e.osis,translations:e.translations,indices:e.indices});return t},i.prototype.parsed_entities=function(){var e,t,n,r,i,s,o,u,a,f,l,c,h;s=[],t=f=0;for(c=this.entities.length;0<=c?f<c:f>c;t=0<=c?++f:--f)if(e=this.entities[t],e.type&&"translation_sequence"===e.type&&0<s.length&&t===s[s.length-1].entity_id+1&&(s[s.length-1].indices[1]=e.absolute_indices[1]),null!=e.passages&&("b"!==e.type&&"b_range"!==e.type||"ignore"!==this.options.book_alone_strategy)){a=[],u=null;if(null!=e.passages[0].translations){l=e.passages[0].translations,r=0;for(o=l.length;r<o;r++)i=l[r],n=0<(null!=(h=i.osis)?h.length:void 0)?i.osis:"",null==u&&(u=i.alias),a.push(n)}else a=[""],u="default";i=[],r=e.passages.length;for(n=l=0;0<=r?l<r:l>r;n=0<=r?++l:--l){o=e.passages[n],null==o.type&&(o.type=e.type);if(!1===o.valid.valid&&("ignore"===this.options.invalid_sequence_strategy&&"sequence"===e.type&&this.snap_sequence("ignore",e,i,n,r),"ignore"===this.options.invalid_passage_strategy))continue;"b"!==o.type&&"b_range"!==o.type||"ignore"!==this.options.book_sequence_strategy||"sequence"!==e.type?(null==o.absolute_indices&&(o.absolute_indices=e.absolute_indices),i.push({osis:o.valid.valid?this.to_osis(o.start,o.end,u):"",type:o.type,indices:o.absolute_indices,translations:a,start:o.start,end:o.end,enclosed_indices:o.enclosed_absolute_indices,entity_id:t,entities:[o]})):this.snap_sequence("book",e,i,n,r)}if(0!==i.length)if(1<i.length&&"combine"===this.options.consecutive_combination_strategy&&(i=this.combine_consecutive_passages(i,u)),"separate"===this.options.sequence_combination_strategy)s=s.concat(i);else{u=[],n=i.length-1,null!=i[n].enclosed_indices&&0<=i[n].enclosed_indices[1]&&(e.absolute_indices[1]=i[n].enclosed_indices[1]),r=0;for(o=i.length;r<o;r++)n=i[r],0<n.osis.length&&u.push(n.osis);s.push({osis:u.join(","),indices:e.absolute_indices,translations:a,entity_id:t,entities:i})}}return s},i.prototype.to_osis=function(e,t,n){var r;return null==t.c&&null==t.v&&e.b===t.b&&null==e.c&&null==e.v&&"first_chapter"===this.options.book_alone_strategy&&(t.c=1),null==e.c&&(e.c=1),null==e.v&&(e.v=1),null==t.c&&(t.c=this.passage.translations[n].chapters[t.b].length),null==t.v&&(t.v=this.passage.translations[n].chapters[t.b][t.c-1]),this.options.include_apocrypha&&"b"===this.options.ps151_strategy&&(151===e.c&&"Ps"===e.b||151===t.c&&"Ps"===t.b)&&this.fix_ps151(e,t,n),"b"===this.options.osis_compaction_strategy&&1===e.c&&1===e.v&&t.c===this.passage.translations[n].chapters[t.b].length&&t.v===this.passage.translations[n].chapters[t.b][t.c-1]?(n=e.b,r=t.b):2>=this.options.osis_compaction_strategy.length&&1===e.v&&t.v===this.passage.translations[n].chapters[t.b][t.c-1]?(n=e.b+"."+e.c.toString(),r=t.b+"."+t.c.toString()):(n=e.b+"."+e.c.toString()+"."+e.v.toString(),r=t.b+"."+t.c.toString()+"."+t.v.toString()),n=n===r?n:n+"-"+r,null!=e.extra&&(n=e.extra+","+n),null!=t.extra&&(n+=","+t.extra),n},i.prototype.fix_ps151=function(e,t,n){return 151===e.c&&"Ps"===e.b?151===t.c&&"Ps"===t.b?(e.b="Ps151",e.c=1,t.b="Ps151",t.c=1):(e.extra=this.to_osis({b:"Ps151",c:1,v:e.v},{b:"Ps151",c:1,v:this.passage.translations[n].chapters.Ps151[0]},n),e.b="Prov",e.c=1,e.v=1):(t.extra=this.to_osis({b:"Ps151",c:1,v:1},{b:"Ps151",c:1,v:t.v},n),t.c=150,t.v=this.passage.translations[n].chapters.Ps[149])},i.prototype.combine_consecutive_passages=function(e,t){var n,r,i,s,o,u,a,f,l,c;a=[],f={},o=e.length-1,n=-1,r=!1;for(i=c=0;0<=o?c<=o:c>=o;i=0<=o?++c:--c)(u=e[i],0<u.osis.length)?(l=a.length-1,s=!1,u.enclosed_indices[0]!==n&&(n=u.enclosed_indices[0]),0<=n&&(i===o||e[i+1].enclosed_indices[0]!==u.enclosed_indices[0])&&(r=s=!0),this.is_verse_consecutive(f,u.start,t)?(a[l].end=u.end,a[l].is_enclosed_last=s,a[l].indices[1]=u.indices[1],a[l].enclosed_indices[1]=u.enclosed_indices[1],a[l].osis=this.to_osis(a[l].start,u.end,t)):a.push(u),f={b:u.end.b,c:u.end.c,v:u.end.v}):(a.push(u),f={});return r&&this.snap_enclosed_indices(a),a},i.prototype.snap_enclosed_indices=function(e){var t,n,r;n=0;for(r=e.length;n<r;n++)t=e[n],null!=t.is_enclosed_last&&(0>t.enclosed_indices[0]&&t.is_enclosed_last&&(t.indices[1]=t.enclosed_indices[1]),delete t.is_enclosed_last);return e},i.prototype.is_verse_consecutive=function(e,t,n){var r;if(null==e.b)return!1;r=null!=this.passage.translations[n].order?this.passage.translations[n].order:this.passage.translations["default"].order;if(e.b===t.b){if(e.c===t.c){if(e.v===t.v-1)return!0}else if(1===t.v&&e.c===t.c-1&&e.v===this.passage.translations[n].chapters[e.b][e.c-1])return!0}else if(1===t.c&&1===t.v&&r[e.b]===r[t.b]-1&&e.c===this.passage.translations[n].chapters[e.b].length&&e.v===this.passage.translations[n].chapters[e.b][e.c-1])return!0;return!1},i.prototype.snap_sequence=function(e,t,n,r,i){var s;return s=t.passages[r],s.absolute_indices[0]===t.absolute_indices[0]&&r<i-1&&this.get_snap_sequence_i(t.passages,r,i)!==r?(t.absolute_indices[0]=t.passages[r+1].absolute_indices[0],this.remove_absolute_indices(t.passages,r+1)):s.absolute_indices[1]===t.absolute_indices[1]&&0<r?t.absolute_indices[1]=0<n.length?n[n.length-1].indices[1]:t.passages[r-1].absolute_indices[1]:"book"===e&&r<i-1&&!this.starts_with_book(t.passages[r+1])&&(t.passages[r+1].absolute_indices[0]=s.absolute_indices[0]),t},i.prototype.get_snap_sequence_i=function(e,t,n){var r,i,s;for(r=i=s=t+1;s<=n?i<n:i>n;r=s<=n?++i:--i){if(this.starts_with_book(e[r]))return r;if(e[r].valid.valid)break}return t},i.prototype.starts_with_book=function(e){return"b"===e.type.substr(0,1)||("range"===e.type||"ff"===e.type)&&"b"===e.start.type.substr(0,1)?!0:!1},i.prototype.remove_absolute_indices=function(e,t){var n,r,i,s,o,u;if(0>e[t].enclosed_absolute_indices[0])return!1;n=e[t].enclosed_absolute_indices,i=n[0],n=n[1],u=e.slice(t),s=0;for(o=u.length;s<o;s++){if(r=u[s],r.enclosed_absolute_indices[0]!==i||r.enclosed_absolute_indices[1]!==n)break;r.enclosed_absolute_indices=[-1,-1]}return!0},this.bcv_parser=e=i;var s=function(){};s.prototype.books=[],s.prototype.indices={},s.prototype.options={},s.prototype.translations={},s.prototype.handle_array=function(e,t,n){var r,i,s;null==t&&(t=[]),null==n&&(n={}),i=0;for(s=e.length;i<s;i++){r=e[i];if("stop"===r.type)break;n=this.handle_obj(r,t,n),t=n[0],n=n[1]}return[t,n]},s.prototype.handle_obj=function(e,t,n){return null!=e.type&&null!=this[e.type]?this[e.type](e,t,n):[t,n]},s.prototype.b=function(e,t,r){var i,s,o,u,a;e.start_context=n.shallow_clone(r),e.passages=[],r=[],a=this.books[e.value].parsed,o=0;for(u=a.length;o<u;o++)i=a[o],s=this.validate_ref(e.start_context.translations,{b:i}),i={start:{b:i},end:{b:i},valid:s},0===e.passages.length&&s.valid?e.passages.push(i):r.push(i);return 0===e.passages.length&&e.passages.push(r.shift()),0<r.length&&(e.passages[0].alternates=r),null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),t.push(e),r={b:e.passages[0].start.b},null!=e.start_context.translations&&(r.translations=e.start_context.translations),[t,r]},s.prototype.b_range=function(e,t,n){return this.range(e,t,n)},s.prototype.b_range_pre=function(e,t,r){var i,s;return e.start_context=n.shallow_clone(r),e.passages=[],i=this.pluck("b",e.value),r=this.b(i,[],r),i=r[0][0],r=r[1],null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),s={b:e.value[0].value+i.passages[0].start.b.substr(1),type:"b"},e.passages=[{start:s,end:i.passages[0].end,valid:i.passages[0].valid}],null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),t.push(e),[t,r]},s.prototype.base=function(e,t,n){return this.indices=this.calculate_indices(e.match,e.start_index),this.handle_array(e.value,t,n)},s.prototype.bc=function(e,t,r){var i,s,o,u,a,f,l,c,h;e.start_context=n.shallow_clone(r),e.passages=[],this.reset_context(r,["b","c","v"]),o=this.pluck("c",e.value).value,i=[],h=this.books[this.pluck("b",e.value).value].parsed,l=0;for(c=h.length;l<c;l++)s=h[l],u="c",f=this.validate_ref(e.start_context.translations,{b:s,c:o}),a={start:{b:s},end:{b:s},valid:f},f.messages.start_chapter_not_exist_in_single_chapter_book&&(a.valid=this.validate_ref(e.start_context.translations,{b:s,v:o}),a.start.c=1,a.end.c=1,u="v"),a.start[u]=o,s=this.fix_start_zeroes(a.valid,a.start.c,a.start.v),a.start.c=s[0],a.start.v=s[1],a.end[u]=a.start[u],0===e.passages.length&&a.valid.valid?e.passages.push(a):i.push(a);return 0===e.passages.length&&e.passages.push(i.shift()),0<i.length&&(e.passages[0].alternates=i),null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),this.set_context_from_object(r,["b","c","v"],e.passages[0].start),t.push(e),[t,r]},s.prototype.bc_title=function(e,t,r){var i,s,o,u;e.start_context=n.shallow_clone(r),r=this.bc(this.pluck("bc",e.value),[],r),i=r[0][0],r=r[1];if("Ps"!==i.passages[0].start.b.substr(0,2)&&null!=i.passages[0].alternates){s=o=0;for(u=i.passages[0].alternates.length;0<=u?o<u:o>u;s=0<=u?++o:--o)if("Ps"===i.passages[0].alternates[s].start.b.substr(0,2)){i.passages[0]=i.passages[0].alternates[s];break}}return"Ps"!==i.passages[0].start.b.substr(0,2)?(t.push(i),[t,r]):(this.books[this.pluck("b",i.value).value].parsed=["Ps"],i=this.pluck("title",e.value),e.value[1]={type:"v",value:[{type:"integer",value:1,indices:i.indices}],indices:i.indices},e.original_type="bc_title",e.type="bcv",this.bcv(e,t,e.start_context))},s.prototype.bcv=function(e,t,r){var i,s,o,u,a,f,l,c;e.start_context=n.shallow_clone(r),e.passages=[],this.reset_context(r,["b","c","v"]),o=this.pluck("bc",e.value),u=this.pluck("c",o.value).value,a=this.pluck("v",e.value).value,i=[],c=this.books[this.pluck("b",o.value).value].parsed,f=0;for(l=c.length;f<l;f++)s=c[f],o=this.validate_ref(e.start_context.translations,{b:s,c:u,v:a}),a=this.fix_start_zeroes(o,u,a),u=a[0],a=a[1],s={start:{b:s,c:u,v:a},end:{b:s,c:u,v:a},valid:o},0===e.passages.length&&o.valid?e.passages.push(s):i.push(s);return 0===e.passages.length&&e.passages.push(i.shift()),0<i.length&&(e.passages[0].alternates=i),null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),this.set_context_from_object(r,["b","c","v"],e.passages[0].start),t.push(e),[t,r]},s.prototype.bv=function(e,t,r){var i;return e.start_context=n.shallow_clone(r),i=e.value,i={indices:e.indices,value:[{type:"bc",value:[i[0],{type:"c",value:[{type:"integer",value:1}]}]},i[1]]},r=this.bcv(i,[],r),i=r[0][0],r=r[1],e.passages=i.passages,null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),t.push(e),[t,r]},s.prototype.c=function(e,t,r){var i,s;return e.start_context=n.shallow_clone(r),i="integer"===e.type?e.value:this.pluck("integer",e.value).value,s=this.validate_ref(e.start_context.translations,{b:r.b,c:i}),!s.valid&&s.messages.start_chapter_not_exist_in_single_chapter_book?this.v(e,t,r):(i=this.fix_start_zeroes(s,i)[0],e.passages=[{start:{b:r.b,c:i},end:{b:r.b,c:i},valid:s}],null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),t.push(e),r.c=i,this.reset_context(r,["v"]),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),[t,r])},s.prototype.c_psalm=function(e,t,n){var r;return e.original_type=e.type,e.original_value=e.value,e.type="bc",r=parseInt(this.books[e.value].value.match(/^\d+/)[0],10),e.value=[{type:"b",value:e.original_value,indices:e.indices},{type:"c",value:[{type:"integer",value:r,indices:e.indices}],indices:e.indices}],this.bc(e,t,n)},s.prototype.c_title=function(e,t,r){return e.start_context=n.shallow_clone(r),"Ps"!==r.b?this.c(e.value[0],t,r):(r=this.pluck("title",e.value),e.value[1]={type:"v",value:[{type:"integer",value:1,indices:r.indices}],indices:r.indices},e.original_type="c_title",e.type="cv",this.cv(e,t,e.start_context))},s.prototype.cv=function(e,t,r){var i,s,o;return e.start_context=n.shallow_clone(r),i=this.pluck("c",e.value).value,s=this.pluck("v",e.value).value,o=this.validate_ref(e.start_context.translations,{b:r.b,c:i,v:s}),s=this.fix_start_zeroes(o,i,s),i=s[0],s=s[1],e.passages=[{start:{b:r.b,c:i,v:s},end:{b:r.b,c:i,v:s},valid:o}],null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),t.push(e),r.c=i,r.v=s,null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),[t,r]},s.prototype.cb_range=function(e,t,n){var r,i,s;return e.original_type=e.type,e.type="range",i=e.value,r=i[0],s=i[1],i=i[2],e.original_value=[r,s,i],e.value=[{type:"bc",value:[r,s],indices:e.indices},i],i.indices[1]=e.indices[1],this.range(e,t,n)},s.prototype.cv_psalm=function(e,t,r){var i,s;return e.start_context=n.shallow_clone(r),e.original_type=e.type,s=e.original_value=e.value,i=s[0],s=s[1],e.type="bcv",i=this.c_psalm(i,[],e.start_context)[0][0],e.value=[i,s],this.bcv(e,t,r)},s.prototype.ff=function(e,t,r){return e.start_context=n.shallow_clone(r),e.value.push({type:"integer",indices:e.indices,value:999}),r=this.range(e,[],e.start_context),e=r[0][0],r=r[1],e.value.pop(),null!=e.passages[0].valid.end_verse_not_exist&&delete e.passages[0].valid.end_verse_not_exist,null!=e.passages[0].valid.end_chapter_not_exist&&delete e.passages[0].valid.end_chapter_not_exist,null!=e.passages[0].end.original_c&&delete e.passages[0].end.original_c,t.push(e),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),[t,r]},s.prototype.integer_title=function(e,t,r){return e.start_context=n.shallow_clone(r),"Ps"!==r.b?this.integer(e.value[0],t,r):(e.value[0]={type:"c",value:[e.value[0]],indices:[e.value[0].indices[0],e.value[0].indices[1]]},r=[e.indices[1]-5,e.indices[1]],e.value[1]={type:"v",value:[{type:"integer",value:1,indices:r}],indices:r},e.original_type="integer_title",e.type="cv",this.cv(e,t,e.start_context))},s.prototype.integer=function(e,t,n){return null!=n.v?this.v(e,t,n):this.c(e,t,n)},s.prototype.sequence=function(e,t,r){var i,s,o,u,a,f,l,c;e.start_context=n.shallow_clone(r),e.passages=[],l=e.value,o=0;for(a=l.length;o<a;o++){i=l[o],r=this.handle_array(i,[],r),i=r[0],i=i[0],r=r[1],c=i.passages,u=0;for(f=c.length;u<f;u++)s=c[u],null==s.type&&(s.type=i.type),null==s.absolute_indices&&(s.absolute_indices=i.absolute_indices),null!=i.start_context.translations&&(s.translations=i.start_context.translations),s.enclosed_absolute_indices="sequence_post_enclosed"===i.type?i.absolute_indices:[-1,-1],e.passages.push(s)}return null==e.absolute_indices&&(e.absolute_indices=0<e.passages.length&&"sequence"===e.type?[e.passages[0].absolute_indices[0],e.passages[e.passages.length-1].absolute_indices[1]]:this.get_absolute_indices(e.indices)),t.push(e),[t,r]},s.prototype.sequence_post_enclosed=function(e,t,n){return this.sequence(e,t,n)},s.prototype.v=function(e,t,r){var i,s,o;return s="integer"===e.type?e.value:this.pluck("integer",e.value).value,e.start_context=n.shallow_clone(r),i=null!=r.c?r.c:1,o=this.validate_ref(e.start_context.translations,{b:r.b,c:i,v:s}),s=this.fix_start_zeroes(o,0,s)[1],e.passages=[{start:{b:r.b,c:i,v:s},end:{b:r.b,c:i,v:s},valid:o}],null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),t.push(e),r.v=s,[t,r]},s.prototype.range=function(e,t,r){var i,s,o,u,a;e.start_context=n.shallow_clone(r),s=e.value,o=s[0],i=s[1];if("v"!==i.type||"bc"!==o.type&&"c"!==o.type||"verse"!==this.options.end_range_digits_strategy)return r=this.handle_obj(o,[],r),o=r[0][0],r=r[1],r=this.handle_obj(i,[],r),i=r[0][0],r=r[1],e.value=[o,i],e.indices=[o.indices[0],i.indices[1]],delete e.absolute_indices,u={b:o.passages[0].start.b,c:o.passages[0].start.c,v:o.passages[0].start.v,type:o.type},s={b:i.passages[0].end.b,c:i.passages[0].end.c,v:i.passages[0].end.v,type:i.type},i.passages[0].valid.messages.start_chapter_is_zero&&(s.c=0),i.passages[0].valid.messages.start_verse_is_zero&&(s.v=0),a=this.validate_ref(e.start_context.translations,u,s),a.valid?(i=this.range_handle_valid(a,e,o,u,i,s,t),o=i[0],i=i[1],o)?i:(null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),e.passages=[{start:u,end:s,valid:a}],null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),t.push(e),[t,r]):this.range_handle_invalid(a,e,o,u,i,s,t);return this.range_change_integer_end(e,t)},s.prototype.range_change_end=function(e,t,n){var r;return r=e.value[1],"integer"===r.type?(r.original_value=r.value,r.value=n):"v"===r.type?(r=this.pluck("integer",r.value),r.original_value=r.value,r.value=n):"cv"===r.type&&(r=this.pluck("c",r.value),r.original_value=r.value,r.value=n),this.handle_obj(e,t,e.start_context)},s.prototype.range_change_integer_end=function(e,t){var n,r;return n=e.value,r=n[0],n=n[1],e.original_type=e.type,e.original_value=[r,n],e.type="integer"===r.type?"cv":r.type+"v","integer"===r.type&&(e.value[0]={type:"c",value:[r],indices:r.indices}),"integer"===n.type&&(e.value[1]={type:"v",value:[n],indices:n.indices}),this.handle_obj(e,t,e.start_context)},s.prototype.range_change_cv_end=function(e,t){var r,i,s;return r=e.value,s=r[0],r=r[1],e.original_type=e.type,e.original_value=[s,r],e.type="sequence",i=r.value,r=i[0],i=i[1],r=n.shallow_clone(r),r.original_type=r.type,r.type="v",e.value=[[{type:"range",value:[s,r],indices:[s.indices[0],r.indices[1]]}],[i]],this.sequence(e,t,e.start_context)},s.prototype.range_validate=function(e,t,n,r){return e.messages.end_chapter_not_exist?(n.original_c=n.c,n.c=e.messages.end_chapter_not_exist,null!=n.v&&(n.v=this.validate_ref(r.start_context.translations,{b:n.b,c:n.c,v:999}).messages.end_verse_not_exist)):e.messages.end_verse_not_exist&&(n.original_v=n.v,n.v=e.messages.end_verse_not_exist),e.messages.end_verse_is_zero&&"allow"!==this.options.zero_verse_strategy&&(n.v=e.messages.end_verse_is_zero),e.messages.end_chapter_is_zero&&(n.c=e.messages.end_chapter_is_zero),e=this.fix_start_zeroes(e,t.c,t.v),t.c=e[0],t.v=e[1],!0},s.prototype.range_check_new_end=function(e,t,n,r){var i,s;return i=0,s=null,r.messages.end_chapter_before_start?s="c":r.messages.end_verse_before_start&&(s="v"),null!=s&&(i=this.range_get_new_end_value(t,n,r,s)),0<i&&(t={b:n.b,c:n.c,v:n.v},t[s]=i,e=this.validate_ref(e,t),e.valid||(i=0)),i},s.prototype.range_get_new_end_value=function(e,t,n,r){var i;return i=0,"c"===r&&n.messages.end_chapter_is_zero||"v"===r&&n.messages.end_verse_is_zero?i:(10<=e[r]&&10>t[r]&&e[r]-10*Math.floor(e[r]/10)<t[r]?i=t[r]+10*Math.floor(e[r]/10):100<=e[r]&&100>t[r]&&e[r]-100<t[r]&&(i=t[r]+100),i)},s.prototype.range_handle_valid=function(e,t,n,r,i,s,o){if(e.messages.end_chapter_not_exist&&"verse"===this.options.end_range_digits_strategy&&null==r.v&&("integer"===i.type||"v"===i.type))if(n="v"===i.type?this.pluck("integer",i.value):i.value,n=this.validate_ref(t.start_context.translations,{b:r.b,c:r.c,v:n}),n.valid)return[!0,this.range_change_integer_end(t,o)];return e.messages.end_chapter_not_exist&&"verse"===this.options.end_range_digits_strategy&&null!=r.v&&"cv"===i.type&&(n=this.validate_ref(t.start_context.translations,{b:s.b,c:r.c,v:s.c}),n.valid&&(n=this.validate_ref(t.start_context.translations,{b:s.b,c:r.c,v:s.v})),n.valid)?[!0,this.range_change_cv_end(t,o)]:(this.range_validate(e,r,s,t),[!1,null])},s.prototype.range_handle_invalid=function(e,t,n,r,i,s,o){if((e.messages.end_chapter_before_start||e.messages.end_verse_before_start)&&("integer"===i.type||"v"===i.type)||e.messages.end_chapter_before_start&&"cv"===i.type)if(e=this.range_check_new_end(t.start_context.translations,r,s,e),0<e)return this.range_change_end(t,o,e);if("verse"===this.options.end_range_digits_strategy&&void 0===r.v&&("integer"===i.type||"v"===i.type))if(e="v"===i.type?this.pluck("integer",i.value):i.value,r=this.validate_ref(t.start_context.translations,{b:r.b,c:r.c,v:e}),r.valid)return this.range_change_integer_end(t,o);return r=[t.type,"sequence"],t.original_type=r[0],t.type=r[1],n=[[n,i],[[n],[i]]],t.original_value=n[0],t.value=n[1],this.handle_obj(t,o,t.start_context)},s.prototype.translation_sequence=function(e,t,n){var r,i,s,o,u;i=[],i.push({translation:this.books[e.value[0].value].parsed}),u=e.value[1],s=0;for(o=u.length;s<o;s++)r=u[s],r=this.books[this.pluck("translation",r).value].parsed,null!=r&&i.push({translation:r});s=0;for(o=i.length;s<o;s++)r=i[s],null!=this.translations.aliases[r.translation]?(r.alias=this.translations.aliases[r.translation].alias,r.osis=this.translations.aliases[r.translation].osis):(r.alias="default",r.osis=r.translation.toUpperCase());if(0<t.length){s=0;for(r=o=u=t.length-1;0>=u?0>=o:0<=o;r=0>=u?++o:--o)if(null!=t[r].original_type&&(t[r].type=t[r].original_type),null!=t[r].original_value&&(t[r].value=t[r].original_value),"translation_sequence"===t[r].type){s=r+1;break}s<t.length&&(t[s].start_context.translations=i,n=this.handle_array(t.slice(s),[],t[s].start_context),n=n[1])}return null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),t.push(e),this.reset_context(n,["translations"]),[t,n]},s.prototype.pluck=function(e,t){var n,r,i;r=0;for(i=t.length;r<i;r++)if(n=t[r],null!=n.type&&n.type===e)return"c"===e||"v"===e?this.pluck("integer",n.value):n;return null},s.prototype.set_context_from_object=function(e,t,n){var r,i,s,o;o=[],i=0;for(s=t.length;i<s;i++)r=t[i],null!=n[r]&&o.push(e[r]=n[r]);return o},s.prototype.reset_context=function(e,t){var n,r,i,s;s=[],r=0;for(i=t.length;r<i;r++)n=t[r],s.push(delete e[n]);return s},s.prototype.fix_start_zeroes=function(e,t,n){return e.valid&&(e.messages.start_chapter_is_zero&&(t=e.messages.start_chapter_is_zero),e.messages.start_verse_is_zero&&"allow"!==this.options.zero_verse_strategy&&(n=e.messages.start_verse_is_zero)),[t,n]},s.prototype.calculate_indices=function(e,t){var n,r,i,s,o,u,a,f,l,c,h,p;a="book",r=[],i=0,t=parseInt(t,10),u=[e],p=["",""],f=0;for(c=p.length;f<c;f++){n=p[f],o=[],l=0;for(h=u.length;l<h;l++)s=u[l],o=o.concat(s.split(n));u=o}f=0;for(l=u.length;f<l;f++)s=u[f],a="book"===a?"rest":"book",o=s.length,0!==o&&("book"===a?(s=s.replace(/\/[a-z]$/,""),n=i+o,0<r.length&&r[r.length-1].index===t?r[r.length-1].end=n:r.push({start:i,end:n,index:t}),i+=o+2,t=this.books[s].start_index+this.books[s].value.length-i,r.push({start:n+1,end:n+1,index:t})):(n=i+o-1,0<r.length&&r[r.length-1].index===t?r[r.length-1].end=n:r.push({start:i,end:n,index:t}),i+=o));return r},s.prototype.get_absolute_indices=function(e){var t,n,r,i,s,o,u;r=e[0],e=e[1],t=i=null,u=this.indices,s=0;for(o=u.length;s<o;s++)if(n=u[s],null===i&&n.start<=r&&r<=n.end&&(i=r+n.index),n.start<=e&&e<=n.end){t=e+n.index+1;break}return[i,t]},s.prototype.validate_ref=function(e,t,n){var r,i;return e||(e=[{translation:"default",osis:"",alias:"default"}]),i=e[0],null==i?{valid:!1,messages:{translation_invalid:!0}}:(r={},null==i.alias&&(i.alias="default"),null==i.alias?{valid:!1,messages:{translation_invalid:!0}}:(null==this.translations.aliases[i.alias]&&(i.alias="default",r.translation_unknown=!0),r=this.validate_start_ref(i.alias,t,!0,r),e=r[0],r=r[1],n&&(t=this.validate_end_ref(i.alias,t,n,e,r),e=t[0],r=t[1]),{valid:e,messages:r}))},s.prototype.validate_start_ref=function(e,t,n,r){var i,s;"default"!==e&&null==(null!=(i=this.translations[e])?i.chapters[t.b]:void 0)&&this.promote_book_to_translation(t.b,e),i=null!=(null!=(s=this.translations[e])?s.order:void 0)?e:"default";if(null!=this.translations[i].order[t.b]){null==t.c&&(t.c=1),t.c=parseInt(t.c,10);if(isNaN(t.c))return r.start_chapter_not_numeric=!0,[!1,r];0===t.c&&(r.start_chapter_is_zero=1,"error"===this.options.zero_chapter_strategy?n=!1:t.c=1),0<t.c&&null!=this.translations[e].chapters[t.b][t.c-1]?null!=t.v&&(t.v=parseInt(t.v,10),isNaN(t.v)?(n=!1,r.start_verse_not_numeric=!0):0===t.v?(r.start_verse_is_zero=1,"error"===this.options.zero_verse_strategy?n=!1:"upgrade"===this.options.zero_verse_strategy&&(t.v=1)):t.v>this.translations[e].chapters[t.b][t.c-1]&&(n=!1,r.start_verse_not_exist=this.translations[e].chapters[t.b][t.c-1])):(n=!1,1!==t.c&&1===this.translations[e].chapters[t.b].length?r.start_chapter_not_exist_in_single_chapter_book=1:0<t.c&&(r.start_chapter_not_exist=this.translations[e].chapters[t.b].length))}else n=!1,r.start_book_not_exist=!0;return[n,r]},s.prototype.validate_end_ref=function(e,t,n,r,i){var s,o;return"default"!==e&&null==(null!=(s=this.translations[e])?s.chapters[n.b]:void 0)&&this.promote_book_to_translation(n.b,e),s=null!=(null!=(o=this.translations[e])?o.order:void 0)?e:"default",null!=n.c&&(n.c=parseInt(n.c,10)),null!=n.v&&(n.v=parseInt(n.v,10)),null!=n.c&&!isNaN(n.c)&&0===n.c&&(i.end_chapter_is_zero=1,"error"===this.options.zero_chapter_strategy?r=!1:n.c=1),null!=this.translations[s].order[n.b]?(null!=this.translations[s].order[t.b]&&this.translations[s].order[t.b]>this.translations[s].order[n.b]&&(r=!1,i.end_book_before_start=!0),t.b===n.b&&null!=n.c&&!isNaN(n.c)&&(null==t.c&&(t.c=1),!isNaN(parseInt(t.c,10))&&t.c>n.c?(r=!1,i.end_chapter_before_start=!0):t.c===n.c&&null!=n.v&&!isNaN(n.v)&&(null==t.v&&(t.v=1),!isNaN(parseInt(t.v,10))&&t.v>n.v&&(r=!1,i.end_verse_before_start=!0))),null!=n.c&&!isNaN(n.c)&&null==this.translations[e].chapters[n.b][n.c-1]&&(1===this.translations[e].chapters[n.b].length?i.end_chapter_not_exist_in_single_chapter_book=1:0<n.c&&(i.end_chapter_not_exist=this.translations[e].chapters[n.b].length)),null!=n.v&&!isNaN(n.v)&&(null==n.c&&(n.c=this.translations[e].chapters[n.b].length),n.v>this.translations[e].chapters[n.b][n.c-1]?i.end_verse_not_exist=this.translations[e].chapters[n.b][n.c-1]:0===n.v&&(i.end_verse_is_zero=1,"error"===this.options.zero_verse_strategy?r=!1:"upgrade"===this.options.zero_verse_strategy&&(n.v=1)))):(r=!1,i.end_book_not_exist=!0),null!=n.c&&isNaN(n.c)&&(r=!1,i.end_chapter_not_numeric=!0),null!=n.v&&isNaN(n.v)&&(r=!1,i.end_verse_not_numeric=!0),[r,i]},s.prototype.promote_book_to_translation=function(e,t){var r,i,s;return null==(r=this.translations)[t]&&(r[t]={}),null==(r=this.translations[t]).chapters&&(r.chapters={}),null!=(null!=(i=this.translations.alternates[t])?null!=(s=i.chapters)?s[e]:void 0:void 0)?this.translations[t].chapters[e]=this.translations.alternates[t].chapters[e]:this.translations[t].chapters[e]=n.shallow_clone_array(this.translations["default"].chapters[e])},t=s,n={shallow_clone:function(e){var t,n,i;if(null==e)return e;n={};for(t in e)r.call(e,t)&&(i=e[t],n[t]=i);return n},shallow_clone_array:function(e){var t,n,r,i;if(null==e)return e;n=[],t=r=0;for(i=e.length;0<=i?r<=i:r>=i;t=0<=i?++r:--r)"undefined"!=typeof e[t]&&(n[t]=e[t]);return n}},e.prototype.regexps.translations=/(?:AMP|ASV|CE[BV]|E[RS]V|HCSB|N?KJV|MSG|NAB(?:RE)?|NASB?|NIR?V|NLT|N?RSV|TNIV)\b/gi,e.prototype.translations={aliases:{ceb:{osis:"CEB",alias:"ceb"},kjv:{osis:"KJV",alias:"kjv"},nab:{osis:"NAB",alias:"nab"},nas:{osis:"NASB",alias:"default"},nirv:{osis:"NIrV",alias:"kjv"},niv:{osis:"NIV",alias:"kjv"},nkjv:{osis:"NKJV",alias:"nkjv"},nlt:{osis:"NLT",alias:"nlt"},nrsv:{osis:"NRSV",alias:"nrsv"},"default":{osis:"",alias:"default"}},"default":{order:{Gen:1,Exod:2,Lev:3,Num:4,Deut:5,Josh:6,Judg:7,Ruth:8,"1Sam":9,"2Sam":10,"1Kgs":11,"2Kgs":12,"1Chr":13,"2Chr":14,Ezra:15,Neh:16,Esth:17,Job:18,Ps:19,Prov:20,Eccl:21,Song:22,Isa:23,Jer:24,Lam:25,Ezek:26,Dan:27,Hos:28,Joel:29,Amos:30,Obad:31,Jonah:32,Mic:33,Nah:34,Hab:35,Zeph:36,Hag:37,Zech:38,Mal:39,Matt:40,Mark:41,Luke:42,John:43,Acts:44,Rom:45,"1Cor":46,"2Cor":47,Gal:48,Eph:49,Phil:50,Col:51,"1Thess":52,"2Thess":53,"1Tim":54,"2Tim":55,Titus:56,Phlm:57,Heb:58,Jas:59,"1Pet":60,"2Pet":61,"1John":62,"2John":63,"3John":64,Jude:65,Rev:66,Tob:67,Jdt:68,GkEsth:69,Wis:70,Sir:71,Bar:72,PrAzar:73,Sus:74,Bel:75,SgThree:76,EpJer:77,"1Macc":78,"2Macc":79,"3Macc":80,"4Macc":81,"1Esd":82,"2Esd":83,PrMan:84,Ps151:85},chapters:{Gen:[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,55,32,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],Exod:[22,25,22,31,23,30,25,32,35,29,10,51,22,31,27,36,16,27,25,26,36,31,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],Lev:[17,16,17,35,19,30,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],Num:[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,50,13,32,22,29,35,41,30,25,18,65,23,31,40,16,54,42,56,29,34,13],Deut:[46,37,29,49,33,25,26,20,29,22,32,32,18,29,23,22,20,22,21,20,23,30,25,22,19,19,26,68,29,20,30,52,29,12],Josh:[18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33],Judg:[36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25],Ruth:[22,23,18,22],"1Sam":[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,15,23,29,22,44,25,12,25,11,31,13],"2Sam":[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,33,43,26,22,51,39,25],"1Kgs":[53,46,28,34,18,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,53],"2Kgs":[18,25,27,44,27,33,20,29,37,36,21,21,25,29,38,20,41,37,37,21,26,20,37,20,30],"1Chr":[54,55,24,43,26,81,40,40,44,14,47,40,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],"2Chr":[17,18,17,22,14,42,22,18,31,19,23,16,22,15,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],Ezra:[11,70,13,24,17,22,28,36,15,44],Neh:[11,20,32,23,19,19,73,18,38,39,36,47,31],Esth:[22,23,15,17,14,14,10,17,32,3],Job:[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,24,34,17],Ps:[6,12,8,8,12,10,17,9,20,18,7,8,6,7,5,11,15,50,14,9,13,31,6,10,22,12,14,9,11,12,24,11,22,22,28,12,40,22,13,17,13,11,5,26,17,11,9,14,20,23,19,9,6,7,23,13,11,11,17,12,8,12,11,10,13,20,7,35,36,5,24,20,28,23,10,12,20,72,13,19,16,8,18,12,13,17,7,18,52,17,16,15,5,23,11,13,12,9,9,5,8,28,22,35,45,48,43,13,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,13,10,7,12,15,21,10,20,14,9,6],Prov:[33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31],Eccl:[18,26,22,16,20,12,29,17,18,20,10,14],Song:[17,17,11,16,16,13,13,14],Isa:[31,22,26,6,30,13,25,22,21,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,12,25,24],Jer:[19,37,25,31,31,30,34,22,26,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],Lam:[22,22,66,22,22],Ezek:[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,49,32,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],Dan:[21,49,30,37,31,28,28,27,27,21,45,13],Hos:[11,23,5,19,15,11,16,14,17,15,12,14,16,9],Joel:[20,32,21],Amos:[15,16,15,13,27,14,17,14,15],Obad:[21],Jonah:[17,10,10,11],Mic:[16,13,12,13,15,16,20],Nah:[15,13,19],Hab:[17,20,19],Zeph:[18,15,20],Hag:[15,23],Zech:[21,13,10,14,11,15,14,23,17,12,17,14,9,21],Mal:[14,17,18,6],Matt:[25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20],Mark:[45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20],Luke:[80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53],John:[51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25],Acts:[26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,41,38,40,30,35,27,27,32,44,31],Rom:[32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27],"1Cor":[31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24],"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,14],Gal:[24,21,29,31,26,18],Eph:[23,22,21,32,33,24],Phil:[30,30,21,23],Col:[29,23,25,18],"1Thess":[10,20,13,18,28],"2Thess":[12,17,18],"1Tim":[20,15,16,16,25,21],"2Tim":[18,26,17,22],Titus:[16,15,15],Phlm:[25],Heb:[14,18,19,16,14,20,28,13,28,39,40,29,25],Jas:[27,26,18,17,20],"1Pet":[25,25,22,19,14],"2Pet":[21,22,18],"1John":[10,29,24,21,21],"2John":[13],"3John":[15],Jude:[25],Rev:[20,29,22,11,14,17,17,13,21,11,19,17,18,20,8,21,18,24,21,15,27,21],Tob:[22,14,17,21,22,18,16,21,6,13,18,22,17,15],Jdt:[16,28,10,15,24,21,32,36,14,23,23,20,20,19,14,25],GkEsth:[22,23,15,17,14,14,10,17,32,13,12,6,18,19,16,24],Wis:[16,24,19,20,23,25,30,21,18,21,26,27,19,31,19,29,21,25,22],Sir:[30,18,31,31,15,37,36,19,18,31,34,18,26,27,20,30,32,33,30,31,28,27,27,34,26,29,30,26,28,25,31,24,33,31,26,31,31,34,35,30,22,25,33,23,26,20,25,25,16,29,30],Bar:[22,35,37,37,9],PrAzar:[68],Sus:[64],Bel:[42],SgThree:[39],EpJer:[73],"1Macc":[64,70,60,61,68,63,50,32,73,89,74,53,53,49,41,24],"2Macc":[36,32,40,50,27,31,42,36,29,38,38,45,26,46,39],"3Macc":[29,33,30,21,51,41,23],"4Macc":[35,24,21,26,38,35,23,29,32,21,27,19,27,20,32,25,24,24],"1Esd":[58,30,24,63,73,34,15,96,55],"2Esd":[40,48,36,52,56,59,70,63,47,59,46,51,58,48,63,78],PrMan:[15],Ps151:[7]}},alternates:{ceb:{chapters:{"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,13],Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21],Tob:[22,14,17,21,22,18,16,21,6,13,18,22,18,15],PrAzar:[67],EpJer:[72],"1Esd":[55,26,24,63,71,33,15,92,55]}},kjv:{chapters:{"3John":[14]}},nab:{chapters:{Gen:[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,54,33,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],Exod:[22,25,22,31,23,30,29,28,35,29,10,51,22,31,27,36,16,27,25,26,37,30,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],Lev:[17,16,17,35,26,23,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],Num:[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,35,28,32,22,29,35,41,30,25,19,65,23,31,39,17,54,42,56,29,34,13],Deut:[46,37,29,49,33,25,26,20,29,22,32,31,19,29,23,22,20,22,21,20,23,29,26,22,19,19,26,69,28,20,30,52,29,12],"1Sam":[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,16,23,28,23,44,25,12,25,11,31,13],"2Sam":[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,32,44,26,22,51,39,25],"1Kgs":[53,46,28,20,32,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,54],"2Kgs":[18,25,27,44,27,33,20,29,37,36,20,22,25,29,38,20,41,37,37,21,26,20,37,20,30],"1Chr":[54,55,24,43,41,66,40,40,44,14,47,41,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],"2Chr":[18,17,17,22,14,42,22,18,31,19,23,16,23,14,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],Neh:[11,20,38,17,19,19,72,18,37,40,36,47,31],Job:[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,32,26,17],Ps:[6,11,9,9,13,11,18,10,21,18,7,9,6,7,5,11,15,51,15,10,14,32,6,10,22,12,14,9,11,13,25,11,22,23,28,13,40,23,14,18,14,12,5,27,18,12,10,15,21,23,21,11,7,9,24,14,12,12,18,14,9,13,12,11,14,20,8,36,37,6,24,20,28,23,11,13,21,72,13,20,17,8,19,13,14,17,7,19,53,17,16,16,5,23,11,13,12,9,9,5,8,29,22,35,45,48,43,14,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,14,10,8,12,15,21,10,20,14,9,6],Eccl:[18,26,22,17,19,12,29,17,18,20,10,14],Song:[17,17,11,16,16,12,14,14],Isa:[31,22,26,6,30,13,25,23,20,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,11,25,24],Jer:[19,37,25,31,31,30,34,23,25,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],Ezek:[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,44,37,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],Dan:[21,49,100,34,30,29,28,27,27,21,45,13,64,42],Hos:[9,25,5,19,15,11,16,14,17,15,11,15,15,10],Joel:[20,27,5,21],Jonah:[16,11,10,11],Mic:[16,13,12,14,14,16,20],Nah:[14,14,19],Zech:[17,17,10,14,11,15,14,23,17,12,17,14,9,21],Mal:[14,17,24],Acts:[26,47,26,37,42,15,60,40,43,49,30,25,52,28,41,40,34,28,40,38,40,30,35,27,27,32,44,31],"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,13],Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21],Tob:[22,14,17,21,22,18,17,21,6,13,18,22,18,15],Sir:[30,18,31,31,15,37,36,19,18,31,34,18,26,27,20,30,32,33,30,31,28,27,27,33,26,29,30,26,28,25,31,24,33,31,26,31,31,34,35,30,22,25,33,23,26,20,25,25,16,29,30],Bar:[22,35,38,37,9,72],"2Macc":[36,32,40,50,27,31,42,36,29,38,38,46,26,46,39]}},nlt:{chapters:{Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21]}},nrsv:{chapters:{"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,13],Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21]}},vulgate:{chapters:{Ps:[6,13,9,10,13,11,18,10,39,8,9,6,7,5,10,15,51,15,10,14,32,6,10,22,12,14,9,11,13,25,11,22,23,28,13,40,23,14,18,14,12,5,26,18,12,10,15,21,23,21,11,7,9,24,13,12,12,18,14,9,13,12,11,14,20,8,36,37,6,24,20,28,23,11,13,21,72,13,20,17,8,19,13,14,17,7,19,53,17,16,16,5,23,11,13,12,9,9,5,8,29,22,35,45,48,43,14,31,7,10,10,9,26,9,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,14,10,8,12,15,21,10,11,20,14,9,7]}}}},e.prototype.regexps.escaped_passage=/(?:^|[^\w\x1f\x1e])((?:(?:ch(?:apters?|a?pts?\.?|a?p?s?\.?)?\s*\d+\s*(?:[\u2013\u2014\-]|through|thru|to)\s*\d+\s*(?:from|of|in)(?:\s+the\s+book\s+of)?\s*)|(?:ch(?:apters?|a?pts?\.?|a?p?s?\.?)?\s*\d+\s*(?:from|of|in)(?:\s+the\s+book\s+of)?\s*)|(?:\d+(?:th|nd|st)\s*ch(?:apter|a?pt\.?|a?p?\.?)?\s*(?:from|of|in)(?:\s+the\s+book\s+of)?\s*))?\x1f(\d+)(?:\/[a-z])?\x1f(?:c(?:f|ompare|h(?:apters?|a?pts?|a?p?s?))|a(?:nd|lso)|\/[pq]\x1f|[\d.:,;\x1e\x1f&\(\)\[\]\/"'\*=~\-\u2013\u2014\s\xa0]|[a-e](?!\w)|ff?\b|see|title(?![a-z])|thr(?:ough|u)|to|v(?:erses?|er|ss?|v)?|$)+)/gi,e.prototype.regexps.match_end_split=/\d+\W*title|\d+\W*ff?(?:[\s\xa0*]*\.)?|\d+[\s\xa0*]*[a-e](?!\w)|\x1e(?:[\s\xa0*]*[)\]])?|[\d\x1f]+/gi,e.prototype.regexps.space="[\\s\\xa0]",e.prototype.regexps.control=/[\x1e\x1f]/g,e.prototype.regexps.first="(?:1st|1|I|First)\\.?"+e.prototype.regexps.space+"*",e.prototype.regexps.second="(?:2nd|2|II|Second)\\.?"+e.prototype.regexps.space+"*",e.prototype.regexps.third="(?:3rd|3|III|Third)\\.?"+e.prototype.regexps.space+"*",e.prototype.regexps.fourth="(?:4th|4|IV|Fourth)\\.?"+e.prototype.regexps.space+"*",e.prototype.regexps.gospel="(?:(?:The[.\\s\\xa0-]*)?Gospel[.\\s\\xa0-]?(?:of[.\\s\\xa0-]*|according[\\s\\xa0-]*?to[.\\s\\xa0-]*)(?:[.\\s\\xa0-]*?(?:Saint|St)[.\\s\\xa0-]*)?|(?:(?:Saint|St)[.\\s\\xa0-]*))?",e.prototype.regexps.range_and="(?:[&–—-]|and|through|to)",e.prototype.regexps.range_only="(?:[–—-]|through|to)",e.prototype.regexps.get_books=function(t,n){var r,i,s,o,u;i=[{osis:["Gen"],regexp:/(\d|\b)(Ge(?:nn?[ei][ei]?s[eiu]s|nn?[es]is|nes[ei]|n)|G[en])(?:\b|(?=\d))/gi},{osis:["Exod"],regexp:/(\d|\b)(Ex(?:od[ui]s|od[se]|od|[do]?))(?:\b|(?=\d))/gi},{osis:["Lev"],regexp:/(\d|\b)(L(?:[ei]v[ei]t[ei]?cus|evi|ev|[ev]))(?:\b|(?=\d))/gi},{osis:["Num"],regexp:/(\d|\b)(N(?:umbers?|umb?|[um]))(?:\b|(?=\d))/gi},{osis:["Deut"],regexp:/(\d|\b)(D(?:eut[eo]?rono?my|ueteronomy|eut?|uet|t))(?:\b|(?=\d))/gi},{osis:["Josh"],regexp:/(\d|\b)(J(?:ou?sh?ua|o?sh|os))(?:\b|(?=\d))/gi},{osis:["Judg"],regexp:/(\d|\b)(J(?:udges|udg|d?gs?))(?:\b|(?=\d))/gi},{osis:["Ruth"],regexp:/(\d|\b)(R(?:uth?|th|u))(?:\b|(?=\d))/gi},{osis:["Isa"],regexp:/(\d|\b)(I(?:saiah|sais?ha?|s[ai]{2,}ha?|s[is]ah|sa[hi]?|sa?|a))(?:\b|(?=\d))/gi},{osis:["2Sam"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"(?:Samu[ae]l[ls]?|Sam|Sma|S[am]|Kingdoms)|2"+e.prototype.regexps.space+"*S)(?:\\b|(?=\\d))","gi")},{osis:["1Sam"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?Samu[ae]l[ls]?|"+e.prototype.regexps.first+"(?:Sam|Sma|S[am]|Kingdoms)|1"+e.prototype.regexps.space+"*S)(?:\\b|(?=\\d))","gi")},{osis:["2Kgs"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"Ki?n?g?s?|"+e.prototype.regexps.fourth+"Kingdoms)(?:\\b|(?=\\d))","gi")},{osis:["1Kgs"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?K(?:i?ngs|in|gs)|"+e.prototype.regexps.first+"Ki?n?g?s?|"+e.prototype.regexps.third+"Kingdoms)(?:\\b|(?=\\d))","gi")},{osis:["2Chr"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"(?:Ch?o?ron[io]cles?|Chronicals|Chro?n?|Cron|Paralipomenon)|2"+e.prototype.regexps.space+"*Ch)(?:\\b|(?=\\d))","gi")},{osis:["1Chr"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?(?:Ch?o?ron[io]cles?|Chronicals|Paralipomenon)|"+e.prototype.regexps.first+"(?:Chro?n?|Cron)|1"+e.prototype.regexps.space+"*Ch)(?:\\b|(?=\\d))","gi")},{osis:["Ezra"],regexp:/(\d|\b)(E(?:zra?|sra))(?:\b|(?=\d))/gi},{osis:["Neh"],regexp:/(\d|\b)(N(?:eh[ei]m[ai]{1,3}h|eh?))(?:\b|(?=\d))/gi},{osis:["GkEsth"],apocrypha:!0,regexp:RegExp("(\\d|\\b)(Greek"+e.prototype.regexps.space+"*Esther|Esther"+e.prototype.regexps.space+"*\\(Greek\\)|G(?:ree)?k"+e.prototype.regexps.space+"*Esth?)(?:\\b|(?=\\d))","gi")},{osis:["Esth"],regexp:/(\d|\b)(E(?:sth?er|sth?|s))(?:\b|(?=\d))/gi},{osis:["Job"],regexp:/(\d|\b)(Jo?b)(?:\b|(?=\d))/gi},{osis:["Ps"],extra:"p",regexp:RegExp("(\\b)((?:(?:(?:1[02-5]|[2-9])?(?:1"+e.prototype.regexps.space+"*st|2"+e.prototype.regexps.space+"*nd|3"+e.prototype.regexps.space+"*rd))|1?1[123]"+e.prototype.regexps.space+"*th|(?:150|1[0-4][04-9]|[1-9][04-9]|[4-9])"+e.prototype.regexps.space+"*th)"+e.prototype.regexps.space+"*Psalm)\\b","gi")},{osis:["Ps"],apocrypha:!0,extra:"q",regexp:/(\b)(Ps151)(?=\.1)/g},{osis:["Ps"],regexp:/(\d|\b)(P(?:s[alm]{2,4}s?|a[slm]{3,4}s?|l[sam]{2,4}s?|s[as]?m?))(?:\b|(?=\d))/gi},{osis:["Prov"],regexp:/(\d|\b)(P(?:r[eo]?verbs?|robv?erbs|or?verbs|rovebs|rvbs?|ro?v?|v)|Oroverbs)(?:\b|(?=\d))/gi},{osis:["Eccl"],regexp:/(\d|\b)(E(?:cc?less?[ia]{1,4}s?tes?|cclesiastic?es|ccles|ccl?|cl?))(?:\b|(?=\d))/gi},{osis:["SgThree"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+e.prototype.regexps.space+"*)?Song"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*(?:the"+e.prototype.regexps.space+"*)?(?:3|Three)"+e.prototype.regexps.space+"*(?:Holy"+e.prototype.regexps.space+"*Children|Young"+e.prototype.regexps.space+"*Men|Youths|Jews)|S\\.?"+e.prototype.regexps.space+"*(?:of)?"+e.prototype.regexps.space+"*(?:Three|Th|3)\\.?"+e.prototype.regexps.space+"*(?:Ch|Y)|So?n?gThree)(?:\\b|(?=\\d))","gi")},{osis:["Song"],regexp:RegExp("(\\d|\\b)((?:The"+e.prototype.regexps.space+"*)?Songs?"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*(?:S[ao]lom[ao]ns?|Songs?)|(?:S(?:n?gs?|ongs?|"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*S|o?S|o[ln]?)))(?:\\b|(?=\\d))","gi")},{osis:["EpJer"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+e.prototype.regexps.space+"*)?(?:Ep(?:istle)?|Let(?:ter))\\.?"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*Jeremiah|EpJer)(?:\\b|(?=\\d))","gi")},{osis:["Jer"],regexp:/(\d|\b)(Jer(?:emaiah|[ae]maih|[ae]miha|[aei]mi[ai]h|[ei]mi?ah|[ai]mih|[ae]mia|[am][im]ah|emi[he]?|e?)|J[er])(?:\b|(?=\d))/gi},{osis:["Lam"],regexp:/(\d|\b)(L(?:am[ei]ntations?|am?|m))(?:\b|(?=\d))/gi},{osis:["Ezek"],regexp:/(\d|\b)(E(?:[zx][ei]{1,2}ki?el|zekial|zek|z[ek]))(?:\b|(?=\d))/gi},{osis:["Dan"],regexp:/(\d|\b)(D(?:aniel|a?n|[al]))(?:\b|(?=\d))/gi},{osis:["Hos"],regexp:/(\d|\b)(H(?:osea|o?s|os?))(?:\b|(?=\d))/gi},{osis:["Joel"],regexp:/(\d|\b)(J(?:oel?|l))(?:\b|(?=\d))/gi},{osis:["Amos"],regexp:/(\d|\b)(Amo?s?)(?:\b|(?=\d))/gi},{osis:["Obad"],regexp:/(\d|\b)(O(?:badiah?|bidah|ba?d?))(?:\b|(?=\d))/gi},{osis:["Jonah"],regexp:/(\d|\b)(J(?:onah|on|nh))(?:\b|(?=\d))/gi},{osis:["Mic"],regexp:/(\d|\b)(M(?:ich?ah?|ic?))(?:\b|(?=\d))/gi},{osis:["Nah"],regexp:/(\d|\b)(N(?:ahum?|ah?))(?:\b|(?=\d))/gi},{osis:["Hab"],regexp:/(\d|\b)(H(?:abb?akk?[au]kk?|abk?))(?:\b|(?=\d))/gi},{osis:["Zeph"],regexp:/(\d|\b)(Z(?:ephana?iah?|e?ph?))(?:\b|(?=\d))/gi},{osis:["Hag"],regexp:/(\d|\b)(H(?:agg?ai|aggia[ih]|a?gg?))(?:\b|(?=\d))/gi},{osis:["Zech"],regexp:/(\d|\b)(Z(?:[ae]ch[ae]r[ai]{1,2}h|ach?|e?ch?))(?:\b|(?=\d))/gi},{osis:["Mal"],regexp:/(\d|\b)(M(?:alachi?|alichi|alaci|al))(?:\b|(?=\d))/gi},{osis:["Matt"],regexp:RegExp("(\\d|\\b)("+e.prototype.regexps.gospel+"M(?:at[th]{1,3}i?ew|atthwe|a?tt?))(?:\\b|(?=\\d))","gi")},{osis:["Mark"],regexp:RegExp("(\\d|\\b)("+e.prototype.regexps.gospel+"M(?:a?rk?|k))(?:\\b|(?=\\d))","gi")},{osis:["Luke"],regexp:RegExp("(\\d|\\b)("+e.prototype.regexps.gospel+"L(?:uke?|[uk]))(?:\\b|(?=\\d))","gi")},{osis:["1John"],regexp:RegExp("(\\b)("+e.prototype.regexps.first+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|o[hn]?|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["2John"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|o[hn]?|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["3John"],regexp:RegExp("(\\b)("+e.prototype.regexps.third+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|o[hn]?|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["John"],regexp:RegExp("([04-9]|\\b)("+e.prototype.regexps.gospel+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|oh|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["Acts"],regexp:RegExp("(\\d|\\b)(A(?:cts"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*the"+e.prototype.regexps.space+"*Apostles|cts*|ct?))(?:\\b|(?=\\d))","gi")},{osis:["Rom"],regexp:/(\d|\b)(R(?:omans?|pmans|oamns|omands|omasn|om?s?|mn?s?))(?:\b|(?=\d))/gi},{osis:["2Cor"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"C(?:h?orr?[in]{1,3}th[aio]{1,3}ns|orin[ai]?th[ai]{1,3}n[aio]{0,3}s|orinti[ao]ns|orinthian|orthians?|orint?h?|orth|or?))(?:\\b|(?=\\d))","gi")},{osis:["1Cor"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?C(?:h?orr?[in]{1,3}th[aio]{1,3}ns|orin[ai]?th[ai]{1,3}n[aio]{0,3}s|orinti[ao]ns)|"+e.prototype.regexps.first+"C(?:orinthian|orthians?|orint?h?|orth|or?))(?:\\b|(?=\\d))","gi")},{osis:["Gal"],regexp:/(\d|\b)(G(?:alatians?|all?at[aino]{1,4}s|alat?|al?|l))(?:\b|(?=\d))/gi},{osis:["Eph"],regexp:/(\d|\b)(E(?:phesians?|phi?sians?|phesains?|sphesians|pehesians|h?pesians|phesiand|phesions|alat?|phe?s?|ph?|hp))(?:\b|(?=\d))/gi},{osis:["Phil"],regexp:/(\d|\b)(P(?:hil{1,}i?p{1,}[aei]{1,3}ns?|hi?li?p{0,2}|hil?|hp))(?:\b|(?=\d))/gi},{osis:["Col"],regexp:/(\d|\b)(C(?:[ao]ll?[ao]ss?i[ao]ns|olossi?ans?|ol?))(?:\b|(?=\d))/gi},{osis:["2Thess"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"T(?:hess?[aeo]lon[ieaoc]{1,4}ns?|he?s{1,3}|h))(?:\\b|(?=\\d))","gi")},{osis:["1Thess"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?Thess?[aeo]lon[ieaoc]{1,4}ns?|"+e.prototype.regexps.first+"T(?:he?s{1,3}|h))(?:\\b|(?=\\d))","gi")},{osis:["2Tim"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"T(?:imothy?|himoth?y|omothy|imoty|im?|m))(?:\\b|(?=\\d))","gi")},{osis:["1Tim"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?Timothy?|"+e.prototype.regexps.first+"T(?:himoth?y|omothy|imoty|im?|m))(?:\\b|(?=\\d))","gi")},{osis:["Titus"],regexp:/(\d|\b)(T(?:itus|it?))(?:\b|(?=\d))/gi},{osis:["Phlm"],regexp:/(\d|\b)(Ph(?:ilemon|l?mn?|ilem?))(?:\b|(?=\d))/gi},{osis:["Heb"],regexp:/(\d|\b)(H(?:eb[rew]{1,3}s|[ew]{0,2}brew{1,2}s|ebrew|eb))(?:\b|(?=\d))/gi},{osis:["Jas"],regexp:/(\d|\b)(J(?:ames?|a[ms]?|ms?))(?:\b|(?=\d))/gi},{osis:["2Pet"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"P(?:eter?|e?t?r?))(?:\\b|(?=\\d))","gi")},{osis:["1Pet"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?Peter|"+e.prototype.regexps.first+"P(?:eter?|e?t?r?))(?:\\b|(?=\\d))","gi")},{osis:["Jude"],regexp:/(\d|\b)(Ju?de)(?:\b|(?=\d))/gi},{osis:["Rev"],regexp:/(\d|\b)(R(?:ev[aeo]?lations?|evel|e?v|e))(?:\b|(?=\d))/gi},{osis:["Tob"],apocrypha:!0,regexp:/(\d|\b)(Tobi?t?|Tb)(?:\b|(?=\d))/gi},{osis:["Jdt"],apocrypha:!0,regexp:/(\d|\b)(Ju?di?th?)(?:\b|(?=\d))/gi},{osis:["Wis"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+e.prototype.regexps.space+"*)Wisd?(?:om)?"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*Solomon|Wisdom|Wisd?)(?:\\b|(?=\\d))","gi")},{osis:["Sir"],apocrypha:!0,regexp:RegExp("(\\d|\\b)(Sirach|Ben"+e.prototype.regexps.space+"*Sira|Sir|Eccl[eu]siasticus|Ecclus|Eccs|(?:The"+e.prototype.regexps.space+"*)Wisdom"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*Jesus"+e.prototype.regexps.space+"*(?:Son"+e.prototype.regexps.space+"*of|ben)"+e.prototype.regexps.space+"*Sirach)(?:\\b|(?=\\d))","gi")},{osis:["Bar"],apocrypha:!0,regexp:/(\d|\b)(Baruch|Bar)(?:\b|(?=\d))/gi},{osis:["PrAzar"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+e.prototype.regexps.space+"*)?Pr(?:ayers?)?"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*Azariah?|Azariah?|PrAza?r)(?:\\b|(?=\\d))","gi")},{osis:["Sus"],apocrypha:!0,regexp:/(\d|\b)(Susannah?|Shoshana|Sus)(?:\b|(?=\d))/gi},{osis:["Bel"],apocrypha:!0,regexp:RegExp("(\\d|\\b)(Bel"+e.prototype.regexps.space+"*(?:and|&)"+e.prototype.regexps.space+"*(?:the"+e.prototype.regexps.space+"*)?(?:Dragon|Serpent|Snake)|Bel)(?:\\b|(?=\\d))","gi")},{osis:["2Macc"],apocrypha:!0,regexp:RegExp("(\\b)("+e.prototype.regexps.second+"Mac{1,3}(?:ab{1,3}e{1,3}s?)?|2"+e.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["3Macc"],apocrypha:!0,regexp:RegExp("(\\b)("+e.prototype.regexps.third+"Mac{1,3}(?:ab{1,3}e{1,3}s?)?|3"+e.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["4Macc"],apocrypha:!0,regexp:RegExp("(\\b)("+e.prototype.regexps.fourth+e.prototype.regexps.space+"*Mac{1,3}(?:ab{1,3}e{1,3}s?)?|4"+e.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["1Macc"],apocrypha:!0,regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?Mac{1,3}ab{1,3}e{1,3}s?|"+e.prototype.regexps.first+"Mac{1,3}|1"+e.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["1Esd"],apocrypha:!0,regexp:RegExp("(\\b)("+e.prototype.regexps.first+"Esdras|1"+e.prototype.regexps.space+"*Esdr?)(?:\\b|(?=\\d))","gi")},{osis:["2Esd"],apocrypha:!0,regexp:RegExp("(\\b)("+e.prototype.regexps.second+"Esdras|2"+e.prototype.regexps.space+"*Esdr?)(?:\\b|(?=\\d))","gi")},{osis:["PrMan"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:(?:The"+e.prototype.regexps.space+"*)Pr(?:ayers?)?"+e.prototype.regexps.space+"*(?:of"+e.prototype.regexps.space+"*)?M[ae]n{1,2}[ae]s{1,2}[ae]h)|PrMan)(?:\\b|(?=\\d))","gi")},{osis:["Ezek","Ezra"],regexp:/(\d|\b)(Ez)(?:\b|(?=\d))/gi},{osis:["Hab","Hag"],regexp:/(\d|\b)(Ha)(?:\b|(?=\d))/gi},{osis:["Heb","Hab"],regexp:/(\d|\b)(Hb)(?:\b|(?=\d))/gi},{osis:["John","Jonah","Job","Josh","Joel"],regexp:/(\d|\b)(Jo)(?:\b|(?=\d))/gi},{osis:["Jude","Judg"],regexp:/(\d|\b)(Jd)(?:\b|(?=\d))/gi},{osis:["Jude","Judg"],regexp:/(\d|\b)(Jud)(?:\b|(?=\d))/gi},{osis:["Jude","Judg"],regexp:/(\d|\b)(Ju)(?:\b|(?=\d))/gi},{osis:["Matt","Mark","Mal"],regexp:/(\d|\b)(Ma)(?:\b|(?=\d))/gi},{osis:["Phil","Phlm"],regexp:/(\d|\b)(Ph)(?:\b|(?=\d))/gi},{osis:["Zeph","Zech"],regexp:/(\d|\b)(Ze)(?:\b|(?=\d))/gi}];if(!0===t&&"none"===n)return i;s=[],o=0;for(u=i.length;o<u;o++)r=i[o],null!=r.apocrypha&&!0===r.apocrypha||("books"===n&&(r.regexp=RegExp(r.regexp.source,"g")),s.push(r));return s},e.prototype.regexps.books=e.prototype.regexps.get_books(!1,"none");var o,u=function(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'},s={parse:function(e,t){function n(e){nt<it||(nt>it&&(it=nt,st=[]),st.push(e))}function r(){var e,t,n,r,i,u,c;u=i=nt,e=b(),null===e&&(e=m(),null===e&&(e=o(),null===e&&(e=A(),null===e&&(e=v(),null===e&&(e=h(),null===e&&(e=D(),null===e&&(e=p(),null===e&&(e=d(),null===e&&(e=_(),null===e&&(e=l(),null===e&&(e=T(),null===e&&(e=g(),null===e&&(e=f(),null===e&&(e=x(),null===e&&(e=a(),null===e&&(e=w(),null===e&&(e=S(),null===e&&(e=y(),null===e&&(e=E())))))))))))))))))));if(null!==e){c=nt,n=q(),n=null!==n?n:"",null!==n?(r=s(),null!==r?n=[n,r]:(n=null,nt=c)):(n=null,nt=c);if(null!==n)for(t=[];null!==n;)t.push(n),c=nt,n=q(),n=null!==n?n:"",null!==n?(r=s(),null!==r?n=[n,r]:(n=null,nt=c)):(n=null,nt=c);else t=null;null!==t?e=[e,t]:(e=null,nt=u)}else e=null,nt=u;return null!==e&&(t=e[1],t.unshift([e[0]]),e={type:"sequence",value:t,indices:[i,nt-1]}),null===e&&(nt=i),e}function i(){var t,r,i,o,u,a,f,l,c,h;c=l=nt,40===e.charCodeAt(nt)?(t="(",nt++):(t=null,0===rt&&n('"("'));if(null!==t)if(r=Y(),null!==r)if(i=q(),i=null!==i?i:"",null!==i)if(o=s(),null!==o){u=[],h=nt,a=q(),a=null!==a?a:"",null!==a?(f=s(),null!==f?a=[a,f]:(a=null,nt=h)):(a=null,nt=h);for(;null!==a;)u.push(a),h=nt,a=q(),a=null!==a?a:"",null!==a?(f=s(),null!==f?a=[a,f]:(a=null,nt=h)):(a=null,nt=h);null!==u?(a=Y(),null!==a?(41===e.charCodeAt(nt)?(f=")",nt++):(f=null,0===rt&&n('")"')),null!==f?t=[t,r,i,o,u,a,f]:(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)}else t=null,nt=c;else t=null,nt=c;else t=null,nt=c;else t=null,nt=c;return null!==t&&(r=t[4],"undefined"==typeof r&&(r=[]),r.unshift([t[3]]),t={type:"sequence_post_enclosed",value:r,indices:[l,nt-1]}),null===t&&(nt=l),t}function s(){var e;return e=i(),null===e&&(e=b(),null===e&&(e=m(),null===e&&(e=o(),null===e&&(e=A(),null===e&&(e=v(),null===e&&(e=h(),null===e&&(e=D(),null===e&&(e=p(),null===e&&(e=d(),null===e&&(e=_(),null===e&&(e=l(),null===e&&(e=T(),null===e&&(e=g(),null===e&&(e=f(),null===e&&(e=x(),null===e&&(e=a(),null===e&&(e=w(),null===e&&(e=S(),null===e&&(e=y(),null===e&&(e=E(),null===e&&(e=N(),null===e&&(e=O(),null===e&&(e=C(),null===e&&(e=k(),null===e&&(e=P(),null===e&&(e=J(),null===e&&(e=L(),null===e&&(e=H())))))))))))))))))))))))))))),e}function o(){var e,t,n,r,i;return i=r=nt,e=v(),null===e&&(e=h(),null===e&&(e=D(),null===e&&(e=p(),null===e&&(e=d(),null===e&&(e=_(),null===e&&(e=l(),null===e&&(e=T(),null===e&&(e=g(),null===e&&(e=w(),null===e&&(e=S(),null===e&&(e=x(),null===e&&(e=y(),null===e&&(e=E(),null===e&&(e=N(),null===e&&(e=O(),null===e&&(e=C(),null===e&&(e=k(),null===e&&(e=P(),null===e&&(e=J(),null===e&&(e=L(),null===e&&(e=H()))))))))))))))))))))),null!==e?(t=R(),null!==t?(n=A(),null===n&&(n=v(),null===n&&(n=h(),null===n&&(n=D(),null===n&&(n=p(),null===n&&(n=d(),null===n&&(n=_(),null===n&&(n=l(),null===n&&(n=T(),null===n&&(n=g(),null===n&&(n=w(),null===n&&(n=S(),null===n&&(n=x(),null===n&&(n=y(),null===n&&(n=E(),null===n&&(n=N(),null===n&&(n=O(),null===n&&(n=C(),null===n&&(n=P(),null===n&&(n=J(),null===n&&(n=k(),null===n&&(n=L(),null===n&&(n=H())))))))))))))))))))))),null!==n?e=[e,t,n]:(e=null,nt=i)):(e=null,nt=i)):(e=null,nt=i),null!==e&&(e={type:"range",value:[e[0],e[2]],indices:[r,nt-1]}),null===e&&(nt=r),e}function a(){var t,r,i,s,o,u,a;return u=o=nt,31===e.charCodeAt(nt)?(t="",nt++):(t=null,0===rt&&n('"\\x1F"')),null!==t?(r=K(),null!==r?(a=nt,47===e.charCodeAt(nt)?(i="/",nt++):(i=null,0===rt&&n('"/"')),null!==i?(/^[a-z]/.test(e.charAt(nt))?(s=e.charAt(nt),nt++):(s=null,0===rt&&n("[a-z]")),null!==s?i=[i,s]:(i=null,nt=a)):(i=null,nt=a),i=null!==i?i:"",null!==i?(31===e.charCodeAt(nt)?(s="",nt++):(s=null,0===rt&&n('"\\x1F"')),null!==s?t=[t,r,i,s]:(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u),null!==t&&(t={type:"b",value:t[1].value,indices:[o,nt-1]}),null===t&&(nt=o),t}function f(){var e,t,n,r,i,s;return s=i=nt,e=a(),null!==e?(t=R(),null!==t?(r=nt,rt++,n=o(),null===n&&(n=A(),null===n&&(n=D(),null===n&&(n=p(),null===n&&(n=d(),null===n&&(n=_(),null===n&&(n=l(),null===n&&(n=g()))))))),rt--,null===n?n="":(n=null,nt=r),null!==n?(r=a(),null!==r?e=[e,t,n,r]:(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s),null!==e&&(e={type:"b_range",value:[e[0],e[3]],indices:[i,nt-1]}),null===e&&(nt=i),e}function l(){var e,t,n,r,i,s,o,u,f,l;o=s=nt,e=a();if(null!==e){u=nt,t=j(),null!==t?(f=nt,rt++,l=nt,n=L(),null!==n?(r=F(),null!==r?(i=H(),null!==i?n=[n,r,i]:(n=null,nt=l)):(n=null,nt=l)):(n=null,nt=l),rt--,null!==n?(n="",nt=f):n=null,null!==n?t=[t,n]:(t=null,nt=u)):(t=null,nt=u);if(null===t){n=F();if(null!==n)for(t=[];null!==n;)t.push(n),n=F();else t=null;if(null===t){n=I();if(null!==n)for(t=[];null!==n;)t.push(n),n=I();else t=null;if(null===t){n=R();if(null!==n)for(t=[];null!==n;)t.push(n),n=R();else t=null;null===t&&(t=Y())}}}null!==t?(n=L(),null!==n?e=[e,t,n]:(e=null,nt=o)):(e=null,nt=o)}else e=null,nt=o;return null!==e&&(e={type:"bc",value:[e[0],e[2]],indices:[s,nt-1]}),null===e&&(nt=s),e}function c(){var t,r,i,s,o,u,f;return f=u=nt,t=a(),null!==t?(r=Y(),null!==r?(44===e.charCodeAt(nt)?(i=",",nt++):(i=null,0===rt&&n('","')),null!==i?(s=Y(),null!==s?(o=L(),null!==o?t=[t,r,i,s,o]:(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f),null!==t&&(t={type:"bc",value:[t[0],t[4]],indices:[u,nt-1]}),null===t&&(nt=u),t}function h(){var e,t,n,r;return r=n=nt,e=_(),null===e&&(e=l()),null!==e?(t=U(),null!==t?e=[e,t]:(e=null,nt=r)):(e=null,nt=r),null!==e&&(e={type:"bc_title",value:[e[0],e[1]],indices:[n,nt-1]}),null===e&&(nt=n),e}function p(){var t,r,i,s,o,u,a,f;return u=o=nt,t=_(),null===t&&(t=l()),null!==t?(a=nt,rt++,f=nt,46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(i=j(),null!==i?(s=H(),null!==s?r=[r,i,s]:(r=null,nt=f)):(r=null,nt=f)):(r=null,nt=f),rt--,null===r?r="":(r=null,nt=a),null!==r?(a=nt,i=F(),null===i&&(i=q()),i=null!==i?i:"",null!==i?(s=j(),null!==s?i=[i,s]:(i=null,nt=a)):(i=null,nt=a),null===i&&(i=F()),null!==i?(s=P(),null===s&&(s=H()),null!==s?t=[t,r,i,s]:(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u),null!==t&&(t={type:"bcv",value:[t[0],t[3]],indices:[o,nt-1]}),null===t&&(nt=o),t}function d(){var e,t,n,r,i,s,o,u,a;return o=s=nt,e=_(),null===e&&(e=l()),null!==e?(t=I(),null!==t?(n=P(),null===n&&(n=H()),null!==n?(u=nt,rt++,a=nt,r=F(),null!==r?(i=H(),null!==i?r=[r,i]:(r=null,nt=a)):(r=null,nt=a),rt--,null===r?r="":(r=null,nt=u),null!==r?e=[e,t,n,r]:(e=null,nt=o)):(e=null,nt=o)):(e=null,nt=o)):(e=null,nt=o),null!==e&&(e={type:"bcv",value:[e[0],e[2]],indices:[s,nt-1]}),null===e&&(nt=s),e}function v(){var t,r,i,s,o,u,a,f,l,h,p;return l=f=nt,t=c(),null!==t?(r=Y(),null!==r?(44===e.charCodeAt(nt)?(i=",",nt++):(i=null,0===rt&&n('","')),null!==i?(s=Y(),null!==s?(o=P(),null===o&&(o=H()),null!==o?(h=nt,rt++,p=nt,u=F(),null!==u?(a=H(),null!==a?u=[u,a]:(u=null,nt=p)):(u=null,nt=p),rt--,null===u?u="":(u=null,nt=h),null!==u?t=[t,r,i,s,o,u]:(t=null,nt=l)):(t=null,nt=l)):(t=null,nt=l)):(t=null,nt=l)):(t=null,nt=l)):(t=null,nt=l),null!==t&&(t={type:"bcv",value:[t[0],t[4]],indices:[f,nt-1]}),null===t&&(nt=f),t}function m(){var t,r,i,s,o,u,f,l,c;return c=l=nt,t=a(),null!==t?(45===e.charCodeAt(nt)?(r="-",nt++):(r=null,0===rt&&n('"-"')),null===r&&(r=Z()),r=null!==r?r:"",null!==r?(i=L(),null!==i?(45===e.charCodeAt(nt)?(s="-",nt++):(s=null,0===rt&&n('"-"')),null!==s?(o=H(),null!==o?(45===e.charCodeAt(nt)?(u="-",nt++):(u=null,0===rt&&n('"-"')),null!==u?(f=H(),null!==f?t=[t,r,i,s,o,u,f]:(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c),null!==t&&(t={type:"range",value:[{type:"bcv",value:[{type:"bc",value:[t[0],t[2]],indices:[t[0].indices[0],t[2].indices[1]]},t[4]],indices:[t[0].indices[0],t[4].indices[1]]},t[6]],indices:[l,nt-1]}),null===t&&(nt=l),t}function g(){var e,t,n,r,i,s,o;i=r=nt,e=a();if(null!==e){n=F();if(null!==n)for(t=[];null!==n;)t.push(n),n=F();else t=null;if(null===t){n=I();if(null!==n)for(t=[];null!==n;)t.push(n),n=I();else t=null;if(null===t){n=R();if(null!==n)for(t=[];null!==n;)t.push(n),n=R();else t=null;if(null===t){s=nt,n=q();if(null!==n)for(t=[];null!==n;)t.push(n),n=q();else t=null;null!==t?(o=nt,rt++,n=j(),rt--,null!==n?(n="",nt=o):n=null,null!==n?t=[t,n]:(t=null,nt=s)):(t=null,nt=s),null===t&&(t=Y())}}}null!==t?(n=P(),null===n&&(n=H()),null!==n?e=[e,t,n]:(e=null,nt=i)):(e=null,nt=i)}else e=null,nt=i;return null!==e&&(e={type:"bv",value:[e[0],e[2]],indices:[r,nt-1]}),null===e&&(nt=r),e}function y(){var e,t,n,r,i,s;return s=i=nt,e=B(),null!==e?(t=L(),null!==t?(n=z(),n=null!==n?n:"",null!==n?(r=a(),null!==r?e=[e,t,n,r]:(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s),null!==e&&(e={type:"bc",value:[e[3],e[1]],indices:[i,nt-1]}),null===e&&(nt=i),e}function b(){var e,t,n,r,i,s,o,u;return u=o=nt,e=B(),null!==e?(t=L(),null!==t?(n=R(),null!==n?(r=L(),null!==r?(i=z(),i=null!==i?i:"",null!==i?(s=a(),null!==s?e=[e,t,n,r,i,s]:(e=null,nt=u)):(e=null,nt=u)):(e=null,nt=u)):(e=null,nt=u)):(e=null,nt=u)):(e=null,nt=u),null!==e&&(e={type:"cb_range",value:[e[5],e[1],e[3]],indices:[o,nt-1]}),null===e&&(nt=o),e}function w(){var e,t,n,r,i,s;return s=i=nt,e=y(),null!==e?(t=q(),t=null!==t?t:"",null!==t?(n=j(),null!==n?(r=H(),null!==r?e=[e,t,n,r]:(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s),null!==e&&(e={type:"bcv",value:[e[0],e[3]],indices:[i,nt-1]}),null===e&&(nt=i),e}function E(){var t,r,i,s,o,u,f;return f=u=nt,t=L(),null!==t?("th"===e.substr(nt,2)?(r="th",nt+=2):(r=null,0===rt&&n('"th"')),null===r&&("nd"===e.substr(nt,2)?(r="nd",nt+=2):(r=null,0===rt&&n('"nd"')),null===r&&("st"===e.substr(nt,2)?(r="st",nt+=2):(r=null,0===rt&&n('"st"')))),null!==r?(i=B(),null!==i?(s=z(),s=null!==s?s:"",null!==s?(o=a(),null!==o?t=[t,r,i,s,o]:(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f),null!==t&&(t={type:"bc",value:[t[4],t[0]],indices:[u,nt-1]}),null===t&&(nt=u),t}function S(){var e,t,n,r,i,s;return s=i=nt,e=E(),null!==e?(t=q(),t=null!==t?t:"",null!==t?(n=j(),null!==n?(r=H(),null!==r?e=[e,t,n,r]:(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s),null!==e&&(e={type:"bcv",value:[e[0],e[3]],indices:[i,nt-1]}),null===e&&(nt=i),e}function x(){var t,r,i,s,o;return o=s=nt,31===e.charCodeAt(nt)?(t="",nt++):(t=null,0===rt&&n('"\\x1F"')),null!==t?(r=K(),null!==r?("/p"===e.substr(nt,3)?(i="/p",nt+=3):(i=null,0===rt&&n('"/p\\x1F"')),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"c_psalm",value:t[1].value,indices:[s,nt-1]}),null===t&&(nt=s),t}function T(){var e,t,n,r,i,s;return s=i=nt,e=x(),null!==e?(t=q(),t=null!==t?t:"",null!==t?(n=j(),null!==n?(r=H(),null!==r?e=[e,t,n,r]:(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s),null!==e&&(e={type:"cv_psalm",value:[e[0],e[3]],indices:[i,nt-1]}),null===e&&(nt=i),e}function N(){var e,t,n,r,i;return i=r=nt,e=B(),null!==e?(t=L(),null!==t?(n=U(),null!==n?e=[e,t,n]:(e=null,nt=i)):(e=null,nt=i)):(e=null,nt=i),null!==e&&(e={type:"c_title",value:[e[1],e[2]],indices:[r,nt-1]}),null===e&&(nt=r),e}function C(){var t,r,i,s,o,u,a,f;return u=o=nt,t=L(),null!==t?(a=nt,rt++,f=nt,46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(i=j(),null!==i?(s=H(),null!==s?r=[r,i,s]:(r=null,nt=f)):(r=null,nt=f)):(r=null,nt=f),rt--,null===r?r="":(r=null,nt=a),null!==r?(a=nt,i=F(),i=null!==i?i:"",null!==i?(s=j(),null!==s?i=[i,s]:(i=null,nt=a)):(i=null,nt=a),null===i&&(i=F()),null!==i?(s=P(),null===s&&(s=H()),null!==s?t=[t,r,i,s]:(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u),null!==t&&(t={type:"cv",value:[t[0],t[3]],indices:[o,nt-1]}),null===t&&(nt=o),t}function k(){var e,t,n,r,i,s,o,u,a;return o=s=nt,e=L(),null!==e?(t=I(),null!==t?(n=P(),null===n&&(n=H()),null!==n?(u=nt,rt++,a=nt,r=F(),null!==r?(i=H(),null!==i?r=[r,i]:(r=null,nt=a)):(r=null,nt=a),rt--,null===r?r="":(r=null,nt=u),null!==r?e=[e,t,n,r]:(e=null,nt=o)):(e=null,nt=o)):(e=null,nt=o)):(e=null,nt=o),null!==e&&(e={type:"cv",value:[e[0],e[2]],indices:[s,nt-1]}),null===e&&(nt=s),e}function L(){var e,t,n,r;return r=n=nt,e=B(),e=null!==e?e:"",null!==e?(t=J(),null!==t?e=[e,t]:(e=null,nt=r)):(e=null,nt=r),null!==e&&(e={type:"c",value:[e[1]],indices:[n,nt-1]}),null===e&&(nt=n),e}function A(){var t,r,i,s,o,u,a,f,c;return f=a=nt,t=p(),null===t&&(t=d(),null===t&&(t=l(),null===t&&(t=C(),null===t&&(t=k(),null===t&&(t=J(),null===t&&(t=L(),null===t&&(t=H()))))))),null!==t?(r=Y(),null!==r?(102===e.charCodeAt(nt)?(i="f",nt++):(i=null,0===rt&&n('"f"')),null!==i?(102===e.charCodeAt(nt)?(s="f",nt++):(s=null,0===rt&&n('"f"')),s=null!==s?s:"",null!==s?(o=W(),o=null!==o?o:"",null!==o?(c=nt,rt++,/^[a-z]/.test(e.charAt(nt))?(u=e.charAt(nt),nt++):(u=null,0===rt&&n("[a-z]")),rt--,null===u?u="":(u=null,nt=c),null!==u?t=[t,r,i,s,o,u]:(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f),null!==t&&(t={type:"ff",value:[t[0]],indices:[a,nt-1]}),null===t&&(nt=a),t}function O(){var t,r,i,s,o;return o=s=nt,t=J(),null!==t?(r=F(),null===r&&(r=q()),r=null!==r?r:"",null!==r?("title"===e.substr(nt,5)?(i="title",nt+=5):(i=null,0===rt&&n('"title"')),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"integer_title",value:[t[0]],indices:[s,nt-1]}),null===t&&(nt=s),t}function M(){var t,r,i,s,o;return o=s=nt,31===e.charCodeAt(nt)?(t="",nt++):(t=null,0===rt&&n('"\\x1F"')),null!==t?(r=K(),null!==r?("/q"===e.substr(nt,3)?(i="/q",nt+=3):(i=null,0===rt&&n('"/q\\x1F"')),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"b",value:t[1].value,indices:[s,nt-1]}),null===t&&(nt=s),t}function _(){var t,r,i,s,o,u;return o=s=nt,t=M(),null!==t?(".1"===e.substr(nt,2)?(r=".1",nt+=2):(r=null,0===rt&&n('".1"')),null!==r?(u=nt,rt++,/^[0-9]/.test(e.charAt(nt))?(i=e.charAt(nt),nt++):(i=null,0===rt&&n("[0-9]")),rt--,null===i?i="":(i=null,nt=u),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"bc",value:[t[0],{type:"c",value:[{type:"integer",value:151,indices:[nt-2,nt-1]}],indices:[nt-2,nt-1]}],indices:[s,nt-1]}),null===t&&(nt=s),t}function D(){var t,r,i,s,o;return o=s=nt,t=_(),null!==t?(46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(i=J(),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"bcv",value:[t[0],{type:"v",value:[t[2]],indices:[t[2].indices[0],t[2].indices[1]]}],indices:[s,nt-1]}),null===t&&(nt=s),t}function P(){var t,r,i,s,o,u,a,f;return a=u=nt,t=j(),t=null!==t?t:"",null!==t?(r=J(),null!==r?(i=Y(),null!==i?(/^[a-e]/.test(e.charAt(nt))?(s=e.charAt(nt),nt++):(s=null,0===rt&&n("[a-e]")),null!==s?(f=nt,rt++,/^[a-z]/.test(e.charAt(nt))?(o=e.charAt(nt),nt++):(o=null,0===rt&&n("[a-z]")),rt--,null===o?o="":(o=null,nt=f),null!==o?t=[t,r,i,s,o]:(t=null,nt=a)):(t=null,nt=a)):(t=null,nt=a)):(t=null,nt=a)):(t=null,nt=a),null!==t&&(t={type:"v",value:[t[1]],indices:[u,nt-1]}),null===t&&(nt=u),t}function H(){var e,t,n,r;return r=n=nt,e=j(),e=null!==e?e:"",null!==e?(t=J(),null!==t?e=[e,t]:(e=null,nt=r)):(e=null,nt=r),null!==e&&(e={type:"v",value:[e[1]],indices:[n,nt-1]}),null===e&&(nt=n),e}function B(){var t,r,i,s,o,u,a,f,l;return f=a=nt,t=Y(),null!==t?(l=nt,"chapter"===e.substr(nt,7)?(r="chapter",nt+=7):(r=null,0===rt&&n('"chapter"')),null!==r?(115===e.charCodeAt(nt)?(i="s",nt++):(i=null,0===rt&&n('"s"')),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=l)):(r=null,nt=l),null===r&&(l=nt,"ch"===e.substr(nt,2)?(r="ch",nt+=2):(r=null,0===rt&&n('"ch"')),null!==r?(97===e.charCodeAt(nt)?(i="a",nt++):(i=null,0===rt&&n('"a"')),i=null!==i?i:"",null!==i?("pt"===e.substr(nt,2)?(s="pt",nt+=2):(s=null,0===rt&&n('"pt"')),null!==s?(115===e.charCodeAt(nt)?(o="s",nt++):(o=null,0===rt&&n('"s"')),o=null!==o?o:"",null!==o?(u=W(),u=null!==u?u:"",null!==u?r=[r,i,s,o,u]:(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l),null===r&&(l=nt,"ch"===e.substr(nt,2)?(r="ch",nt+=2):(r=null,0===rt&&n('"ch"')),null!==r?(97===e.charCodeAt(nt)?(i="a",nt++):(i=null,0===rt&&n('"a"')),i=null!==i?i:"",null!==i?(112===e.charCodeAt(nt)?(s="p",nt++):(s=null,0===rt&&n('"p"')),s=null!==s?s:"",null!==s?(115===e.charCodeAt(nt)?(o="s",nt++):(o=null,0===rt&&n('"s"')),o=null!==o?o:"",null!==o?(u=W(),u=null!==u?u:"",null!==u?r=[r,i,s,o,u]:(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l))),null!==r?(i=Y(),null!==i?t=[t,r,i]:(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f),null!==t&&(t={type:"c_explicit"}),null===t&&(nt=a),t}function j(){var t,r,i,s,o,u,a,f;return a=u=nt,t=Y(),null!==t?(f=nt,"verse"===e.substr(nt,5)?(r="verse",nt+=5):(r=null,0===rt&&n('"verse"')),null!==r?(115===e.charCodeAt(nt)?(i="s",nt++):(i=null,0===rt&&n('"s"')),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&(f=nt,"vv"===e.substr(nt,2)?(r="vv",nt+=2):(r=null,0===rt&&n('"vv"')),null!==r?(i=W(),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&(f=nt,"ver"===e.substr(nt,3)?(r="ver",nt+=3):(r=null,0===rt&&n('"ver"')),null!==r?(i=W(),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&(f=nt,118===e.charCodeAt(nt)?(r="v",nt++):(r=null,0===rt&&n('"v"')),null!==r?(115===e.charCodeAt(nt)?(i="s",nt++):(i=null,0===rt&&n('"s"')),i=null!==i?i:"",null!==i?(115===e.charCodeAt(nt)?(s="s",nt++):(s=null,0===rt&&n('"s"')),s=null!==s?s:"",null!==s?(o=W(),o=null!==o?o:"",null!==o?r=[r,i,s,o]:(r=null,nt=f)):(r=null,nt=f)):(r=null,nt=f)):(r=null,nt=f)))),null!==r?(i=Y(),null!==i?t=[t,r,i]:(t=null,nt=a)):(t=null,nt=a)):(t=null,nt=a),null!==t&&(t={type:"v_explicit"}),null===t&&(nt=u),t}function F(){var t,r,i,s,o,u,a,f,l,c;a=nt,t=Y();if(null!==t){58===e.charCodeAt(nt)?(i=":",nt++):(i=null,0===rt&&n('":"'));if(null!==i)for(r=[];null!==i;)r.push(i),58===e.charCodeAt(nt)?(i=":",nt++):(i=null,0===rt&&n('":"'));else r=null;null===r&&(f=nt,46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(l=nt,rt++,c=nt,i=Y(),null!==i?(46===e.charCodeAt(nt)?(s=".",nt++):(s=null,0===rt&&n('"."')),null!==s?(o=Y(),null!==o?(46===e.charCodeAt(nt)?(u=".",nt++):(u=null,0===rt&&n('"."')),null!==u?i=[i,s,o,u]:(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c),rt--,null===i?i="":(i=null,nt=l),null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f)),null!==r?(i=Y(),null!==i?t=[t,r,i]:(t=null,nt=a)):(t=null,nt=a)}else t=null,nt=a;return t}function I(){var t,r,i,s;return s=nt,t=Y(),null!==t?(/^["']/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[\"']")),null!==r?(i=Y(),null!==i?t=[t,r,i]:(t=null,nt=s)):(t=null,nt=s)):(t=null,nt=s),null===t&&(t=Z()),t}function q(){var t,r,i,s,o,u,a,f,l,c;a=nt,/^[,;\/:&\-\u2013\u2014~]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[,;\\/:&\\-\\u2013\\u2014~]")),null===r&&(f=nt,46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(l=nt,rt++,c=nt,i=Y(),null!==i?(46===e.charCodeAt(nt)?(s=".",nt++):(s=null,0===rt&&n('"."')),null!==s?(o=Y(),null!==o?(46===e.charCodeAt(nt)?(u=".",nt++):(u=null,0===rt&&n('"."')),null!==u?i=[i,s,o,u]:(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c),rt--,null===i?i="":(i=null,nt=l),null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&("see"===e.substr(nt,3)?(r="see",nt+=3):(r=null,0===rt&&n('"see"')),null===r&&("compare"===e.substr(nt,7)?(r="compare",nt+=7):(r=null,0===rt&&n('"compare"')),null===r&&(f=nt,"cf"===e.substr(nt,2)?(r="cf",nt+=2):(r=null,0===rt&&n('"cf"')),null!==r?(i=W(),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&("and"===e.substr(nt,3)?(r="and",nt+=3):(r=null,0===rt&&n('"and"')),null===r&&("also"===e.substr(nt,4)?(r="also",nt+=4):(r=null,0===rt&&n('"also"')),null===r&&(r=Z())))))));if(null!==r)for(t=[];null!==r;)t.push(r),/^[,;\/:&\-\u2013\u2014~]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[,;\\/:&\\-\\u2013\\u2014~]")),null===r&&(f=nt,46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(l=nt,rt++,c=nt,i=Y(),null!==i?(46===e.charCodeAt(nt)?(s=".",nt++):(s=null,0===rt&&n('"."')),null!==s?(o=Y(),null!==o?(46===e.charCodeAt(nt)?(u=".",nt++):(u=null,0===rt&&n('"."')),null!==u?i=[i,s,o,u]:(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c),rt--,null===i?i="":(i=null,nt=l),null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&("see"===e.substr(nt,3)?(r="see",nt+=3):(r=null,0===rt&&n('"see"')),null===r&&("compare"===e.substr(nt,7)?(r="compare",nt+=7):(r=null,0===rt&&n('"compare"')),null===r&&(f=nt,"cf"===e.substr(nt,2)?(r="cf",nt+=2):(r=null,0===rt&&n('"cf"')),null!==r?(i=W(),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&("and"===e.substr(nt,3)?(r="and",nt+=3):(r=null,0===rt&&n('"and"')),null===r&&("also"===e.substr(nt,4)?(r="also",nt+=4):(r=null,0===rt&&n('"also"')),null===r&&(r=Z())))))));else t=null;return null!==t&&(t=""),null===t&&(nt=a),t}function R(){var t,r,i,s,o,u;o=nt,t=Y();if(null!==t){u=nt,/^[\-\u2013\u2014]/.test(e.charAt(nt))?(i=e.charAt(nt),nt++):(i=null,0===rt&&n("[\\-\\u2013\\u2014]")),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"through"===e.substr(nt,7)?(i="through",nt+=7):(i=null,0===rt&&n('"through"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"thru"===e.substr(nt,4)?(i="thru",nt+=4):(i=null,0===rt&&n('"thru"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"to"===e.substr(nt,2)?(i="to",nt+=2):(i=null,0===rt&&n('"to"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u))));if(null!==i)for(r=[];null!==i;)r.push(i),u=nt,/^[\-\u2013\u2014]/.test(e.charAt(nt))?(i=e.charAt(nt),nt++):(i=null,0===rt&&n("[\\-\\u2013\\u2014]")),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"through"===e.substr(nt,7)?(i="through",nt+=7):(i=null,0===rt&&n('"through"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"thru"===e.substr(nt,4)?(i="thru",nt+=4):(i=null,0===rt&&n('"thru"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"to"===e.substr(nt,2)?(i="to",nt+=2):(i=null,0===rt&&n('"to"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u))));else r=null;null!==r?t=[t,r]:(t=null,nt=o)}else t=null,nt=o;return t}function U(){var t,r,i,s;return s=i=nt,t=F(),null===t&&(t=q()),t=null!==t?t:"",null!==t?("title"===e.substr(nt,5)?(r="title",nt+=5):(r=null,0===rt&&n('"title"')),null!==r?t=[t,r]:(t=null,nt=s)):(t=null,nt=s),null!==t&&(t={type:"title",value:[t[1]],indices:[i,nt-1]}),null===t&&(nt=i),t}function z(){var t,r,i,s,o,u,a,f,l,c,h;return c=nt,t=Y(),null!==t?("from"===e.substr(nt,4)?(r="from",nt+=4):(r=null,0===rt&&n('"from"')),null===r&&("of"===e.substr(nt,2)?(r="of",nt+=2):(r=null,0===rt&&n('"of"')),null===r&&("in"===e.substr(nt,2)?(r="in",nt+=2):(r=null,0===rt&&n('"in"')))),null!==r?(i=Y(),null!==i?(h=nt,"the"===e.substr(nt,3)?(s="the",nt+=3):(s=null,0===rt&&n('"the"')),null!==s?(o=Y(),null!==o?("book"===e.substr(nt,4)?(u="book",nt+=4):(u=null,0===rt&&n('"book"')),null!==u?(a=Y(),null!==a?("of"===e.substr(nt,2)?(f="of",nt+=2):(f=null,0===rt&&n('"of"')),null!==f?(l=Y(),null!==l?s=[s,o,u,a,f,l]:(s=null,nt=h)):(s=null,nt=h)):(s=null,nt=h)):(s=null,nt=h)):(s=null,nt=h)):(s=null,nt=h),s=null!==s?s:"",null!==s?t=[t,r,i,s]:(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c),t}function W(){var t,r,i,s,o,u,a,f,l;return a=nt,t=Y(),null!==t?(46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(f=nt,rt++,l=nt,i=Y(),null!==i?(46===e.charCodeAt(nt)?(s=".",nt++):(s=null,0===rt&&n('"."')),null!==s?(o=Y(),null!==o?(46===e.charCodeAt(nt)?(u=".",nt++):(u=null,0===rt&&n('"."')),null!==u?i=[i,s,o,u]:(i=null,nt=l)):(i=null,nt=l)):(i=null,nt=l)):(i=null,nt=l),rt--,null===i?i="":(i=null,nt=f),null!==i?t=[t,r,i]:(t=null,nt=a)):(t=null,nt=a)):(t=null,nt=a),t}function X(){var t,r,i,s,o,u,a,f,l,c,h;l=f=nt,t=Y();if(null!==t)if(/^[([]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[([]")),null!==r)if(i=Y(),null!==i){c=nt,s=$();if(null!==s){o=[],h=nt,u=q(),null!==u?(a=$(),null!==a?u=[u,a]:(u=null,nt=h)):(u=null,nt=h);for(;null!==u;)o.push(u),h=nt,u=q(),null!==u?(a=$(),null!==a?u=[u,a]:(u=null,nt=h)):(u=null,nt=h);null!==o?s=[s,o]:(s=null,nt=c)}else s=null,nt=c;null!==s?(o=Y(),null!==o?(/^[)\]]/.test(e.charAt(nt))?(u=e.charAt(nt),nt++):(u=null,0===rt&&n("[)\\]]")),null!==u?t=[t,r,i,s,o,u]:(t=null,nt=l)):(t=null,nt=l)):(t=null,nt=l)}else t=null,nt=l;else t=null,nt=l;else t=null,nt=l;return null!==t&&(t={type:"translation_sequence",value:t[3],indices:[f,nt-1]}),null===t&&(nt=f),t}function V(){var t,r,i,s,o,u,a,f,l,c;f=a=nt,t=Y();if(null!==t)if(l=nt,44===e.charCodeAt(nt)?(r=",",nt++):(r=null,0===rt&&n('","')),null!==r?(i=Y(),null!==i?r=[r,i]:(r=null,nt=l)):(r=null,nt=l),r=null!==r?r:"",null!==r){l=nt,i=$();if(null!==i){s=[],c=nt,o=q(),null!==o?(u=$(),null!==u?o=[o,u]:(o=null,nt=c)):(o=null,nt=c);for(;null!==o;)s.push(o),c=nt,o=q(),null!==o?(u=$(),null!==u?o=[o,u]:(o=null,nt=c)):(o=null,nt=c);null!==s?i=[i,s]:(i=null,nt=l)}else i=null,nt=l;null!==i?t=[t,r,i]:(t=null,nt=f)}else t=null,nt=f;else t=null,nt=f;return null!==t&&(t={type:"translation_sequence",value:t[2],indices:[a,nt-1]}),null===t&&(nt=a),t}function $(){var t,r,i,s,o;return o=s=nt,30===e.charCodeAt(nt)?(t="",nt++):(t=null,0===rt&&n('"\\x1E"')),null!==t?(r=K(),null!==r?(30===e.charCodeAt(nt)?(i="",nt++):(i=null,0===rt&&n('"\\x1E"')),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"translation",value:t[1].value,indices:[s,nt-1]}),null===t&&(nt=s),t}function J(){var t,r,i,s,o,u;return u=o=s=nt,/^[0-9]/.test(e.charAt(nt))?(t=e.charAt(nt),nt++):(t=null,0===rt&&n("[0-9]")),null!==t?(/^[0-9]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[0-9]")),r=null!==r?r:"",null!==r?(/^[0-9]/.test(e.charAt(nt))?(i=e.charAt(nt),nt++):(i=null,0===rt&&n("[0-9]")),i=null!==i?i:"",null!==i?t=[t,r,i]:(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u),null!==t?(u=nt,rt++,/^[0-9]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[0-9]")),null===r&&(",000"===e.substr(nt,4)?(r=",000",nt+=4):(r=null,0===rt&&n('",000"'))),rt--,null===r?r="":(r=null,nt=u),null!==r?t=[t,r]:(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"integer",value:parseInt(t[0].join(""),10),indices:[s,nt-1]}),null===t&&(nt=s),t}function K(){var t,r,i;i=nt,/^[0-9]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[0-9]"));if(null!==r)for(t=[];null!==r;)t.push(r),/^[0-9]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[0-9]"));else t=null;return null!==t&&(t={type:"integer",value:parseInt(t.join(""),10),indices:[i,nt-1]}),null===t&&(nt=i),t}function Q(){var t,r,i;i=nt,/^[^\x1F\x1E([]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[^\\x1F\\x1E([]"));if(null!==r)for(t=[];null!==r;)t.push(r),/^[^\x1F\x1E([]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[^\\x1F\\x1E([]"));else t=null;return null!==t&&(t={type:"word",value:t.join(""),indices:[i,nt-1]}),null===t&&(nt=i),t}function G(){var t,r;return r=nt,/^[([]/.test(e.charAt(nt))?(t=e.charAt(nt),nt++):(t=null,0===rt&&n("[([]")),null!==t&&(t={type:"stop",value:t,indices:[r,nt-1]}),null===t&&(nt=r),t}function Y(){var e;return e=Z(),null!==e?e:""}function Z(){var t,r;/^[\s\xa0*]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[\\s\\xa0*]"));if(null!==r)for(t=[];null!==r;)t.push(r),/^[\s\xa0*]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[\\s\\xa0*]"));else t=null;return t}function et(e){e.sort();for(var t=null,n=[],r=0;r<e.length;r++)e[r]!==t&&(n.push(e[r]),t=e[r]);return n}var tt={start:function(){var e,t;t=m(),null===t&&(t=r(),null===t&&(t=b(),null===t&&(t=o(),null===t&&(t=A(),null===t&&(t=v(),null===t&&(t=h(),null===t&&(t=D(),null===t&&(t=p(),null===t&&(t=d(),null===t&&(t=_(),null===t&&(t=l(),null===t&&(t=T(),null===t&&(t=g(),null===t&&(t=f(),null===t&&(t=x(),null===t&&(t=a(),null===t&&(t=w(),null===t&&(t=S(),null===t&&(t=y(),null===t&&(t=E(),null===t&&(t=X(),null===t&&(t=V(),null===t&&(t=q(),null===t&&(t=N(),null===t&&(t=O(),null===t&&(t=C(),null===t&&(t=k(),null===t&&(t=P(),null===t&&(t=J(),null===t&&(t=L(),null===t&&(t=H(),null===t&&(t=Q(),null===t&&(t=G())))))))))))))))))))))))))))))))));if(null!==t)for(e=[];null!==t;)e.push(t),t=m(),null===t&&(t=r(),null===t&&(t=b(),null===t&&(t=o(),null===t&&(t=A(),null===t&&(t=v(),null===t&&(t=h(),null===t&&(t=D(),null===t&&(t=p(),null===t&&(t=d(),null===t&&(t=_(),null===t&&(t=l(),null===t&&(t=T(),null===t&&(t=g(),null===t&&(t=f(),null===t&&(t=x(),null===t&&(t=a(),null===t&&(t=w(),null===t&&(t=S(),null===t&&(t=y(),null===t&&(t=E(),null===t&&(t=X(),null===t&&(t=V(),null===t&&(t=q(),null===t&&(t=N(),null===t&&(t=O(),null===t&&(t=C(),null===t&&(t=k(),null===t&&(t=P(),null===t&&(t=J(),null===t&&(t=L(),null===t&&(t=H(),null===t&&(t=Q(),null===t&&(t=G())))))))))))))))))))))))))))))))));else e=null;return e},sequence:r,sequence_post_enclosed:i,sequence_post:s,range:o,b:a,b_range:f,bc:l,bc_comma:c,bc_title:h,bcv:p,bcv_weak:d,bcv_comma:v,bcv_hyphen_range:m,bv:g,cb:y,cb_range:b,cbv:w,cb_ordinal:E,cbv_ordinal:S,c_psalm:x,cv_psalm:T,c_title:N,cv:C,cv_weak:k,c:L,ff:A,integer_title:O,ps151_b:M,ps151_bc:_,ps151_bcv:D,v_letter:P,v:H,c_explicit:B,v_explicit:j,cv_sep:F,cv_sep_weak:I,sequence_sep:q,range_sep:R,title:U,in_book_of:z,abbrev:W,translation_sequence_enclosed:X,translation_sequence:V,translation:$,integer:J,any_integer:K,word:Q,word_parenthesis:G,sp:Y,space:Z};if(void 0!==t){if(void 0===tt[t])throw Error("Invalid rule name: "+u(t)+".")}else t="start";var nt=0,rt=0,it=0,st=[],tt=tt[t]();if(null===tt||nt!==e.length){for(var tt=Math.max(nt,it),ot=tt<e.length?e.charAt(tt):null,ut=1,at=1,ft=!1,lt=0;lt<Math.max(nt,it);lt++){var ct=e.charAt(lt);"\n"===ct?(ft||ut++,at=1,ft=!1):"\r"===ct||"\u2028"===ct||"\u2029"===ct?(ut++,at=1,ft=!0):(at++,ft=!1)}throw new this.SyntaxError(et(st),ot,tt,ut,at)}return tt},toSource:function(){return this._source},SyntaxError:function(e,t,n,r,i){this.name="SyntaxError",this.expected=e,this.found=t;switch(e.length){case 0:e="end of input";break;case 1:e=e[0];break;default:e=e.slice(0,e.length-1).join(", ")+" or "+e[e.length-1]}t=t?u(t):"end of input",this.message="Expected "+e+" but "+t+" found.",this.offset=n,this.line=r,this.column=i}};s.SyntaxError.prototype=Error.prototype,o=s}.call(this),define("bcv",function(e){return function(){var t,n;return n=function(){return new this.bcv_parser},t=n.apply(e,arguments),t||e.bcv_parser}}(this)),define("verseKey",["bcv","versificationMgr"],function(e,t){function n(n,r){var i={};i.osis=e.parse(n).osis(),i.osis===""&&(i.osis="Matt.1");var s=i.osis.split("-")[0].split(".");return i.book=s[0],i.chapter=isNaN(parseInt(s[1],10))?1:parseInt(s[1],10),i.verse=parseInt(s[2],10),i.bookNum=t.getBookNum(i.book,r),i}function r(e,r){var i=[],s=e;typeof e=="string"&&(s=n(e));if(!(s.osis.split("-").length>1))if(isNaN(s.verse)){var o=t.getBookNum(s.book);for(var u=0;u<t.getVersesInChapter(o,s.chapter-1,r);u++)i.push({osis:s.book+"."+s.chapter+"."+(u+1),book:s.book,bookNum:o,chapter:s.chapter,verse:u+1})}else i.push(s);return i}function i(e,r){var i=n(e,r),s=t.getChapterMax(i.bookNum,r);return i.chapter<s?i.chapter++:(i.bookNum=i.bookNum<65?++i.bookNum:65,i.chapter=i.bookNum<65?1:s,i.book=t.getBook(i.bookNum,r).abbrev),i.osis=i.book+"."+i.chapter,i}function s(e,r){var i=n(e,r),s=t.getChapterMax(i.bookNum-1,r);return i.chapter>1?--i.chapter:(i.bookNum=i.bookNum>0?--i.bookNum:0,i.chapter=i.bookNum===0?1:s,i.book=t.getBook(i.bookNum,r).abbrev),i.osis=i.book+"."+i.chapter,i}return{parse:n,parseVerseList:r,next:i,previous:s}}),function(e){function n(t,r){if(!(this instanceof n))return new n(t,r);var s=this;i(s),s.q=s.c="",s.bufferCheckPosition=e.MAX_BUFFER_LENGTH,s.opt=r||{},s.opt.lowercase=s.opt.lowercase||s.opt.lowercasetags,s.looseCase=s.opt.lowercase?"toLowerCase":"toUpperCase",s.tags=[],s.closed=s.closedRoot=s.sawRoot=!1,s.tag=s.error=null,s.strict=!!t,s.noscript=!!t||!!s.opt.noscript,s.state=k.BEGIN,s.ENTITIES=Object.create(e.ENTITIES),s.attribList=[],s.opt.xmlns&&(s.ns=Object.create(w)),s.trackPosition=s.opt.position!==!1,s.trackPosition&&(s.position=s.line=s.column=0),L(s,"onready")}function r(n){var r=Math.max(e.MAX_BUFFER_LENGTH,10),i=0;for(var s=0,o=t.length;s<o;s++){var u=n[t[s]].length;if(u>r)switch(t[s]){case"textNode":O(n);break;case"cdata":A(n,"oncdata",n.cdata),n.cdata="";break;case"script":A(n,"onscript",n.script),n.script="";break;default:_(n,"Max buffer length exceeded: "+t[s])}i=Math.max(i,u)}n.bufferCheckPosition=e.MAX_BUFFER_LENGTH-i+n.position}function i(e){for(var n=0,r=t.length;n<r;n++)e[t[n]]=""}function a(e,t){return new f(e,t)}function f(e,t){if(!(this instanceof f))return new f(e,t);s.apply(this),this._parser=new n(e,t),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(e){r.emit("error",e),r._parser.error=null},this._decoder=null,u.forEach(function(e){Object.defineProperty(r,"on"+e,{get:function(){return r._parser["on"+e]},set:function(t){if(!t)return r.removeAllListeners(e),r._parser["on"+e]=t;r.on(e,t)},enumerable:!0,configurable:!1})})}function x(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}function T(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function N(e,t){return T(e)?!!t.match(e):e[t]}function C(e,t){return!N(e,t)}function L(e,t,n){e[t]&&e[t](n)}function A(e,t,n){e.textNode&&O(e),L(e,t,n)}function O(e){e.textNode=M(e.opt,e.textNode),e.textNode&&L(e,"ontext",e.textNode),e.textNode=""}function M(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function _(e,t){return O(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,L(e,"onerror",t),e}function D(e){return e.closedRoot||P(e,"Unclosed root tag"),e.state!==k.TEXT&&_(e,"Unexpected end"),O(e),e.c="",e.closed=!0,L(e,"onend"),n.call(e,e.strict,e.opt),e}function P(e,t){if(!(typeof e=="object"&&e instanceof n))throw new Error("bad call to strictFail");e.strict&&_(e,t)}function H(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0}function B(e){var t=e.indexOf(":"),n=t<0?["",e]:e.split(":"),r=n[0],i=n[1];return e==="xmlns"&&(r="xmlns",i=""),{prefix:r,local:i}}function j(e){e.strict||(e.attribName=e.attribName[e.looseCase]());if(e.attribList.indexOf(e.attribName)!==-1||e.tag.attributes.hasOwnProperty(e.attribName))return e.attribName=e.attribValue="";if(e.opt.xmlns){var t=B(e.attribName),n=t.prefix,r=t.local;if(n==="xmlns")if(r==="xml"&&e.attribValue!==y)P(e,"xml: prefix must be bound to "+y+"\n"+"Actual: "+e.attribValue);else if(r==="xmlns"&&e.attribValue!==b)P(e,"xmlns: prefix must be bound to "+b+"\n"+"Actual: "+e.attribValue);else{var i=e.tag,s=e.tags[e.tags.length-1]||e;i.ns===s.ns&&(i.ns=Object.create(s.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,A(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}function F(e,t){if(e.opt.xmlns){var n=e.tag,r=B(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(P(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach(function(t){A(e,"onopennamespace",{prefix:t,uri:n.ns[t]})});for(var s=0,o=e.attribList.length;s<o;s++){var u=e.attribList[s],a=u[0],f=u[1],l=B(a),c=l.prefix,h=l.local,p=c==""?"":n.ns[c]||"",d={name:a,value:f,prefix:c,local:h,uri:p};c&&c!="xmlns"&&!p&&(P(e,"Unbound namespace prefix: "+JSON.stringify(c)),d.uri=c),e.tag.attributes[a]=d,A(e,"onattribute",d)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),A(e,"onopentag",e.tag),t||(!e.noscript&&e.tagName.toLowerCase()==="script"?e.state=k.SCRIPT:e.state=k.TEXT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function I(e){if(!e.tagName){P(e,"Weird empty close tag."),e.textNode+="</>",e.state=k.TEXT;return}if(e.script){if(e.tagName!=="script"){e.script+="</"+e.tagName+">",e.tagName="",e.state=k.SCRIPT;return}A(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());var r=n;while(t--){var i=e.tags[t];if(i.name===r)break;P(e,"Unexpected close tag")}if(t<0){P(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",e.state=k.TEXT;return}e.tagName=n;var s=e.tags.length;while(s-->t){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,A(e,"onclosetag",e.tagName);var u={};for(var a in o.ns)u[a]=o.ns[a];var f=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==f.ns&&Object.keys(o.ns).forEach(function(t){var n=o.ns[t];A(e,"onclosenamespace",{prefix:t,uri:n})})}t===0&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=k.TEXT}function q(e){var t=e.entity,n=t.toLowerCase(),r,i="";return e.ENTITIES[t]?e.ENTITIES[t]:e.ENTITIES[n]?e.ENTITIES[n]:(t=n,t.charAt(0)==="#"&&(t.charAt(1)==="x"?(t=t.slice(2),r=parseInt(t,16),i=r.toString(16)):(t=t.slice(1),r=parseInt(t,10),i=r.toString(10))),t=t.replace(/^0+/,""),i.toLowerCase()!==t?(P(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCharCode(r))}function R(e){var t=this;if(this.error)throw this.error;if(t.closed)return _(t,"Cannot write after close. Assign an onready handler.");if(e===null)return D(t);var n=0,i="";while(t.c=i=e.charAt(n++)){t.trackPosition&&(t.position++,i==="\n"?(t.line++,t.column=0):t.column++);switch(t.state){case k.BEGIN:i==="<"?(t.state=k.OPEN_WAKA,t.startTagPosition=t.position):C(l,i)&&(P(t,"Non-whitespace before first tag."),t.textNode=i,t.state=k.TEXT);continue;case k.TEXT:if(t.sawRoot&&!t.closedRoot){var s=n-1;while(i&&i!=="<"&&i!=="&")i=e.charAt(n++),i&&t.trackPosition&&(t.position++,i==="\n"?(t.line++,t.column=0):t.column++);t.textNode+=e.substring(s,n-1)}i==="<"?(t.state=k.OPEN_WAKA,t.startTagPosition=t.position):(C(l,i)&&(!t.sawRoot||t.closedRoot)&&P(t,"Text data outside of root node."),i==="&"?t.state=k.TEXT_ENTITY:t.textNode+=i);continue;case k.SCRIPT:i==="<"?t.state=k.SCRIPT_ENDING:t.script+=i;continue;case k.SCRIPT_ENDING:i==="/"?t.state=k.CLOSE_TAG:(t.script+="<"+i,t.state=k.SCRIPT);continue;case k.OPEN_WAKA:if(i==="!")t.state=k.SGML_DECL,t.sgmlDecl="";else if(!N(l,i))if(N(E,i))t.state=k.OPEN_TAG,t.tagName=i;else if(i==="/")t.state=k.CLOSE_TAG,t.tagName="";else if(i==="?")t.state=k.PROC_INST,t.procInstName=t.procInstBody="";else{P(t,"Unencoded <");if(t.startTagPosition+1<t.position){var o=t.position-t.startTagPosition;i=(new Array(o)).join(" ")+i}t.textNode+="<"+i,t.state=k.TEXT}continue;case k.SGML_DECL:(t.sgmlDecl+i).toUpperCase()===m?(A(t,"onopencdata"),t.state=k.CDATA,t.sgmlDecl="",t.cdata=""):t.sgmlDecl+i==="--"?(t.state=k.COMMENT,t.comment="",t.sgmlDecl=""):(t.sgmlDecl+i).toUpperCase()===g?(t.state=k.DOCTYPE,(t.doctype||t.sawRoot)&&P(t,"Inappropriately located doctype declaration"),t.doctype="",t.sgmlDecl=""):i===">"?(A(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=k.TEXT):N(p,i)?(t.state=k.SGML_DECL_QUOTED,t.sgmlDecl+=i):t.sgmlDecl+=i;continue;case k.SGML_DECL_QUOTED:i===t.q&&(t.state=k.SGML_DECL,t.q=""),t.sgmlDecl+=i;continue;case k.DOCTYPE:i===">"?(t.state=k.TEXT,A(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=i,i==="["?t.state=k.DOCTYPE_DTD:N(p,i)&&(t.state=k.DOCTYPE_QUOTED,t.q=i));continue;case k.DOCTYPE_QUOTED:t.doctype+=i,i===t.q&&(t.q="",t.state=k.DOCTYPE);continue;case k.DOCTYPE_DTD:t.doctype+=i,i==="]"?t.state=k.DOCTYPE:N(p,i)&&(t.state=k.DOCTYPE_DTD_QUOTED,t.q=i);continue;case k.DOCTYPE_DTD_QUOTED:t.doctype+=i,i===t.q&&(t.state=k.DOCTYPE_DTD,t.q="");continue;case k.COMMENT:i==="-"?t.state=k.COMMENT_ENDING:t.comment+=i;continue;case k.COMMENT_ENDING:i==="-"?(t.state=k.COMMENT_ENDED,t.comment=M(t.opt,t.comment),t.comment&&A(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+i,t.state=k.COMMENT);continue;case k.COMMENT_ENDED:i!==">"?(P(t,"Malformed comment"),t.comment+="--"+i,t.state=k.COMMENT):t.state=k.TEXT;continue;case k.CDATA:i==="]"?t.state=k.CDATA_ENDING:t.cdata+=i;continue;case k.CDATA_ENDING:i==="]"?t.state=k.CDATA_ENDING_2:(t.cdata+="]"+i,t.state=k.CDATA);continue;case k.CDATA_ENDING_2:i===">"?(t.cdata&&A(t,"oncdata",t.cdata),A(t,"onclosecdata"),t.cdata="",t.state=k.TEXT):i==="]"?t.cdata+="]":(t.cdata+="]]"+i,t.state=k.CDATA);continue;case k.PROC_INST:i==="?"?t.state=k.PROC_INST_ENDING:N(l,i)?t.state=k.PROC_INST_BODY:t.procInstName+=i;continue;case k.PROC_INST_BODY:if(!t.procInstBody&&N(l,i))continue;i==="?"?t.state=k.PROC_INST_ENDING:t.procInstBody+=i;continue;case k.PROC_INST_ENDING:i===">"?(A(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=k.TEXT):(t.procInstBody+="?"+i,t.state=k.PROC_INST_BODY);continue;case k.OPEN_TAG:N(S,i)?t.tagName+=i:(H(t),i===">"?F(t):i==="/"?t.state=k.OPEN_TAG_SLASH:(C(l,i)&&P(t,"Invalid character in tag name"),t.state=k.ATTRIB));continue;case k.OPEN_TAG_SLASH:i===">"?(F(t,!0),I(t)):(P(t,"Forward-slash in opening tag not followed by >"),t.state=k.ATTRIB);continue;case k.ATTRIB:if(N(l,i))continue;i===">"?F(t):i==="/"?t.state=k.OPEN_TAG_SLASH:N(E,i)?(t.attribName=i,t.attribValue="",t.state=k.ATTRIB_NAME):P(t,"Invalid attribute name");continue;case k.ATTRIB_NAME:i==="="?t.state=k.ATTRIB_VALUE:i===">"?(P(t,"Attribute without value"),t.attribValue=t.attribName,j(t),F(t)):N(l,i)?t.state=k.ATTRIB_NAME_SAW_WHITE:N(S,i)?t.attribName+=i:P(t,"Invalid attribute name");continue;case k.ATTRIB_NAME_SAW_WHITE:if(i==="=")t.state=k.ATTRIB_VALUE;else{if(N(l,i))continue;P(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",A(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",i===">"?F(t):N(E,i)?(t.attribName=i,t.state=k.ATTRIB_NAME):(P(t,"Invalid attribute name"),t.state=k.ATTRIB)}continue;case k.ATTRIB_VALUE:if(N(l,i))continue;N(p,i)?(t.q=i,t.state=k.ATTRIB_VALUE_QUOTED):(P(t,"Unquoted attribute value"),t.state=k.ATTRIB_VALUE_UNQUOTED,t.attribValue=i);continue;case k.ATTRIB_VALUE_QUOTED:if(i!==t.q){i==="&"?t.state=k.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=i;continue}j(t),t.q="",t.state=k.ATTRIB;continue;case k.ATTRIB_VALUE_UNQUOTED:if(C(v,i)){i==="&"?t.state=k.ATTRIB_VALUE_ENTITY_U:t.attribValue+=i;continue}j(t),i===">"?F(t):t.state=k.ATTRIB;continue;case k.CLOSE_TAG:if(!t.tagName){if(N(l,i))continue;C(E,i)?t.script?(t.script+="</"+i,t.state=k.SCRIPT):P(t,"Invalid tagname in closing tag."):t.tagName=i}else i===">"?I(t):N(S,i)?t.tagName+=i:t.script?(t.script+="</"+t.tagName,t.tagName="",t.state=k.SCRIPT):(C(l,i)&&P(t,"Invalid tagname in closing tag"),t.state=k.CLOSE_TAG_SAW_WHITE);continue;case k.CLOSE_TAG_SAW_WHITE:if(N(l,i))continue;i===">"?I(t):P(t,"Invalid characters in closing tag");continue;case k.TEXT_ENTITY:case k.ATTRIB_VALUE_ENTITY_Q:case k.ATTRIB_VALUE_ENTITY_U:switch(t.state){case k.TEXT_ENTITY:var u=k.TEXT,a="textNode";break;case k.ATTRIB_VALUE_ENTITY_Q:var u=k.ATTRIB_VALUE_QUOTED,a="attribValue";break;case k.ATTRIB_VALUE_ENTITY_U:var u=k.ATTRIB_VALUE_UNQUOTED,a="attribValue"}i===";"?(t[a]+=q(t),t.entity="",t.state=u):N(d,i)?t.entity+=i:(P(t,"Invalid character entity"),t[a]+="&"+t.entity+i,t.entity="",t.state=u);continue;default:throw new Error(t,"Unknown state: "+t.state)}}return t.position>=t.bufferCheckPosition&&r(t),t}e.parser=function(e,t){return new n(e,t)},e.SAXParser=n,e.SAXStream=f,e.createStream=a,e.MAX_BUFFER_LENGTH=65536;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){this.__proto__=e}return t.prototype=e,new t}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),n.prototype={end:function(){D(this)},write:R,resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{var s=require("stream").Stream}catch(o){var s=function(){}}var u=e.EVENTS.filter(function(e){return e!=="error"&&e!=="end"});f.prototype=Object.create(s.prototype,{constructor:{value:f}}),f.prototype.write=function(e){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(e)){if(!this._decoder){var t=require("string_decoder").StringDecoder;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},f.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},f.prototype.on=function(e,t){var n=this;return!n._parser["on"+e]&&u.indexOf(e)!==-1&&(n._parser["on"+e]=function(){var t=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),s.prototype.on.call(n,e,t)};var l="\r\n ",c="0124356789",h="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",p="'\"",d=c+h+"#",v=l+">",m="[CDATA[",g="DOCTYPE",y="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/2000/xmlns/",w={xml:y,xmlns:b};l=x(l),c=x(c),h=x(h);var E=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,S=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;p=x(p),d=x(d),v=x(v);var k=0;e.STATE={BEGIN:k++,TEXT:k++,TEXT_ENTITY:k++,OPEN_WAKA:k++,SGML_DECL:k++,SGML_DECL_QUOTED:k++,DOCTYPE:k++,DOCTYPE_QUOTED:k++,DOCTYPE_DTD:k++,DOCTYPE_DTD_QUOTED:k++,COMMENT_STARTING:k++,COMMENT:k++,COMMENT_ENDING:k++,COMMENT_ENDED:k++,CDATA:k++,CDATA_ENDING:k++,CDATA_ENDING_2:k++,PROC_INST:k++,PROC_INST_BODY:k++,PROC_INST_ENDING:k++,OPEN_TAG:k++,OPEN_TAG_SLASH:k++,ATTRIB:k++,ATTRIB_NAME:k++,ATTRIB_NAME_SAW_WHITE:k++,ATTRIB_VALUE:k++,ATTRIB_VALUE_QUOTED:k++,ATTRIB_VALUE_UNQUOTED:k++,ATTRIB_VALUE_ENTITY_Q:k++,ATTRIB_VALUE_ENTITY_U:k++,CLOSE_TAG:k++,CLOSE_TAG_SAW_WHITE:k++,SCRIPT:k++,SCRIPT_ENDING:k++},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(t){var n=e.ENTITIES[t],r=typeof n=="number"?String.fromCharCode(n):n;e.ENTITIES[t]=r});for(var k in e.STATE)e.STATE[e.STATE[k]]=k;k=e.STATE}(typeof exports=="undefined"?sax={}:exports),define("sax",function(e){return function(){var t,n;return t||e.sax}}(this)),define("filters/osis",["sax","bcv"],function(e,t){function s(e,n){var r="";return t.parse(e).osis()!==""?r='<a href="?type=crossReference&osisRef='+t.parse(e).osis()+"&n="+n.attributes.n+'">'+e+"</a>":r=e,r}var n={},r=e.parser(!0),i={headings:!1,footnotes:!1,strongsNumbers:!1,wordsOfChristInRed:!1,oneVersePerLine:!1};return n.processText=function(e,t,n){!n||n==={}?n=i:(n.headings=n.headings?n.headings:i.headings,n.footnotes=n.footnotes?n.footnotes:i.footnotes,n.strongsNumbers=n.strongsNumbers?n.strongsNumbers:i.strongsNumbers,n.wordsOfChristInRed=n.wordsOfChristInRed?n.wordsOfChristInRed:i.wordsOfChristInRed,n.oneVersePerLine=n.oneVersePerLine?n.oneVersePerLine:i.oneVersePerLine);var o="",u=null,a=null,f=null,l=null,c="",h="",p="",d="",v=!1;r.onerror=function(e){r.resume()},r.ontext=function(e){if(a)n.footnotes&&a.attributes.type==="crossReference"&&(o!=="reference"?h+=s(e,a):h+='<a href="?type=crossReference&osisRef='+f.attributes.osisRef+"&n="+a.attributes.n+'">'+e+"</a>");else if(u)switch(u.name){case"title":u.attributes.type==="section"?h="<h3>"+e+"</h3>"+h:h="<h1>"+e+"</h1>"+h;break;default:h+=e}else h+=e},r.onopentag=function(e){u=e,o=e.name;switch(e.name){case"xml":l={osisRef:e.attributes.osisRef,verseNum:e.attributes.verseNum},t==="RtoL"?h+="<span dir='rtl'><a href=\"?type=verseNum&osisRef="+l.osisRef+"\" class='verse-number'> "+l.verseNum+" </a><span dir='rtl'>":h+='<a href="?type=verseNum&osisRef='+l.osisRef+"\" class='verse-number'> "+l.verseNum+" </a>";break;case"note":e.attributes.type==="crossReference"&&n.footnotes&&(h+="["),a=e;break;case"reference":f=e}},r.onclosetag=function(e){switch(e){case"title":u=null;break;case"note":a.attributes.type==="crossReference"&&n.footnotes&&(h+="] "),c="",a=null;break;case"reference":f=null;break;case"xml":t==="RtoL"&&(h+="</span>")}o=""},r.onattribute=function(e){},r.onend=function(){};var m="";for(var g=0;g<e.length;g++)m="<xml osisRef='"+e[g].osis+"' verseNum = '"+e[g].verse+"'>"+e[g].text+"</xml>",r.write(m),r.close(),p+=n.oneVersePerLine?"<div class='verse' id = 'verse"+e[g].verse+"'>"+h+"</div>":"<span class='verse' id = 'verse"+e[g].verse+"'>"+h+"</span>",h="";return t==="RtoL"&&(p="<div style='text-align: right;'>"+p+"</div>"),p},n}),define("filters/plain",[],function(){var e={},t={oneVersePerLine:!1};return e.processText=function(e,n,r){var i="";!r||r==={}?r=t:r.oneVersePerLine=r.oneVersePerLine?r.oneVersePerLine:t.oneVersePerLine;for(var s=0;s<e.length;s++)outText=n!=="RtoL"?'<a href="?type=verseNum&osisRef='+e[s].verse+"\" class='verse-number'> "+verseData.verseNum+" </a>":"<span dir='rtl'><a href=\"?type=verseNum&osisRef="+e[s].verse+"\" class='verse-number'> "+verseData.verseNum+" </a></span>",outText+=n!=="RtoL"?e[s].text:"<span dir='rtl'>"+e[s].text+"</span>",i+=r.oneVersePerLine?"<div class='verse' id = 'verse"+e[s].verse+"'>"+outText+"</div>":"<span class='verse' id = 'verse"+e[s].verse+"'>"+outText+"</span>",outText="";return n==="RtoL"&&(i="<div style='text-align: right;'>"+i+"</div>"),i},e}),define("filterMgr",["filters/osis","filters/plain"],function(e,t){function n(n,r,i,s){return r.toLowerCase()==="osis"?e.processText(n,i,s):t.processText(n,i,s)}return{processText:n}}),define("swmodule",["dataMgr","verseKey","zText","filterMgr","versificationMgr"],function(e,t,n,r,i){function u(e,t,n){if(!(this instanceof u))throw new TypeError("Module constructor cannot be called as a function.");this.modKey=e,this.id=t,this.config=n}function a(e,t){}function f(t,n){e.getBlob(t,n)}var s=null,o=null;return u.create=function(e,t,n){return new u(e,t,n)},u.prototype={constructor:u,self:this,renderText:function(i,s,o){var u=null,a=null,l=this;typeof s=="function"&&(o=s);var c=t.parseVerseList(i,this.config.Versification);c.length!==0&&c[0].osis!==""?e.get(l.config.bcvPosID,function(e,t){e?o(e):(t.nt&&t.nt.hasOwnProperty(c[0].book)?(u=t.nt[c[0].book],a=l.config.nt):t.ot&&t.ot.hasOwnProperty(c[0].book)&&(u=t.ot[c[0].book],a=l.config.ot),u===null&&o({message:"Wrong passage. The requested chapter is not available in this module."}),f(a,function(e,t){e||n.getRawEntry(t,u,c,l.config.Encoding,function(e,t){e?o(e):o(null,r.processText(t,l.config.SourceType,l.config.Direction,s))})}))}):o({message:"Wrong passage. The requested chapter is not available in this module."})},getAllBooks:function(){return i.getAllBooks(this.config.Versification)}},u}),define("moduleMgr",["dataMgr","swmodule"],function(e,t){var n={};return n.getModules=function(n){var r=[];e.getModules(function(e,i){e?n(e):(i.forEach(function(e){r.push(new t(e.moduleKey,e.id,e))}),n(null,r))})},n.getModule=function(n,r){e.get(n,function(e,i){e?r(null):r(null,new t(i.moduleKey,n,i))})},n}),require.config({paths:{text:"libs/text/text",json:"libs/json/src/json",async:"libs/async/lib/async",bcv:"libs/bible-reference-parser/js/en_bcv_parser.min",unzip:"libs/zlib/bin/unzip.min",inflateStream:"libs/zlib/bin/inflate_stream.min",sax:"libs/sax/lib/sax",idb:"libs/IDBWrapper/idbstore.min"},shim:{bcv:{exports:"bcv_parser",init:function(){return new this.bcv_parser}},unzip:{exports:"Zlib"},inflateStream:{exports:"Zlib"},sax:{exports:"sax"}}}),define("sword",["installMgr","moduleMgr","dataMgr","versificationMgr","verseKey"],function(e,t,n,r,i){var s={};return s.installMgr=e,s.moduleMgr=t,s.versificationMgr=r,s.dataMgr=n,s.verseKey=i,s.isSupported=function(){var e={}.toString,t=[],n="[object Function]";return window.FileReader&&e.call(t.forEach)==n?!0:!1},s}),require("sword")});
\ No newline at end of file +(function(e,t){typeof define=="function"&&define.amd?define(t):e.sword=t()})(this,function(){var requirejs,require,define;return function(e){function c(e,t){return f.call(e,t)}function h(e,t){var n,r,i,s,o,a,f,l,c,h,p=t&&t.split("/"),d=u.map,v=d&&d["*"]||{};if(e&&e.charAt(0)===".")if(t){p=p.slice(0,p.length-1),e=p.concat(e.split("/"));for(l=0;l<e.length;l+=1){h=e[l];if(h===".")e.splice(l,1),l-=1;else if(h===".."){if(l===1&&(e[2]===".."||e[0]===".."))break;l>0&&(e.splice(l-1,2),l-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((p||v)&&d){n=e.split("/");for(l=n.length;l>0;l-=1){r=n.slice(0,l).join("/");if(p)for(c=p.length;c>0;c-=1){i=d[p.slice(0,c).join("/")];if(i){i=i[r];if(i){s=i,o=l;break}}}if(s)break;!a&&v&&v[r]&&(a=v[r],f=l)}!s&&a&&(s=a,o=f),s&&(n.splice(0,o,s),e=n.join("/"))}return e}function p(t,r){return function(){return n.apply(e,l.call(arguments,0).concat([t,r]))}}function d(e){return function(t){return h(t,e)}}function v(e){return function(t){s[e]=t}}function m(n){if(c(o,n)){var r=o[n];delete o[n],a[n]=!0,t.apply(e,r)}if(!c(s,n)&&!c(a,n))throw new Error("No "+n);return s[n]}function g(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function y(e){return function(){return u&&u.config&&u.config[e]||{}}}var t,n,r,i,s={},o={},u={},a={},f=Object.prototype.hasOwnProperty,l=[].slice;r=function(e,t){var n,r=g(e),i=r[0];return e=r[1],i&&(i=h(i,t),n=m(i)),i?n&&n.normalize?e=n.normalize(e,d(t)):e=h(e,t):(e=h(e,t),r=g(e),i=r[0],e=r[1],i&&(n=m(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},i={require:function(e){return p(e)},exports:function(e){var t=s[e];return typeof t!="undefined"?t:s[e]={}},module:function(e){return{id:e,uri:"",exports:s[e],config:y(e)}}},t=function(t,n,u,f){var l,h,d,g,y,b=[],w;f=f||t;if(typeof u=="function"){n=!n.length&&u.length?["require","exports","module"]:n;for(y=0;y<n.length;y+=1){g=r(n[y],f),h=g.f;if(h==="require")b[y]=i.require(t);else if(h==="exports")b[y]=i.exports(t),w=!0;else if(h==="module")l=b[y]=i.module(t);else if(c(s,h)||c(o,h)||c(a,h))b[y]=m(h);else{if(!g.p)throw new Error(t+" missing "+h);g.p.load(g.n,p(f,!0),v(h),{}),b[y]=s[h]}}d=u.apply(s[t],b);if(t)if(l&&l.exports!==e&&l.exports!==s[t])s[t]=l.exports;else if(d!==e||!w)s[t]=d}else t&&(s[t]=u)},requirejs=require=n=function(s,o,a,f,l){return typeof s=="string"?i[s]?i[s](o):m(r(s,o).f):(s.splice||(u=s,o.splice?(s=o,o=a,a=null):s=e),o=o||function(){},typeof a=="function"&&(a=f,f=l),f?t(e,s,o,a):setTimeout(function(){t(e,s,o,a)},4),n)},n.config=function(e){return u=e,u.deps&&n(u.deps,u.callback),n},define=function(e,t,n){t.splice||(n=t,t=[]),!c(s,e)&&!c(o,e)&&(o[e]=[e,t,n])},define.amd={jQuery:!0}}(),define("almond",function(){}),function(){function e(e){throw e}function i(e,n){var i=e.split("."),s=r;!(i[0]in s)&&s.execScript&&s.execScript("var "+i[0]);for(var o;i.length&&(o=i.shift());)!i.length&&n!==t?s[o]=n:s=s[o]?s[o]:s[o]={}}function c(e){var t=e.length,n=0,r=Number.POSITIVE_INFINITY,i,o,u,a,f,l,c,h,p;for(h=0;h<t;++h)e[h]>n&&(n=e[h]),e[h]<r&&(r=e[h]);i=1<<n,o=new(s?Uint32Array:Array)(i),u=1,a=0;for(f=2;u<=n;){for(h=0;h<t;++h)if(e[h]===u){l=0,c=a;for(p=0;p<u;++p)l=l<<1|c&1,c>>=1;for(p=l;p<i;p+=f)o[p]=u<<16|h;++a}++u,a<<=1,f<<=1}return[o,n,r]}function v(t,n){this.l=[],this.m=32768,this.d=this.f=this.c=this.t=0,this.input=s?new Uint8Array(t):t,this.u=!1,this.n=g,this.K=!1;if(n||!(n={}))n.index&&(this.c=n.index),n.bufferSize&&(this.m=n.bufferSize),n.bufferType&&(this.n=n.bufferType),n.resize&&(this.K=n.resize);switch(this.n){case m:this.a=32768,this.b=new(s?Uint8Array:Array)(32768+this.m+258);break;case g:this.a=0,this.b=new(s?Uint8Array:Array)(this.m),this.e=this.W,this.B=this.R,this.q=this.V;break;default:e(Error("invalid inflate mode"))}}function B(n,r){for(var i=n.f,s=n.d,o=n.input,u=n.c,a;s<r;)a=o[u++],a===t&&e(Error("input buffer is broken")),i|=a<<s,s+=8;return a=i&(1<<r)-1,n.f=i>>>r,n.d=s-r,n.c=u,a}function j(e,n){for(var r=e.f,i=e.d,s=e.input,o=e.c,u=n[0],a=n[1],f,l,c;i<a;){f=s[o++];if(f===t)break;r|=f<<i,i+=8}return l=u[r&(1<<a)-1],c=l>>>16,e.f=r>>c,e.d=i-c,e.c=o,l&65535}function F(e){function t(e,t,n){var r,i,s,o;for(o=0;o<e;)switch(r=j(this,t),r){case 16:for(s=3+B(this,2);s--;)n[o++]=i;break;case 17:for(s=3+B(this,3);s--;)n[o++]=0;i=0;break;case 18:for(s=11+B(this,7);s--;)n[o++]=0;i=0;break;default:i=n[o++]=r}return n}var n=B(e,5)+257,r=B(e,5)+1,i=B(e,4)+4,o=new(s?Uint8Array:Array)(b.length),u,a,f,l;for(l=0;l<i;++l)o[b[l]]=B(e,3);u=c(o),a=new(s?Uint8Array:Array)(n),f=new(s?Uint8Array:Array)(r),e.q(c(t.call(e,n,u,a)),c(t.call(e,r,u,f)))}function I(e){e=e||{},this.files=[],this.v=e.comment}function q(e,t){t=t||{},this.input=s&&e instanceof Array?new Uint8Array(e):e,this.c=0,this.ba=t.verify||!1,this.j=t.password}function X(e,t){this.input=e,this.offset=t}function V(e,t){this.input=e,this.offset=t}function J(n){var r=[],i={},o,u,a,f;if(!n.i){if(n.o===t){var l=n.input,c;if(!n.D)e:{var h=n.input,p;for(p=h.length-12;0<p;--p)if(h[p]===W[0]&&h[p+1]===W[1]&&h[p+2]===W[2]&&h[p+3]===W[3]){n.D=p;break e}e(Error("End of Central Directory Record not found"))}c=n.D,(l[c++]!==W[0]||l[c++]!==W[1]||l[c++]!==W[2]||l[c++]!==W[3])&&e(Error("invalid signature")),n.ha=l[c++]|l[c++]<<8,n.ja=l[c++]|l[c++]<<8,n.ka=l[c++]|l[c++]<<8,n.aa=l[c++]|l[c++]<<8,n.Q=(l[c++]|l[c++]<<8|l[c++]<<16|l[c++]<<24)>>>0,n.o=(l[c++]|l[c++]<<8|l[c++]<<16|l[c++]<<24)>>>0,n.w=l[c++]|l[c++]<<8,n.v=s?l.subarray(c,c+n.w):l.slice(c,c+n.w)}o=n.o,a=0;for(f=n.aa;a<f;++a)u=new X(n.input,o),u.parse(),o+=u.length,r[a]=u,i[u.filename]=a;n.Q<o-n.o&&e(Error("invalid file header size")),n.i=r,n.G=i}}function K(e,t,n){return n^=e.s(t),e.k(t,n),n}var t=void 0,n,r=this,s="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array;new(s?Uint8Array:Array)(256);var o;for(o=0;256>o;++o)for(var u=o,a=7,u=u>>>1;u;u>>>=1)--a;var f=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],l=s?new Uint32Array(f):f,h=[],p;for(p=0;288>p;p++)switch(!0){case 143>=p:h.push([p+48,8]);break;case 255>=p:h.push([p-144+400,9]);break;case 279>=p:h.push([p-256+0,7]);break;case 287>=p:h.push([p-280+192,8]);break;default:e("invalid literal: "+p)}var d=function(){function t(t){switch(!0){case 3===t:return[257,t-3,0];case 4===t:return[258,t-4,0];case 5===t:return[259,t-5,0];case 6===t:return[260,t-6,0];case 7===t:return[261,t-7,0];case 8===t:return[262,t-8,0];case 9===t:return[263,t-9,0];case 10===t:return[264,t-10,0];case 12>=t:return[265,t-11,1];case 14>=t:return[266,t-13,1];case 16>=t:return[267,t-15,1];case 18>=t:return[268,t-17,1];case 22>=t:return[269,t-19,2];case 26>=t:return[270,t-23,2];case 30>=t:return[271,t-27,2];case 34>=t:return[272,t-31,2];case 42>=t:return[273,t-35,3];case 50>=t:return[274,t-43,3];case 58>=t:return[275,t-51,3];case 66>=t:return[276,t-59,3];case 82>=t:return[277,t-67,4];case 98>=t:return[278,t-83,4];case 114>=t:return[279,t-99,4];case 130>=t:return[280,t-115,4];case 162>=t:return[281,t-131,5];case 194>=t:return[282,t-163,5];case 226>=t:return[283,t-195,5];case 257>=t:return[284,t-227,5];case 258===t:return[285,t-258,0];default:e("invalid length: "+t)}}var n=[],r,i;for(r=3;258>=r;r++)i=t(r),n[r]=i[2]<<24|i[1]<<16|i[0];return n}();s&&new Uint32Array(d);var m=0,g=1;v.prototype.r=function(){for(;!this.u;){var n=B(this,3);n&1&&(this.u=!0),n>>>=1;switch(n){case 0:var r=this.input,i=this.c,o=this.b,u=this.a,a=t,f=t,l=t,c=o.length,h=t;this.d=this.f=0,a=r[i++],a===t&&e(Error("invalid uncompressed block header: LEN (first byte)")),f=a,a=r[i++],a===t&&e(Error("invalid uncompressed block header: LEN (second byte)")),f|=a<<8,a=r[i++],a===t&&e(Error("invalid uncompressed block header: NLEN (first byte)")),l=a,a=r[i++],a===t&&e(Error("invalid uncompressed block header: NLEN (second byte)")),l|=a<<8,f===~l&&e(Error("invalid uncompressed block header: length verify")),i+f>r.length&&e(Error("input buffer is broken"));switch(this.n){case m:for(;u+f>o.length;){h=c-u,f-=h;if(s)o.set(r.subarray(i,i+h),u),u+=h,i+=h;else for(;h--;)o[u++]=r[i++];this.a=u,o=this.e(),u=this.a}break;case g:for(;u+f>o.length;)o=this.e({H:2});break;default:e(Error("invalid inflate mode"))}if(s)o.set(r.subarray(i,i+f),u),u+=f,i+=f;else for(;f--;)o[u++]=r[i++];this.c=i,this.a=u,this.b=o;break;case 1:this.q(M,H);break;case 2:F(this);break;default:e(Error("unknown BTYPE: "+n))}}return this.B()};var y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],b=s?new Uint16Array(y):y,w=[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,258,258],E=s?new Uint16Array(w):w,S=[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,0,0],x=s?new Uint8Array(S):S,T=[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],N=s?new Uint16Array(T):T,C=[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],k=s?new Uint8Array(C):C,L=new(s?Uint8Array:Array)(288),A,O;A=0;for(O=L.length;A<O;++A)L[A]=143>=A?8:255>=A?9:279>=A?7:8;var M=c(L),_=new(s?Uint8Array:Array)(30),D,P;D=0;for(P=_.length;D<P;++D)_[D]=5;var H=c(_);n=v.prototype,n.q=function(e,t){var n=this.b,r=this.a;this.C=e;for(var i=n.length-258,s,o,u,a;256!==(s=j(this,e));)if(256>s)r>=i&&(this.a=r,n=this.e(),r=this.a),n[r++]=s;else{o=s-257,a=E[o],0<x[o]&&(a+=B(this,x[o])),s=j(this,t),u=N[s],0<k[s]&&(u+=B(this,k[s])),r>=i&&(this.a=r,n=this.e(),r=this.a);for(;a--;)n[r]=n[r++ -u]}for(;8<=this.d;)this.d-=8,this.c--;this.a=r},n.V=function(e,t){var n=this.b,r=this.a;this.C=e;for(var i=n.length,s,o,u,a;256!==(s=j(this,e));)if(256>s)r>=i&&(n=this.e(),i=n.length),n[r++]=s;else{o=s-257,a=E[o],0<x[o]&&(a+=B(this,x[o])),s=j(this,t),u=N[s],0<k[s]&&(u+=B(this,k[s])),r+a>i&&(n=this.e(),i=n.length);for(;a--;)n[r]=n[r++ -u]}for(;8<=this.d;)this.d-=8,this.c--;this.a=r},n.e=function(){var e=new(s?Uint8Array:Array)(this.a-32768),t=this.a-32768,n,r,i=this.b;if(s)e.set(i.subarray(32768,e.length));else{n=0;for(r=e.length;n<r;++n)e[n]=i[n+32768]}this.l.push(e),this.t+=e.length;if(s)i.set(i.subarray(t,t+32768));else for(n=0;32768>n;++n)i[n]=i[t+n];return this.a=32768,i},n.W=function(e){var t,n=this.input.length/this.c+1|0,r,i,o,u=this.input,a=this.b;return e&&("number"==typeof e.H&&(n=e.H),"number"==typeof e.P&&(n+=e.P)),2>n?(r=(u.length-this.c)/this.C[2],o=258*(r/2)|0,i=o<a.length?a.length+o:a.length<<1):i=a.length*n,s?(t=new Uint8Array(i),t.set(a)):t=a,this.b=t},n.B=function(){var e=0,t=this.b,n=this.l,r,i=new(s?Uint8Array:Array)(this.t+(this.a-32768)),o,u,a,f;if(0===n.length)return s?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);o=0;for(u=n.length;o<u;++o){r=n[o],a=0;for(f=r.length;a<f;++a)i[e++]=r[a]}o=32768;for(u=this.a;o<u;++o)i[e++]=t[o];return this.l=[],this.buffer=i},n.R=function(){var e,t=this.a;return s?this.K?(e=new Uint8Array(t),e.set(this.b.subarray(0,t))):e=this.b.subarray(0,t):(this.b.length>t&&(this.b.length=t),e=this.b),this.buffer=e},I.prototype.L=function(e){this.j=e},I.prototype.s=function(e){var t=e[2]&65535|2;return t*(t^1)>>8&255},I.prototype.k=function(e,t){e[0]=(l[(e[0]^t)&255]^e[0]>>>8)>>>0,e[1]=(6681*(20173*(e[1]+(e[0]&255))>>>0)>>>0)+1>>>0,e[2]=(l[(e[2]^e[1]>>>24)&255]^e[2]>>>8)>>>0},I.prototype.T=function(e){var t=[305419896,591751049,878082192],n,r;s&&(t=new Uint32Array(t)),n=0;for(r=e.length;n<r;++n)this.k(t,e[n]&255);return t};var R={O:0,M:8},U=[80,75,1,2],z=[80,75,3,4],W=[80,75,5,6];X.prototype.parse=function(){var t=this.input,n=this.offset;(t[n++]!==U[0]||t[n++]!==U[1]||t[n++]!==U[2]||t[n++]!==U[3])&&e(Error("invalid file header signature")),this.version=t[n++],this.ia=t[n++],this.Z=t[n++]|t[n++]<<8,this.I=t[n++]|t[n++]<<8,this.A=t[n++]|t[n++]<<8,this.time=t[n++]|t[n++]<<8,this.U=t[n++]|t[n++]<<8,this.p=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.z=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.J=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.h=t[n++]|t[n++]<<8,this.g=t[n++]|t[n++]<<8,this.F=t[n++]|t[n++]<<8,this.ea=t[n++]|t[n++]<<8,this.ga=t[n++]|t[n++]<<8,this.fa=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24,this.$=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.filename=String.fromCharCode.apply(null,s?t.subarray(n,n+=this.h):t.slice(n,n+=this.h)),this.X=s?t.subarray(n,n+=this.g):t.slice(n,n+=this.g),this.v=s?t.subarray(n,n+this.F):t.slice(n,n+this.F),this.length=n-this.offset};var $={N:1,ca:8,da:2048};V.prototype.parse=function(){var t=this.input,n=this.offset;(t[n++]!==z[0]||t[n++]!==z[1]||t[n++]!==z[2]||t[n++]!==z[3])&&e(Error("invalid local file header signature")),this.Z=t[n++]|t[n++]<<8,this.I=t[n++]|t[n++]<<8,this.A=t[n++]|t[n++]<<8,this.time=t[n++]|t[n++]<<8,this.U=t[n++]|t[n++]<<8,this.p=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.z=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.J=(t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24)>>>0,this.h=t[n++]|t[n++]<<8,this.g=t[n++]|t[n++]<<8,this.filename=String.fromCharCode.apply(null,s?t.subarray(n,n+=this.h):t.slice(n,n+=this.h)),this.X=s?t.subarray(n,n+=this.g):t.slice(n,n+=this.g),this.length=n-this.offset},n=q.prototype,n.Y=function(){var e=[],t,n,r;this.i||J(this),r=this.i,t=0;for(n=r.length;t<n;++t)e[t]=r[t].filename;return e},n.r=function(n,r){var i;this.G||J(this),i=this.G[n],i===t&&e(Error(n+" not found"));var o;o=r||{};var u=this.input,a=this.i,f,c,h,p,d,m,g,y;a||J(this),a[i]===t&&e(Error("wrong index")),c=a[i].$,f=new V(this.input,c),f.parse(),c+=f.length,h=f.z;if(0!==(f.I&$.N)){!o.password&&!this.j&&e(Error("please set password")),m=this.S(o.password||this.j),g=c;for(y=c+12;g<y;++g)K(this,m,u[g]);c+=12,h-=12,g=c;for(y=c+h;g<y;++g)u[g]=K(this,m,u[g])}switch(f.A){case R.O:p=s?this.input.subarray(c,c+h):this.input.slice(c,c+h);break;case R.M:p=(new v(this.input,{index:c,bufferSize:f.J})).r();break;default:e(Error("unknown compression type"))}if(this.ba){var b=t,w,E="number"==typeof b?b:b=0,S=p.length;w=-1;for(E=S&7;E--;++b)w=w>>>8^l[(w^p[b])&255];for(E=S>>3;E--;b+=8)w=w>>>8^l[(w^p[b])&255],w=w>>>8^l[(w^p[b+1])&255],w=w>>>8^l[(w^p[b+2])&255],w=w>>>8^l[(w^p[b+3])&255],w=w>>>8^l[(w^p[b+4])&255],w=w>>>8^l[(w^p[b+5])&255],w=w>>>8^l[(w^p[b+6])&255],w=w>>>8^l[(w^p[b+7])&255];d=(w^4294967295)>>>0,f.p!==d&&e(Error("wrong crc: file=0x"+f.p.toString(16)+", data=0x"+d.toString(16)))}return p},n.L=function(e){this.j=e},n.k=I.prototype.k,n.S=I.prototype.T,n.s=I.prototype.s,i("Zlib.Unzip",q),i("Zlib.Unzip.prototype.decompress",q.prototype.r),i("Zlib.Unzip.prototype.getFilenames",q.prototype.Y),i("Zlib.Unzip.prototype.setPassword",q.prototype.L)}.call(this),define("unzip",function(e){return function(){var t,n;return t||e.Zlib}}(this)),function(){function r(e){var n=!1;return function(){if(n)throw new Error("Callback was already called.");n=!0,e.apply(t,arguments)}}var e={},t,n;t=this,t!=null&&(n=t.async),e.noConflict=function(){return t.async=n,e};var i=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n+=1)t(e[n],n,e)},s=function(e,t){if(e.map)return e.map(t);var n=[];return i(e,function(e,r,i){n.push(t(e,r,i))}),n},o=function(e,t,n){return e.reduce?e.reduce(t,n):(i(e,function(e,r,i){n=t(n,e,r,i)}),n)},u=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t};typeof process=="undefined"||!process.nextTick?typeof setImmediate=="function"?(e.nextTick=function(e){setImmediate(e)},e.setImmediate=e.nextTick):(e.nextTick=function(e){setTimeout(e,0)},e.setImmediate=e.nextTick):(e.nextTick=process.nextTick,typeof setImmediate!="undefined"?e.setImmediate=setImmediate:e.setImmediate=e.nextTick),e.each=function(e,t,n){n=n||function(){};if(!e.length)return n();var s=0;i(e,function(i){t(i,r(function(t){t?(n(t),n=function(){}):(s+=1,s>=e.length&&n(null))}))})},e.forEach=e.each,e.eachSeries=function(e,t,n){n=n||function(){};if(!e.length)return n();var r=0,i=function(){t(e[r],function(t){t?(n(t),n=function(){}):(r+=1,r>=e.length?n(null):i())})};i()},e.forEachSeries=e.eachSeries,e.eachLimit=function(e,t,n,r){var i=a(t);i.apply(null,[e,n,r])},e.forEachLimit=e.eachLimit;var a=function(e){return function(t,n,r){r=r||function(){};if(!t.length||e<=0)return r();var i=0,s=0,o=0;(function u(){if(i>=t.length)return r();while(o<e&&s<t.length)s+=1,o+=1,n(t[s-1],function(e){e?(r(e),r=function(){}):(i+=1,o-=1,i>=t.length?r():u())})})()}},f=function(t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[e.each].concat(n))}},l=function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[a(e)].concat(n))}},c=function(t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[e.eachSeries].concat(n))}},h=function(e,t,n,r){var i=[];t=s(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n,r){i[e.index]=r,t(n)})},function(e){r(e,i)})};e.map=f(h),e.mapSeries=c(h),e.mapLimit=function(e,t,n,r){return p(t)(e,n,r)};var p=function(e){return l(e,h)};e.reduce=function(t,n,r,i){e.eachSeries(t,function(e,t){r(n,e,function(e,r){n=r,t(e)})},function(e){i(e,n)})},e.inject=e.reduce,e.foldl=e.reduce,e.reduceRight=function(t,n,r,i){var o=s(t,function(e){return e}).reverse();e.reduce(o,n,r,i)},e.foldr=e.reduceRight;var d=function(e,t,n,r){var i=[];t=s(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n&&i.push(e),t()})},function(e){r(s(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};e.filter=f(d),e.filterSeries=c(d),e.select=e.filter,e.selectSeries=e.filterSeries;var v=function(e,t,n,r){var i=[];t=s(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n||i.push(e),t()})},function(e){r(s(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};e.reject=f(v),e.rejectSeries=c(v);var m=function(e,t,n,r){e(t,function(e,t){n(e,function(n){n?(r(e),r=function(){}):t()})},function(e){r()})};e.detect=f(m),e.detectSeries=c(m),e.some=function(t,n,r){e.each(t,function(e,t){n(e,function(e){e&&(r(!0),r=function(){}),t()})},function(e){r(!1)})},e.any=e.some,e.every=function(t,n,r){e.each(t,function(e,t){n(e,function(e){e||(r(!1),r=function(){}),t()})},function(e){r(!0)})},e.all=e.every,e.sortBy=function(t,n,r){e.map(t,function(e,t){n(e,function(n,r){n?t(n):t(null,{value:e,criteria:r})})},function(e,t){if(e)return r(e);var n=function(e,t){var n=e.criteria,r=t.criteria;return n<r?-1:n>r?1:0};r(null,s(t.sort(n),function(e){return e.value}))})},e.auto=function(t,n){n=n||function(){};var r=u(t);if(!r.length)return n(null);var s={},a=[],f=function(e){a.unshift(e)},l=function(e){for(var t=0;t<a.length;t+=1)if(a[t]===e){a.splice(t,1);return}},c=function(){i(a.slice(0),function(e){e()})};f(function(){u(s).length===r.length&&(n(null,s),n=function(){})}),i(r,function(r){var a=t[r]instanceof Function?[t[r]]:t[r],h=function(t){var o=Array.prototype.slice.call(arguments,1);o.length<=1&&(o=o[0]);if(t){var a={};i(u(s),function(e){a[e]=s[e]}),a[r]=o,n(t,a),n=function(){}}else s[r]=o,e.setImmediate(c)},p=a.slice(0,Math.abs(a.length-1))||[],d=function(){return o(p,function(e,t){return e&&s.hasOwnProperty(t)},!0)&&!s.hasOwnProperty(r)};if(d())a[a.length-1](h,s);else{var v=function(){d()&&(l(v),a[a.length-1](h,s))};f(v)}})},e.waterfall=function(t,n){n=n||function(){};if(t.constructor!==Array){var r=new Error("First argument to waterfall must be an array of functions");return n(r)}if(!t.length)return n();var i=function(t){return function(r){if(r)n.apply(null,arguments),n=function(){};else{var s=Array.prototype.slice.call(arguments,1),o=t.next();o?s.push(i(o)):s.push(n),e.setImmediate(function(){t.apply(null,s)})}}};i(e.iterator(t))()};var g=function(e,t,n){n=n||function(){};if(t.constructor===Array)e.map(t,function(e,t){e&&e(function(e){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),t.call(null,e,n)})},n);else{var r={};e.each(u(t),function(e,n){t[e](function(t){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),r[e]=i,n(t)})},function(e){n(e,r)})}};e.parallel=function(t,n){g({map:e.map,each:e.each},t,n)},e.parallelLimit=function(e,t,n){g({map:p(t),each:a(t)},e,n)},e.series=function(t,n){n=n||function(){};if(t.constructor===Array)e.mapSeries(t,function(e,t){e&&e(function(e){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),t.call(null,e,n)})},n);else{var r={};e.eachSeries(u(t),function(e,n){t[e](function(t){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),r[e]=i,n(t)})},function(e){n(e,r)})}},e.iterator=function(e){var t=function(n){var r=function(){return e.length&&e[n].apply(null,arguments),r.next()};return r.next=function(){return n<e.length-1?t(n+1):null},r};return t(0)},e.apply=function(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t.concat(Array.prototype.slice.call(arguments)))}};var y=function(e,t,n,r){var i=[];e(t,function(e,t){n(e,function(e,n){i=i.concat(n||[]),t(e)})},function(e){r(e,i)})};e.concat=f(y),e.concatSeries=c(y),e.whilst=function(t,n,r){t()?n(function(i){if(i)return r(i);e.whilst(t,n,r)}):r()},e.doWhilst=function(t,n,r){t(function(i){if(i)return r(i);n()?e.doWhilst(t,n,r):r()})},e.until=function(t,n,r){t()?r():n(function(i){if(i)return r(i);e.until(t,n,r)})},e.doUntil=function(t,n,r){t(function(i){if(i)return r(i);n()?r():e.doUntil(t,n,r)})},e.queue=function(t,n){function s(t,r,s,o){r.constructor!==Array&&(r=[r]),i(r,function(r){var i={data:r,callback:typeof o=="function"?o:null};s?t.tasks.unshift(i):t.tasks.push(i),t.saturated&&t.tasks.length===n&&t.saturated(),e.setImmediate(t.process)})}n===undefined&&(n=1);var o=0,u={tasks:[],concurrency:n,saturated:null,empty:null,drain:null,push:function(e,t){s(u,e,!1,t)},unshift:function(e,t){s(u,e,!0,t)},process:function(){if(o<u.concurrency&&u.tasks.length){var e=u.tasks.shift();u.empty&&u.tasks.length===0&&u.empty(),o+=1;var n=function(){o-=1,e.callback&&e.callback.apply(e,arguments),u.drain&&u.tasks.length+o===0&&u.drain(),u.process()},i=r(n);t(e.data,i)}},length:function(){return u.tasks.length},running:function(){return o}};return u},e.cargo=function(t,n){var r=!1,o=[],u={tasks:o,payload:n,saturated:null,empty:null,drain:null,push:function(t,r){t.constructor!==Array&&(t=[t]),i(t,function(e){o.push({data:e,callback:typeof r=="function"?r:null}),u.saturated&&o.length===n&&u.saturated()}),e.setImmediate(u.process)},process:function a(){if(r)return;if(o.length===0){u.drain&&u.drain();return}var e=typeof n=="number"?o.splice(0,n):o.splice(0),f=s(e,function(e){return e.data});u.empty&&u.empty(),r=!0,t(f,function(){r=!1;var t=arguments;i(e,function(e){e.callback&&e.callback.apply(null,t)}),a()})},length:function(){return o.length},running:function(){return r}};return u};var b=function(e){return function(t){var n=Array.prototype.slice.call(arguments,1);t.apply(null,n.concat([function(t){var n=Array.prototype.slice.call(arguments,1);typeof console!="undefined"&&(t?console.error&&console.error(t):console[e]&&i(n,function(t){console[e](t)}))}]))}};e.log=b("log"),e.dir=b("dir"),e.memoize=function(e,t){var n={},r={};t=t||function(e){return e};var i=function(){var i=Array.prototype.slice.call(arguments),s=i.pop(),o=t.apply(null,i);o in n?s.apply(null,n[o]):o in r?r[o].push(s):(r[o]=[s],e.apply(null,i.concat([function(){n[o]=arguments;var e=r[o];delete r[o];for(var t=0,i=e.length;t<i;t++)e[t].apply(null,arguments)}])))};return i.memo=n,i.unmemoized=e,i},e.unmemoize=function(e){return function(){return(e.unmemoized||e).apply(null,arguments)}},e.times=function(t,n,r){var i=[];for(var s=0;s<t;s++)i.push(s);return e.map(i,n,r)},e.timesSeries=function(t,n,r){var i=[];for(var s=0;s<t;s++)i.push(s);return e.mapSeries(i,n,r)},e.compose=function(){var t=Array.prototype.reverse.call(arguments);return function(){var n=this,r=Array.prototype.slice.call(arguments),i=r.pop();e.reduce(t,r,function(e,t,r){t.apply(n,e.concat([function(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);r(e,t)}]))},function(e,t){i.apply(n,[e].concat(t))})}};var w=function(e,t){var n=function(){var n=this,r=Array.prototype.slice.call(arguments),i=r.pop();return e(t,function(e,t){e.apply(n,r.concat([t]))},i)};if(arguments.length>2){var r=Array.prototype.slice.call(arguments,2);return n.apply(this,r)}return n};e.applyEach=f(w),e.applyEachSeries=c(w),e.forever=function(e,t){function n(r){if(r){if(t)return t(r);throw r}e(n)}n()},typeof define!="undefined"&&define.amd?define("async",[],function(){return e}):typeof module!="undefined"&&module.exports?module.exports=e:t.async=e}(),define("tools",[],function(){function e(e){var t=e.split(/[\r\n]+/g),n={},r=null;return n.GlobalOptionFilter=[],n.Feature=[],t.forEach(function(e,t){r=e.split(/=(.+)/),r[0]!==""&&(r[0].search(/\[.*\]/)!==-1?n.moduleKey=r[0].replace("[","").replace("]",""):r[0]==="GlobalOptionFilter"?n[r[0]].push(r[1]):r[0]==="Feature"?n[r[0]].push(r[1]):r[0]==="Versification"?n[r[0]]=r[1].toLowerCase():n[r[0]]=r[1])}),n}function t(e){return function(t,n){return t[e]>n[e]?1:t[e]<n[e]?-1:0}}function n(){var e=arguments;return function(n,r){var i=0,s=0,o=e.length;while(s===0&&i<o)s=t(e[i])(n,r),i++;return s}}function r(e){var t=[];for(var n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}return{readConf:e,dynamicSort:t,dynamicSortMultiple:n,cleanArray:r}}),function(e,t,n){"function"==typeof define?define("idb",t):"undefined"!=typeof module&&module.exports?module.exports=t():n[e]=t()}("IDBStore",function(){var e=function(e){throw e},t={storeName:"Store",storePrefix:"IDBWrapper-",dbVersion:1,keyPath:"id",autoIncrement:!0,onStoreReady:function(){},onError:e,indexes:[]},n=function(e,n){"undefined"==typeof n&&"function"==typeof e&&(n=e),"[object Object]"!=Object.prototype.toString.call(e)&&(e={});for(var r in t)this[r]="undefined"!=typeof e[r]?e[r]:t[r];this.dbName=this.storePrefix+this.storeName,this.dbVersion=parseInt(this.dbVersion,10)||1,n&&(this.onStoreReady=n),r="object"==typeof window?window:self,this.idb=r.indexedDB||r.webkitIndexedDB||r.mozIndexedDB,this.keyRange=r.IDBKeyRange||r.webkitIDBKeyRange||r.mozIDBKeyRange,this.features={hasAutoIncrement:!r.mozIndexedDB},this.consts={READ_ONLY:"readonly",READ_WRITE:"readwrite",VERSION_CHANGE:"versionchange",NEXT:"next",NEXT_NO_DUPLICATE:"nextunique",PREV:"prev",PREV_NO_DUPLICATE:"prevunique"},this.openDB()};n.prototype={constructor:n,version:"1.4.0",db:null,dbName:null,dbVersion:null,store:null,storeName:null,keyPath:null,autoIncrement:null,indexes:null,features:null,onStoreReady:null,onError:null,_insertIdCount:0,openDB:function(){var e=this.idb.open(this.dbName,this.dbVersion),t=!1;e.onerror=function(e){var t=!1;"error"in e.target?t="VersionError"==e.target.error.name:"errorCode"in e.target&&(t=12==e.target.errorCode),t?this.onError(Error("The version number provided is lower than the existing one.")):this.onError(e)}.bind(this),e.onsuccess=function(e){t||(this.db?this.onStoreReady():(this.db=e.target.result,"string"==typeof this.db.version)?this.onError(Error("The IndexedDB implementation in this browser is outdated. Please upgrade your browser.")):this.db.objectStoreNames.contains(this.storeName)?(this.store=this.db.transaction([this.storeName],this.consts.READ_ONLY).objectStore(this.storeName),this.indexes.forEach(function(e){var n=e.name;n?(this.normalizeIndexData(e),this.hasIndex(n)?this.indexComplies(this.store.index(n),e)||(t=!0,this.onError(Error('Cannot modify index "'+n+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))):(t=!0,this.onError(Error('Cannot create new index "'+n+'" for current version. Please bump version number to '+(this.dbVersion+1)+".")))):(t=!0,this.onError(Error("Cannot create index: No index name given.")))},this),t||this.onStoreReady()):this.onError(Error("Something is wrong with the IndexedDB implementation in this browser. Please upgrade your browser.")))}.bind(this),e.onupgradeneeded=function(e){this.db=e.target.result,this.store=this.db.objectStoreNames.contains(this.storeName)?e.target.transaction.objectStore(this.storeName):this.db.createObjectStore(this.storeName,{keyPath:this.keyPath,autoIncrement:this.autoIncrement}),this.indexes.forEach(function(e){var n=e.name;n||(t=!0,this.onError(Error("Cannot create index: No index name given."))),this.normalizeIndexData(e),this.hasIndex(n)?this.indexComplies(this.store.index(n),e)||(this.store.deleteIndex(n),this.store.createIndex(n,e.keyPath,{unique:e.unique,multiEntry:e.multiEntry})):this.store.createIndex(n,e.keyPath,{unique:e.unique,multiEntry:e.multiEntry})},this)}.bind(this)},deleteDatabase:function(){this.idb.deleteDatabase&&this.idb.deleteDatabase(this.dbName)},put:function(t,n,i,s){null!==this.keyPath&&(s=i,i=n,n=t),s||(s=e),i||(i=r);var o=!1,u=null,a=this.db.transaction([this.storeName],this.consts.READ_WRITE);return a.oncomplete=function(){(o?i:s)(u)},a.onabort=s,a.onerror=s,null!==this.keyPath?(this._addIdPropertyIfNeeded(n),t=a.objectStore(this.storeName).put(n)):t=a.objectStore(this.storeName).put(n,t),t.onsuccess=function(e){o=!0,u=e.target.result},t.onerror=s,a},get:function(t,n,i){i||(i=e),n||(n=r);var s=!1,o=null,u=this.db.transaction([this.storeName],this.consts.READ_ONLY);return u.oncomplete=function(){(s?n:i)(o)},u.onabort=i,u.onerror=i,t=u.objectStore(this.storeName).get(t),t.onsuccess=function(e){s=!0,o=e.target.result},t.onerror=i,u},remove:function(t,n,i){i||(i=e),n||(n=r);var s=!1,o=null,u=this.db.transaction([this.storeName],this.consts.READ_WRITE);return u.oncomplete=function(){(s?n:i)(o)},u.onabort=i,u.onerror=i,t=u.objectStore(this.storeName)["delete"](t),t.onsuccess=function(e){s=!0,o=e.target.result},t.onerror=i,u},batch:function(t,n,i){i||(i=e),n||(n=r),"[object Array]"!=Object.prototype.toString.call(t)&&i(Error("dataArray argument must be of type Array."));var s=this.db.transaction([this.storeName],this.consts.READ_WRITE);s.oncomplete=function(){(a?n:i)(a)},s.onabort=i,s.onerror=i;var o=t.length,u=!1,a=!1,f=function(){o--,0===o&&!u&&(a=u=!0)};return t.forEach(function(e){var t=e.type,n=e.key,r=e.value,e=function(e){s.abort(),u||(u=!0,i(e,t,n))};"remove"==t?(r=s.objectStore(this.storeName)["delete"](n),r.onsuccess=f,r.onerror=e):"put"==t&&(null!==this.keyPath?(this._addIdPropertyIfNeeded(r),r=s.objectStore(this.storeName).put(r)):r=s.objectStore(this.storeName).put(r,n),r.onsuccess=f,r.onerror=e)},this),s},putBatch:function(e,t,n){return this.batch(e.map(function(e){return{type:"put",value:e}}),t,n)},removeBatch:function(e,t,n){return this.batch(e.map(function(e){return{type:"remove",key:e}}),t,n)},getBatch:function(t,n,i,s){i||(i=e),n||(n=r),s||(s="sparse"),"[object Array]"!=Object.prototype.toString.call(t)&&i(Error("keyArray argument must be of type Array."));var o=this.db.transaction([this.storeName],this.consts.READ_ONLY);o.oncomplete=function(){(f?n:i)(l)},o.onabort=i,o.onerror=i;var u=[],a=t.length,f=!1,l=null,c=function(e){e.target.result||"dense"==s?u.push(e.target.result):"sparse"==s&&u.length++,a--,0===a&&(f=!0,l=u)};return t.forEach(function(e){e=o.objectStore(this.storeName).get(e),e.onsuccess=c,e.onerror=function(e){l=e,i(e),o.abort()}},this),o},getAll:function(t,n){n||(n=e),t||(t=r);var i=this.db.transaction([this.storeName],this.consts.READ_ONLY),s=i.objectStore(this.storeName);return s.getAll?this._getAllNative(i,s,t,n):this._getAllCursor(i,s,t,n),i},_getAllNative:function(e,t,n,r){var i=!1,s=null;e.oncomplete=function(){(i?n:r)(s)},e.onabort=r,e.onerror=r,e=t.getAll(),e.onsuccess=function(e){i=!0,s=e.target.result},e.onerror=r},_getAllCursor:function(e,t,n,r){var i=[],s=!1,o=null;e.oncomplete=function(){(s?n:r)(o)},e.onabort=r,e.onerror=r,e=t.openCursor(),e.onsuccess=function(e){(e=e.target.result)?(i.push(e.value),e["continue"]()):(s=!0,o=i)},e.onError=r},clear:function(t,n){n||(n=e),t||(t=r);var i=!1,s=null,o=this.db.transaction([this.storeName],this.consts.READ_WRITE);o.oncomplete=function(){(i?t:n)(s)},o.onabort=n,o.onerror=n;var u=o.objectStore(this.storeName).clear();return u.onsuccess=function(e){i=!0,s=e.target.result},u.onerror=n,o},_addIdPropertyIfNeeded:function(e){!this.features.hasAutoIncrement&&"undefined"==typeof e[this.keyPath]&&(e[this.keyPath]=this._insertIdCount++ +Date.now())},getIndexList:function(){return this.store.indexNames},hasIndex:function(e){return this.store.indexNames.contains(e)},normalizeIndexData:function(e){e.keyPath=e.keyPath||e.name,e.unique=!!e.unique,e.multiEntry=!!e.multiEntry},indexComplies:function(e,t){return["keyPath","unique","multiEntry"].every(function(n){return"multiEntry"==n&&void 0===e[n]&&!1===t[n]?!0:t[n]==e[n]})},iterate:function(t,n){var n=s({index:null,order:"ASC",autoContinue:!0,filterDuplicates:!1,keyRange:null,writeAccess:!1,onEnd:null,onError:e},n||{}),r="desc"==n.order.toLowerCase()?"PREV":"NEXT";n.filterDuplicates&&(r+="_NO_DUPLICATE");var i=!1,o=this.db.transaction([this.storeName],this.consts[n.writeAccess?"READ_WRITE":"READ_ONLY"]),u=o.objectStore(this.storeName);return n.index&&(u=u.index(n.index)),o.oncomplete=function(){i?n.onEnd?n.onEnd():t(null):n.onError(null)},o.onabort=n.onError,o.onerror=n.onError,r=u.openCursor(n.keyRange,this.consts[r]),r.onerror=n.onError,r.onsuccess=function(e){(e=e.target.result)?(t(e.value,e,o),n.autoContinue)&&e["continue"]():i=!0},o},query:function(e,t){var n=[],t=t||{};return t.onEnd=function(){e(n)},this.iterate(function(e){n.push(e)},t)},count:function(t,n){var n=s({index:null,keyRange:null},n||{}),r=n.onError||e,i=!1,o=null,u=this.db.transaction([this.storeName],this.consts.READ_ONLY);u.oncomplete=function(){(i?t:r)(o)},u.onabort=r,u.onerror=r;var a=u.objectStore(this.storeName);return n.index&&(a=a.index(n.index)),a=a.count(n.keyRange),a.onsuccess=function(e){i=!0,o=e.target.result},a.onError=r,u},makeKeyRange:function(e){var t="undefined"!=typeof e.lower,n="undefined"!=typeof e.upper,r="undefined"!=typeof e.only;switch(!0){case r:e=this.keyRange.only(e.only);break;case t&&n:e=this.keyRange.bound(e.lower,e.upper,e.excludeLower,e.excludeUpper);break;case t:e=this.keyRange.lowerBound(e.lower,e.excludeLower);break;case n:e=this.keyRange.upperBound(e.upper,e.excludeUpper);break;default:throw Error('Cannot create KeyRange. Provide one or both of "lower" or "upper" value, or an "only" value.')}return e}};var r=function(){},i={},s=function(e,t){var n,r;for(n in t)r=t[n],r!==i[n]&&r!==e[n]&&(e[n]=r);return e};return n.version=n.prototype.version,n},this),define("idbPluginWrapper",["idb"],function(e){function r(r){t?r(null,n):n=new e({storeName:"swordjs",dbVersion:4,indexes:[{name:"modules",keyPath:"moduleKey",unique:!0}],onStoreReady:function(){t=!0,r(null,n)},onError:function(e){t=!1,r(e)}})}function i(){return e}var t=!1,n=null;return{getDB:r,getIDBWrapper:i}}),define("dataMgr",["async","tools","idbPluginWrapper"],function(e,t,n){function i(e,t){n.getDB(function(n,r){n?t(n):r.get(e,function(e){t(null,e)},function(e){t(e)})})}function s(e,r){var i=new FileReader;i.readAsText(e),i.onload=function(e){var i=t.readConf(e.target.result);n.getDB(function(e,t){e?r(e):t.put(i,function(e){r(null,{id:e,modKey:i.moduleKey,v11n:i.Versification})},function(e){r(e)})})}}function o(t,r,i){var s=t.length,o={},a=null,f=null;o.docId=r.id,e.eachSeries(t,function(e,t){var s=e.name.split("/"),u=s[s.length-3];n.getDB(function(n,a){n?i(n):a.put({fileName:s[s.length-1],modKey:r.modKey,driver:u,blob:e.blob},function(e){o[s[s.length-1].split(".")[0]]=e,t(null)},function(e){t(e)})})},function(e){e?i(e):u(o,i)})}function u(e,t){n.getDB(function(n,r){n?t(n):r.get(e.docId,function(n){n.nt=e.nt,n.ot=e.ot,r.put(n,function(e){t(null)},function(e){t(e)})},function(e){t(e)})})}function a(e,t){n.getDB(function(n,r){n?t(n):r.get(e,function(e){t(null,e.blob)},function(e){t(e)})})}function f(e,t,r,i){n.getDB(function(n,s){n?i(n):s.put({modKey:r.modKey,ot:e,nt:t},function(e){s.get(r.id,function(t){t.bcvPosID=e,s.put(t,function(e){i(null)},function(e){i(e)})},function(e){i(e)})},function(e){i(e)})})}function l(e){n.getDB(function(t,n){t?e(t):n.query(function(t){e(null,t)},{onError:function(t){e(t)},index:"modules"})})}function c(e,t){n.getDB(function(n,r){n?t(n):r.remove(e,t(null),function(e){t(e)})})}function h(){n.getDB(function(e,t){e?inCallback(e):t.clear(function(){},function(e){console.log(e)})})}function p(){return n.getIDBWrapper()}function d(e,t){console.log(e,t)}var r={};return{clearDatabase:h,saveConfig:s,saveModule:o,saveBCVPos:f,getBlob:a,get:i,remove:c,getModules:l,getIDBWrapper:p}}),function(){function r(t,r){var i=t.split("."),s=n;!(i[0]in s)&&s.execScript&&s.execScript("var "+i[0]);for(var o;i.length&&(o=i.shift());)!i.length&&r!==e?s[o]=r:s=s[o]?s[o]:s[o]={}}function s(e){var t=e.length,n=0,r=Number.POSITIVE_INFINITY,s,o,u,a,f,l,c,h,p;for(h=0;h<t;++h)e[h]>n&&(n=e[h]),e[h]<r&&(r=e[h]);s=1<<n,o=new(i?Uint32Array:Array)(s),u=1,a=0;for(f=2;u<=n;){for(h=0;h<t;++h)if(e[h]===u){l=0,c=a;for(p=0;p<u;++p)l=l<<1|c&1,c>>=1;for(p=l;p<s;p+=f)o[p]=u<<16|h;++a}++u,a<<=1,f<<=1}return[o,n,r]}function o(t,n,r){this.t=[],this.q=r?r:32768,this.u=0,this.a=n===e?0:n,this.d=this.e=0,this.input=i?new Uint8Array(t):t,this.c=new(i?Uint8Array:Array)(this.q),this.b=0,this.s=this.l=!1,this.f=0,this.status=u}function C(e,t){for(var n=e.e,r=e.d,i=e.input,s=e.a,o;r<t;){if(i.length<=s)return-1;o=i[s++],n|=o<<r,r+=8}return o=n&(1<<t)-1,e.e=n>>>t,e.d=r-t,e.a=s,o}function k(e,t){for(var n=e.e,r=e.d,i=e.input,s=e.a,o=t[0],u=t[1],a,f,l;r<u;){if(i.length<=s)return-1;a=i[s++],n|=a<<r,r+=8}return f=o[n&(1<<u)-1],l=f>>>16,e.e=n>>l,e.d=r-l,e.a=s,f&65535}function L(e){e.r=e.a,e.p=e.d,e.o=e.e}function A(e){e.a=e.r,e.d=e.p,e.e=e.o}function O(e){function t(){function e(e,t,n){for(var r,i,s,o=0,u,o=0;o<e;){r=k(this,t);if(0>r)throw Error("not enough input");switch(r){case 16:if(0>(u=C(this,2)))throw Error("not enough input");for(s=3+u;s--;)n[o++]=i;break;case 17:if(0>(u=C(this,3)))throw Error("not enough input");for(s=3+u;s--;)n[o++]=0;i=0;break;case 18:if(0>(u=C(this,7)))throw Error("not enough input");for(s=11+u;s--;)n[o++]=0;i=0;break;default:i=n[o++]=r}}return n}var t;for(h=0;h<o;++h){if(0>(t=C(this,3)))throw Error("not enough input");u[f[h]]=t}a=s(u),l=new(i?Uint8Array:Array)(n),c=new(i?Uint8Array:Array)(r),this.k=s(e.call(this,n,a,l)),this.n=s(e.call(this,r,a,c))}var n,r,o,u=new(i?Uint8Array:Array)(f.length),a,l,c,h=0;e.status=3,L(e),n=C(e,5)+257,r=C(e,5)+1,o=C(e,4)+4;if(0>n||0>r||0>o)return A(e),-1;try{t.call(e)}catch(p){return A(e),-1}return e.status=4,0}function M(e){var t=e.c,n=e.b,r,i,s,o,u=e.k,a=e.n,f=t.length,l;for(e.status=5;;){L(e),r=k(e,u);if(0>r)return e.b=n,A(e),-1;if(256===r)break;if(256>r)n===f&&(t=_(e),f=t.length),t[n++]=r;else{i=r-257,o=c[i];if(0<p[i]){l=C(e,p[i]);if(0>l)return e.b=n,A(e),-1;o+=l}r=k(e,a);if(0>r)return e.b=n,A(e),-1;s=v[r];if(0<g[r]){l=C(e,g[r]);if(0>l)return e.b=n,A(e),-1;s+=l}n+o>=f&&(t=_(e),f=t.length);for(;o--;)t[n]=t[n++ -s];if(e.a===e.input.length)return e.b=n,-1}}for(;8<=e.d;)e.d-=8,e.a--;e.b=n,e.status=6}function _(e){var t,n=e.input.length/e.a+1|0,r,s,o,u=e.input,a=e.c;return 2>n?(r=(u.length-e.a)/e.k[2],o=258*(r/2)|0,s=o<a.length?a.length+o:a.length<<1):s=a.length*n,i?(t=new Uint8Array(s),t.set(a)):t=a,e.c=t,e.c}function D(t){this.input=t===e?new(i?Uint8Array:Array):t,this.a=0,this.h=new o(this.input,this.a),this.c=this.h.c}var e=void 0,t=!0,n=this,i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,u=0;o.prototype.i=function(n,r){var s=!1;n!==e&&(this.input=n),r!==e&&(this.a=r);for(;!s;)switch(this.status){case u:case 1:var o,a=e;this.status=1,L(this);if(0>(a=C(this,3)))A(this),o=-1;else{a&1&&(this.l=t),a>>>=1;switch(a){case 0:this.g=0;break;case 1:this.g=1;break;case 2:this.g=2;break;default:throw Error("unknown BTYPE: "+a)}this.status=2,o=e}0>o&&(s=t);break;case 2:case 3:switch(this.g){case 0:var f,l=e,c=e,h=this.input,p=this.a;this.status=3;if(p+4>=h.length)f=-1;else{l=h[p++]|h[p++]<<8,c=h[p++]|h[p++]<<8;if(l===~c)throw Error("invalid uncompressed block header: length verify");this.d=this.e=0,this.a=p,this.m=l,this.status=4,f=e}0>f&&(s=t);break;case 1:this.status=3,this.k=E,this.n=N,this.status=4;break;case 2:0>O(this)&&(s=t)}break;case 4:case 5:switch(this.g){case 0:var d;e:{var v=this.input,m=this.a,g=this.c,y=this.b,b=this.m;for(this.status=5;b--;){y===g.length&&(g=_(this));if(m>=v.length){this.a=m,this.b=y,this.m=b+1,d=-1;break e}g[y++]=v[m++]}0>b&&(this.status=6),this.a=m,this.b=y,d=0}0>d&&(s=t);break;case 1:case 2:0>M(this)&&(s=t)}break;case 6:this.l?s=t:this.status=u}var w,S=this.b;return this.s?i?(w=new Uint8Array(S),w.set(this.c.subarray(this.f,S))):w=this.c.slice(this.f,S):w=i?this.c.subarray(this.f,S):this.c.slice(this.f,S),this.buffer=w,this.f=S,this.buffer};var a=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=i?new Uint16Array(a):a,l=[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,258,258],c=i?new Uint16Array(l):l,h=[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,0,0],p=i?new Uint8Array(h):h,d=[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],v=i?new Uint16Array(d):d,m=[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],g=i?new Uint8Array(m):m,y=new(i?Uint8Array:Array)(288),b,w;b=0;for(w=y.length;b<w;++b)y[b]=143>=b?8:255>=b?9:279>=b?7:8;var E=s(y),S=new(i?Uint8Array:Array)(30),x,T;x=0;for(T=S.length;x<T;++x)S[x]=5;var N=s(S);o.prototype.j=function(){return i?this.c.subarray(0,this.b):this.c.slice(0,this.b)},D.prototype.i=function(t){var n;if(t!==e)if(i){var r=new Uint8Array(this.input.length+t.length);r.set(this.input,0),r.set(t,this.input.length),this.input=r}else this.input=this.input.concat(t);var s;if(s=this.method===e){var o,u=this.a,a=this.input,f=a[u++],l=a[u++];if(f===e||l===e)o=-1;else{switch(f&15){case 8:this.method=8;break;default:throw Error("unsupported compression method")}if(0!==((f<<8)+l)%31)throw Error("invalid fcheck flag:"+((f<<8)+l)%31);if(l&32)throw Error("fdict flag is not supported");this.a=u,o=e}s=0>o}return s?new(i?Uint8Array:Array):(n=this.h.i(this.input,this.a),this.a=this.h.a,n)},D.prototype.j=function(){return this.h.j()},r("Zlib.InflateStream",D),r("Zlib.InflateStream.prototype.decompress",D.prototype.i),r("Zlib.InflateStream.prototype.getBytes",D.prototype.j)}.call(this),define("inflateStream",function(e){return function(){var t,n;return t||e.Zlib}}(this)),define("zText",["inflateStream","async"],function(e,t){var n={},r=new FileReader,i=new FileReader;return n.getRawEntry=function(n,s,o,u,a){if(!s[o[0].chapter-1])a({message:"Wrong passage. The requested chapter is not available in this module."});else{var f=s[o[0].chapter-1].bookStartPos,l=s[o[0].chapter-1].startPos,c=s[o[0].chapter-1].length,h=f+l,p=h+c,d=n.slice(f,p);r.readAsArrayBuffer(d),r.onload=function(n){var r=new Uint8Array(n.target.result),f=new e.InflateStream,c=new Blob([f.decompress(r)]),h=[],p=0,d=0,v=0;t.whilst(function(){return v<o.length},function(e){p=l+s[o[v].chapter-1].verses[o[v].verse-1].startPos,d=p+s[o[v].chapter-1].verses[o[v].verse-1].length,u?i.readAsText(c.slice(p,d),u):i.readAsText(c.slice(p,d),"CP1252"),i.onload=function(t){h.push({text:t.target.result,osis:o[v].osis,verse:o[v].verse}),v++,e()}},function(e){a(e,h)})}}},n}),define("text",["module"],function(e){var t,n,r,i,s,o=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],u=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,f=typeof location!="undefined"&&location.href,l=f&&location.protocol&&location.protocol.replace(/\:/,""),c=f&&location.hostname,h=f&&(location.port||undefined),p={},d=e.config&&e.config()||{};t={version:"2.0.10",strip:function(e){if(e){e=e.replace(u,"");var t=e.match(a);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:d.createXhr||function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(t=0;t<3;t+=1){n=o[t];try{e=new ActiveXObject(n)}catch(r){}if(e){o=[n];break}}return e},parseName:function(e){var t,n,r,i=!1,s=e.indexOf("."),o=e.indexOf("./")===0||e.indexOf("../")===0;return s!==-1&&(!o||s>1)?(t=e.substring(0,s),n=e.substring(s+1,e.length)):t=e,r=n||t,s=r.indexOf("!"),s!==-1&&(i=r.substring(s+1)==="strip",r=r.substring(0,s),n?n=r:t=r),{moduleName:t,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var s,o,u,a=t.xdRegExp.exec(e);return a?(s=a[2],o=a[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===n)&&(!o||o.toLowerCase()===r.toLowerCase())&&(!u&&!o||u===i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,d.isBuild&&(p[e]=r),i(r)},load:function(e,n,r,i){if(i.isBuild&&!i.inlineText){r();return}d.isBuild=i.isBuild;var s=t.parseName(e),o=s.moduleName+(s.ext?"."+s.ext:""),u=n.toUrl(o),a=d.useXhr||t.useXhr;if(u.indexOf("empty:")===0){r();return}!f||a(u,l,c,h)?t.get(u,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([o],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)})},write:function(e,n,r,i){if(p.hasOwnProperty(n)){var s=t.jsEscape(p[n]);r.asModule(e+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(e,n,r,i,s){var o=t.parseName(n),u=o.ext?"."+o.ext:"",a=o.moduleName+u,f=r.toUrl(o.moduleName+u)+".js";t.load(a,r,function(n){var r=function(e){return i(f,e)};r.asModule=function(e,t){return i.asModule(e,f,t)},t.write(e,a,r,s)},s)}};if(d.env==="node"||!d.env&&typeof process!="undefined"&&process.versions&&!!process.versions.node&&!process.versions["node-webkit"])n=require.nodeRequire("fs"),t.get=function(e,t,r){try{var i=n.readFileSync(e,"utf8");i.indexOf("")===0&&(i=i.substring(1)),t(i)}catch(s){r(s)}};else if(d.env==="xhr"||!d.env&&t.createXhr())t.get=function(e,n,r,i){var s=t.createXhr(),o;s.open("GET",e,!0);if(i)for(o in i)i.hasOwnProperty(o)&&s.setRequestHeader(o.toLowerCase(),i[o]);d.onXhr&&d.onXhr(s,e),s.onreadystatechange=function(t){var i,o;s.readyState===4&&(i=s.status,i>399&&i<600?(o=new Error(e+" HTTP status: "+i),o.xhr=s,r(o)):n(s.responseText),d.onXhrComplete&&d.onXhrComplete(s,e))},s.send(null)};else if(d.env==="rhino"||!d.env&&typeof Packages!="undefined"&&typeof java!="undefined")t.get=function(e,t){var n,r,i="utf-8",s=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),u=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),i)),a="";try{n=new java.lang.StringBuffer,r=u.readLine(),r&&r.length()&&r.charAt(0)===65279&&(r=r.substring(1)),r!==null&&n.append(r);while((r=u.readLine())!==null)n.append(o),n.append(r);a=String(n.toString())}finally{u.close()}t(a)};else if(d.env==="xpconnect"||!d.env&&typeof Components!="undefined"&&Components.classes&&Components.interfaces)r=Components.classes,i=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),s="@mozilla.org/windows-registry-key;1"in r,t.get=function(e,t){var n,o,u,a={};s&&(e=e.replace(/\//g,"\\")),u=new FileUtils.File(e);try{n=r["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream),n.init(u,1,0,!1),o=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream),o.init(n,"utf-8",n.available(),i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),o.readString(n.available(),a),o.close(),n.close(),t(a.value)}catch(f){throw new Error((u&&u.path||"")+": "+f)}};return t}),define("json",["text"],function(text){function cacheBust(e){return e=e.replace(CACHE_BUST_FLAG,""),e+=e.indexOf("?")<0?"?":"&",e+CACHE_BUST_QUERY_PARAM+"="+Math.round(2147483647*Math.random())}var CACHE_BUST_QUERY_PARAM="bust",CACHE_BUST_FLAG="!bust",jsonParse=typeof JSON!="undefined"&&typeof JSON.parse=="function"?JSON.parse:function(val){return eval("("+val+")")},buildMap={};return{load:function(e,t,n,r){!r.isBuild||r.inlineJSON!==!1&&e.indexOf(CACHE_BUST_QUERY_PARAM+"=")===-1?text.get(t.toUrl(e),function(t){r.isBuild?(buildMap[e]=t,n(t)):n(jsonParse(t))},n.error,{accept:"application/json"}):n(null)},normalize:function(e,t){return e.indexOf(CACHE_BUST_FLAG)!==-1&&(e=cacheBust(e)),t(e)},write:function(e,t,n){if(t in buildMap){var r=buildMap[t];n('define("'+e+"!"+t+'", function(){ return '+r+";});\n")}}}}),define("json!../data/kjv.json",function(){return{ot:[{name:"Genesis",abbrev:"Gen",maxChapter:50},{name:"Exodus",abbrev:"Exod",maxChapter:40},{name:"Leviticus",abbrev:"Lev",maxChapter:27},{name:"Numbers",abbrev:"Num",maxChapter:36},{name:"Deuteronomy",abbrev:"Deut",maxChapter:34},{name:"Joshua",abbrev:"Josh",maxChapter:24},{name:"Judges",abbrev:"Judg",maxChapter:21},{name:"Ruth",abbrev:"Ruth",maxChapter:4},{name:"I Samuel",abbrev:"1Sam",maxChapter:31},{name:"II Samuel",abbrev:"2Sam",maxChapter:24},{name:"I Kings",abbrev:"1Kgs",maxChapter:22},{name:"II Kings",abbrev:"2Kgs",maxChapter:25},{name:"I Chronicles",abbrev:"1Chr",maxChapter:29},{name:"II Chronicles",abbrev:"2Chr",maxChapter:36},{name:"Ezra",abbrev:"Ezra",maxChapter:10},{name:"Nehemiah",abbrev:"Neh",maxChapter:13},{name:"Esther",abbrev:"Esth",maxChapter:10},{name:"Job",abbrev:"Job",maxChapter:42},{name:"Psalms",abbrev:"Ps",maxChapter:150},{name:"Proverbs",abbrev:"Prov",maxChapter:31},{name:"Ecclesiastes",abbrev:"Eccl",maxChapter:12},{name:"Song of Solomon",abbrev:"Song",maxChapter:8},{name:"Isaiah",abbrev:"Isa",maxChapter:66},{name:"Jeremiah",abbrev:"Jer",maxChapter:52},{name:"Lamentations",abbrev:"Lam",maxChapter:5},{name:"Ezekiel",abbrev:"Ezek",maxChapter:48},{name:"Daniel",abbrev:"Dan",maxChapter:12},{name:"Hosea",abbrev:"Hos",maxChapter:14},{name:"Joel",abbrev:"Joel",maxChapter:3},{name:"Amos",abbrev:"Amos",maxChapter:9},{name:"Obadiah",abbrev:"Obad",maxChapter:1},{name:"Jonah",abbrev:"Jonah",maxChapter:4},{name:"Micah",abbrev:"Mic",maxChapter:7},{name:"Nahum",abbrev:"Nah",maxChapter:3},{name:"Habakkuk",abbrev:"Hab",maxChapter:3},{name:"Zephaniah",abbrev:"Zeph",maxChapter:3},{name:"Haggai",abbrev:"Hag",maxChapter:2},{name:"Zechariah",abbrev:"Zech",maxChapter:14},{name:"Malachi",abbrev:"Mal",maxChapter:4}],nt:[{name:"Matthew",abbrev:"Matt",maxChapter:28},{name:"Mark",abbrev:"Mark",maxChapter:16},{name:"Luke",abbrev:"Luke",maxChapter:24},{name:"John",abbrev:"John",maxChapter:21},{name:"Acts",abbrev:"Acts",maxChapter:28},{name:"Romans",abbrev:"Rom",maxChapter:16},{name:"I Corinthians",abbrev:"1Cor",maxChapter:16},{name:"II Corinthians",abbrev:"2Cor",maxChapter:13},{name:"Galatians",abbrev:"Gal",maxChapter:6},{name:"Ephesians",abbrev:"Eph",maxChapter:6},{name:"Philippians",abbrev:"Phil",maxChapter:4},{name:"Colossians",abbrev:"Col",maxChapter:4},{name:"I Thessalonians",abbrev:"1Thess",maxChapter:5},{name:"II Thessalonians",abbrev:"2Thess",maxChapter:3},{name:"I Timothy",abbrev:"1Tim",maxChapter:6},{name:"II Timothy",abbrev:"2Tim",maxChapter:4},{name:"Titus",abbrev:"Titus",maxChapter:3},{name:"Philemon",abbrev:"Phlm",maxChapter:1},{name:"Hebrews",abbrev:"Heb",maxChapter:13},{name:"James",abbrev:"Jas",maxChapter:5},{name:"I Peter",abbrev:"1Pet",maxChapter:5},{name:"II Peter",abbrev:"2Pet",maxChapter:3},{name:"I John",abbrev:"1John",maxChapter:5},{name:"II John",abbrev:"2John",maxChapter:1},{name:"III John",abbrev:"3John",maxChapter:1},{name:"Jude",abbrev:"Jude",maxChapter:1},{name:"Revelation of John",abbrev:"Rev",maxChapter:22}],osisToBookNum:{Gen:0,Exod:1,Lev:2,Num:3,Deut:4,Josh:5,Judg:6,Ruth:7,"1Sam":8,"2Sam":9,"1Kgs":10,"2Kgs":11,"1Chr":12,"2Chr":13,Ezra:14,Neh:15,Esth:16,Job:17,Ps:18,Prov:19,Eccl:20,Song:21,Isa:22,Jer:23,Lam:24,Ezek:25,Dan:26,Hos:27,Joel:28,Amos:29,Obad:30,Jonah:31,Mic:32,Nah:33,Hab:34,Zeph:35,Hag:36,Zech:37,Mal:38,Matt:39,Mark:40,Luke:41,John:42,Acts:43,Rom:44,"1Cor":45,"2Cor":46,Gal:47,Eph:48,Phil:49,Col:50,"1Thess":51,"2Thess":52,"1Tim":53,"2Tim":54,Titus:55,Phlm:56,Heb:57,Jas:58,"1Pet":59,"2Pet":60,"1John":61,"2John":62,"3John":63,Jude:64,Rev:65},versesInChapter:[[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,55,32,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],[22,25,22,31,23,30,25,32,35,29,10,51,22,31,27,36,16,27,25,26,36,31,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],[17,16,17,35,19,30,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,50,13,32,22,29,35,41,30,25,18,65,23,31,40,16,54,42,56,29,34,13],[46,37,29,49,33,25,26,20,29,22,32,32,18,29,23,22,20,22,21,20,23,30,25,22,19,19,26,68,29,20,30,52,29,12],[18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33],[36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25],[22,23,18,22],[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,15,23,29,22,44,25,12,25,11,31,13],[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,33,43,26,22,51,39,25],[53,46,28,34,18,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,53],[18,25,27,44,27,33,20,29,37,36,21,21,25,29,38,20,41,37,37,21,26,20,37,20,30],[54,55,24,43,26,81,40,40,44,14,47,40,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],[17,18,17,22,14,42,22,18,31,19,23,16,22,15,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],[11,70,13,24,17,22,28,36,15,44],[11,20,32,23,19,19,73,18,38,39,36,47,31],[22,23,15,17,14,14,10,17,32,3],[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,24,34,17],[6,12,8,8,12,10,17,9,20,18,7,8,6,7,5,11,15,50,14,9,13,31,6,10,22,12,14,9,11,12,24,11,22,22,28,12,40,22,13,17,13,11,5,26,17,11,9,14,20,23,19,9,6,7,23,13,11,11,17,12,8,12,11,10,13,20,7,35,36,5,24,20,28,23,10,12,20,72,13,19,16,8,18,12,13,17,7,18,52,17,16,15,5,23,11,13,12,9,9,5,8,28,22,35,45,48,43,13,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,13,10,7,12,15,21,10,20,14,9,6],[33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31],[18,26,22,16,20,12,29,17,18,20,10,14],[17,17,11,16,16,13,13,14],[31,22,26,6,30,13,25,22,21,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,12,25,24],[19,37,25,31,31,30,34,22,26,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],[22,22,66,22,22],[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,49,32,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],[21,49,30,37,31,28,28,27,27,21,45,13],[11,23,5,19,15,11,16,14,17,15,12,14,16,9],[20,32,21],[15,16,15,13,27,14,17,14,15],[21],[17,10,10,11],[16,13,12,13,15,16,20],[15,13,19],[17,20,19],[18,15,20],[15,23],[21,13,10,14,11,15,14,23,17,12,17,14,9,21],[14,17,18,6],[25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20],[45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20],[80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53],[51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25],[26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,41,38,40,30,35,27,27,32,44,31],[32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27],[31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24],[24,17,18,18,21,18,16,24,15,18,33,21,14],[24,21,29,31,26,18],[23,22,21,32,33,24],[30,30,21,23],[29,23,25,18],[10,20,13,18,28],[12,17,18],[20,15,16,16,25,21],[18,26,17,22],[16,15,15],[25],[14,18,19,16,14,20,28,13,28,39,40,29,25],[27,26,18,17,20],[25,25,22,19,14],[21,22,18],[10,29,24,21,21],[13],[14],[25],[20,29,22,11,14,17,17,13,21,11,19,17,18,20,8,21,18,24,21,15,27,21]]}}),define("json!../data/german.json",function(){return{ot:[{name:"Genesis",abbrev:"Gen",maxChapter:50},{name:"Exodus",abbrev:"Exod",maxChapter:40},{name:"Leviticus",abbrev:"Lev",maxChapter:27},{name:"Numbers",abbrev:"Num",maxChapter:36},{name:"Deuteronomy",abbrev:"Deut",maxChapter:34},{name:"Joshua",abbrev:"Josh",maxChapter:24},{name:"Judges",abbrev:"Judg",maxChapter:21},{name:"Ruth",abbrev:"Ruth",maxChapter:4},{name:"I Samuel",abbrev:"1Sam",maxChapter:31},{name:"II Samuel",abbrev:"2Sam",maxChapter:24},{name:"I Kings",abbrev:"1Kgs",maxChapter:22},{name:"II Kings",abbrev:"2Kgs",maxChapter:25},{name:"I Chronicles",abbrev:"1Chr",maxChapter:29},{name:"II Chronicles",abbrev:"2Chr",maxChapter:36},{name:"Ezra",abbrev:"Ezra",maxChapter:10},{name:"Nehemiah",abbrev:"Neh",maxChapter:13},{name:"Esther",abbrev:"Esth",maxChapter:10},{name:"Job",abbrev:"Job",maxChapter:42},{name:"Psalms",abbrev:"Ps",maxChapter:150},{name:"Proverbs",abbrev:"Prov",maxChapter:31},{name:"Ecclesiastes",abbrev:"Eccl",maxChapter:12},{name:"Song of Solomon",abbrev:"Song",maxChapter:8},{name:"Isaiah",abbrev:"Isa",maxChapter:66},{name:"Jeremiah",abbrev:"Jer",maxChapter:52},{name:"Lamentations",abbrev:"Lam",maxChapter:5},{name:"Ezekiel",abbrev:"Ezek",maxChapter:48},{name:"Daniel",abbrev:"Dan",maxChapter:12},{name:"Hosea",abbrev:"Hos",maxChapter:14},{name:"Joel",abbrev:"Joel",maxChapter:4},{name:"Amos",abbrev:"Amos",maxChapter:9},{name:"Obadiah",abbrev:"Obad",maxChapter:1},{name:"Jonah",abbrev:"Jonah",maxChapter:4},{name:"Micah",abbrev:"Mic",maxChapter:7},{name:"Nahum",abbrev:"Nah",maxChapter:3},{name:"Habakkuk",abbrev:"Hab",maxChapter:3},{name:"Zephaniah",abbrev:"Zeph",maxChapter:3},{name:"Haggai",abbrev:"Hag",maxChapter:2},{name:"Zechariah",abbrev:"Zech",maxChapter:14},{name:"Malachi",abbrev:"Mal",maxChapter:3}],versesInChapter:[[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,54,33,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],[22,25,22,31,23,30,29,28,35,29,10,51,22,31,27,36,16,27,25,26,37,30,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],[17,16,17,35,26,23,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,35,28,32,22,29,35,41,30,25,19,65,23,31,39,17,54,42,56,29,34,13],[46,37,29,49,33,25,26,20,29,22,32,31,19,29,23,22,20,22,21,20,23,29,26,22,19,19,26,69,28,20,30,52,29,12],[18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33],[36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25],[22,23,18,22],[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,16,23,28,23,44,25,12,25,11,31,13],[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,32,44,26,22,51,39,25],[53,46,28,20,32,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,54],[18,25,27,44,27,33,20,29,37,36,20,22,25,29,39,20,41,37,37,21,26,20,37,20,30],[54,55,24,43,41,66,40,40,44,14,47,41,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],[18,17,17,22,14,42,22,18,31,19,23,16,23,14,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],[11,70,13,24,17,22,28,36,15,44],[11,20,38,17,19,19,73,18,37,40,36,47,31],[22,23,15,17,14,14,10,17,32,3],[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,32,26,17],[6,12,9,9,13,11,18,10,21,18,7,9,6,7,5,11,15,51,15,10,14,32,6,10,22,12,14,9,11,13,25,11,22,23,28,13,40,23,14,18,14,12,5,27,18,12,10,15,21,23,21,11,7,9,24,14,12,12,18,14,9,13,12,11,14,20,8,36,37,6,24,20,28,23,11,13,21,72,13,20,17,8,19,13,14,17,7,19,53,17,16,16,5,23,11,13,12,9,9,5,8,29,22,35,45,48,43,14,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,14,10,8,12,15,21,10,20,14,9,6],[33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31],[18,26,22,17,19,12,29,17,18,20,10,14],[17,17,11,16,16,12,14,14],[31,22,26,6,30,13,25,23,20,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,11,25,24],[19,37,25,31,31,30,34,23,25,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],[22,22,66,22,22],[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,44,37,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],[21,49,33,34,30,29,28,27,27,21,45,13],[9,25,5,19,15,11,16,14,17,15,11,15,15,10],[20,27,5,21],[15,16,15,13,27,14,17,14,15],[21],[16,11,10,11],[16,13,12,14,14,16,20],[14,14,19],[17,20,19],[18,15,20],[15,23],[17,17,10,14,11,15,14,23,17,12,17,14,9,21],[14,17,24],[25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20],[45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20],[80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53],[51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25],[26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,40,38,40,30,35,27,27,32,44,31],[32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27],[31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24],[24,17,18,18,21,18,16,24,15,18,33,21,13],[24,21,29,31,26,18],[23,22,21,32,33,24],[30,30,21,23],[29,23,25,18],[10,20,13,18,28],[12,17,18],[20,15,16,16,25,21],[18,26,17,22],[16,15,15],[25],[14,18,19,16,14,20,28,13,28,39,40,29,25],[27,26,18,17,20],[25,25,22,19,14],[21,22,18],[10,29,24,21,21],[13],[15],[25],[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21]]}}),define("versificationMgr",["json!../data/kjv.json","json!../data/german.json"],function(e,t){function r(e){return e!==undefined&&n[e]?n[e].ot.length:n.kjv.ot.length}function i(e){return e!==undefined&&n[e]?n[e].nt.length:n.kjv.nt.length}function s(e,t){e=e<0?0:e;var i=r(t),s=e<i?"ot":"nt";return e=e<i?e:e-i,t!==undefined&&n[t]?n[t][s][e].maxChapter:n.kjv[s][e].maxChapter}function o(e,t,r){return r!==undefined&&n[r]?n[r].versesInChapter[e][parseInt(t,10)-1]:n.kjv.versesInChapter[e][parseInt(t,10)-1]}function u(e,t){e=e<0?0:e;var i=r(t),s=e<i?"ot":"nt";return e=e<i?e:e-i,t!==undefined&&n[t]?n[t][s][e]:n.kjv[s][e]}function a(e,t){return t!==undefined&&n[t]?n[t].osisToBookNum[e]:n.kjv.osisToBookNum[e]}function f(e){var t=[];return e!==undefined&&n[e]?t.concat(n[e].ot,n[e].nt):t.concat(n.kjv.ot,n.kjv.nt)}var n={};return n.kjv=e,t.nt=e.nt,t.osisToBookNum=e.osisToBookNum,n.german=t,{getBooksInOT:r,getBooksInNT:i,getChapterMax:s,getVersesInChapter:o,getBook:u,getBookNum:a,getAllBooks:f}}),define("installMgr",["unzip","dataMgr","zText","versificationMgr","async","tools"],function(e,t,n,r,i,s){function f(e){c("http://crosswire.org/ftpmirror/pub/sword/masterRepoList.conf","text",function(t,n){if(n===""&&!t)e("Couldn't download master repo list!");else if(!t){var r=[],i=null,s="",o="";n.split(/[\r\n]+/g).forEach(function(e){i=e.split("|");if(i.length>1&&i[0].search("CrossWire")!==-1){o=i[0].split("=")[2];switch(o){case"CrossWire":s="main";break;case"CrossWire Beta":s="beta";break;case"CrossWire av11n":s="av";break;case"CrossWire Attic":s="attic";break;case"CrossWire Wycliffe":s="wycliffe";break;case"CrossWire av11n Attic":s="avattic"}r.push({name:o,type:s,url:"http://crosswire.org/ftpmirror"+i[2].replace("raw","packages")+"/rawzip/",confUrl:"http://crosswire.org/ftpmirror"+i[2]+"/mods.d"})}}),e(t,r)}else e(t)})}function l(e,t){c(e.confUrl,"document",function(n,r){if(!n){var o=[],u="",a=r.getElementsByTagName("a");for(var f=0;f<a.length;f++)a[f].href.search(".conf")!==-1&&(u=a[f].baseURI+"/"+a[f].textContent,o.push(function(t){return function(n){c(t,"text",function(t,r){var i=s.readConf(r);i.ModDrv==="zText"?(i.url="http://www.crosswire.org/sword/servlet/SwordMod.Verify?modName="+i.moduleKey+"&"+e.type+"=true&pkgType=raw",n(t,i)):n(t)})}}(u)));i.parallel(o,function(e,n){t(e,s.cleanArray(n).sort(s.dynamicSortMultiple("Lang","moduleKey")))})}else t(n)})}function c(e,t,n,r){var i=new XMLHttpRequest({mozSystem:!0,mozAnon:!0});i.open("GET",e,!0),i.responseType=t,i.onreadystatechange=function(e){i.readyState==4&&(i.status===200?n(null,i.response):n({message:"Couldn't download module.",error:i.status}))},i.onprogress=r,i.onerror=function(e){n(e)},i.send(null)}function h(e,t,n){typeof e=="string"?c(e,"document",function(e,r){if(!e){var i=r.getElementsByTagName("a")[0].href;c(i,"blob",function(e,n){e?t(e):p(n,t)},n)}else t(e)}):p(e,t)}function p(n,r){var i=null,s=new FileReader;s.onload=function(n){var i=new e.Unzip(new Uint8Array(n.target.result)),s=i.getFilenames();s.forEach(function(e,n){e.search(".conf")!==-1&&t.saveConfig(new Blob([i.decompress(e)]),function(e,t){e?r(e):d(i,t.v11n,t,r)})})},s.readAsArrayBuffer(n)}function d(e,n,r,s){var o={};o.bin=[];var u=e.getFilenames();u.forEach(function(t,n){t.search("nt.bzs")!==-1?o.ntB=t:t.search("nt.bzv")!==-1?o.ntCV=t:t.search("ot.bzs")!==-1?o.otB=t:t.search("ot.bzv")!==-1?o.otCV=t:t.search(".conf")===-1&&o.bin.push({blob:new Blob([e.decompress(t)]),name:t})}),i.series([function(e){t.saveModule(o.bin,r,function(t,n){t?e(t):e(null)})},function(i){var s=null,u=null,a=null,f=null;o.otB&&(s=v(e.decompress(o.otB)),u=g(e.decompress(o.otCV),s,"ot",n)),o.ntB&&(a=v(e.decompress(o.ntB)),f=g(e.decompress(o.ntCV),a,"nt",n)),t.saveBCVPos(u,f,r,function(e,t){e?i(e):i(null)})}],function(e,n){e?(t.remove(r.id,function(e){}),s(e)):s(null,r.id)})}function v(e,t){var n=0,r=0,i=0,s=null,u=!1,a=[];o=0;while(!u){s=y(e),n=s[0],u=s[1];if(!u){s=y(e),r=s[0],u=s[1];if(!u){s=y(e),i=s[0],u=s[1];if(u)break;a.push({startPos:n,length:r,unused:i})}}}return a}function m(e){o=0;for(var t=0;t<4;t++)b(e),w(e),b(e)}function g(e,t,n,i){m(e);var s=n==="ot"?0:r.getBooksInOT(i),o=n==="ot"?r.getBooksInOT(i):r.getBooksInOT(i)+r.getBooksInNT(i),u=0,a=0,f=0,l=0,c=0,h=0,p=0,d=0,v=null,g=0,y={},E={};for(var S=s;S<o;S++){v=r.getBook(S,i),E[v.abbrev]=[];for(var x=0;x<v.maxChapter;x++){f=0,l=0,y={},y.verses=[],c=0,d=r.getVersesInChapter(S,x+1,i);for(var T=0;T<d;T++)p=b(e)[0],g=w(e)[0],g!==0&&(l=g),c=b(e)[0],T===0&&(f=g,h=0,p<t.length&&(h=t[p].startPos),y.startPos=f,y.booknum=S,y.bookStartPos=h),p===0&&g===0&&c===0?y!=={}&&y.verses.push({startPos:0,length:0}):y!=={}&&y.verses.push({startPos:g-f,length:c});y!={}&&(y.length=l-f+c,E[v.abbrev].push(y)),b(e),w(e),b(e)}b(e),w(e),b(e)}return E}function y(e,t){return u=e.subarray(o,o+4),a=!1,o+=4,u.length!==4&&(a=!0),t&&t(u[3]*1048576+u[2]*65536+u[1]*256+u[0],a),[u[3]*1048576+u[2]*65536+u[1]*256+u[0],a]}function b(e,t){return u=e.subarray(o,o+2),a=!1,o+=2,u.length!==2&&(a=!0),t&&t(u[1]*256+u[0],a),[u[1]*256+u[0],a]}function w(e,t){return u=e.subarray(o,o+6),a=!1,o+=6,u.length!==6&&(a=!0),t&&t(u[1]*17592186044416+u[0]*4294967296+u[5]*16777216+u[4]*65536+u[3]*256+u[2],a),[u[1]*17592186044416+u[0]*4294967296+u[5]*16777216+u[4]*65536+u[3]*256+u[2],a]}var o=0,u=null,a=!1;return{getRepositories:f,getModules:l,installModule:h}}),function(){var e,t,n,r={}.hasOwnProperty,i=function(){var e,t,n;this.options={},n=i.prototype.options;for(e in n)r.call(n,e)&&(t=n[e],this.options[e]=t);this.versification_system(this.options.versification_system)};i.prototype.s="",i.prototype.entities=[],i.prototype.passage=null,i.prototype.regexps={},i.prototype.options={consecutive_combination_strategy:"combine",osis_compaction_strategy:"b",book_sequence_strategy:"ignore",invalid_sequence_strategy:"ignore",sequence_combination_strategy:"combine",invalid_passage_strategy:"ignore",zero_chapter_strategy:"error",zero_verse_strategy:"error",non_latin_digits_strategy:"ignore",book_alone_strategy:"ignore",captive_end_digits_strategy:"delete",end_range_digits_strategy:"verse",include_apocrypha:!1,ps151_strategy:"c",versification_system:"default",case_sensitive:"none"},i.prototype.parse=function(e){var t,n,r;this.reset(),this.s=e,e=this.replace_control_characters(e),n=this.match_books(e),e=n[0],this.passage.books=n[1],e=this.match_passages(e),this.entities=[],n=0;for(r=e.length;n<r;n++)t=e[n],t=this.passage.handle_array([t])[0],this.entities=this.entities.concat(t);return this},i.prototype.reset=function(){return this.s="",this.entities=[],this.passage?(this.passage.books=[],this.passage.indices={}):(this.passage=new t,this.passage.options=this.options,this.passage.translations=this.translations)},i.prototype.set_options=function(e){var t,n;for(t in e)r.call(e,t)&&((n=e[t],"include_apocrypha"===t||"versification_system"===t||"case_sensitive"===t)?this[t](n):this.options[t]=n);return this},i.prototype.include_apocrypha=function(e){return null==e||!0!==e&&!1!==e?this:(this.options.include_apocrypha=e,this.regexps.books=this.regexps.get_books(e,this.options.case_sensitive),!0===e?this.translations["default"].chapters.Ps[150]=this.translations["default"].chapters.Ps151[0]:!1===e&&151===this.translations["default"].chapters.Ps.length&&this.translations["default"].chapters.Ps.pop(),this)},i.prototype.versification_system=function(e){var t,i;if(null==e||null==this.translations.alternates[e])return this;this.options.versification_system=e,null==(i=this.translations.alternates)["default"]&&(i["default"]={order:null,chapters:{}}),null!=this.translations.alternates[e].order&&(null==this.translations.alternates["default"].order&&(this.translations.alternates["default"].order=n.shallow_clone(this.translations["default"].order)),this.translations["default"].order=n.shallow_clone(this.translations.alternates[e].order));if(null!=this.translations.alternates[e].chapters)for(t in i=this.translations.alternates[e].chapters,i)r.call(i,t)&&(e=i[t],null==this.translations.alternates["default"].chapters[t]&&(this.translations.alternates["default"].chapters[t]=n.shallow_clone_array(this.translations["default"].chapters[t])),this.translations["default"].chapters[t]=n.shallow_clone_array(e));return this.include_apocrypha(this.options.include_apocrypha),this},i.prototype.case_sensitive=function(e){return null==e||"none"!==e&&"books"!==e||e===this.options.case_sensitive?this:(this.options.case_sensitive=e,this.regexps.books=this.regexps.get_books(this.options.include_apocrypha,e),this)},i.prototype.replace_control_characters=function(e){return e=e.replace(this.regexps.control," "),"replace"===this.options.non_latin_digits_strategy&&(e=e.replace(/[\u0660\u06f0\u07c0\u0966\u09e6\u0a66\u0ae6\u0b660\u0c66\u0ce6\u0d66\u0e50\u0ed0\u0f20\u1040\u1090\u17e0\u1810\u1946\u19d0\u1a80\u1a90\u1b50\u1bb0\u1c40\u1c50\ua620\ua8d0\ua900\ua9d0\uaa50\uabf0\uff10]/g,"0"),e=e.replace(/[\u0661\u06f1\u07c1\u0967\u09e7\u0a67\u0ae7\u0b67\u0be7\u0c67\u0ce7\u0d67\u0e51\u0ed1\u0f21\u1041\u1091\u17e1\u1811\u1947\u19d1\u1a81\u1a91\u1b51\u1bb1\u1c41\u1c51\ua621\ua8d1\ua901\ua9d1\uaa51\uabf1\uff11]/g,"1"),e=e.replace(/[\u0662\u06f2\u07c2\u0968\u09e8\u0a68\u0ae8\u0b68\u0be8\u0c68\u0ce8\u0d68\u0e52\u0ed2\u0f22\u1042\u1092\u17e2\u1812\u1948\u19d2\u1a82\u1a92\u1b52\u1bb2\u1c42\u1c52\ua622\ua8d2\ua902\ua9d2\uaa52\uabf2\uff12]/g,"2"),e=e.replace(/[\u0663\u06f3\u07c3\u0969\u09e9\u0a69\u0ae9\u0b69\u0be9\u0c69\u0ce9\u0d69\u0e53\u0ed3\u0f23\u1043\u1093\u17e3\u1813\u1949\u19d3\u1a83\u1a93\u1b53\u1bb3\u1c43\u1c53\ua623\ua8d3\ua903\ua9d3\uaa53\uabf3\uff13]/g,"3"),e=e.replace(/[\u0664\u06f4\u07c4\u096a\u09ea\u0a6a\u0aea\u0b6a\u0bea\u0c6a\u0cea\u0d6a\u0e54\u0ed4\u0f24\u1044\u1094\u17e4\u1814\u194a\u19d4\u1a84\u1a94\u1b54\u1bb4\u1c44\u1c54\ua624\ua8d4\ua904\ua9d4\uaa54\uabf4\uff14]/g,"4"),e=e.replace(/[\u0665\u06f5\u07c5\u096b\u09eb\u0a6b\u0aeb\u0b6b\u0beb\u0c6b\u0ceb\u0d6b\u0e55\u0ed5\u0f25\u1045\u1095\u17e5\u1815\u194b\u19d5\u1a85\u1a95\u1b55\u1bb5\u1c45\u1c55\ua625\ua8d5\ua905\ua9d5\uaa55\uabf5\uff15]/g,"5"),e=e.replace(/[\u0666\u06f6\u07c6\u096c\u09ec\u0a6c\u0aec\u0b6c\u0bec\u0c6c\u0cec\u0d6c\u0e56\u0ed6\u0f26\u1046\u1096\u17e6\u1816\u194c\u19d6\u1a86\u1a96\u1b56\u1bb6\u1c46\u1c56\ua626\ua8d6\ua906\ua9d6\uaa56\uabf6\uff16]/g,"6"),e=e.replace(/[\u0667\u06f7\u07c7\u096d\u09ed\u0a6d\u0aed\u0b6d\u0bed\u0c6d\u0ced\u0d6d\u0e57\u0ed7\u0f27\u1047\u1097\u17e7\u1817\u194d\u19d7\u1a87\u1a97\u1b57\u1bb7\u1c47\u1c57\ua627\ua8d7\ua907\ua9d7\uaa57\uabf7\uff17]/g,"7"),e=e.replace(/[\u0668\u06f8\u07c8\u096e\u09ee\u0a6e\u0aee\u0b6e\u0bee\u0c6e\u0cee\u0d6e\u0e58\u0ed8\u0f28\u1048\u1098\u17e8\u1818\u194e\u19d8\u1a88\u1a98\u1b58\u1bb8\u1c48\u1c58\ua628\ua8d8\ua908\ua9d8\uaa58\uabf8\uff18]/g,"8"),e=e.replace(/[\u0669\u06f9\u07c9\u096f\u09ef\u0a6f\u0aef\u0b6f\u0bef\u0c6f\u0cef\u0d6f\u0e59\u0ed9\u0f29\u1049\u1099\u17e9\u1819\u194f\u19d9\u1a89\u1a99\u1b59\u1bb9\u1c49\u1c59\ua629\ua8d9\ua909\ua9d9\uaa59\uabf9\uff19]/g,"9")),e},i.prototype.match_books=function(e){var t,n,r,i,s;n=[],s=this.regexps.books,r=0;for(i=s.length;r<i;r++)t=s[r],e=e.replace(t.regexp,function(e,r,i){return n.push({value:i,parsed:t.osis}),""+r+""+(n.length-1)+(null!=t.extra?"/"+t.extra:"")+""});return e=e.replace(this.regexps.translations,function(e){return n.push({value:e,parsed:e.toLowerCase()}),""+(n.length-1)+""}),[e,this.get_book_indices(n,e)]},i.prototype.get_book_indices=function(e,t){var n,r,i;n=0;for(i=/([\x1f\x1e])(\d+)(?:\/[a-z])?\1/g;r=i.exec(t);)e[r[2]].start_index=r.index+n,n+=e[r[2]].value.length-r[0].length;return e},i.prototype.match_passages=function(e){var t,n,r,i,s;for(s=[];r=this.regexps.escaped_passage.exec(e);)n=r[0],i=r[1],t=r[2],r.index+=n.length-i.length,/\s[2-9]\d\d\s*$|\s\d{4,}\s*$/.test(i)&&(n=/\s+\d+\s*$/,i=i.replace(n,"")),/[\d\x1f\x1e)]$/.test(i)||(i=this.replace_match_end(i)),"delete"===this.options.captive_end_digits_strategy&&(r=r.index+i.length,e.length>r&&/^\w/.test(e.substr(r,1))&&(i=i.replace(/[\s*]+\d+$/,"")),i=i.replace(/(\x1e[)\]]?)[\s*]*\d+$/,"$1")),i=i.replace(/[A-Z]+/g,function(e){return e.toLowerCase()}),r=i.substr(0,!1)?0:i.split("")[0].length,i={value:o.parse(i),type:"base",start_index:this.passage.books[t].start_index-r,match:i},"full"===this.options.book_alone_strategy&&1===i.value.length&&"b"===i.value[0].type&&0===r&&1===this.passage.books[t].parsed.length&&/^[234]/.test(this.passage.books[t].parsed[0])&&this.create_book_range(e,i,t),s.push(i);return s},i.prototype.replace_match_end=function(e){var t,n;for(n=e.length;t=this.regexps.match_end_split.exec(e);)n=t.index+t[0].length;return n<e.length&&(e=e.substr(0,n)),e},i.prototype.create_book_range=function(e,t,n){var r,s,o,u,a;r=[i.prototype.regexps.first,i.prototype.regexps.second,i.prototype.regexps.third],o=parseInt(this.passage.books[n].parsed[0].substr(0,1),10);for(s=a=1;1<=o?a<o:a>o;s=1<=o?++a:--a)if(u=s===o-1?i.prototype.regexps.range_and:i.prototype.regexps.range_only,u=e.match(RegExp("(?:^|\\W)("+r[s-1]+"\\s*"+u+"\\s*)\\x1f"+n+"\\x1f","i")),null!=u)return this.add_book_range_object(t,u,s);return!1},i.prototype.add_book_range_object=function(e,t,n){var r;return r=t[1].length,e.value[0]={type:"b_range_pre",value:[{type:"b_pre",value:n.toString(),indices:[t.index,t.index+r]},e.value[0]],indices:[0,e.value[0].indices[1]+r]},e.value[0].value[1].indices[0]+=r,e.value[0].value[1].indices[1]+=r,e.start_index-=r,e.match=t[1]+e.match},i.prototype.osis=function(){var e,t,n,r,i;t=[],i=this.parsed_entities(),n=0;for(r=i.length;n<r;n++)e=i[n],0<e.osis.length&&t.push(e.osis);return t.join(",")},i.prototype.osis_and_translations=function(){var e,t,n,r,i;t=[],i=this.parsed_entities(),n=0;for(r=i.length;n<r;n++)e=i[n],0<e.osis.length&&t.push([e.osis,e.translations.join(",")]);return t},i.prototype.osis_and_indices=function(){var e,t,n,r,i;t=[],i=this.parsed_entities(),n=0;for(r=i.length;n<r;n++)e=i[n],0<e.osis.length&&t.push({osis:e.osis,translations:e.translations,indices:e.indices});return t},i.prototype.parsed_entities=function(){var e,t,n,r,i,s,o,u,a,f,l,c,h;s=[],t=f=0;for(c=this.entities.length;0<=c?f<c:f>c;t=0<=c?++f:--f)if(e=this.entities[t],e.type&&"translation_sequence"===e.type&&0<s.length&&t===s[s.length-1].entity_id+1&&(s[s.length-1].indices[1]=e.absolute_indices[1]),null!=e.passages&&("b"!==e.type&&"b_range"!==e.type||"ignore"!==this.options.book_alone_strategy)){a=[],u=null;if(null!=e.passages[0].translations){l=e.passages[0].translations,r=0;for(o=l.length;r<o;r++)i=l[r],n=0<(null!=(h=i.osis)?h.length:void 0)?i.osis:"",null==u&&(u=i.alias),a.push(n)}else a=[""],u="default";i=[],r=e.passages.length;for(n=l=0;0<=r?l<r:l>r;n=0<=r?++l:--l){o=e.passages[n],null==o.type&&(o.type=e.type);if(!1===o.valid.valid&&("ignore"===this.options.invalid_sequence_strategy&&"sequence"===e.type&&this.snap_sequence("ignore",e,i,n,r),"ignore"===this.options.invalid_passage_strategy))continue;"b"!==o.type&&"b_range"!==o.type||"ignore"!==this.options.book_sequence_strategy||"sequence"!==e.type?(null==o.absolute_indices&&(o.absolute_indices=e.absolute_indices),i.push({osis:o.valid.valid?this.to_osis(o.start,o.end,u):"",type:o.type,indices:o.absolute_indices,translations:a,start:o.start,end:o.end,enclosed_indices:o.enclosed_absolute_indices,entity_id:t,entities:[o]})):this.snap_sequence("book",e,i,n,r)}if(0!==i.length)if(1<i.length&&"combine"===this.options.consecutive_combination_strategy&&(i=this.combine_consecutive_passages(i,u)),"separate"===this.options.sequence_combination_strategy)s=s.concat(i);else{u=[],n=i.length-1,null!=i[n].enclosed_indices&&0<=i[n].enclosed_indices[1]&&(e.absolute_indices[1]=i[n].enclosed_indices[1]),r=0;for(o=i.length;r<o;r++)n=i[r],0<n.osis.length&&u.push(n.osis);s.push({osis:u.join(","),indices:e.absolute_indices,translations:a,entity_id:t,entities:i})}}return s},i.prototype.to_osis=function(e,t,n){var r;return null==t.c&&null==t.v&&e.b===t.b&&null==e.c&&null==e.v&&"first_chapter"===this.options.book_alone_strategy&&(t.c=1),null==e.c&&(e.c=1),null==e.v&&(e.v=1),null==t.c&&(t.c=this.passage.translations[n].chapters[t.b].length),null==t.v&&(t.v=this.passage.translations[n].chapters[t.b][t.c-1]),this.options.include_apocrypha&&"b"===this.options.ps151_strategy&&(151===e.c&&"Ps"===e.b||151===t.c&&"Ps"===t.b)&&this.fix_ps151(e,t,n),"b"===this.options.osis_compaction_strategy&&1===e.c&&1===e.v&&t.c===this.passage.translations[n].chapters[t.b].length&&t.v===this.passage.translations[n].chapters[t.b][t.c-1]?(n=e.b,r=t.b):2>=this.options.osis_compaction_strategy.length&&1===e.v&&t.v===this.passage.translations[n].chapters[t.b][t.c-1]?(n=e.b+"."+e.c.toString(),r=t.b+"."+t.c.toString()):(n=e.b+"."+e.c.toString()+"."+e.v.toString(),r=t.b+"."+t.c.toString()+"."+t.v.toString()),n=n===r?n:n+"-"+r,null!=e.extra&&(n=e.extra+","+n),null!=t.extra&&(n+=","+t.extra),n},i.prototype.fix_ps151=function(e,t,n){return 151===e.c&&"Ps"===e.b?151===t.c&&"Ps"===t.b?(e.b="Ps151",e.c=1,t.b="Ps151",t.c=1):(e.extra=this.to_osis({b:"Ps151",c:1,v:e.v},{b:"Ps151",c:1,v:this.passage.translations[n].chapters.Ps151[0]},n),e.b="Prov",e.c=1,e.v=1):(t.extra=this.to_osis({b:"Ps151",c:1,v:1},{b:"Ps151",c:1,v:t.v},n),t.c=150,t.v=this.passage.translations[n].chapters.Ps[149])},i.prototype.combine_consecutive_passages=function(e,t){var n,r,i,s,o,u,a,f,l,c;a=[],f={},o=e.length-1,n=-1,r=!1;for(i=c=0;0<=o?c<=o:c>=o;i=0<=o?++c:--c)(u=e[i],0<u.osis.length)?(l=a.length-1,s=!1,u.enclosed_indices[0]!==n&&(n=u.enclosed_indices[0]),0<=n&&(i===o||e[i+1].enclosed_indices[0]!==u.enclosed_indices[0])&&(r=s=!0),this.is_verse_consecutive(f,u.start,t)?(a[l].end=u.end,a[l].is_enclosed_last=s,a[l].indices[1]=u.indices[1],a[l].enclosed_indices[1]=u.enclosed_indices[1],a[l].osis=this.to_osis(a[l].start,u.end,t)):a.push(u),f={b:u.end.b,c:u.end.c,v:u.end.v}):(a.push(u),f={});return r&&this.snap_enclosed_indices(a),a},i.prototype.snap_enclosed_indices=function(e){var t,n,r;n=0;for(r=e.length;n<r;n++)t=e[n],null!=t.is_enclosed_last&&(0>t.enclosed_indices[0]&&t.is_enclosed_last&&(t.indices[1]=t.enclosed_indices[1]),delete t.is_enclosed_last);return e},i.prototype.is_verse_consecutive=function(e,t,n){var r;if(null==e.b)return!1;r=null!=this.passage.translations[n].order?this.passage.translations[n].order:this.passage.translations["default"].order;if(e.b===t.b){if(e.c===t.c){if(e.v===t.v-1)return!0}else if(1===t.v&&e.c===t.c-1&&e.v===this.passage.translations[n].chapters[e.b][e.c-1])return!0}else if(1===t.c&&1===t.v&&r[e.b]===r[t.b]-1&&e.c===this.passage.translations[n].chapters[e.b].length&&e.v===this.passage.translations[n].chapters[e.b][e.c-1])return!0;return!1},i.prototype.snap_sequence=function(e,t,n,r,i){var s;return s=t.passages[r],s.absolute_indices[0]===t.absolute_indices[0]&&r<i-1&&this.get_snap_sequence_i(t.passages,r,i)!==r?(t.absolute_indices[0]=t.passages[r+1].absolute_indices[0],this.remove_absolute_indices(t.passages,r+1)):s.absolute_indices[1]===t.absolute_indices[1]&&0<r?t.absolute_indices[1]=0<n.length?n[n.length-1].indices[1]:t.passages[r-1].absolute_indices[1]:"book"===e&&r<i-1&&!this.starts_with_book(t.passages[r+1])&&(t.passages[r+1].absolute_indices[0]=s.absolute_indices[0]),t},i.prototype.get_snap_sequence_i=function(e,t,n){var r,i,s;for(r=i=s=t+1;s<=n?i<n:i>n;r=s<=n?++i:--i){if(this.starts_with_book(e[r]))return r;if(e[r].valid.valid)break}return t},i.prototype.starts_with_book=function(e){return"b"===e.type.substr(0,1)||("range"===e.type||"ff"===e.type)&&"b"===e.start.type.substr(0,1)?!0:!1},i.prototype.remove_absolute_indices=function(e,t){var n,r,i,s,o,u;if(0>e[t].enclosed_absolute_indices[0])return!1;n=e[t].enclosed_absolute_indices,i=n[0],n=n[1],u=e.slice(t),s=0;for(o=u.length;s<o;s++){if(r=u[s],r.enclosed_absolute_indices[0]!==i||r.enclosed_absolute_indices[1]!==n)break;r.enclosed_absolute_indices=[-1,-1]}return!0},this.bcv_parser=e=i;var s=function(){};s.prototype.books=[],s.prototype.indices={},s.prototype.options={},s.prototype.translations={},s.prototype.handle_array=function(e,t,n){var r,i,s;null==t&&(t=[]),null==n&&(n={}),i=0;for(s=e.length;i<s;i++){r=e[i];if("stop"===r.type)break;n=this.handle_obj(r,t,n),t=n[0],n=n[1]}return[t,n]},s.prototype.handle_obj=function(e,t,n){return null!=e.type&&null!=this[e.type]?this[e.type](e,t,n):[t,n]},s.prototype.b=function(e,t,r){var i,s,o,u,a;e.start_context=n.shallow_clone(r),e.passages=[],r=[],a=this.books[e.value].parsed,o=0;for(u=a.length;o<u;o++)i=a[o],s=this.validate_ref(e.start_context.translations,{b:i}),i={start:{b:i},end:{b:i},valid:s},0===e.passages.length&&s.valid?e.passages.push(i):r.push(i);return 0===e.passages.length&&e.passages.push(r.shift()),0<r.length&&(e.passages[0].alternates=r),null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),t.push(e),r={b:e.passages[0].start.b},null!=e.start_context.translations&&(r.translations=e.start_context.translations),[t,r]},s.prototype.b_range=function(e,t,n){return this.range(e,t,n)},s.prototype.b_range_pre=function(e,t,r){var i,s;return e.start_context=n.shallow_clone(r),e.passages=[],i=this.pluck("b",e.value),r=this.b(i,[],r),i=r[0][0],r=r[1],null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),s={b:e.value[0].value+i.passages[0].start.b.substr(1),type:"b"},e.passages=[{start:s,end:i.passages[0].end,valid:i.passages[0].valid}],null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),t.push(e),[t,r]},s.prototype.base=function(e,t,n){return this.indices=this.calculate_indices(e.match,e.start_index),this.handle_array(e.value,t,n)},s.prototype.bc=function(e,t,r){var i,s,o,u,a,f,l,c,h;e.start_context=n.shallow_clone(r),e.passages=[],this.reset_context(r,["b","c","v"]),o=this.pluck("c",e.value).value,i=[],h=this.books[this.pluck("b",e.value).value].parsed,l=0;for(c=h.length;l<c;l++)s=h[l],u="c",f=this.validate_ref(e.start_context.translations,{b:s,c:o}),a={start:{b:s},end:{b:s},valid:f},f.messages.start_chapter_not_exist_in_single_chapter_book&&(a.valid=this.validate_ref(e.start_context.translations,{b:s,v:o}),a.start.c=1,a.end.c=1,u="v"),a.start[u]=o,s=this.fix_start_zeroes(a.valid,a.start.c,a.start.v),a.start.c=s[0],a.start.v=s[1],a.end[u]=a.start[u],0===e.passages.length&&a.valid.valid?e.passages.push(a):i.push(a);return 0===e.passages.length&&e.passages.push(i.shift()),0<i.length&&(e.passages[0].alternates=i),null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),this.set_context_from_object(r,["b","c","v"],e.passages[0].start),t.push(e),[t,r]},s.prototype.bc_title=function(e,t,r){var i,s,o,u;e.start_context=n.shallow_clone(r),r=this.bc(this.pluck("bc",e.value),[],r),i=r[0][0],r=r[1];if("Ps"!==i.passages[0].start.b.substr(0,2)&&null!=i.passages[0].alternates){s=o=0;for(u=i.passages[0].alternates.length;0<=u?o<u:o>u;s=0<=u?++o:--o)if("Ps"===i.passages[0].alternates[s].start.b.substr(0,2)){i.passages[0]=i.passages[0].alternates[s];break}}return"Ps"!==i.passages[0].start.b.substr(0,2)?(t.push(i),[t,r]):(this.books[this.pluck("b",i.value).value].parsed=["Ps"],i=this.pluck("title",e.value),e.value[1]={type:"v",value:[{type:"integer",value:1,indices:i.indices}],indices:i.indices},e.original_type="bc_title",e.type="bcv",this.bcv(e,t,e.start_context))},s.prototype.bcv=function(e,t,r){var i,s,o,u,a,f,l,c;e.start_context=n.shallow_clone(r),e.passages=[],this.reset_context(r,["b","c","v"]),o=this.pluck("bc",e.value),u=this.pluck("c",o.value).value,a=this.pluck("v",e.value).value,i=[],c=this.books[this.pluck("b",o.value).value].parsed,f=0;for(l=c.length;f<l;f++)s=c[f],o=this.validate_ref(e.start_context.translations,{b:s,c:u,v:a}),a=this.fix_start_zeroes(o,u,a),u=a[0],a=a[1],s={start:{b:s,c:u,v:a},end:{b:s,c:u,v:a},valid:o},0===e.passages.length&&o.valid?e.passages.push(s):i.push(s);return 0===e.passages.length&&e.passages.push(i.shift()),0<i.length&&(e.passages[0].alternates=i),null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),this.set_context_from_object(r,["b","c","v"],e.passages[0].start),t.push(e),[t,r]},s.prototype.bv=function(e,t,r){var i;return e.start_context=n.shallow_clone(r),i=e.value,i={indices:e.indices,value:[{type:"bc",value:[i[0],{type:"c",value:[{type:"integer",value:1}]}]},i[1]]},r=this.bcv(i,[],r),i=r[0][0],r=r[1],e.passages=i.passages,null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),t.push(e),[t,r]},s.prototype.c=function(e,t,r){var i,s;return e.start_context=n.shallow_clone(r),i="integer"===e.type?e.value:this.pluck("integer",e.value).value,s=this.validate_ref(e.start_context.translations,{b:r.b,c:i}),!s.valid&&s.messages.start_chapter_not_exist_in_single_chapter_book?this.v(e,t,r):(i=this.fix_start_zeroes(s,i)[0],e.passages=[{start:{b:r.b,c:i},end:{b:r.b,c:i},valid:s}],null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),t.push(e),r.c=i,this.reset_context(r,["v"]),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),[t,r])},s.prototype.c_psalm=function(e,t,n){var r;return e.original_type=e.type,e.original_value=e.value,e.type="bc",r=parseInt(this.books[e.value].value.match(/^\d+/)[0],10),e.value=[{type:"b",value:e.original_value,indices:e.indices},{type:"c",value:[{type:"integer",value:r,indices:e.indices}],indices:e.indices}],this.bc(e,t,n)},s.prototype.c_title=function(e,t,r){return e.start_context=n.shallow_clone(r),"Ps"!==r.b?this.c(e.value[0],t,r):(r=this.pluck("title",e.value),e.value[1]={type:"v",value:[{type:"integer",value:1,indices:r.indices}],indices:r.indices},e.original_type="c_title",e.type="cv",this.cv(e,t,e.start_context))},s.prototype.cv=function(e,t,r){var i,s,o;return e.start_context=n.shallow_clone(r),i=this.pluck("c",e.value).value,s=this.pluck("v",e.value).value,o=this.validate_ref(e.start_context.translations,{b:r.b,c:i,v:s}),s=this.fix_start_zeroes(o,i,s),i=s[0],s=s[1],e.passages=[{start:{b:r.b,c:i,v:s},end:{b:r.b,c:i,v:s},valid:o}],null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),t.push(e),r.c=i,r.v=s,null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),[t,r]},s.prototype.cb_range=function(e,t,n){var r,i,s;return e.original_type=e.type,e.type="range",i=e.value,r=i[0],s=i[1],i=i[2],e.original_value=[r,s,i],e.value=[{type:"bc",value:[r,s],indices:e.indices},i],i.indices[1]=e.indices[1],this.range(e,t,n)},s.prototype.cv_psalm=function(e,t,r){var i,s;return e.start_context=n.shallow_clone(r),e.original_type=e.type,s=e.original_value=e.value,i=s[0],s=s[1],e.type="bcv",i=this.c_psalm(i,[],e.start_context)[0][0],e.value=[i,s],this.bcv(e,t,r)},s.prototype.ff=function(e,t,r){return e.start_context=n.shallow_clone(r),e.value.push({type:"integer",indices:e.indices,value:999}),r=this.range(e,[],e.start_context),e=r[0][0],r=r[1],e.value.pop(),null!=e.passages[0].valid.end_verse_not_exist&&delete e.passages[0].valid.end_verse_not_exist,null!=e.passages[0].valid.end_chapter_not_exist&&delete e.passages[0].valid.end_chapter_not_exist,null!=e.passages[0].end.original_c&&delete e.passages[0].end.original_c,t.push(e),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),[t,r]},s.prototype.integer_title=function(e,t,r){return e.start_context=n.shallow_clone(r),"Ps"!==r.b?this.integer(e.value[0],t,r):(e.value[0]={type:"c",value:[e.value[0]],indices:[e.value[0].indices[0],e.value[0].indices[1]]},r=[e.indices[1]-5,e.indices[1]],e.value[1]={type:"v",value:[{type:"integer",value:1,indices:r}],indices:r},e.original_type="integer_title",e.type="cv",this.cv(e,t,e.start_context))},s.prototype.integer=function(e,t,n){return null!=n.v?this.v(e,t,n):this.c(e,t,n)},s.prototype.sequence=function(e,t,r){var i,s,o,u,a,f,l,c;e.start_context=n.shallow_clone(r),e.passages=[],l=e.value,o=0;for(a=l.length;o<a;o++){i=l[o],r=this.handle_array(i,[],r),i=r[0],i=i[0],r=r[1],c=i.passages,u=0;for(f=c.length;u<f;u++)s=c[u],null==s.type&&(s.type=i.type),null==s.absolute_indices&&(s.absolute_indices=i.absolute_indices),null!=i.start_context.translations&&(s.translations=i.start_context.translations),s.enclosed_absolute_indices="sequence_post_enclosed"===i.type?i.absolute_indices:[-1,-1],e.passages.push(s)}return null==e.absolute_indices&&(e.absolute_indices=0<e.passages.length&&"sequence"===e.type?[e.passages[0].absolute_indices[0],e.passages[e.passages.length-1].absolute_indices[1]]:this.get_absolute_indices(e.indices)),t.push(e),[t,r]},s.prototype.sequence_post_enclosed=function(e,t,n){return this.sequence(e,t,n)},s.prototype.v=function(e,t,r){var i,s,o;return s="integer"===e.type?e.value:this.pluck("integer",e.value).value,e.start_context=n.shallow_clone(r),i=null!=r.c?r.c:1,o=this.validate_ref(e.start_context.translations,{b:r.b,c:i,v:s}),s=this.fix_start_zeroes(o,0,s)[1],e.passages=[{start:{b:r.b,c:i,v:s},end:{b:r.b,c:i,v:s},valid:o}],null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),t.push(e),r.v=s,[t,r]},s.prototype.range=function(e,t,r){var i,s,o,u,a;e.start_context=n.shallow_clone(r),s=e.value,o=s[0],i=s[1];if("v"!==i.type||"bc"!==o.type&&"c"!==o.type||"verse"!==this.options.end_range_digits_strategy)return r=this.handle_obj(o,[],r),o=r[0][0],r=r[1],r=this.handle_obj(i,[],r),i=r[0][0],r=r[1],e.value=[o,i],e.indices=[o.indices[0],i.indices[1]],delete e.absolute_indices,u={b:o.passages[0].start.b,c:o.passages[0].start.c,v:o.passages[0].start.v,type:o.type},s={b:i.passages[0].end.b,c:i.passages[0].end.c,v:i.passages[0].end.v,type:i.type},i.passages[0].valid.messages.start_chapter_is_zero&&(s.c=0),i.passages[0].valid.messages.start_verse_is_zero&&(s.v=0),a=this.validate_ref(e.start_context.translations,u,s),a.valid?(i=this.range_handle_valid(a,e,o,u,i,s,t),o=i[0],i=i[1],o)?i:(null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),e.passages=[{start:u,end:s,valid:a}],null!=e.start_context.translations&&(e.passages[0].translations=e.start_context.translations),t.push(e),[t,r]):this.range_handle_invalid(a,e,o,u,i,s,t);return this.range_change_integer_end(e,t)},s.prototype.range_change_end=function(e,t,n){var r;return r=e.value[1],"integer"===r.type?(r.original_value=r.value,r.value=n):"v"===r.type?(r=this.pluck("integer",r.value),r.original_value=r.value,r.value=n):"cv"===r.type&&(r=this.pluck("c",r.value),r.original_value=r.value,r.value=n),this.handle_obj(e,t,e.start_context)},s.prototype.range_change_integer_end=function(e,t){var n,r;return n=e.value,r=n[0],n=n[1],e.original_type=e.type,e.original_value=[r,n],e.type="integer"===r.type?"cv":r.type+"v","integer"===r.type&&(e.value[0]={type:"c",value:[r],indices:r.indices}),"integer"===n.type&&(e.value[1]={type:"v",value:[n],indices:n.indices}),this.handle_obj(e,t,e.start_context)},s.prototype.range_change_cv_end=function(e,t){var r,i,s;return r=e.value,s=r[0],r=r[1],e.original_type=e.type,e.original_value=[s,r],e.type="sequence",i=r.value,r=i[0],i=i[1],r=n.shallow_clone(r),r.original_type=r.type,r.type="v",e.value=[[{type:"range",value:[s,r],indices:[s.indices[0],r.indices[1]]}],[i]],this.sequence(e,t,e.start_context)},s.prototype.range_validate=function(e,t,n,r){return e.messages.end_chapter_not_exist?(n.original_c=n.c,n.c=e.messages.end_chapter_not_exist,null!=n.v&&(n.v=this.validate_ref(r.start_context.translations,{b:n.b,c:n.c,v:999}).messages.end_verse_not_exist)):e.messages.end_verse_not_exist&&(n.original_v=n.v,n.v=e.messages.end_verse_not_exist),e.messages.end_verse_is_zero&&"allow"!==this.options.zero_verse_strategy&&(n.v=e.messages.end_verse_is_zero),e.messages.end_chapter_is_zero&&(n.c=e.messages.end_chapter_is_zero),e=this.fix_start_zeroes(e,t.c,t.v),t.c=e[0],t.v=e[1],!0},s.prototype.range_check_new_end=function(e,t,n,r){var i,s;return i=0,s=null,r.messages.end_chapter_before_start?s="c":r.messages.end_verse_before_start&&(s="v"),null!=s&&(i=this.range_get_new_end_value(t,n,r,s)),0<i&&(t={b:n.b,c:n.c,v:n.v},t[s]=i,e=this.validate_ref(e,t),e.valid||(i=0)),i},s.prototype.range_get_new_end_value=function(e,t,n,r){var i;return i=0,"c"===r&&n.messages.end_chapter_is_zero||"v"===r&&n.messages.end_verse_is_zero?i:(10<=e[r]&&10>t[r]&&e[r]-10*Math.floor(e[r]/10)<t[r]?i=t[r]+10*Math.floor(e[r]/10):100<=e[r]&&100>t[r]&&e[r]-100<t[r]&&(i=t[r]+100),i)},s.prototype.range_handle_valid=function(e,t,n,r,i,s,o){if(e.messages.end_chapter_not_exist&&"verse"===this.options.end_range_digits_strategy&&null==r.v&&("integer"===i.type||"v"===i.type))if(n="v"===i.type?this.pluck("integer",i.value):i.value,n=this.validate_ref(t.start_context.translations,{b:r.b,c:r.c,v:n}),n.valid)return[!0,this.range_change_integer_end(t,o)];return e.messages.end_chapter_not_exist&&"verse"===this.options.end_range_digits_strategy&&null!=r.v&&"cv"===i.type&&(n=this.validate_ref(t.start_context.translations,{b:s.b,c:r.c,v:s.c}),n.valid&&(n=this.validate_ref(t.start_context.translations,{b:s.b,c:r.c,v:s.v})),n.valid)?[!0,this.range_change_cv_end(t,o)]:(this.range_validate(e,r,s,t),[!1,null])},s.prototype.range_handle_invalid=function(e,t,n,r,i,s,o){if((e.messages.end_chapter_before_start||e.messages.end_verse_before_start)&&("integer"===i.type||"v"===i.type)||e.messages.end_chapter_before_start&&"cv"===i.type)if(e=this.range_check_new_end(t.start_context.translations,r,s,e),0<e)return this.range_change_end(t,o,e);if("verse"===this.options.end_range_digits_strategy&&void 0===r.v&&("integer"===i.type||"v"===i.type))if(e="v"===i.type?this.pluck("integer",i.value):i.value,r=this.validate_ref(t.start_context.translations,{b:r.b,c:r.c,v:e}),r.valid)return this.range_change_integer_end(t,o);return r=[t.type,"sequence"],t.original_type=r[0],t.type=r[1],n=[[n,i],[[n],[i]]],t.original_value=n[0],t.value=n[1],this.handle_obj(t,o,t.start_context)},s.prototype.translation_sequence=function(e,t,n){var r,i,s,o,u;i=[],i.push({translation:this.books[e.value[0].value].parsed}),u=e.value[1],s=0;for(o=u.length;s<o;s++)r=u[s],r=this.books[this.pluck("translation",r).value].parsed,null!=r&&i.push({translation:r});s=0;for(o=i.length;s<o;s++)r=i[s],null!=this.translations.aliases[r.translation]?(r.alias=this.translations.aliases[r.translation].alias,r.osis=this.translations.aliases[r.translation].osis):(r.alias="default",r.osis=r.translation.toUpperCase());if(0<t.length){s=0;for(r=o=u=t.length-1;0>=u?0>=o:0<=o;r=0>=u?++o:--o)if(null!=t[r].original_type&&(t[r].type=t[r].original_type),null!=t[r].original_value&&(t[r].value=t[r].original_value),"translation_sequence"===t[r].type){s=r+1;break}s<t.length&&(t[s].start_context.translations=i,n=this.handle_array(t.slice(s),[],t[s].start_context),n=n[1])}return null==e.absolute_indices&&(e.absolute_indices=this.get_absolute_indices(e.indices)),t.push(e),this.reset_context(n,["translations"]),[t,n]},s.prototype.pluck=function(e,t){var n,r,i;r=0;for(i=t.length;r<i;r++)if(n=t[r],null!=n.type&&n.type===e)return"c"===e||"v"===e?this.pluck("integer",n.value):n;return null},s.prototype.set_context_from_object=function(e,t,n){var r,i,s,o;o=[],i=0;for(s=t.length;i<s;i++)r=t[i],null!=n[r]&&o.push(e[r]=n[r]);return o},s.prototype.reset_context=function(e,t){var n,r,i,s;s=[],r=0;for(i=t.length;r<i;r++)n=t[r],s.push(delete e[n]);return s},s.prototype.fix_start_zeroes=function(e,t,n){return e.valid&&(e.messages.start_chapter_is_zero&&(t=e.messages.start_chapter_is_zero),e.messages.start_verse_is_zero&&"allow"!==this.options.zero_verse_strategy&&(n=e.messages.start_verse_is_zero)),[t,n]},s.prototype.calculate_indices=function(e,t){var n,r,i,s,o,u,a,f,l,c,h,p;a="book",r=[],i=0,t=parseInt(t,10),u=[e],p=["",""],f=0;for(c=p.length;f<c;f++){n=p[f],o=[],l=0;for(h=u.length;l<h;l++)s=u[l],o=o.concat(s.split(n));u=o}f=0;for(l=u.length;f<l;f++)s=u[f],a="book"===a?"rest":"book",o=s.length,0!==o&&("book"===a?(s=s.replace(/\/[a-z]$/,""),n=i+o,0<r.length&&r[r.length-1].index===t?r[r.length-1].end=n:r.push({start:i,end:n,index:t}),i+=o+2,t=this.books[s].start_index+this.books[s].value.length-i,r.push({start:n+1,end:n+1,index:t})):(n=i+o-1,0<r.length&&r[r.length-1].index===t?r[r.length-1].end=n:r.push({start:i,end:n,index:t}),i+=o));return r},s.prototype.get_absolute_indices=function(e){var t,n,r,i,s,o,u;r=e[0],e=e[1],t=i=null,u=this.indices,s=0;for(o=u.length;s<o;s++)if(n=u[s],null===i&&n.start<=r&&r<=n.end&&(i=r+n.index),n.start<=e&&e<=n.end){t=e+n.index+1;break}return[i,t]},s.prototype.validate_ref=function(e,t,n){var r,i;return e||(e=[{translation:"default",osis:"",alias:"default"}]),i=e[0],null==i?{valid:!1,messages:{translation_invalid:!0}}:(r={},null==i.alias&&(i.alias="default"),null==i.alias?{valid:!1,messages:{translation_invalid:!0}}:(null==this.translations.aliases[i.alias]&&(i.alias="default",r.translation_unknown=!0),r=this.validate_start_ref(i.alias,t,!0,r),e=r[0],r=r[1],n&&(t=this.validate_end_ref(i.alias,t,n,e,r),e=t[0],r=t[1]),{valid:e,messages:r}))},s.prototype.validate_start_ref=function(e,t,n,r){var i,s;"default"!==e&&null==(null!=(i=this.translations[e])?i.chapters[t.b]:void 0)&&this.promote_book_to_translation(t.b,e),i=null!=(null!=(s=this.translations[e])?s.order:void 0)?e:"default";if(null!=this.translations[i].order[t.b]){null==t.c&&(t.c=1),t.c=parseInt(t.c,10);if(isNaN(t.c))return r.start_chapter_not_numeric=!0,[!1,r];0===t.c&&(r.start_chapter_is_zero=1,"error"===this.options.zero_chapter_strategy?n=!1:t.c=1),0<t.c&&null!=this.translations[e].chapters[t.b][t.c-1]?null!=t.v&&(t.v=parseInt(t.v,10),isNaN(t.v)?(n=!1,r.start_verse_not_numeric=!0):0===t.v?(r.start_verse_is_zero=1,"error"===this.options.zero_verse_strategy?n=!1:"upgrade"===this.options.zero_verse_strategy&&(t.v=1)):t.v>this.translations[e].chapters[t.b][t.c-1]&&(n=!1,r.start_verse_not_exist=this.translations[e].chapters[t.b][t.c-1])):(n=!1,1!==t.c&&1===this.translations[e].chapters[t.b].length?r.start_chapter_not_exist_in_single_chapter_book=1:0<t.c&&(r.start_chapter_not_exist=this.translations[e].chapters[t.b].length))}else n=!1,r.start_book_not_exist=!0;return[n,r]},s.prototype.validate_end_ref=function(e,t,n,r,i){var s,o;return"default"!==e&&null==(null!=(s=this.translations[e])?s.chapters[n.b]:void 0)&&this.promote_book_to_translation(n.b,e),s=null!=(null!=(o=this.translations[e])?o.order:void 0)?e:"default",null!=n.c&&(n.c=parseInt(n.c,10)),null!=n.v&&(n.v=parseInt(n.v,10)),null!=n.c&&!isNaN(n.c)&&0===n.c&&(i.end_chapter_is_zero=1,"error"===this.options.zero_chapter_strategy?r=!1:n.c=1),null!=this.translations[s].order[n.b]?(null!=this.translations[s].order[t.b]&&this.translations[s].order[t.b]>this.translations[s].order[n.b]&&(r=!1,i.end_book_before_start=!0),t.b===n.b&&null!=n.c&&!isNaN(n.c)&&(null==t.c&&(t.c=1),!isNaN(parseInt(t.c,10))&&t.c>n.c?(r=!1,i.end_chapter_before_start=!0):t.c===n.c&&null!=n.v&&!isNaN(n.v)&&(null==t.v&&(t.v=1),!isNaN(parseInt(t.v,10))&&t.v>n.v&&(r=!1,i.end_verse_before_start=!0))),null!=n.c&&!isNaN(n.c)&&null==this.translations[e].chapters[n.b][n.c-1]&&(1===this.translations[e].chapters[n.b].length?i.end_chapter_not_exist_in_single_chapter_book=1:0<n.c&&(i.end_chapter_not_exist=this.translations[e].chapters[n.b].length)),null!=n.v&&!isNaN(n.v)&&(null==n.c&&(n.c=this.translations[e].chapters[n.b].length),n.v>this.translations[e].chapters[n.b][n.c-1]?i.end_verse_not_exist=this.translations[e].chapters[n.b][n.c-1]:0===n.v&&(i.end_verse_is_zero=1,"error"===this.options.zero_verse_strategy?r=!1:"upgrade"===this.options.zero_verse_strategy&&(n.v=1)))):(r=!1,i.end_book_not_exist=!0),null!=n.c&&isNaN(n.c)&&(r=!1,i.end_chapter_not_numeric=!0),null!=n.v&&isNaN(n.v)&&(r=!1,i.end_verse_not_numeric=!0),[r,i]},s.prototype.promote_book_to_translation=function(e,t){var r,i,s;return null==(r=this.translations)[t]&&(r[t]={}),null==(r=this.translations[t]).chapters&&(r.chapters={}),null!=(null!=(i=this.translations.alternates[t])?null!=(s=i.chapters)?s[e]:void 0:void 0)?this.translations[t].chapters[e]=this.translations.alternates[t].chapters[e]:this.translations[t].chapters[e]=n.shallow_clone_array(this.translations["default"].chapters[e])},t=s,n={shallow_clone:function(e){var t,n,i;if(null==e)return e;n={};for(t in e)r.call(e,t)&&(i=e[t],n[t]=i);return n},shallow_clone_array:function(e){var t,n,r,i;if(null==e)return e;n=[],t=r=0;for(i=e.length;0<=i?r<=i:r>=i;t=0<=i?++r:--r)"undefined"!=typeof e[t]&&(n[t]=e[t]);return n}},e.prototype.regexps.translations=/(?:AMP|ASV|CE[BV]|E[RS]V|HCSB|N?KJV|MSG|NAB(?:RE)?|NASB?|NIR?V|NLT|N?RSV|TNIV)\b/gi,e.prototype.translations={aliases:{ceb:{osis:"CEB",alias:"ceb"},kjv:{osis:"KJV",alias:"kjv"},nab:{osis:"NAB",alias:"nab"},nas:{osis:"NASB",alias:"default"},nirv:{osis:"NIrV",alias:"kjv"},niv:{osis:"NIV",alias:"kjv"},nkjv:{osis:"NKJV",alias:"nkjv"},nlt:{osis:"NLT",alias:"nlt"},nrsv:{osis:"NRSV",alias:"nrsv"},"default":{osis:"",alias:"default"}},"default":{order:{Gen:1,Exod:2,Lev:3,Num:4,Deut:5,Josh:6,Judg:7,Ruth:8,"1Sam":9,"2Sam":10,"1Kgs":11,"2Kgs":12,"1Chr":13,"2Chr":14,Ezra:15,Neh:16,Esth:17,Job:18,Ps:19,Prov:20,Eccl:21,Song:22,Isa:23,Jer:24,Lam:25,Ezek:26,Dan:27,Hos:28,Joel:29,Amos:30,Obad:31,Jonah:32,Mic:33,Nah:34,Hab:35,Zeph:36,Hag:37,Zech:38,Mal:39,Matt:40,Mark:41,Luke:42,John:43,Acts:44,Rom:45,"1Cor":46,"2Cor":47,Gal:48,Eph:49,Phil:50,Col:51,"1Thess":52,"2Thess":53,"1Tim":54,"2Tim":55,Titus:56,Phlm:57,Heb:58,Jas:59,"1Pet":60,"2Pet":61,"1John":62,"2John":63,"3John":64,Jude:65,Rev:66,Tob:67,Jdt:68,GkEsth:69,Wis:70,Sir:71,Bar:72,PrAzar:73,Sus:74,Bel:75,SgThree:76,EpJer:77,"1Macc":78,"2Macc":79,"3Macc":80,"4Macc":81,"1Esd":82,"2Esd":83,PrMan:84,Ps151:85},chapters:{Gen:[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,55,32,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],Exod:[22,25,22,31,23,30,25,32,35,29,10,51,22,31,27,36,16,27,25,26,36,31,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],Lev:[17,16,17,35,19,30,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],Num:[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,50,13,32,22,29,35,41,30,25,18,65,23,31,40,16,54,42,56,29,34,13],Deut:[46,37,29,49,33,25,26,20,29,22,32,32,18,29,23,22,20,22,21,20,23,30,25,22,19,19,26,68,29,20,30,52,29,12],Josh:[18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33],Judg:[36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25],Ruth:[22,23,18,22],"1Sam":[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,15,23,29,22,44,25,12,25,11,31,13],"2Sam":[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,33,43,26,22,51,39,25],"1Kgs":[53,46,28,34,18,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,53],"2Kgs":[18,25,27,44,27,33,20,29,37,36,21,21,25,29,38,20,41,37,37,21,26,20,37,20,30],"1Chr":[54,55,24,43,26,81,40,40,44,14,47,40,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],"2Chr":[17,18,17,22,14,42,22,18,31,19,23,16,22,15,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],Ezra:[11,70,13,24,17,22,28,36,15,44],Neh:[11,20,32,23,19,19,73,18,38,39,36,47,31],Esth:[22,23,15,17,14,14,10,17,32,3],Job:[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,24,34,17],Ps:[6,12,8,8,12,10,17,9,20,18,7,8,6,7,5,11,15,50,14,9,13,31,6,10,22,12,14,9,11,12,24,11,22,22,28,12,40,22,13,17,13,11,5,26,17,11,9,14,20,23,19,9,6,7,23,13,11,11,17,12,8,12,11,10,13,20,7,35,36,5,24,20,28,23,10,12,20,72,13,19,16,8,18,12,13,17,7,18,52,17,16,15,5,23,11,13,12,9,9,5,8,28,22,35,45,48,43,13,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,13,10,7,12,15,21,10,20,14,9,6],Prov:[33,22,35,27,23,35,27,36,18,32,31,28,25,35,33,33,28,24,29,30,31,29,35,34,28,28,27,28,27,33,31],Eccl:[18,26,22,16,20,12,29,17,18,20,10,14],Song:[17,17,11,16,16,13,13,14],Isa:[31,22,26,6,30,13,25,22,21,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,12,25,24],Jer:[19,37,25,31,31,30,34,22,26,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],Lam:[22,22,66,22,22],Ezek:[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,49,32,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],Dan:[21,49,30,37,31,28,28,27,27,21,45,13],Hos:[11,23,5,19,15,11,16,14,17,15,12,14,16,9],Joel:[20,32,21],Amos:[15,16,15,13,27,14,17,14,15],Obad:[21],Jonah:[17,10,10,11],Mic:[16,13,12,13,15,16,20],Nah:[15,13,19],Hab:[17,20,19],Zeph:[18,15,20],Hag:[15,23],Zech:[21,13,10,14,11,15,14,23,17,12,17,14,9,21],Mal:[14,17,18,6],Matt:[25,23,17,25,48,34,29,34,38,42,30,50,58,36,39,28,27,35,30,34,46,46,39,51,46,75,66,20],Mark:[45,28,35,41,43,56,37,38,50,52,33,44,37,72,47,20],Luke:[80,52,38,44,39,49,50,56,62,42,54,59,35,35,32,31,37,43,48,47,38,71,56,53],John:[51,25,36,54,47,71,53,59,41,42,57,50,38,31,27,33,26,40,42,31,25],Acts:[26,47,26,37,42,15,60,40,43,48,30,25,52,28,41,40,34,28,41,38,40,30,35,27,27,32,44,31],Rom:[32,29,31,25,21,23,25,39,33,21,36,21,14,23,33,27],"1Cor":[31,16,23,21,13,20,40,13,27,33,34,31,13,40,58,24],"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,14],Gal:[24,21,29,31,26,18],Eph:[23,22,21,32,33,24],Phil:[30,30,21,23],Col:[29,23,25,18],"1Thess":[10,20,13,18,28],"2Thess":[12,17,18],"1Tim":[20,15,16,16,25,21],"2Tim":[18,26,17,22],Titus:[16,15,15],Phlm:[25],Heb:[14,18,19,16,14,20,28,13,28,39,40,29,25],Jas:[27,26,18,17,20],"1Pet":[25,25,22,19,14],"2Pet":[21,22,18],"1John":[10,29,24,21,21],"2John":[13],"3John":[15],Jude:[25],Rev:[20,29,22,11,14,17,17,13,21,11,19,17,18,20,8,21,18,24,21,15,27,21],Tob:[22,14,17,21,22,18,16,21,6,13,18,22,17,15],Jdt:[16,28,10,15,24,21,32,36,14,23,23,20,20,19,14,25],GkEsth:[22,23,15,17,14,14,10,17,32,13,12,6,18,19,16,24],Wis:[16,24,19,20,23,25,30,21,18,21,26,27,19,31,19,29,21,25,22],Sir:[30,18,31,31,15,37,36,19,18,31,34,18,26,27,20,30,32,33,30,31,28,27,27,34,26,29,30,26,28,25,31,24,33,31,26,31,31,34,35,30,22,25,33,23,26,20,25,25,16,29,30],Bar:[22,35,37,37,9],PrAzar:[68],Sus:[64],Bel:[42],SgThree:[39],EpJer:[73],"1Macc":[64,70,60,61,68,63,50,32,73,89,74,53,53,49,41,24],"2Macc":[36,32,40,50,27,31,42,36,29,38,38,45,26,46,39],"3Macc":[29,33,30,21,51,41,23],"4Macc":[35,24,21,26,38,35,23,29,32,21,27,19,27,20,32,25,24,24],"1Esd":[58,30,24,63,73,34,15,96,55],"2Esd":[40,48,36,52,56,59,70,63,47,59,46,51,58,48,63,78],PrMan:[15],Ps151:[7]}},alternates:{ceb:{chapters:{"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,13],Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21],Tob:[22,14,17,21,22,18,16,21,6,13,18,22,18,15],PrAzar:[67],EpJer:[72],"1Esd":[55,26,24,63,71,33,15,92,55]}},kjv:{chapters:{"3John":[14]}},nab:{chapters:{Gen:[31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,54,33,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26],Exod:[22,25,22,31,23,30,29,28,35,29,10,51,22,31,27,36,16,27,25,26,37,30,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38],Lev:[17,16,17,35,26,23,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34],Num:[54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,35,28,32,22,29,35,41,30,25,19,65,23,31,39,17,54,42,56,29,34,13],Deut:[46,37,29,49,33,25,26,20,29,22,32,31,19,29,23,22,20,22,21,20,23,29,26,22,19,19,26,69,28,20,30,52,29,12],"1Sam":[28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,16,23,28,23,44,25,12,25,11,31,13],"2Sam":[27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,32,44,26,22,51,39,25],"1Kgs":[53,46,28,20,32,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,54],"2Kgs":[18,25,27,44,27,33,20,29,37,36,20,22,25,29,38,20,41,37,37,21,26,20,37,20,30],"1Chr":[54,55,24,43,41,66,40,40,44,14,47,41,14,17,29,43,27,17,19,8,30,19,32,31,31,32,34,21,30],"2Chr":[18,17,17,22,14,42,22,18,31,19,23,16,23,14,19,14,19,34,11,37,20,12,21,27,28,23,9,27,36,27,21,33,25,33,27,23],Neh:[11,20,38,17,19,19,72,18,37,40,36,47,31],Job:[22,13,26,21,27,30,21,22,35,22,20,25,28,22,35,22,16,21,29,29,34,30,17,25,6,14,23,28,25,31,40,22,33,37,16,33,24,41,30,32,26,17],Ps:[6,11,9,9,13,11,18,10,21,18,7,9,6,7,5,11,15,51,15,10,14,32,6,10,22,12,14,9,11,13,25,11,22,23,28,13,40,23,14,18,14,12,5,27,18,12,10,15,21,23,21,11,7,9,24,14,12,12,18,14,9,13,12,11,14,20,8,36,37,6,24,20,28,23,11,13,21,72,13,20,17,8,19,13,14,17,7,19,53,17,16,16,5,23,11,13,12,9,9,5,8,29,22,35,45,48,43,14,31,7,10,10,9,8,18,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,14,10,8,12,15,21,10,20,14,9,6],Eccl:[18,26,22,17,19,12,29,17,18,20,10,14],Song:[17,17,11,16,16,12,14,14],Isa:[31,22,26,6,30,13,25,23,20,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,11,25,24],Jer:[19,37,25,31,31,30,34,23,25,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34],Ezek:[28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,44,37,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35],Dan:[21,49,100,34,30,29,28,27,27,21,45,13,64,42],Hos:[9,25,5,19,15,11,16,14,17,15,11,15,15,10],Joel:[20,27,5,21],Jonah:[16,11,10,11],Mic:[16,13,12,14,14,16,20],Nah:[14,14,19],Zech:[17,17,10,14,11,15,14,23,17,12,17,14,9,21],Mal:[14,17,24],Acts:[26,47,26,37,42,15,60,40,43,49,30,25,52,28,41,40,34,28,40,38,40,30,35,27,27,32,44,31],"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,13],Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21],Tob:[22,14,17,21,22,18,17,21,6,13,18,22,18,15],Sir:[30,18,31,31,15,37,36,19,18,31,34,18,26,27,20,30,32,33,30,31,28,27,27,33,26,29,30,26,28,25,31,24,33,31,26,31,31,34,35,30,22,25,33,23,26,20,25,25,16,29,30],Bar:[22,35,38,37,9,72],"2Macc":[36,32,40,50,27,31,42,36,29,38,38,46,26,46,39]}},nlt:{chapters:{Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21]}},nrsv:{chapters:{"2Cor":[24,17,18,18,21,18,16,24,15,18,33,21,13],Rev:[20,29,22,11,14,17,17,13,21,11,19,18,18,20,8,21,18,24,21,15,27,21]}},vulgate:{chapters:{Ps:[6,13,9,10,13,11,18,10,39,8,9,6,7,5,10,15,51,15,10,14,32,6,10,22,12,14,9,11,13,25,11,22,23,28,13,40,23,14,18,14,12,5,26,18,12,10,15,21,23,21,11,7,9,24,13,12,12,18,14,9,13,12,11,14,20,8,36,37,6,24,20,28,23,11,13,21,72,13,20,17,8,19,13,14,17,7,19,53,17,16,16,5,23,11,13,12,9,9,5,8,29,22,35,45,48,43,14,31,7,10,10,9,26,9,19,2,29,176,7,8,9,4,8,5,6,5,6,8,8,3,18,3,3,21,26,9,8,24,14,10,8,12,15,21,10,11,20,14,9,7]}}}},e.prototype.regexps.escaped_passage=/(?:^|[^\w\x1f\x1e])((?:(?:ch(?:apters?|a?pts?\.?|a?p?s?\.?)?\s*\d+\s*(?:[\u2013\u2014\-]|through|thru|to)\s*\d+\s*(?:from|of|in)(?:\s+the\s+book\s+of)?\s*)|(?:ch(?:apters?|a?pts?\.?|a?p?s?\.?)?\s*\d+\s*(?:from|of|in)(?:\s+the\s+book\s+of)?\s*)|(?:\d+(?:th|nd|st)\s*ch(?:apter|a?pt\.?|a?p?\.?)?\s*(?:from|of|in)(?:\s+the\s+book\s+of)?\s*))?\x1f(\d+)(?:\/[a-z])?\x1f(?:c(?:f|ompare|h(?:apters?|a?pts?|a?p?s?))|a(?:nd|lso)|\/[pq]\x1f|[\d.:,;\x1e\x1f&\(\)\[\]\/"'\*=~\-\u2013\u2014\s\xa0]|[a-e](?!\w)|ff?\b|see|title(?![a-z])|thr(?:ough|u)|to|v(?:erses?|er|ss?|v)?|$)+)/gi,e.prototype.regexps.match_end_split=/\d+\W*title|\d+\W*ff?(?:[\s\xa0*]*\.)?|\d+[\s\xa0*]*[a-e](?!\w)|\x1e(?:[\s\xa0*]*[)\]])?|[\d\x1f]+/gi,e.prototype.regexps.space="[\\s\\xa0]",e.prototype.regexps.control=/[\x1e\x1f]/g,e.prototype.regexps.first="(?:1st|1|I|First)\\.?"+e.prototype.regexps.space+"*",e.prototype.regexps.second="(?:2nd|2|II|Second)\\.?"+e.prototype.regexps.space+"*",e.prototype.regexps.third="(?:3rd|3|III|Third)\\.?"+e.prototype.regexps.space+"*",e.prototype.regexps.fourth="(?:4th|4|IV|Fourth)\\.?"+e.prototype.regexps.space+"*",e.prototype.regexps.gospel="(?:(?:The[.\\s\\xa0-]*)?Gospel[.\\s\\xa0-]?(?:of[.\\s\\xa0-]*|according[\\s\\xa0-]*?to[.\\s\\xa0-]*)(?:[.\\s\\xa0-]*?(?:Saint|St)[.\\s\\xa0-]*)?|(?:(?:Saint|St)[.\\s\\xa0-]*))?",e.prototype.regexps.range_and="(?:[&–—-]|and|through|to)",e.prototype.regexps.range_only="(?:[–—-]|through|to)",e.prototype.regexps.get_books=function(t,n){var r,i,s,o,u;i=[{osis:["Gen"],regexp:/(\d|\b)(Ge(?:nn?[ei][ei]?s[eiu]s|nn?[es]is|nes[ei]|n)|G[en])(?:\b|(?=\d))/gi},{osis:["Exod"],regexp:/(\d|\b)(Ex(?:od[ui]s|od[se]|od|[do]?))(?:\b|(?=\d))/gi},{osis:["Lev"],regexp:/(\d|\b)(L(?:[ei]v[ei]t[ei]?cus|evi|ev|[ev]))(?:\b|(?=\d))/gi},{osis:["Num"],regexp:/(\d|\b)(N(?:umbers?|umb?|[um]))(?:\b|(?=\d))/gi},{osis:["Deut"],regexp:/(\d|\b)(D(?:eut[eo]?rono?my|ueteronomy|eut?|uet|t))(?:\b|(?=\d))/gi},{osis:["Josh"],regexp:/(\d|\b)(J(?:ou?sh?ua|o?sh|os))(?:\b|(?=\d))/gi},{osis:["Judg"],regexp:/(\d|\b)(J(?:udges|udg|d?gs?))(?:\b|(?=\d))/gi},{osis:["Ruth"],regexp:/(\d|\b)(R(?:uth?|th|u))(?:\b|(?=\d))/gi},{osis:["Isa"],regexp:/(\d|\b)(I(?:saiah|sais?ha?|s[ai]{2,}ha?|s[is]ah|sa[hi]?|sa?|a))(?:\b|(?=\d))/gi},{osis:["2Sam"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"(?:Samu[ae]l[ls]?|Sam|Sma|S[am]|Kingdoms)|2"+e.prototype.regexps.space+"*S)(?:\\b|(?=\\d))","gi")},{osis:["1Sam"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?Samu[ae]l[ls]?|"+e.prototype.regexps.first+"(?:Sam|Sma|S[am]|Kingdoms)|1"+e.prototype.regexps.space+"*S)(?:\\b|(?=\\d))","gi")},{osis:["2Kgs"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"Ki?n?g?s?|"+e.prototype.regexps.fourth+"Kingdoms)(?:\\b|(?=\\d))","gi")},{osis:["1Kgs"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?K(?:i?ngs|in|gs)|"+e.prototype.regexps.first+"Ki?n?g?s?|"+e.prototype.regexps.third+"Kingdoms)(?:\\b|(?=\\d))","gi")},{osis:["2Chr"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"(?:Ch?o?ron[io]cles?|Chronicals|Chro?n?|Cron|Paralipomenon)|2"+e.prototype.regexps.space+"*Ch)(?:\\b|(?=\\d))","gi")},{osis:["1Chr"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?(?:Ch?o?ron[io]cles?|Chronicals|Paralipomenon)|"+e.prototype.regexps.first+"(?:Chro?n?|Cron)|1"+e.prototype.regexps.space+"*Ch)(?:\\b|(?=\\d))","gi")},{osis:["Ezra"],regexp:/(\d|\b)(E(?:zra?|sra))(?:\b|(?=\d))/gi},{osis:["Neh"],regexp:/(\d|\b)(N(?:eh[ei]m[ai]{1,3}h|eh?))(?:\b|(?=\d))/gi},{osis:["GkEsth"],apocrypha:!0,regexp:RegExp("(\\d|\\b)(Greek"+e.prototype.regexps.space+"*Esther|Esther"+e.prototype.regexps.space+"*\\(Greek\\)|G(?:ree)?k"+e.prototype.regexps.space+"*Esth?)(?:\\b|(?=\\d))","gi")},{osis:["Esth"],regexp:/(\d|\b)(E(?:sth?er|sth?|s))(?:\b|(?=\d))/gi},{osis:["Job"],regexp:/(\d|\b)(Jo?b)(?:\b|(?=\d))/gi},{osis:["Ps"],extra:"p",regexp:RegExp("(\\b)((?:(?:(?:1[02-5]|[2-9])?(?:1"+e.prototype.regexps.space+"*st|2"+e.prototype.regexps.space+"*nd|3"+e.prototype.regexps.space+"*rd))|1?1[123]"+e.prototype.regexps.space+"*th|(?:150|1[0-4][04-9]|[1-9][04-9]|[4-9])"+e.prototype.regexps.space+"*th)"+e.prototype.regexps.space+"*Psalm)\\b","gi")},{osis:["Ps"],apocrypha:!0,extra:"q",regexp:/(\b)(Ps151)(?=\.1)/g},{osis:["Ps"],regexp:/(\d|\b)(P(?:s[alm]{2,4}s?|a[slm]{3,4}s?|l[sam]{2,4}s?|s[as]?m?))(?:\b|(?=\d))/gi},{osis:["Prov"],regexp:/(\d|\b)(P(?:r[eo]?verbs?|robv?erbs|or?verbs|rovebs|rvbs?|ro?v?|v)|Oroverbs)(?:\b|(?=\d))/gi},{osis:["Eccl"],regexp:/(\d|\b)(E(?:cc?less?[ia]{1,4}s?tes?|cclesiastic?es|ccles|ccl?|cl?))(?:\b|(?=\d))/gi},{osis:["SgThree"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+e.prototype.regexps.space+"*)?Song"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*(?:the"+e.prototype.regexps.space+"*)?(?:3|Three)"+e.prototype.regexps.space+"*(?:Holy"+e.prototype.regexps.space+"*Children|Young"+e.prototype.regexps.space+"*Men|Youths|Jews)|S\\.?"+e.prototype.regexps.space+"*(?:of)?"+e.prototype.regexps.space+"*(?:Three|Th|3)\\.?"+e.prototype.regexps.space+"*(?:Ch|Y)|So?n?gThree)(?:\\b|(?=\\d))","gi")},{osis:["Song"],regexp:RegExp("(\\d|\\b)((?:The"+e.prototype.regexps.space+"*)?Songs?"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*(?:S[ao]lom[ao]ns?|Songs?)|(?:S(?:n?gs?|ongs?|"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*S|o?S|o[ln]?)))(?:\\b|(?=\\d))","gi")},{osis:["EpJer"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+e.prototype.regexps.space+"*)?(?:Ep(?:istle)?|Let(?:ter))\\.?"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*Jeremiah|EpJer)(?:\\b|(?=\\d))","gi")},{osis:["Jer"],regexp:/(\d|\b)(Jer(?:emaiah|[ae]maih|[ae]miha|[aei]mi[ai]h|[ei]mi?ah|[ai]mih|[ae]mia|[am][im]ah|emi[he]?|e?)|J[er])(?:\b|(?=\d))/gi},{osis:["Lam"],regexp:/(\d|\b)(L(?:am[ei]ntations?|am?|m))(?:\b|(?=\d))/gi},{osis:["Ezek"],regexp:/(\d|\b)(E(?:[zx][ei]{1,2}ki?el|zekial|zek|z[ek]))(?:\b|(?=\d))/gi},{osis:["Dan"],regexp:/(\d|\b)(D(?:aniel|a?n|[al]))(?:\b|(?=\d))/gi},{osis:["Hos"],regexp:/(\d|\b)(H(?:osea|o?s|os?))(?:\b|(?=\d))/gi},{osis:["Joel"],regexp:/(\d|\b)(J(?:oel?|l))(?:\b|(?=\d))/gi},{osis:["Amos"],regexp:/(\d|\b)(Amo?s?)(?:\b|(?=\d))/gi},{osis:["Obad"],regexp:/(\d|\b)(O(?:badiah?|bidah|ba?d?))(?:\b|(?=\d))/gi},{osis:["Jonah"],regexp:/(\d|\b)(J(?:onah|on|nh))(?:\b|(?=\d))/gi},{osis:["Mic"],regexp:/(\d|\b)(M(?:ich?ah?|ic?))(?:\b|(?=\d))/gi},{osis:["Nah"],regexp:/(\d|\b)(N(?:ahum?|ah?))(?:\b|(?=\d))/gi},{osis:["Hab"],regexp:/(\d|\b)(H(?:abb?akk?[au]kk?|abk?))(?:\b|(?=\d))/gi},{osis:["Zeph"],regexp:/(\d|\b)(Z(?:ephana?iah?|e?ph?))(?:\b|(?=\d))/gi},{osis:["Hag"],regexp:/(\d|\b)(H(?:agg?ai|aggia[ih]|a?gg?))(?:\b|(?=\d))/gi},{osis:["Zech"],regexp:/(\d|\b)(Z(?:[ae]ch[ae]r[ai]{1,2}h|ach?|e?ch?))(?:\b|(?=\d))/gi},{osis:["Mal"],regexp:/(\d|\b)(M(?:alachi?|alichi|alaci|al))(?:\b|(?=\d))/gi},{osis:["Matt"],regexp:RegExp("(\\d|\\b)("+e.prototype.regexps.gospel+"M(?:at[th]{1,3}i?ew|atthwe|a?tt?))(?:\\b|(?=\\d))","gi")},{osis:["Mark"],regexp:RegExp("(\\d|\\b)("+e.prototype.regexps.gospel+"M(?:a?rk?|k))(?:\\b|(?=\\d))","gi")},{osis:["Luke"],regexp:RegExp("(\\d|\\b)("+e.prototype.regexps.gospel+"L(?:uke?|[uk]))(?:\\b|(?=\\d))","gi")},{osis:["1John"],regexp:RegExp("(\\b)("+e.prototype.regexps.first+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|o[hn]?|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["2John"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|o[hn]?|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["3John"],regexp:RegExp("(\\b)("+e.prototype.regexps.third+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|o[hn]?|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["John"],regexp:RegExp("([04-9]|\\b)("+e.prototype.regexps.gospel+"J(?:o?phn|[ho][ho]n|onh|ohm|hn|oh|[hn]))(?:\\b|(?=\\d))","gi")},{osis:["Acts"],regexp:RegExp("(\\d|\\b)(A(?:cts"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*the"+e.prototype.regexps.space+"*Apostles|cts*|ct?))(?:\\b|(?=\\d))","gi")},{osis:["Rom"],regexp:/(\d|\b)(R(?:omans?|pmans|oamns|omands|omasn|om?s?|mn?s?))(?:\b|(?=\d))/gi},{osis:["2Cor"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"C(?:h?orr?[in]{1,3}th[aio]{1,3}ns|orin[ai]?th[ai]{1,3}n[aio]{0,3}s|orinti[ao]ns|orinthian|orthians?|orint?h?|orth|or?))(?:\\b|(?=\\d))","gi")},{osis:["1Cor"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?C(?:h?orr?[in]{1,3}th[aio]{1,3}ns|orin[ai]?th[ai]{1,3}n[aio]{0,3}s|orinti[ao]ns)|"+e.prototype.regexps.first+"C(?:orinthian|orthians?|orint?h?|orth|or?))(?:\\b|(?=\\d))","gi")},{osis:["Gal"],regexp:/(\d|\b)(G(?:alatians?|all?at[aino]{1,4}s|alat?|al?|l))(?:\b|(?=\d))/gi},{osis:["Eph"],regexp:/(\d|\b)(E(?:phesians?|phi?sians?|phesains?|sphesians|pehesians|h?pesians|phesiand|phesions|alat?|phe?s?|ph?|hp))(?:\b|(?=\d))/gi},{osis:["Phil"],regexp:/(\d|\b)(P(?:hil{1,}i?p{1,}[aei]{1,3}ns?|hi?li?p{0,2}|hil?|hp))(?:\b|(?=\d))/gi},{osis:["Col"],regexp:/(\d|\b)(C(?:[ao]ll?[ao]ss?i[ao]ns|olossi?ans?|ol?))(?:\b|(?=\d))/gi},{osis:["2Thess"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"T(?:hess?[aeo]lon[ieaoc]{1,4}ns?|he?s{1,3}|h))(?:\\b|(?=\\d))","gi")},{osis:["1Thess"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?Thess?[aeo]lon[ieaoc]{1,4}ns?|"+e.prototype.regexps.first+"T(?:he?s{1,3}|h))(?:\\b|(?=\\d))","gi")},{osis:["2Tim"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"T(?:imothy?|himoth?y|omothy|imoty|im?|m))(?:\\b|(?=\\d))","gi")},{osis:["1Tim"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?Timothy?|"+e.prototype.regexps.first+"T(?:himoth?y|omothy|imoty|im?|m))(?:\\b|(?=\\d))","gi")},{osis:["Titus"],regexp:/(\d|\b)(T(?:itus|it?))(?:\b|(?=\d))/gi},{osis:["Phlm"],regexp:/(\d|\b)(Ph(?:ilemon|l?mn?|ilem?))(?:\b|(?=\d))/gi},{osis:["Heb"],regexp:/(\d|\b)(H(?:eb[rew]{1,3}s|[ew]{0,2}brew{1,2}s|ebrew|eb))(?:\b|(?=\d))/gi},{osis:["Jas"],regexp:/(\d|\b)(J(?:ames?|a[ms]?|ms?))(?:\b|(?=\d))/gi},{osis:["2Pet"],regexp:RegExp("(\\b)("+e.prototype.regexps.second+"P(?:eter?|e?t?r?))(?:\\b|(?=\\d))","gi")},{osis:["1Pet"],regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?Peter|"+e.prototype.regexps.first+"P(?:eter?|e?t?r?))(?:\\b|(?=\\d))","gi")},{osis:["Jude"],regexp:/(\d|\b)(Ju?de)(?:\b|(?=\d))/gi},{osis:["Rev"],regexp:/(\d|\b)(R(?:ev[aeo]?lations?|evel|e?v|e))(?:\b|(?=\d))/gi},{osis:["Tob"],apocrypha:!0,regexp:/(\d|\b)(Tobi?t?|Tb)(?:\b|(?=\d))/gi},{osis:["Jdt"],apocrypha:!0,regexp:/(\d|\b)(Ju?di?th?)(?:\b|(?=\d))/gi},{osis:["Wis"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+e.prototype.regexps.space+"*)Wisd?(?:om)?"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*Solomon|Wisdom|Wisd?)(?:\\b|(?=\\d))","gi")},{osis:["Sir"],apocrypha:!0,regexp:RegExp("(\\d|\\b)(Sirach|Ben"+e.prototype.regexps.space+"*Sira|Sir|Eccl[eu]siasticus|Ecclus|Eccs|(?:The"+e.prototype.regexps.space+"*)Wisdom"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*Jesus"+e.prototype.regexps.space+"*(?:Son"+e.prototype.regexps.space+"*of|ben)"+e.prototype.regexps.space+"*Sirach)(?:\\b|(?=\\d))","gi")},{osis:["Bar"],apocrypha:!0,regexp:/(\d|\b)(Baruch|Bar)(?:\b|(?=\d))/gi},{osis:["PrAzar"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:The"+e.prototype.regexps.space+"*)?Pr(?:ayers?)?"+e.prototype.regexps.space+"*of"+e.prototype.regexps.space+"*Azariah?|Azariah?|PrAza?r)(?:\\b|(?=\\d))","gi")},{osis:["Sus"],apocrypha:!0,regexp:/(\d|\b)(Susannah?|Shoshana|Sus)(?:\b|(?=\d))/gi},{osis:["Bel"],apocrypha:!0,regexp:RegExp("(\\d|\\b)(Bel"+e.prototype.regexps.space+"*(?:and|&)"+e.prototype.regexps.space+"*(?:the"+e.prototype.regexps.space+"*)?(?:Dragon|Serpent|Snake)|Bel)(?:\\b|(?=\\d))","gi")},{osis:["2Macc"],apocrypha:!0,regexp:RegExp("(\\b)("+e.prototype.regexps.second+"Mac{1,3}(?:ab{1,3}e{1,3}s?)?|2"+e.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["3Macc"],apocrypha:!0,regexp:RegExp("(\\b)("+e.prototype.regexps.third+"Mac{1,3}(?:ab{1,3}e{1,3}s?)?|3"+e.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["4Macc"],apocrypha:!0,regexp:RegExp("(\\b)("+e.prototype.regexps.fourth+e.prototype.regexps.space+"*Mac{1,3}(?:ab{1,3}e{1,3}s?)?|4"+e.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["1Macc"],apocrypha:!0,regexp:RegExp("(\\b)((?:"+e.prototype.regexps.first+")?Mac{1,3}ab{1,3}e{1,3}s?|"+e.prototype.regexps.first+"Mac{1,3}|1"+e.prototype.regexps.space+"*Mc)(?:\\b|(?=\\d))","gi")},{osis:["1Esd"],apocrypha:!0,regexp:RegExp("(\\b)("+e.prototype.regexps.first+"Esdras|1"+e.prototype.regexps.space+"*Esdr?)(?:\\b|(?=\\d))","gi")},{osis:["2Esd"],apocrypha:!0,regexp:RegExp("(\\b)("+e.prototype.regexps.second+"Esdras|2"+e.prototype.regexps.space+"*Esdr?)(?:\\b|(?=\\d))","gi")},{osis:["PrMan"],apocrypha:!0,regexp:RegExp("(\\d|\\b)((?:(?:The"+e.prototype.regexps.space+"*)Pr(?:ayers?)?"+e.prototype.regexps.space+"*(?:of"+e.prototype.regexps.space+"*)?M[ae]n{1,2}[ae]s{1,2}[ae]h)|PrMan)(?:\\b|(?=\\d))","gi")},{osis:["Ezek","Ezra"],regexp:/(\d|\b)(Ez)(?:\b|(?=\d))/gi},{osis:["Hab","Hag"],regexp:/(\d|\b)(Ha)(?:\b|(?=\d))/gi},{osis:["Heb","Hab"],regexp:/(\d|\b)(Hb)(?:\b|(?=\d))/gi},{osis:["John","Jonah","Job","Josh","Joel"],regexp:/(\d|\b)(Jo)(?:\b|(?=\d))/gi},{osis:["Jude","Judg"],regexp:/(\d|\b)(Jd)(?:\b|(?=\d))/gi},{osis:["Jude","Judg"],regexp:/(\d|\b)(Jud)(?:\b|(?=\d))/gi},{osis:["Jude","Judg"],regexp:/(\d|\b)(Ju)(?:\b|(?=\d))/gi},{osis:["Matt","Mark","Mal"],regexp:/(\d|\b)(Ma)(?:\b|(?=\d))/gi},{osis:["Phil","Phlm"],regexp:/(\d|\b)(Ph)(?:\b|(?=\d))/gi},{osis:["Zeph","Zech"],regexp:/(\d|\b)(Ze)(?:\b|(?=\d))/gi}];if(!0===t&&"none"===n)return i;s=[],o=0;for(u=i.length;o<u;o++)r=i[o],null!=r.apocrypha&&!0===r.apocrypha||("books"===n&&(r.regexp=RegExp(r.regexp.source,"g")),s.push(r));return s},e.prototype.regexps.books=e.prototype.regexps.get_books(!1,"none");var o,u=function(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'},s={parse:function(e,t){function n(e){nt<it||(nt>it&&(it=nt,st=[]),st.push(e))}function r(){var e,t,n,r,i,u,c;u=i=nt,e=b(),null===e&&(e=m(),null===e&&(e=o(),null===e&&(e=A(),null===e&&(e=v(),null===e&&(e=h(),null===e&&(e=D(),null===e&&(e=p(),null===e&&(e=d(),null===e&&(e=_(),null===e&&(e=l(),null===e&&(e=T(),null===e&&(e=g(),null===e&&(e=f(),null===e&&(e=x(),null===e&&(e=a(),null===e&&(e=w(),null===e&&(e=S(),null===e&&(e=y(),null===e&&(e=E())))))))))))))))))));if(null!==e){c=nt,n=q(),n=null!==n?n:"",null!==n?(r=s(),null!==r?n=[n,r]:(n=null,nt=c)):(n=null,nt=c);if(null!==n)for(t=[];null!==n;)t.push(n),c=nt,n=q(),n=null!==n?n:"",null!==n?(r=s(),null!==r?n=[n,r]:(n=null,nt=c)):(n=null,nt=c);else t=null;null!==t?e=[e,t]:(e=null,nt=u)}else e=null,nt=u;return null!==e&&(t=e[1],t.unshift([e[0]]),e={type:"sequence",value:t,indices:[i,nt-1]}),null===e&&(nt=i),e}function i(){var t,r,i,o,u,a,f,l,c,h;c=l=nt,40===e.charCodeAt(nt)?(t="(",nt++):(t=null,0===rt&&n('"("'));if(null!==t)if(r=Y(),null!==r)if(i=q(),i=null!==i?i:"",null!==i)if(o=s(),null!==o){u=[],h=nt,a=q(),a=null!==a?a:"",null!==a?(f=s(),null!==f?a=[a,f]:(a=null,nt=h)):(a=null,nt=h);for(;null!==a;)u.push(a),h=nt,a=q(),a=null!==a?a:"",null!==a?(f=s(),null!==f?a=[a,f]:(a=null,nt=h)):(a=null,nt=h);null!==u?(a=Y(),null!==a?(41===e.charCodeAt(nt)?(f=")",nt++):(f=null,0===rt&&n('")"')),null!==f?t=[t,r,i,o,u,a,f]:(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)}else t=null,nt=c;else t=null,nt=c;else t=null,nt=c;else t=null,nt=c;return null!==t&&(r=t[4],"undefined"==typeof r&&(r=[]),r.unshift([t[3]]),t={type:"sequence_post_enclosed",value:r,indices:[l,nt-1]}),null===t&&(nt=l),t}function s(){var e;return e=i(),null===e&&(e=b(),null===e&&(e=m(),null===e&&(e=o(),null===e&&(e=A(),null===e&&(e=v(),null===e&&(e=h(),null===e&&(e=D(),null===e&&(e=p(),null===e&&(e=d(),null===e&&(e=_(),null===e&&(e=l(),null===e&&(e=T(),null===e&&(e=g(),null===e&&(e=f(),null===e&&(e=x(),null===e&&(e=a(),null===e&&(e=w(),null===e&&(e=S(),null===e&&(e=y(),null===e&&(e=E(),null===e&&(e=N(),null===e&&(e=O(),null===e&&(e=C(),null===e&&(e=k(),null===e&&(e=P(),null===e&&(e=J(),null===e&&(e=L(),null===e&&(e=H())))))))))))))))))))))))))))),e}function o(){var e,t,n,r,i;return i=r=nt,e=v(),null===e&&(e=h(),null===e&&(e=D(),null===e&&(e=p(),null===e&&(e=d(),null===e&&(e=_(),null===e&&(e=l(),null===e&&(e=T(),null===e&&(e=g(),null===e&&(e=w(),null===e&&(e=S(),null===e&&(e=x(),null===e&&(e=y(),null===e&&(e=E(),null===e&&(e=N(),null===e&&(e=O(),null===e&&(e=C(),null===e&&(e=k(),null===e&&(e=P(),null===e&&(e=J(),null===e&&(e=L(),null===e&&(e=H()))))))))))))))))))))),null!==e?(t=R(),null!==t?(n=A(),null===n&&(n=v(),null===n&&(n=h(),null===n&&(n=D(),null===n&&(n=p(),null===n&&(n=d(),null===n&&(n=_(),null===n&&(n=l(),null===n&&(n=T(),null===n&&(n=g(),null===n&&(n=w(),null===n&&(n=S(),null===n&&(n=x(),null===n&&(n=y(),null===n&&(n=E(),null===n&&(n=N(),null===n&&(n=O(),null===n&&(n=C(),null===n&&(n=P(),null===n&&(n=J(),null===n&&(n=k(),null===n&&(n=L(),null===n&&(n=H())))))))))))))))))))))),null!==n?e=[e,t,n]:(e=null,nt=i)):(e=null,nt=i)):(e=null,nt=i),null!==e&&(e={type:"range",value:[e[0],e[2]],indices:[r,nt-1]}),null===e&&(nt=r),e}function a(){var t,r,i,s,o,u,a;return u=o=nt,31===e.charCodeAt(nt)?(t="",nt++):(t=null,0===rt&&n('"\\x1F"')),null!==t?(r=K(),null!==r?(a=nt,47===e.charCodeAt(nt)?(i="/",nt++):(i=null,0===rt&&n('"/"')),null!==i?(/^[a-z]/.test(e.charAt(nt))?(s=e.charAt(nt),nt++):(s=null,0===rt&&n("[a-z]")),null!==s?i=[i,s]:(i=null,nt=a)):(i=null,nt=a),i=null!==i?i:"",null!==i?(31===e.charCodeAt(nt)?(s="",nt++):(s=null,0===rt&&n('"\\x1F"')),null!==s?t=[t,r,i,s]:(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u),null!==t&&(t={type:"b",value:t[1].value,indices:[o,nt-1]}),null===t&&(nt=o),t}function f(){var e,t,n,r,i,s;return s=i=nt,e=a(),null!==e?(t=R(),null!==t?(r=nt,rt++,n=o(),null===n&&(n=A(),null===n&&(n=D(),null===n&&(n=p(),null===n&&(n=d(),null===n&&(n=_(),null===n&&(n=l(),null===n&&(n=g()))))))),rt--,null===n?n="":(n=null,nt=r),null!==n?(r=a(),null!==r?e=[e,t,n,r]:(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s),null!==e&&(e={type:"b_range",value:[e[0],e[3]],indices:[i,nt-1]}),null===e&&(nt=i),e}function l(){var e,t,n,r,i,s,o,u,f,l;o=s=nt,e=a();if(null!==e){u=nt,t=j(),null!==t?(f=nt,rt++,l=nt,n=L(),null!==n?(r=F(),null!==r?(i=H(),null!==i?n=[n,r,i]:(n=null,nt=l)):(n=null,nt=l)):(n=null,nt=l),rt--,null!==n?(n="",nt=f):n=null,null!==n?t=[t,n]:(t=null,nt=u)):(t=null,nt=u);if(null===t){n=F();if(null!==n)for(t=[];null!==n;)t.push(n),n=F();else t=null;if(null===t){n=I();if(null!==n)for(t=[];null!==n;)t.push(n),n=I();else t=null;if(null===t){n=R();if(null!==n)for(t=[];null!==n;)t.push(n),n=R();else t=null;null===t&&(t=Y())}}}null!==t?(n=L(),null!==n?e=[e,t,n]:(e=null,nt=o)):(e=null,nt=o)}else e=null,nt=o;return null!==e&&(e={type:"bc",value:[e[0],e[2]],indices:[s,nt-1]}),null===e&&(nt=s),e}function c(){var t,r,i,s,o,u,f;return f=u=nt,t=a(),null!==t?(r=Y(),null!==r?(44===e.charCodeAt(nt)?(i=",",nt++):(i=null,0===rt&&n('","')),null!==i?(s=Y(),null!==s?(o=L(),null!==o?t=[t,r,i,s,o]:(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f),null!==t&&(t={type:"bc",value:[t[0],t[4]],indices:[u,nt-1]}),null===t&&(nt=u),t}function h(){var e,t,n,r;return r=n=nt,e=_(),null===e&&(e=l()),null!==e?(t=U(),null!==t?e=[e,t]:(e=null,nt=r)):(e=null,nt=r),null!==e&&(e={type:"bc_title",value:[e[0],e[1]],indices:[n,nt-1]}),null===e&&(nt=n),e}function p(){var t,r,i,s,o,u,a,f;return u=o=nt,t=_(),null===t&&(t=l()),null!==t?(a=nt,rt++,f=nt,46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(i=j(),null!==i?(s=H(),null!==s?r=[r,i,s]:(r=null,nt=f)):(r=null,nt=f)):(r=null,nt=f),rt--,null===r?r="":(r=null,nt=a),null!==r?(a=nt,i=F(),null===i&&(i=q()),i=null!==i?i:"",null!==i?(s=j(),null!==s?i=[i,s]:(i=null,nt=a)):(i=null,nt=a),null===i&&(i=F()),null!==i?(s=P(),null===s&&(s=H()),null!==s?t=[t,r,i,s]:(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u),null!==t&&(t={type:"bcv",value:[t[0],t[3]],indices:[o,nt-1]}),null===t&&(nt=o),t}function d(){var e,t,n,r,i,s,o,u,a;return o=s=nt,e=_(),null===e&&(e=l()),null!==e?(t=I(),null!==t?(n=P(),null===n&&(n=H()),null!==n?(u=nt,rt++,a=nt,r=F(),null!==r?(i=H(),null!==i?r=[r,i]:(r=null,nt=a)):(r=null,nt=a),rt--,null===r?r="":(r=null,nt=u),null!==r?e=[e,t,n,r]:(e=null,nt=o)):(e=null,nt=o)):(e=null,nt=o)):(e=null,nt=o),null!==e&&(e={type:"bcv",value:[e[0],e[2]],indices:[s,nt-1]}),null===e&&(nt=s),e}function v(){var t,r,i,s,o,u,a,f,l,h,p;return l=f=nt,t=c(),null!==t?(r=Y(),null!==r?(44===e.charCodeAt(nt)?(i=",",nt++):(i=null,0===rt&&n('","')),null!==i?(s=Y(),null!==s?(o=P(),null===o&&(o=H()),null!==o?(h=nt,rt++,p=nt,u=F(),null!==u?(a=H(),null!==a?u=[u,a]:(u=null,nt=p)):(u=null,nt=p),rt--,null===u?u="":(u=null,nt=h),null!==u?t=[t,r,i,s,o,u]:(t=null,nt=l)):(t=null,nt=l)):(t=null,nt=l)):(t=null,nt=l)):(t=null,nt=l)):(t=null,nt=l),null!==t&&(t={type:"bcv",value:[t[0],t[4]],indices:[f,nt-1]}),null===t&&(nt=f),t}function m(){var t,r,i,s,o,u,f,l,c;return c=l=nt,t=a(),null!==t?(45===e.charCodeAt(nt)?(r="-",nt++):(r=null,0===rt&&n('"-"')),null===r&&(r=Z()),r=null!==r?r:"",null!==r?(i=L(),null!==i?(45===e.charCodeAt(nt)?(s="-",nt++):(s=null,0===rt&&n('"-"')),null!==s?(o=H(),null!==o?(45===e.charCodeAt(nt)?(u="-",nt++):(u=null,0===rt&&n('"-"')),null!==u?(f=H(),null!==f?t=[t,r,i,s,o,u,f]:(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c),null!==t&&(t={type:"range",value:[{type:"bcv",value:[{type:"bc",value:[t[0],t[2]],indices:[t[0].indices[0],t[2].indices[1]]},t[4]],indices:[t[0].indices[0],t[4].indices[1]]},t[6]],indices:[l,nt-1]}),null===t&&(nt=l),t}function g(){var e,t,n,r,i,s,o;i=r=nt,e=a();if(null!==e){n=F();if(null!==n)for(t=[];null!==n;)t.push(n),n=F();else t=null;if(null===t){n=I();if(null!==n)for(t=[];null!==n;)t.push(n),n=I();else t=null;if(null===t){n=R();if(null!==n)for(t=[];null!==n;)t.push(n),n=R();else t=null;if(null===t){s=nt,n=q();if(null!==n)for(t=[];null!==n;)t.push(n),n=q();else t=null;null!==t?(o=nt,rt++,n=j(),rt--,null!==n?(n="",nt=o):n=null,null!==n?t=[t,n]:(t=null,nt=s)):(t=null,nt=s),null===t&&(t=Y())}}}null!==t?(n=P(),null===n&&(n=H()),null!==n?e=[e,t,n]:(e=null,nt=i)):(e=null,nt=i)}else e=null,nt=i;return null!==e&&(e={type:"bv",value:[e[0],e[2]],indices:[r,nt-1]}),null===e&&(nt=r),e}function y(){var e,t,n,r,i,s;return s=i=nt,e=B(),null!==e?(t=L(),null!==t?(n=z(),n=null!==n?n:"",null!==n?(r=a(),null!==r?e=[e,t,n,r]:(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s),null!==e&&(e={type:"bc",value:[e[3],e[1]],indices:[i,nt-1]}),null===e&&(nt=i),e}function b(){var e,t,n,r,i,s,o,u;return u=o=nt,e=B(),null!==e?(t=L(),null!==t?(n=R(),null!==n?(r=L(),null!==r?(i=z(),i=null!==i?i:"",null!==i?(s=a(),null!==s?e=[e,t,n,r,i,s]:(e=null,nt=u)):(e=null,nt=u)):(e=null,nt=u)):(e=null,nt=u)):(e=null,nt=u)):(e=null,nt=u),null!==e&&(e={type:"cb_range",value:[e[5],e[1],e[3]],indices:[o,nt-1]}),null===e&&(nt=o),e}function w(){var e,t,n,r,i,s;return s=i=nt,e=y(),null!==e?(t=q(),t=null!==t?t:"",null!==t?(n=j(),null!==n?(r=H(),null!==r?e=[e,t,n,r]:(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s),null!==e&&(e={type:"bcv",value:[e[0],e[3]],indices:[i,nt-1]}),null===e&&(nt=i),e}function E(){var t,r,i,s,o,u,f;return f=u=nt,t=L(),null!==t?("th"===e.substr(nt,2)?(r="th",nt+=2):(r=null,0===rt&&n('"th"')),null===r&&("nd"===e.substr(nt,2)?(r="nd",nt+=2):(r=null,0===rt&&n('"nd"')),null===r&&("st"===e.substr(nt,2)?(r="st",nt+=2):(r=null,0===rt&&n('"st"')))),null!==r?(i=B(),null!==i?(s=z(),s=null!==s?s:"",null!==s?(o=a(),null!==o?t=[t,r,i,s,o]:(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f),null!==t&&(t={type:"bc",value:[t[4],t[0]],indices:[u,nt-1]}),null===t&&(nt=u),t}function S(){var e,t,n,r,i,s;return s=i=nt,e=E(),null!==e?(t=q(),t=null!==t?t:"",null!==t?(n=j(),null!==n?(r=H(),null!==r?e=[e,t,n,r]:(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s),null!==e&&(e={type:"bcv",value:[e[0],e[3]],indices:[i,nt-1]}),null===e&&(nt=i),e}function x(){var t,r,i,s,o;return o=s=nt,31===e.charCodeAt(nt)?(t="",nt++):(t=null,0===rt&&n('"\\x1F"')),null!==t?(r=K(),null!==r?("/p"===e.substr(nt,3)?(i="/p",nt+=3):(i=null,0===rt&&n('"/p\\x1F"')),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"c_psalm",value:t[1].value,indices:[s,nt-1]}),null===t&&(nt=s),t}function T(){var e,t,n,r,i,s;return s=i=nt,e=x(),null!==e?(t=q(),t=null!==t?t:"",null!==t?(n=j(),null!==n?(r=H(),null!==r?e=[e,t,n,r]:(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s)):(e=null,nt=s),null!==e&&(e={type:"cv_psalm",value:[e[0],e[3]],indices:[i,nt-1]}),null===e&&(nt=i),e}function N(){var e,t,n,r,i;return i=r=nt,e=B(),null!==e?(t=L(),null!==t?(n=U(),null!==n?e=[e,t,n]:(e=null,nt=i)):(e=null,nt=i)):(e=null,nt=i),null!==e&&(e={type:"c_title",value:[e[1],e[2]],indices:[r,nt-1]}),null===e&&(nt=r),e}function C(){var t,r,i,s,o,u,a,f;return u=o=nt,t=L(),null!==t?(a=nt,rt++,f=nt,46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(i=j(),null!==i?(s=H(),null!==s?r=[r,i,s]:(r=null,nt=f)):(r=null,nt=f)):(r=null,nt=f),rt--,null===r?r="":(r=null,nt=a),null!==r?(a=nt,i=F(),i=null!==i?i:"",null!==i?(s=j(),null!==s?i=[i,s]:(i=null,nt=a)):(i=null,nt=a),null===i&&(i=F()),null!==i?(s=P(),null===s&&(s=H()),null!==s?t=[t,r,i,s]:(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u),null!==t&&(t={type:"cv",value:[t[0],t[3]],indices:[o,nt-1]}),null===t&&(nt=o),t}function k(){var e,t,n,r,i,s,o,u,a;return o=s=nt,e=L(),null!==e?(t=I(),null!==t?(n=P(),null===n&&(n=H()),null!==n?(u=nt,rt++,a=nt,r=F(),null!==r?(i=H(),null!==i?r=[r,i]:(r=null,nt=a)):(r=null,nt=a),rt--,null===r?r="":(r=null,nt=u),null!==r?e=[e,t,n,r]:(e=null,nt=o)):(e=null,nt=o)):(e=null,nt=o)):(e=null,nt=o),null!==e&&(e={type:"cv",value:[e[0],e[2]],indices:[s,nt-1]}),null===e&&(nt=s),e}function L(){var e,t,n,r;return r=n=nt,e=B(),e=null!==e?e:"",null!==e?(t=J(),null!==t?e=[e,t]:(e=null,nt=r)):(e=null,nt=r),null!==e&&(e={type:"c",value:[e[1]],indices:[n,nt-1]}),null===e&&(nt=n),e}function A(){var t,r,i,s,o,u,a,f,c;return f=a=nt,t=p(),null===t&&(t=d(),null===t&&(t=l(),null===t&&(t=C(),null===t&&(t=k(),null===t&&(t=J(),null===t&&(t=L(),null===t&&(t=H()))))))),null!==t?(r=Y(),null!==r?(102===e.charCodeAt(nt)?(i="f",nt++):(i=null,0===rt&&n('"f"')),null!==i?(102===e.charCodeAt(nt)?(s="f",nt++):(s=null,0===rt&&n('"f"')),s=null!==s?s:"",null!==s?(o=W(),o=null!==o?o:"",null!==o?(c=nt,rt++,/^[a-z]/.test(e.charAt(nt))?(u=e.charAt(nt),nt++):(u=null,0===rt&&n("[a-z]")),rt--,null===u?u="":(u=null,nt=c),null!==u?t=[t,r,i,s,o,u]:(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f),null!==t&&(t={type:"ff",value:[t[0]],indices:[a,nt-1]}),null===t&&(nt=a),t}function O(){var t,r,i,s,o;return o=s=nt,t=J(),null!==t?(r=F(),null===r&&(r=q()),r=null!==r?r:"",null!==r?("title"===e.substr(nt,5)?(i="title",nt+=5):(i=null,0===rt&&n('"title"')),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"integer_title",value:[t[0]],indices:[s,nt-1]}),null===t&&(nt=s),t}function M(){var t,r,i,s,o;return o=s=nt,31===e.charCodeAt(nt)?(t="",nt++):(t=null,0===rt&&n('"\\x1F"')),null!==t?(r=K(),null!==r?("/q"===e.substr(nt,3)?(i="/q",nt+=3):(i=null,0===rt&&n('"/q\\x1F"')),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"b",value:t[1].value,indices:[s,nt-1]}),null===t&&(nt=s),t}function _(){var t,r,i,s,o,u;return o=s=nt,t=M(),null!==t?(".1"===e.substr(nt,2)?(r=".1",nt+=2):(r=null,0===rt&&n('".1"')),null!==r?(u=nt,rt++,/^[0-9]/.test(e.charAt(nt))?(i=e.charAt(nt),nt++):(i=null,0===rt&&n("[0-9]")),rt--,null===i?i="":(i=null,nt=u),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"bc",value:[t[0],{type:"c",value:[{type:"integer",value:151,indices:[nt-2,nt-1]}],indices:[nt-2,nt-1]}],indices:[s,nt-1]}),null===t&&(nt=s),t}function D(){var t,r,i,s,o;return o=s=nt,t=_(),null!==t?(46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(i=J(),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"bcv",value:[t[0],{type:"v",value:[t[2]],indices:[t[2].indices[0],t[2].indices[1]]}],indices:[s,nt-1]}),null===t&&(nt=s),t}function P(){var t,r,i,s,o,u,a,f;return a=u=nt,t=j(),t=null!==t?t:"",null!==t?(r=J(),null!==r?(i=Y(),null!==i?(/^[a-e]/.test(e.charAt(nt))?(s=e.charAt(nt),nt++):(s=null,0===rt&&n("[a-e]")),null!==s?(f=nt,rt++,/^[a-z]/.test(e.charAt(nt))?(o=e.charAt(nt),nt++):(o=null,0===rt&&n("[a-z]")),rt--,null===o?o="":(o=null,nt=f),null!==o?t=[t,r,i,s,o]:(t=null,nt=a)):(t=null,nt=a)):(t=null,nt=a)):(t=null,nt=a)):(t=null,nt=a),null!==t&&(t={type:"v",value:[t[1]],indices:[u,nt-1]}),null===t&&(nt=u),t}function H(){var e,t,n,r;return r=n=nt,e=j(),e=null!==e?e:"",null!==e?(t=J(),null!==t?e=[e,t]:(e=null,nt=r)):(e=null,nt=r),null!==e&&(e={type:"v",value:[e[1]],indices:[n,nt-1]}),null===e&&(nt=n),e}function B(){var t,r,i,s,o,u,a,f,l;return f=a=nt,t=Y(),null!==t?(l=nt,"chapter"===e.substr(nt,7)?(r="chapter",nt+=7):(r=null,0===rt&&n('"chapter"')),null!==r?(115===e.charCodeAt(nt)?(i="s",nt++):(i=null,0===rt&&n('"s"')),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=l)):(r=null,nt=l),null===r&&(l=nt,"ch"===e.substr(nt,2)?(r="ch",nt+=2):(r=null,0===rt&&n('"ch"')),null!==r?(97===e.charCodeAt(nt)?(i="a",nt++):(i=null,0===rt&&n('"a"')),i=null!==i?i:"",null!==i?("pt"===e.substr(nt,2)?(s="pt",nt+=2):(s=null,0===rt&&n('"pt"')),null!==s?(115===e.charCodeAt(nt)?(o="s",nt++):(o=null,0===rt&&n('"s"')),o=null!==o?o:"",null!==o?(u=W(),u=null!==u?u:"",null!==u?r=[r,i,s,o,u]:(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l),null===r&&(l=nt,"ch"===e.substr(nt,2)?(r="ch",nt+=2):(r=null,0===rt&&n('"ch"')),null!==r?(97===e.charCodeAt(nt)?(i="a",nt++):(i=null,0===rt&&n('"a"')),i=null!==i?i:"",null!==i?(112===e.charCodeAt(nt)?(s="p",nt++):(s=null,0===rt&&n('"p"')),s=null!==s?s:"",null!==s?(115===e.charCodeAt(nt)?(o="s",nt++):(o=null,0===rt&&n('"s"')),o=null!==o?o:"",null!==o?(u=W(),u=null!==u?u:"",null!==u?r=[r,i,s,o,u]:(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l)):(r=null,nt=l))),null!==r?(i=Y(),null!==i?t=[t,r,i]:(t=null,nt=f)):(t=null,nt=f)):(t=null,nt=f),null!==t&&(t={type:"c_explicit"}),null===t&&(nt=a),t}function j(){var t,r,i,s,o,u,a,f;return a=u=nt,t=Y(),null!==t?(f=nt,"verse"===e.substr(nt,5)?(r="verse",nt+=5):(r=null,0===rt&&n('"verse"')),null!==r?(115===e.charCodeAt(nt)?(i="s",nt++):(i=null,0===rt&&n('"s"')),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&(f=nt,"vv"===e.substr(nt,2)?(r="vv",nt+=2):(r=null,0===rt&&n('"vv"')),null!==r?(i=W(),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&(f=nt,"ver"===e.substr(nt,3)?(r="ver",nt+=3):(r=null,0===rt&&n('"ver"')),null!==r?(i=W(),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&(f=nt,118===e.charCodeAt(nt)?(r="v",nt++):(r=null,0===rt&&n('"v"')),null!==r?(115===e.charCodeAt(nt)?(i="s",nt++):(i=null,0===rt&&n('"s"')),i=null!==i?i:"",null!==i?(115===e.charCodeAt(nt)?(s="s",nt++):(s=null,0===rt&&n('"s"')),s=null!==s?s:"",null!==s?(o=W(),o=null!==o?o:"",null!==o?r=[r,i,s,o]:(r=null,nt=f)):(r=null,nt=f)):(r=null,nt=f)):(r=null,nt=f)))),null!==r?(i=Y(),null!==i?t=[t,r,i]:(t=null,nt=a)):(t=null,nt=a)):(t=null,nt=a),null!==t&&(t={type:"v_explicit"}),null===t&&(nt=u),t}function F(){var t,r,i,s,o,u,a,f,l,c;a=nt,t=Y();if(null!==t){58===e.charCodeAt(nt)?(i=":",nt++):(i=null,0===rt&&n('":"'));if(null!==i)for(r=[];null!==i;)r.push(i),58===e.charCodeAt(nt)?(i=":",nt++):(i=null,0===rt&&n('":"'));else r=null;null===r&&(f=nt,46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(l=nt,rt++,c=nt,i=Y(),null!==i?(46===e.charCodeAt(nt)?(s=".",nt++):(s=null,0===rt&&n('"."')),null!==s?(o=Y(),null!==o?(46===e.charCodeAt(nt)?(u=".",nt++):(u=null,0===rt&&n('"."')),null!==u?i=[i,s,o,u]:(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c),rt--,null===i?i="":(i=null,nt=l),null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f)),null!==r?(i=Y(),null!==i?t=[t,r,i]:(t=null,nt=a)):(t=null,nt=a)}else t=null,nt=a;return t}function I(){var t,r,i,s;return s=nt,t=Y(),null!==t?(/^["']/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[\"']")),null!==r?(i=Y(),null!==i?t=[t,r,i]:(t=null,nt=s)):(t=null,nt=s)):(t=null,nt=s),null===t&&(t=Z()),t}function q(){var t,r,i,s,o,u,a,f,l,c;a=nt,/^[,;\/:&\-\u2013\u2014~]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[,;\\/:&\\-\\u2013\\u2014~]")),null===r&&(f=nt,46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(l=nt,rt++,c=nt,i=Y(),null!==i?(46===e.charCodeAt(nt)?(s=".",nt++):(s=null,0===rt&&n('"."')),null!==s?(o=Y(),null!==o?(46===e.charCodeAt(nt)?(u=".",nt++):(u=null,0===rt&&n('"."')),null!==u?i=[i,s,o,u]:(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c),rt--,null===i?i="":(i=null,nt=l),null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&("see"===e.substr(nt,3)?(r="see",nt+=3):(r=null,0===rt&&n('"see"')),null===r&&("compare"===e.substr(nt,7)?(r="compare",nt+=7):(r=null,0===rt&&n('"compare"')),null===r&&(f=nt,"cf"===e.substr(nt,2)?(r="cf",nt+=2):(r=null,0===rt&&n('"cf"')),null!==r?(i=W(),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&("and"===e.substr(nt,3)?(r="and",nt+=3):(r=null,0===rt&&n('"and"')),null===r&&("also"===e.substr(nt,4)?(r="also",nt+=4):(r=null,0===rt&&n('"also"')),null===r&&(r=Z())))))));if(null!==r)for(t=[];null!==r;)t.push(r),/^[,;\/:&\-\u2013\u2014~]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[,;\\/:&\\-\\u2013\\u2014~]")),null===r&&(f=nt,46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(l=nt,rt++,c=nt,i=Y(),null!==i?(46===e.charCodeAt(nt)?(s=".",nt++):(s=null,0===rt&&n('"."')),null!==s?(o=Y(),null!==o?(46===e.charCodeAt(nt)?(u=".",nt++):(u=null,0===rt&&n('"."')),null!==u?i=[i,s,o,u]:(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c)):(i=null,nt=c),rt--,null===i?i="":(i=null,nt=l),null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&("see"===e.substr(nt,3)?(r="see",nt+=3):(r=null,0===rt&&n('"see"')),null===r&&("compare"===e.substr(nt,7)?(r="compare",nt+=7):(r=null,0===rt&&n('"compare"')),null===r&&(f=nt,"cf"===e.substr(nt,2)?(r="cf",nt+=2):(r=null,0===rt&&n('"cf"')),null!==r?(i=W(),i=null!==i?i:"",null!==i?r=[r,i]:(r=null,nt=f)):(r=null,nt=f),null===r&&("and"===e.substr(nt,3)?(r="and",nt+=3):(r=null,0===rt&&n('"and"')),null===r&&("also"===e.substr(nt,4)?(r="also",nt+=4):(r=null,0===rt&&n('"also"')),null===r&&(r=Z())))))));else t=null;return null!==t&&(t=""),null===t&&(nt=a),t}function R(){var t,r,i,s,o,u;o=nt,t=Y();if(null!==t){u=nt,/^[\-\u2013\u2014]/.test(e.charAt(nt))?(i=e.charAt(nt),nt++):(i=null,0===rt&&n("[\\-\\u2013\\u2014]")),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"through"===e.substr(nt,7)?(i="through",nt+=7):(i=null,0===rt&&n('"through"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"thru"===e.substr(nt,4)?(i="thru",nt+=4):(i=null,0===rt&&n('"thru"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"to"===e.substr(nt,2)?(i="to",nt+=2):(i=null,0===rt&&n('"to"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u))));if(null!==i)for(r=[];null!==i;)r.push(i),u=nt,/^[\-\u2013\u2014]/.test(e.charAt(nt))?(i=e.charAt(nt),nt++):(i=null,0===rt&&n("[\\-\\u2013\\u2014]")),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"through"===e.substr(nt,7)?(i="through",nt+=7):(i=null,0===rt&&n('"through"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"thru"===e.substr(nt,4)?(i="thru",nt+=4):(i=null,0===rt&&n('"thru"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u),null===i&&(u=nt,"to"===e.substr(nt,2)?(i="to",nt+=2):(i=null,0===rt&&n('"to"')),null!==i?(s=Y(),null!==s?i=[i,s]:(i=null,nt=u)):(i=null,nt=u))));else r=null;null!==r?t=[t,r]:(t=null,nt=o)}else t=null,nt=o;return t}function U(){var t,r,i,s;return s=i=nt,t=F(),null===t&&(t=q()),t=null!==t?t:"",null!==t?("title"===e.substr(nt,5)?(r="title",nt+=5):(r=null,0===rt&&n('"title"')),null!==r?t=[t,r]:(t=null,nt=s)):(t=null,nt=s),null!==t&&(t={type:"title",value:[t[1]],indices:[i,nt-1]}),null===t&&(nt=i),t}function z(){var t,r,i,s,o,u,a,f,l,c,h;return c=nt,t=Y(),null!==t?("from"===e.substr(nt,4)?(r="from",nt+=4):(r=null,0===rt&&n('"from"')),null===r&&("of"===e.substr(nt,2)?(r="of",nt+=2):(r=null,0===rt&&n('"of"')),null===r&&("in"===e.substr(nt,2)?(r="in",nt+=2):(r=null,0===rt&&n('"in"')))),null!==r?(i=Y(),null!==i?(h=nt,"the"===e.substr(nt,3)?(s="the",nt+=3):(s=null,0===rt&&n('"the"')),null!==s?(o=Y(),null!==o?("book"===e.substr(nt,4)?(u="book",nt+=4):(u=null,0===rt&&n('"book"')),null!==u?(a=Y(),null!==a?("of"===e.substr(nt,2)?(f="of",nt+=2):(f=null,0===rt&&n('"of"')),null!==f?(l=Y(),null!==l?s=[s,o,u,a,f,l]:(s=null,nt=h)):(s=null,nt=h)):(s=null,nt=h)):(s=null,nt=h)):(s=null,nt=h)):(s=null,nt=h),s=null!==s?s:"",null!==s?t=[t,r,i,s]:(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c)):(t=null,nt=c),t}function W(){var t,r,i,s,o,u,a,f,l;return a=nt,t=Y(),null!==t?(46===e.charCodeAt(nt)?(r=".",nt++):(r=null,0===rt&&n('"."')),null!==r?(f=nt,rt++,l=nt,i=Y(),null!==i?(46===e.charCodeAt(nt)?(s=".",nt++):(s=null,0===rt&&n('"."')),null!==s?(o=Y(),null!==o?(46===e.charCodeAt(nt)?(u=".",nt++):(u=null,0===rt&&n('"."')),null!==u?i=[i,s,o,u]:(i=null,nt=l)):(i=null,nt=l)):(i=null,nt=l)):(i=null,nt=l),rt--,null===i?i="":(i=null,nt=f),null!==i?t=[t,r,i]:(t=null,nt=a)):(t=null,nt=a)):(t=null,nt=a),t}function X(){var t,r,i,s,o,u,a,f,l,c,h;l=f=nt,t=Y();if(null!==t)if(/^[([]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[([]")),null!==r)if(i=Y(),null!==i){c=nt,s=$();if(null!==s){o=[],h=nt,u=q(),null!==u?(a=$(),null!==a?u=[u,a]:(u=null,nt=h)):(u=null,nt=h);for(;null!==u;)o.push(u),h=nt,u=q(),null!==u?(a=$(),null!==a?u=[u,a]:(u=null,nt=h)):(u=null,nt=h);null!==o?s=[s,o]:(s=null,nt=c)}else s=null,nt=c;null!==s?(o=Y(),null!==o?(/^[)\]]/.test(e.charAt(nt))?(u=e.charAt(nt),nt++):(u=null,0===rt&&n("[)\\]]")),null!==u?t=[t,r,i,s,o,u]:(t=null,nt=l)):(t=null,nt=l)):(t=null,nt=l)}else t=null,nt=l;else t=null,nt=l;else t=null,nt=l;return null!==t&&(t={type:"translation_sequence",value:t[3],indices:[f,nt-1]}),null===t&&(nt=f),t}function V(){var t,r,i,s,o,u,a,f,l,c;f=a=nt,t=Y();if(null!==t)if(l=nt,44===e.charCodeAt(nt)?(r=",",nt++):(r=null,0===rt&&n('","')),null!==r?(i=Y(),null!==i?r=[r,i]:(r=null,nt=l)):(r=null,nt=l),r=null!==r?r:"",null!==r){l=nt,i=$();if(null!==i){s=[],c=nt,o=q(),null!==o?(u=$(),null!==u?o=[o,u]:(o=null,nt=c)):(o=null,nt=c);for(;null!==o;)s.push(o),c=nt,o=q(),null!==o?(u=$(),null!==u?o=[o,u]:(o=null,nt=c)):(o=null,nt=c);null!==s?i=[i,s]:(i=null,nt=l)}else i=null,nt=l;null!==i?t=[t,r,i]:(t=null,nt=f)}else t=null,nt=f;else t=null,nt=f;return null!==t&&(t={type:"translation_sequence",value:t[2],indices:[a,nt-1]}),null===t&&(nt=a),t}function $(){var t,r,i,s,o;return o=s=nt,30===e.charCodeAt(nt)?(t="",nt++):(t=null,0===rt&&n('"\\x1E"')),null!==t?(r=K(),null!==r?(30===e.charCodeAt(nt)?(i="",nt++):(i=null,0===rt&&n('"\\x1E"')),null!==i?t=[t,r,i]:(t=null,nt=o)):(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"translation",value:t[1].value,indices:[s,nt-1]}),null===t&&(nt=s),t}function J(){var t,r,i,s,o,u;return u=o=s=nt,/^[0-9]/.test(e.charAt(nt))?(t=e.charAt(nt),nt++):(t=null,0===rt&&n("[0-9]")),null!==t?(/^[0-9]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[0-9]")),r=null!==r?r:"",null!==r?(/^[0-9]/.test(e.charAt(nt))?(i=e.charAt(nt),nt++):(i=null,0===rt&&n("[0-9]")),i=null!==i?i:"",null!==i?t=[t,r,i]:(t=null,nt=u)):(t=null,nt=u)):(t=null,nt=u),null!==t?(u=nt,rt++,/^[0-9]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[0-9]")),null===r&&(",000"===e.substr(nt,4)?(r=",000",nt+=4):(r=null,0===rt&&n('",000"'))),rt--,null===r?r="":(r=null,nt=u),null!==r?t=[t,r]:(t=null,nt=o)):(t=null,nt=o),null!==t&&(t={type:"integer",value:parseInt(t[0].join(""),10),indices:[s,nt-1]}),null===t&&(nt=s),t}function K(){var t,r,i;i=nt,/^[0-9]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[0-9]"));if(null!==r)for(t=[];null!==r;)t.push(r),/^[0-9]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[0-9]"));else t=null;return null!==t&&(t={type:"integer",value:parseInt(t.join(""),10),indices:[i,nt-1]}),null===t&&(nt=i),t}function Q(){var t,r,i;i=nt,/^[^\x1F\x1E([]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[^\\x1F\\x1E([]"));if(null!==r)for(t=[];null!==r;)t.push(r),/^[^\x1F\x1E([]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[^\\x1F\\x1E([]"));else t=null;return null!==t&&(t={type:"word",value:t.join(""),indices:[i,nt-1]}),null===t&&(nt=i),t}function G(){var t,r;return r=nt,/^[([]/.test(e.charAt(nt))?(t=e.charAt(nt),nt++):(t=null,0===rt&&n("[([]")),null!==t&&(t={type:"stop",value:t,indices:[r,nt-1]}),null===t&&(nt=r),t}function Y(){var e;return e=Z(),null!==e?e:""}function Z(){var t,r;/^[\s\xa0*]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[\\s\\xa0*]"));if(null!==r)for(t=[];null!==r;)t.push(r),/^[\s\xa0*]/.test(e.charAt(nt))?(r=e.charAt(nt),nt++):(r=null,0===rt&&n("[\\s\\xa0*]"));else t=null;return t}function et(e){e.sort();for(var t=null,n=[],r=0;r<e.length;r++)e[r]!==t&&(n.push(e[r]),t=e[r]);return n}var tt={start:function(){var e,t;t=m(),null===t&&(t=r(),null===t&&(t=b(),null===t&&(t=o(),null===t&&(t=A(),null===t&&(t=v(),null===t&&(t=h(),null===t&&(t=D(),null===t&&(t=p(),null===t&&(t=d(),null===t&&(t=_(),null===t&&(t=l(),null===t&&(t=T(),null===t&&(t=g(),null===t&&(t=f(),null===t&&(t=x(),null===t&&(t=a(),null===t&&(t=w(),null===t&&(t=S(),null===t&&(t=y(),null===t&&(t=E(),null===t&&(t=X(),null===t&&(t=V(),null===t&&(t=q(),null===t&&(t=N(),null===t&&(t=O(),null===t&&(t=C(),null===t&&(t=k(),null===t&&(t=P(),null===t&&(t=J(),null===t&&(t=L(),null===t&&(t=H(),null===t&&(t=Q(),null===t&&(t=G())))))))))))))))))))))))))))))))));if(null!==t)for(e=[];null!==t;)e.push(t),t=m(),null===t&&(t=r(),null===t&&(t=b(),null===t&&(t=o(),null===t&&(t=A(),null===t&&(t=v(),null===t&&(t=h(),null===t&&(t=D(),null===t&&(t=p(),null===t&&(t=d(),null===t&&(t=_(),null===t&&(t=l(),null===t&&(t=T(),null===t&&(t=g(),null===t&&(t=f(),null===t&&(t=x(),null===t&&(t=a(),null===t&&(t=w(),null===t&&(t=S(),null===t&&(t=y(),null===t&&(t=E(),null===t&&(t=X(),null===t&&(t=V(),null===t&&(t=q(),null===t&&(t=N(),null===t&&(t=O(),null===t&&(t=C(),null===t&&(t=k(),null===t&&(t=P(),null===t&&(t=J(),null===t&&(t=L(),null===t&&(t=H(),null===t&&(t=Q(),null===t&&(t=G())))))))))))))))))))))))))))))))));else e=null;return e},sequence:r,sequence_post_enclosed:i,sequence_post:s,range:o,b:a,b_range:f,bc:l,bc_comma:c,bc_title:h,bcv:p,bcv_weak:d,bcv_comma:v,bcv_hyphen_range:m,bv:g,cb:y,cb_range:b,cbv:w,cb_ordinal:E,cbv_ordinal:S,c_psalm:x,cv_psalm:T,c_title:N,cv:C,cv_weak:k,c:L,ff:A,integer_title:O,ps151_b:M,ps151_bc:_,ps151_bcv:D,v_letter:P,v:H,c_explicit:B,v_explicit:j,cv_sep:F,cv_sep_weak:I,sequence_sep:q,range_sep:R,title:U,in_book_of:z,abbrev:W,translation_sequence_enclosed:X,translation_sequence:V,translation:$,integer:J,any_integer:K,word:Q,word_parenthesis:G,sp:Y,space:Z};if(void 0!==t){if(void 0===tt[t])throw Error("Invalid rule name: "+u(t)+".")}else t="start";var nt=0,rt=0,it=0,st=[],tt=tt[t]();if(null===tt||nt!==e.length){for(var tt=Math.max(nt,it),ot=tt<e.length?e.charAt(tt):null,ut=1,at=1,ft=!1,lt=0;lt<Math.max(nt,it);lt++){var ct=e.charAt(lt);"\n"===ct?(ft||ut++,at=1,ft=!1):"\r"===ct||"\u2028"===ct||"\u2029"===ct?(ut++,at=1,ft=!0):(at++,ft=!1)}throw new this.SyntaxError(et(st),ot,tt,ut,at)}return tt},toSource:function(){return this._source},SyntaxError:function(e,t,n,r,i){this.name="SyntaxError",this.expected=e,this.found=t;switch(e.length){case 0:e="end of input";break;case 1:e=e[0];break;default:e=e.slice(0,e.length-1).join(", ")+" or "+e[e.length-1]}t=t?u(t):"end of input",this.message="Expected "+e+" but "+t+" found.",this.offset=n,this.line=r,this.column=i}};s.SyntaxError.prototype=Error.prototype,o=s}.call(this),define("bcv",function(e){return function(){var t,n;return n=function(){return new this.bcv_parser},t=n.apply(e,arguments),t||e.bcv_parser}}(this)),define("verseKey",["bcv","versificationMgr"],function(e,t){function n(n,r){var i={};i.osis=e.parse(n).osis(),i.osis===""&&(i.osis="Matt.1");var s=i.osis.split("-")[0].split(".");return i.book=s[0],i.chapter=isNaN(parseInt(s[1],10))?1:parseInt(s[1],10),i.verse=parseInt(s[2],10),i.bookNum=t.getBookNum(i.book,r),i}function r(e,r){var i=[],s=e;typeof e=="string"&&(s=n(e));if(!(s.osis.split("-").length>1))if(isNaN(s.verse)){var o=t.getBookNum(s.book),u=t.getVersesInChapter(o,s.chapter,r);for(var a=0;a<u;a++)i.push({osis:s.book+"."+s.chapter+"."+(a+1),book:s.book,bookNum:o,chapter:s.chapter,verse:a+1})}else i.push(s);return i}function i(e,r){var i=n(e,r),s=t.getChapterMax(i.bookNum,r);return i.chapter<s?i.chapter++:(i.bookNum=i.bookNum<65?++i.bookNum:65,i.chapter=i.bookNum<65?1:s,i.book=t.getBook(i.bookNum,r).abbrev),i.osis=i.book+"."+i.chapter,i}function s(e,r){var i=n(e,r),s=t.getChapterMax(i.bookNum-1,r);return i.chapter>1?--i.chapter:(i.bookNum=i.bookNum>0?--i.bookNum:0,i.chapter=i.bookNum===0?1:s,i.book=t.getBook(i.bookNum,r).abbrev),i.osis=i.book+"."+i.chapter,i}return{parse:n,parseVerseList:r,next:i,previous:s}}),function(e){function n(t,r){if(!(this instanceof n))return new n(t,r);var s=this;i(s),s.q=s.c="",s.bufferCheckPosition=e.MAX_BUFFER_LENGTH,s.opt=r||{},s.opt.lowercase=s.opt.lowercase||s.opt.lowercasetags,s.looseCase=s.opt.lowercase?"toLowerCase":"toUpperCase",s.tags=[],s.closed=s.closedRoot=s.sawRoot=!1,s.tag=s.error=null,s.strict=!!t,s.noscript=!!t||!!s.opt.noscript,s.state=k.BEGIN,s.ENTITIES=Object.create(e.ENTITIES),s.attribList=[],s.opt.xmlns&&(s.ns=Object.create(w)),s.trackPosition=s.opt.position!==!1,s.trackPosition&&(s.position=s.line=s.column=0),L(s,"onready")}function r(n){var r=Math.max(e.MAX_BUFFER_LENGTH,10),i=0;for(var s=0,o=t.length;s<o;s++){var u=n[t[s]].length;if(u>r)switch(t[s]){case"textNode":O(n);break;case"cdata":A(n,"oncdata",n.cdata),n.cdata="";break;case"script":A(n,"onscript",n.script),n.script="";break;default:_(n,"Max buffer length exceeded: "+t[s])}i=Math.max(i,u)}n.bufferCheckPosition=e.MAX_BUFFER_LENGTH-i+n.position}function i(e){for(var n=0,r=t.length;n<r;n++)e[t[n]]=""}function a(e,t){return new f(e,t)}function f(e,t){if(!(this instanceof f))return new f(e,t);s.apply(this),this._parser=new n(e,t),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(e){r.emit("error",e),r._parser.error=null},this._decoder=null,u.forEach(function(e){Object.defineProperty(r,"on"+e,{get:function(){return r._parser["on"+e]},set:function(t){if(!t)return r.removeAllListeners(e),r._parser["on"+e]=t;r.on(e,t)},enumerable:!0,configurable:!1})})}function x(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}function T(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function N(e,t){return T(e)?!!t.match(e):e[t]}function C(e,t){return!N(e,t)}function L(e,t,n){e[t]&&e[t](n)}function A(e,t,n){e.textNode&&O(e),L(e,t,n)}function O(e){e.textNode=M(e.opt,e.textNode),e.textNode&&L(e,"ontext",e.textNode),e.textNode=""}function M(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function _(e,t){return O(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,L(e,"onerror",t),e}function D(e){return e.closedRoot||P(e,"Unclosed root tag"),e.state!==k.TEXT&&_(e,"Unexpected end"),O(e),e.c="",e.closed=!0,L(e,"onend"),n.call(e,e.strict,e.opt),e}function P(e,t){if(!(typeof e=="object"&&e instanceof n))throw new Error("bad call to strictFail");e.strict&&_(e,t)}function H(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0}function B(e){var t=e.indexOf(":"),n=t<0?["",e]:e.split(":"),r=n[0],i=n[1];return e==="xmlns"&&(r="xmlns",i=""),{prefix:r,local:i}}function j(e){e.strict||(e.attribName=e.attribName[e.looseCase]());if(e.attribList.indexOf(e.attribName)!==-1||e.tag.attributes.hasOwnProperty(e.attribName))return e.attribName=e.attribValue="";if(e.opt.xmlns){var t=B(e.attribName),n=t.prefix,r=t.local;if(n==="xmlns")if(r==="xml"&&e.attribValue!==y)P(e,"xml: prefix must be bound to "+y+"\n"+"Actual: "+e.attribValue);else if(r==="xmlns"&&e.attribValue!==b)P(e,"xmlns: prefix must be bound to "+b+"\n"+"Actual: "+e.attribValue);else{var i=e.tag,s=e.tags[e.tags.length-1]||e;i.ns===s.ns&&(i.ns=Object.create(s.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,A(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}function F(e,t){if(e.opt.xmlns){var n=e.tag,r=B(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(P(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach(function(t){A(e,"onopennamespace",{prefix:t,uri:n.ns[t]})});for(var s=0,o=e.attribList.length;s<o;s++){var u=e.attribList[s],a=u[0],f=u[1],l=B(a),c=l.prefix,h=l.local,p=c==""?"":n.ns[c]||"",d={name:a,value:f,prefix:c,local:h,uri:p};c&&c!="xmlns"&&!p&&(P(e,"Unbound namespace prefix: "+JSON.stringify(c)),d.uri=c),e.tag.attributes[a]=d,A(e,"onattribute",d)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),A(e,"onopentag",e.tag),t||(!e.noscript&&e.tagName.toLowerCase()==="script"?e.state=k.SCRIPT:e.state=k.TEXT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function I(e){if(!e.tagName){P(e,"Weird empty close tag."),e.textNode+="</>",e.state=k.TEXT;return}if(e.script){if(e.tagName!=="script"){e.script+="</"+e.tagName+">",e.tagName="",e.state=k.SCRIPT;return}A(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());var r=n;while(t--){var i=e.tags[t];if(i.name===r)break;P(e,"Unexpected close tag")}if(t<0){P(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",e.state=k.TEXT;return}e.tagName=n;var s=e.tags.length;while(s-->t){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,A(e,"onclosetag",e.tagName);var u={};for(var a in o.ns)u[a]=o.ns[a];var f=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==f.ns&&Object.keys(o.ns).forEach(function(t){var n=o.ns[t];A(e,"onclosenamespace",{prefix:t,uri:n})})}t===0&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=k.TEXT}function q(e){var t=e.entity,n=t.toLowerCase(),r,i="";return e.ENTITIES[t]?e.ENTITIES[t]:e.ENTITIES[n]?e.ENTITIES[n]:(t=n,t.charAt(0)==="#"&&(t.charAt(1)==="x"?(t=t.slice(2),r=parseInt(t,16),i=r.toString(16)):(t=t.slice(1),r=parseInt(t,10),i=r.toString(10))),t=t.replace(/^0+/,""),i.toLowerCase()!==t?(P(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCharCode(r))}function R(e){var t=this;if(this.error)throw this.error;if(t.closed)return _(t,"Cannot write after close. Assign an onready handler.");if(e===null)return D(t);var n=0,i="";while(t.c=i=e.charAt(n++)){t.trackPosition&&(t.position++,i==="\n"?(t.line++,t.column=0):t.column++);switch(t.state){case k.BEGIN:i==="<"?(t.state=k.OPEN_WAKA,t.startTagPosition=t.position):C(l,i)&&(P(t,"Non-whitespace before first tag."),t.textNode=i,t.state=k.TEXT);continue;case k.TEXT:if(t.sawRoot&&!t.closedRoot){var s=n-1;while(i&&i!=="<"&&i!=="&")i=e.charAt(n++),i&&t.trackPosition&&(t.position++,i==="\n"?(t.line++,t.column=0):t.column++);t.textNode+=e.substring(s,n-1)}i==="<"?(t.state=k.OPEN_WAKA,t.startTagPosition=t.position):(C(l,i)&&(!t.sawRoot||t.closedRoot)&&P(t,"Text data outside of root node."),i==="&"?t.state=k.TEXT_ENTITY:t.textNode+=i);continue;case k.SCRIPT:i==="<"?t.state=k.SCRIPT_ENDING:t.script+=i;continue;case k.SCRIPT_ENDING:i==="/"?t.state=k.CLOSE_TAG:(t.script+="<"+i,t.state=k.SCRIPT);continue;case k.OPEN_WAKA:if(i==="!")t.state=k.SGML_DECL,t.sgmlDecl="";else if(!N(l,i))if(N(E,i))t.state=k.OPEN_TAG,t.tagName=i;else if(i==="/")t.state=k.CLOSE_TAG,t.tagName="";else if(i==="?")t.state=k.PROC_INST,t.procInstName=t.procInstBody="";else{P(t,"Unencoded <");if(t.startTagPosition+1<t.position){var o=t.position-t.startTagPosition;i=(new Array(o)).join(" ")+i}t.textNode+="<"+i,t.state=k.TEXT}continue;case k.SGML_DECL:(t.sgmlDecl+i).toUpperCase()===m?(A(t,"onopencdata"),t.state=k.CDATA,t.sgmlDecl="",t.cdata=""):t.sgmlDecl+i==="--"?(t.state=k.COMMENT,t.comment="",t.sgmlDecl=""):(t.sgmlDecl+i).toUpperCase()===g?(t.state=k.DOCTYPE,(t.doctype||t.sawRoot)&&P(t,"Inappropriately located doctype declaration"),t.doctype="",t.sgmlDecl=""):i===">"?(A(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=k.TEXT):N(p,i)?(t.state=k.SGML_DECL_QUOTED,t.sgmlDecl+=i):t.sgmlDecl+=i;continue;case k.SGML_DECL_QUOTED:i===t.q&&(t.state=k.SGML_DECL,t.q=""),t.sgmlDecl+=i;continue;case k.DOCTYPE:i===">"?(t.state=k.TEXT,A(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=i,i==="["?t.state=k.DOCTYPE_DTD:N(p,i)&&(t.state=k.DOCTYPE_QUOTED,t.q=i));continue;case k.DOCTYPE_QUOTED:t.doctype+=i,i===t.q&&(t.q="",t.state=k.DOCTYPE);continue;case k.DOCTYPE_DTD:t.doctype+=i,i==="]"?t.state=k.DOCTYPE:N(p,i)&&(t.state=k.DOCTYPE_DTD_QUOTED,t.q=i);continue;case k.DOCTYPE_DTD_QUOTED:t.doctype+=i,i===t.q&&(t.state=k.DOCTYPE_DTD,t.q="");continue;case k.COMMENT:i==="-"?t.state=k.COMMENT_ENDING:t.comment+=i;continue;case k.COMMENT_ENDING:i==="-"?(t.state=k.COMMENT_ENDED,t.comment=M(t.opt,t.comment),t.comment&&A(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+i,t.state=k.COMMENT);continue;case k.COMMENT_ENDED:i!==">"?(P(t,"Malformed comment"),t.comment+="--"+i,t.state=k.COMMENT):t.state=k.TEXT;continue;case k.CDATA:i==="]"?t.state=k.CDATA_ENDING:t.cdata+=i;continue;case k.CDATA_ENDING:i==="]"?t.state=k.CDATA_ENDING_2:(t.cdata+="]"+i,t.state=k.CDATA);continue;case k.CDATA_ENDING_2:i===">"?(t.cdata&&A(t,"oncdata",t.cdata),A(t,"onclosecdata"),t.cdata="",t.state=k.TEXT):i==="]"?t.cdata+="]":(t.cdata+="]]"+i,t.state=k.CDATA);continue;case k.PROC_INST:i==="?"?t.state=k.PROC_INST_ENDING:N(l,i)?t.state=k.PROC_INST_BODY:t.procInstName+=i;continue;case k.PROC_INST_BODY:if(!t.procInstBody&&N(l,i))continue;i==="?"?t.state=k.PROC_INST_ENDING:t.procInstBody+=i;continue;case k.PROC_INST_ENDING:i===">"?(A(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=k.TEXT):(t.procInstBody+="?"+i,t.state=k.PROC_INST_BODY);continue;case k.OPEN_TAG:N(S,i)?t.tagName+=i:(H(t),i===">"?F(t):i==="/"?t.state=k.OPEN_TAG_SLASH:(C(l,i)&&P(t,"Invalid character in tag name"),t.state=k.ATTRIB));continue;case k.OPEN_TAG_SLASH:i===">"?(F(t,!0),I(t)):(P(t,"Forward-slash in opening tag not followed by >"),t.state=k.ATTRIB);continue;case k.ATTRIB:if(N(l,i))continue;i===">"?F(t):i==="/"?t.state=k.OPEN_TAG_SLASH:N(E,i)?(t.attribName=i,t.attribValue="",t.state=k.ATTRIB_NAME):P(t,"Invalid attribute name");continue;case k.ATTRIB_NAME:i==="="?t.state=k.ATTRIB_VALUE:i===">"?(P(t,"Attribute without value"),t.attribValue=t.attribName,j(t),F(t)):N(l,i)?t.state=k.ATTRIB_NAME_SAW_WHITE:N(S,i)?t.attribName+=i:P(t,"Invalid attribute name");continue;case k.ATTRIB_NAME_SAW_WHITE:if(i==="=")t.state=k.ATTRIB_VALUE;else{if(N(l,i))continue;P(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",A(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",i===">"?F(t):N(E,i)?(t.attribName=i,t.state=k.ATTRIB_NAME):(P(t,"Invalid attribute name"),t.state=k.ATTRIB)}continue;case k.ATTRIB_VALUE:if(N(l,i))continue;N(p,i)?(t.q=i,t.state=k.ATTRIB_VALUE_QUOTED):(P(t,"Unquoted attribute value"),t.state=k.ATTRIB_VALUE_UNQUOTED,t.attribValue=i);continue;case k.ATTRIB_VALUE_QUOTED:if(i!==t.q){i==="&"?t.state=k.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=i;continue}j(t),t.q="",t.state=k.ATTRIB;continue;case k.ATTRIB_VALUE_UNQUOTED:if(C(v,i)){i==="&"?t.state=k.ATTRIB_VALUE_ENTITY_U:t.attribValue+=i;continue}j(t),i===">"?F(t):t.state=k.ATTRIB;continue;case k.CLOSE_TAG:if(!t.tagName){if(N(l,i))continue;C(E,i)?t.script?(t.script+="</"+i,t.state=k.SCRIPT):P(t,"Invalid tagname in closing tag."):t.tagName=i}else i===">"?I(t):N(S,i)?t.tagName+=i:t.script?(t.script+="</"+t.tagName,t.tagName="",t.state=k.SCRIPT):(C(l,i)&&P(t,"Invalid tagname in closing tag"),t.state=k.CLOSE_TAG_SAW_WHITE);continue;case k.CLOSE_TAG_SAW_WHITE:if(N(l,i))continue;i===">"?I(t):P(t,"Invalid characters in closing tag");continue;case k.TEXT_ENTITY:case k.ATTRIB_VALUE_ENTITY_Q:case k.ATTRIB_VALUE_ENTITY_U:switch(t.state){case k.TEXT_ENTITY:var u=k.TEXT,a="textNode";break;case k.ATTRIB_VALUE_ENTITY_Q:var u=k.ATTRIB_VALUE_QUOTED,a="attribValue";break;case k.ATTRIB_VALUE_ENTITY_U:var u=k.ATTRIB_VALUE_UNQUOTED,a="attribValue"}i===";"?(t[a]+=q(t),t.entity="",t.state=u):N(d,i)?t.entity+=i:(P(t,"Invalid character entity"),t[a]+="&"+t.entity+i,t.entity="",t.state=u);continue;default:throw new Error(t,"Unknown state: "+t.state)}}return t.position>=t.bufferCheckPosition&&r(t),t}e.parser=function(e,t){return new n(e,t)},e.SAXParser=n,e.SAXStream=f,e.createStream=a,e.MAX_BUFFER_LENGTH=65536;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){this.__proto__=e}return t.prototype=e,new t}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),n.prototype={end:function(){D(this)},write:R,resume:function(){return this.error=null,this},close:function(){return this.write(null)}};try{var s=require("stream").Stream}catch(o){var s=function(){}}var u=e.EVENTS.filter(function(e){return e!=="error"&&e!=="end"});f.prototype=Object.create(s.prototype,{constructor:{value:f}}),f.prototype.write=function(e){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(e)){if(!this._decoder){var t=require("string_decoder").StringDecoder;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},f.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},f.prototype.on=function(e,t){var n=this;return!n._parser["on"+e]&&u.indexOf(e)!==-1&&(n._parser["on"+e]=function(){var t=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),s.prototype.on.call(n,e,t)};var l="\r\n ",c="0124356789",h="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",p="'\"",d=c+h+"#",v=l+">",m="[CDATA[",g="DOCTYPE",y="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/2000/xmlns/",w={xml:y,xmlns:b};l=x(l),c=x(c),h=x(h);var E=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,S=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;p=x(p),d=x(d),v=x(v);var k=0;e.STATE={BEGIN:k++,TEXT:k++,TEXT_ENTITY:k++,OPEN_WAKA:k++,SGML_DECL:k++,SGML_DECL_QUOTED:k++,DOCTYPE:k++,DOCTYPE_QUOTED:k++,DOCTYPE_DTD:k++,DOCTYPE_DTD_QUOTED:k++,COMMENT_STARTING:k++,COMMENT:k++,COMMENT_ENDING:k++,COMMENT_ENDED:k++,CDATA:k++,CDATA_ENDING:k++,CDATA_ENDING_2:k++,PROC_INST:k++,PROC_INST_BODY:k++,PROC_INST_ENDING:k++,OPEN_TAG:k++,OPEN_TAG_SLASH:k++,ATTRIB:k++,ATTRIB_NAME:k++,ATTRIB_NAME_SAW_WHITE:k++,ATTRIB_VALUE:k++,ATTRIB_VALUE_QUOTED:k++,ATTRIB_VALUE_UNQUOTED:k++,ATTRIB_VALUE_ENTITY_Q:k++,ATTRIB_VALUE_ENTITY_U:k++,CLOSE_TAG:k++,CLOSE_TAG_SAW_WHITE:k++,SCRIPT:k++,SCRIPT_ENDING:k++},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(t){var n=e.ENTITIES[t],r=typeof n=="number"?String.fromCharCode(n):n;e.ENTITIES[t]=r});for(var k in e.STATE)e.STATE[e.STATE[k]]=k;k=e.STATE}(typeof exports=="undefined"?sax={}:exports),define("sax",function(e){return function(){var t,n;return t||e.sax}}(this)),define("filters/osis",["sax","bcv"],function(e,t){function s(e,n){var r="";return t.parse(e).osis()!==""?r='<a href="?type=crossReference&osisRef='+t.parse(e).osis()+"&n="+n.attributes.n+'">'+e+"</a>":r=e,r}var n={},r=e.parser(!0),i={headings:!1,footnotes:!1,strongsNumbers:!1,wordsOfChristInRed:!1,oneVersePerLine:!1};return n.processText=function(e,t,n){!n||n==={}?n=i:(n.headings=n.headings?n.headings:i.headings,n.footnotes=n.footnotes?n.footnotes:i.footnotes,n.strongsNumbers=n.strongsNumbers?n.strongsNumbers:i.strongsNumbers,n.wordsOfChristInRed=n.wordsOfChristInRed?n.wordsOfChristInRed:i.wordsOfChristInRed,n.oneVersePerLine=n.oneVersePerLine?n.oneVersePerLine:i.oneVersePerLine);var o="",u=null,a=null,f=null,l=null,c="",h="",p="",d="",v=!1;r.onerror=function(e){r.resume()},r.ontext=function(e){if(a)n.footnotes&&a.attributes.type==="crossReference"&&(o!=="reference"?h+=s(e,a):h+='<a href="?type=crossReference&osisRef='+f.attributes.osisRef+"&n="+a.attributes.n+'">'+e+"</a>");else if(u)switch(u.name){case"title":u.attributes.type==="section"?h="<h3>"+e+"</h3>"+h:h="<h1>"+e+"</h1>"+h;break;default:h+=e}else h+=e},r.onopentag=function(e){u=e,o=e.name;switch(e.name){case"xml":l={osisRef:e.attributes.osisRef,verseNum:e.attributes.verseNum},t==="RtoL"?h+="<span dir='rtl'><a href=\"?type=verseNum&osisRef="+l.osisRef+"\" class='verse-number'> "+l.verseNum+" </a><span dir='rtl'>":h+='<a href="?type=verseNum&osisRef='+l.osisRef+"\" class='verse-number'> "+l.verseNum+" </a>";break;case"note":e.attributes.type==="crossReference"&&n.footnotes&&(h+="["),a=e;break;case"reference":f=e}},r.onclosetag=function(e){switch(e){case"title":u=null;break;case"note":a.attributes.type==="crossReference"&&n.footnotes&&(h+="] "),c="",a=null;break;case"reference":f=null;break;case"xml":t==="RtoL"&&(h+="</span>")}o=""},r.onattribute=function(e){},r.onend=function(){};var m="";for(var g=0;g<e.length;g++)m="<xml osisRef='"+e[g].osis+"' verseNum = '"+e[g].verse+"'>"+e[g].text+"</xml>",r.write(m),r.close(),p+=n.oneVersePerLine?"<div class='verse' id = '"+e[g].osis+"'>"+h+"</div>":"<span class='verse' id = '"+e[g].osis+"'>"+h+"</span>",h="";return t==="RtoL"&&(p="<div style='text-align: right;'>"+p+"</div>"),p},n}),define("filters/plain",[],function(){var e={},t={oneVersePerLine:!1};return e.processText=function(e,n,r){var i="";!r||r==={}?r=t:r.oneVersePerLine=r.oneVersePerLine?r.oneVersePerLine:t.oneVersePerLine;for(var s=0;s<e.length;s++)outText=n!=="RtoL"?'<a href="?type=verseNum&osisRef='+e[s].osis+"\" class='verse-number'> "+e[s].verse+" </a>":"<span dir='rtl'><a href=\"?type=verseNum&osisRef="+e[s].osis+"\" class='verse-number'> "+e[s].verse+" </a></span>",outText+=n!=="RtoL"?e[s].text:"<span dir='rtl'>"+e[s].text+"</span>",i+=r.oneVersePerLine?"<div class='verse' id = '"+e[s].osis+"'>"+outText+"</div>":"<span class='verse' id = '"+e[s].osis+"'>"+outText+"</span>",outText="";return n==="RtoL"&&(i="<div style='text-align: right;'>"+i+"</div>"),i},e}),define("filterMgr",["filters/osis","filters/plain"],function(e,t){function n(n,r,i,s){return r.toLowerCase()==="osis"?e.processText(n,i,s):t.processText(n,i,s)}return{processText:n}}),define("swmodule",["dataMgr","verseKey","zText","filterMgr","versificationMgr"],function(e,t,n,r,i){function u(e,t,n){if(!(this instanceof u))throw new TypeError("Module constructor cannot be called as a function.");this.modKey=e,this.id=t,this.config=n}function a(e,t){}function f(t,n){e.getBlob(t,n)}var s=null,o=null;return u.create=function(e,t,n){return new u(e,t,n)},u.prototype={constructor:u,self:this,renderText:function(i,s,o){var u=null,a=null,l=this;typeof s=="function"&&(o=s);var c=t.parseVerseList(i,this.config.Versification);c.length!==0&&c[0].osis!==""?e.get(l.config.bcvPosID,function(e,t){e?o(e):(t.nt&&t.nt.hasOwnProperty(c[0].book)?(u=t.nt[c[0].book],a=l.config.nt):t.ot&&t.ot.hasOwnProperty(c[0].book)&&(u=t.ot[c[0].book],a=l.config.ot),u===null&&o({message:"Wrong passage. The requested chapter is not available in this module."}),f(a,function(e,t){e||n.getRawEntry(t,u,c,l.config.Encoding,function(e,t){e?o(e):o(null,r.processText(t,l.config.SourceType,l.config.Direction,s))})}))}):o({message:"Wrong passage. The requested chapter is not available in this module."})},getAllBooks:function(){return i.getAllBooks(this.config.Versification)},getVersesInChapter:function(e){return i.getVersesInChapter(i.getBookNum(e.split(".")[0],this.config.Versification),e.split(".")[1],this.config.Versification)}},u}),define("moduleMgr",["dataMgr","swmodule"],function(e,t){var n={};return n.getModules=function(n){var r=[];e.getModules(function(e,i){e?n(e):(i.forEach(function(e){r.push(new t(e.moduleKey,e.id,e))}),n(null,r))})},n.getModule=function(n,r){e.get(n,function(e,i){e?r(null):r(null,new t(i.moduleKey,n,i))})},n}),require.config({paths:{text:"libs/text/text",json:"libs/json/src/json",async:"libs/async/lib/async",bcv:"libs/bible-reference-parser/js/en_bcv_parser.min",unzip:"libs/zlib/bin/unzip.min",inflateStream:"libs/zlib/bin/inflate_stream.min",sax:"libs/sax/lib/sax",idb:"libs/IDBWrapper/idbstore.min"},shim:{bcv:{exports:"bcv_parser",init:function(){return new this.bcv_parser}},unzip:{exports:"Zlib"},inflateStream:{exports:"Zlib"},sax:{exports:"sax"}}}),define("sword",["installMgr","moduleMgr","dataMgr","versificationMgr","verseKey"],function(e,t,n,r,i){var s={};return s.installMgr=e,s.moduleMgr=t,s.versificationMgr=r,s.dataMgr=n,s.verseKey=i,s.isSupported=function(){var e={}.toString,t=[],n="[object Function]";return window.FileReader&&e.call(t.forEach)==n?!0:!1},s}),require("sword")});
\ No newline at end of file |