JAVASCRIPT   64

php.js

Guest on 9th October 2021 04:34:31 PM

  1. /*
  2.  * More info at: http://phpjs.org
  3.  *
  4.  * This is version: 3.26
  5.  * php.js is copyright 2011 Kevin van Zonneveld.
  6.  *
  7.  * Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
  8.  * (http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White
  9.  * (http://getsprink.com), Waldo Malqui Silva, Paulo Freitas, Jack, Jonas
  10.  * Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Legaev
  11.  * Andrey, Ates Goral (http://magnetiq.com), Alex, Ratheous, Martijn Wieringa,
  12.  * RafaÅ‚ Kukawski (http://blog.kukawski.pl), lmeyrick
  13.  * (https://sourceforge.net/projects/bcmath-js/), Nate, Philippe Baumann,
  14.  * Enrique Gonzalez, Webtoolkit.info (http://www.webtoolkit.info/), Carlos R.
  15.  * L. Rodrigues (http://www.jsfromhell.com), Ash Searle
  16.  * (http://hexmen.com/blog/), Jani Hartikainen, travc, Ole Vrijenhoek,
  17.  * Erkekjetter, Michael Grier, RafaÅ‚ Kukawski (http://kukawski.pl), Johnny
  18.  * Mast (http://www.phpvrouwen.nl), T.Wild, d3x,
  19.  * http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
  20.  * RafaÅ‚ Kukawski (http://blog.kukawski.pl/), stag019, pilus, WebDevHobo
  21.  * (http://webdevhobo.blogspot.com/), marrtins, GeekFG
  22.  * (http://geekfg.blogspot.com), Andrea Giammarchi
  23.  * (http://webreflection.blogspot.com), Arpad Ray (mailto:arpad@php.net),
  24.  * gorthaur, Paul Smith, Tim de Koning (http://www.kingsquare.nl), Joris, Oleg
  25.  * Eremeev, Steve Hilder, majak, gettimeofday, KELAN, Josh Fraser
  26.  * (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
  27.  * Marc Palau, Kevin van Zonneveld (http://kevin.vanzonneveld.net/), Martin
  28.  * (http://www.erlenwiese.de/), Breaking Par Consulting Inc
  29.  * (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
  30.  * Chris, Mirek Slugen, saulius, Alfonso Jimenez
  31.  * (http://www.alfonsojimenez.com), Diplom@t (http://difane.com/), felix,
  32.  * Mailfaker (http://www.weedem.fr/), Tyler Akins (http://rumkin.com), Caio
  33.  * Ariede (http://caioariede.com), Robin, Kankrelune
  34.  * (http://www.webfaktory.info/), Karol Kowalski, Imgen Tata
  35.  * (http://www.myipdf.com/), mdsjack (http://www.mdsjack.bo.it), Dreamer,
  36.  * Felix Geisendoerfer (http://www.debuggable.com/felix), Lars Fischer, AJ,
  37.  * David, Aman Gupta, Michael White, Public Domain
  38.  * (http://www.json.org/json2.js), Steven Levithan
  39.  * (http://blog.stevenlevithan.com), Sakimori, Pellentesque Malesuada,
  40.  * Thunder.m, Dj (http://phpjs.org/functions/htmlentities:425#comment_134018),
  41.  * Steve Clay, David James, Francois, class_exists, nobbler, T. Wild, Itsacon
  42.  * (http://www.itsacon.net/), date, Ole Vrijenhoek (http://www.nervous.nl/),
  43.  * Fox, Raphael (Ao RUDLER), Marco, noname, Mateusz "loonquawl" Zalega, Frank
  44.  * Forte, Arno, ger, mktime, john (http://www.jd-tech.net), Nick Kolosov
  45.  * (http://sammy.ru), marc andreu, Scott Cariss, Douglas Crockford
  46.  * (http://javascript.crockford.com), madipta, Slawomir Kaniecki,
  47.  * ReverseSyntax, Nathan, Alex Wilson, kenneth, Bayron Guevara, Adam Wallner
  48.  * (http://web2.bitbaro.hu/), paulo kuong, jmweb, Lincoln Ramsay, djmix,
  49.  * Pyerre, Jon Hohle, Thiago Mata (http://thiagomata.blog.com), lmeyrick
  50.  * (https://sourceforge.net/projects/bcmath-js/this.), Linuxworld, duncan,
  51.  * Gilbert, Sanjoy Roy, Shingo, sankai, Oskar Larsson Högfeldt
  52.  * (http://oskar-lh.name/), Denny Wardhana, 0m3r, Everlasto, Subhasis Deb,
  53.  * josh, jd, Pier Paolo Ramon (http://www.mastersoup.com/), P, merabi, Soren
  54.  * Hansen, Eugene Bulkin (http://doubleaw.com/), Der Simon
  55.  * (http://innerdom.sourceforge.net/), echo is bad, Ozh, XoraX
  56.  * (http://www.xorax.info), EdorFaus, JB, J A R, Marc Jansen, Francesco, LH,
  57.  * Stoyan Kyosev (http://www.svest.org/), nord_ua, omid
  58.  * (http://phpjs.org/functions/380:380#comment_137122), Brad Touesnard, MeEtc
  59.  * (http://yass.meetcweb.com), Peter-Paul Koch
  60.  * (http://www.quirksmode.org/js/beat.html), Olivier Louvignes
  61.  * (http://mg-crea.com/), T0bsn, Tim Wiel, Bryan Elliott, Jalal Berrami,
  62.  * Martin, JT, David Randall, Thomas Beaucourt (http://www.webapp.fr), taith,
  63.  * vlado houba, Pierre-Luc Paour, Kristof Coomans (SCK-CEN Belgian Nucleair
  64.  * Research Centre), Martin Pool, Kirk Strobeck, Rick Waldron, Brant Messenger
  65.  * (http://www.brantmessenger.com/), Devan Penner-Woelk, Saulo Vallory, Wagner
  66.  * B. Soares, Artur Tchernychev, Valentina De Rosa, Jason Wong
  67.  * (http://carrot.org/), Christoph, Daniel Esteban, strftime, Mick@el, rezna,
  68.  * Simon Willison (http://simonwillison.net), Anton Ongson, Gabriel Paderni,
  69.  * Marco van Oort, penutbutterjelly, Philipp Lenssen, Bjorn Roesbeke
  70.  * (http://www.bjornroesbeke.be/), Bug?, Eric Nagel, Tomasz Wesolowski,
  71.  * Evertjan Garretsen, Bobby Drake, Blues (http://tech.bluesmoon.info/), Luke
  72.  * Godfrey, Pul, uestla, Alan C, Ulrich, Rafal Kukawski, Yves Sucaet,
  73.  * sowberry, Norman "zEh" Fuchs, hitwork, Zahlii, johnrembo, Nick Callen,
  74.  * Steven Levithan (stevenlevithan.com), ejsanders, Scott Baker, Brian Tafoya
  75.  * (http://www.premasolutions.com/), Philippe Jausions
  76.  * (http://pear.php.net/user/jausions), Aidan Lister
  77.  * (http://aidanlister.com/), Rob, e-mike, HKM, ChaosNo1, metjay, strcasecmp,
  78.  * strcmp, Taras Bogach, jpfle, Alexander Ermolaev
  79.  * (http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, kilops, Orlando,
  80.  * dptr1988, Le Torbi, James (http://www.james-bell.co.uk/), Pedro Tainha
  81.  * (http://www.pedrotainha.com), James, Arnout Kazemier
  82.  * (http://www.3rd-Eden.com), Chris McMacken, gabriel paderni, Yannoo,
  83.  * FGFEmperor, baris ozdil, Tod Gentille, Greg Frazier, jakes, 3D-GRAF, Allan
  84.  * Jensen (http://www.winternet.no), Howard Yeend, Benjamin Lupton, davook,
  85.  * daniel airton wermann (http://wermann.com.br), Atli Þór, Maximusya, Ryan
  86.  * W Tenney (http://ryan.10e.us), Alexander M Beedie, fearphage
  87.  * (http://http/my.opera.com/fearphage/), Nathan Sepulveda, Victor, Matteo,
  88.  * Billy, stensi, Cord, Manish, T.J. Leahy, Riddler
  89.  * (http://www.frontierwebdev.com/), RafaÅ‚ Kukawski, FremyCompany, Matt
  90.  * Bradley, Tim de Koning, Luis Salazar (http://www.freaky-media.com/), Diogo
  91.  * Resende, Rival, Andrej Pavlovic, Garagoth, Le Torbi
  92.  * (http://www.letorbi.de/), Dino, Josep Sanz (http://www.ws3.es/), rem,
  93.  * Russell Walker (http://www.nbill.co.uk/), Jamie Beck
  94.  * (http://www.terabit.ca/), setcookie, Michael, YUI Library:
  95.  * http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, Blues at
  96.  * http://hacks.bluesmoon.info/strftime/strftime.js, Ben
  97.  * (http://benblume.co.uk/), DtTvB
  98.  * (http://dt.in.th/2008-09-16.string-length-in-bytes.html), Andreas, William,
  99.  * meo, incidence, Cagri Ekin, Amirouche, Amir Habibi
  100.  * (http://www.residence-mixte.com/), Luke Smith (http://lucassmith.name),
  101.  * Kheang Hok Chin (http://www.distantia.ca/), Jay Klehr, Lorenzo Pisani,
  102.  * Tony, Yen-Wei Liu, Greenseed, mk.keck, Leslie Hoare, dude, booeyOH, Ben
  103.  * Bryan
  104.  *
  105.  * Dual licensed under the MIT (MIT-LICENSE.txt)
  106.  * and GPL (GPL-LICENSE.txt) licenses.
  107.  *
  108.  * Permission is hereby granted, free of charge, to any person obtaining a
  109.  * copy of this software and associated documentation files (the
  110.  * "Software"), to deal in the Software without restriction, including
  111.  * without limitation the rights to use, copy, modify, merge, publish,
  112.  * distribute, sublicense, and/or sell copies of the Software, and to
  113.  * permit persons to whom the Software is furnished to do so, subject to
  114.  * the following conditions:
  115.  *
  116.  * The above copyright notice and this permission notice shall be included
  117.  * in all copies or substantial portions of the Software.
  118.  *
  119.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  120.  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  121.  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  122.  * IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
  123.  * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  124.  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  125.  * OTHER DEALINGS IN THE SOFTWARE.
  126.  */ THE// Compression: minified
  127. ression: minified
  128.  
  129.  
  130. function abs(mixed_number){return Math.abs(mixed_number)||0;}
  131. function acos(arg){return Math.acos(arg);}
  132. function acosh(arg){return Math.log(arg+Math.sqrt(arg*arg-1));}
  133. function addslashes(str){return(str+'').replace(replace(/,'\\$&').replace(
  134. function,'\\0');}
  135. function array_change_key_case(array,cs){var case_fn,key,tmp_ar={};if(Object.prototype.toString.call(array)==='[object Array]'){return array;}
  136. if(array&&typeof array==='object'&&array.change_key_case){return array.change_key_case(cs);}
  137. if(array&&typeof array==='object'){case_fn=(!cs||cs==='CASE_LOWER')?'toLowerCase':'toUpperCase';for(key in array){tmp_ar[key[case_fn]()]=array[key];}
  138. return tmp_ar;}
  139. return false;}
  140. function array_chunk(input,size,preserve_keys){var x,p='',i=0,c=-1,l=input.length||0,n=[];if(size<1){return null;}
  141. if(Object.prototype.toString.call(input)==='[object Array]'){if(preserve_keys){while(i<l){(x=i%size)?n[c][i]=input[i]:n[++c]={},n[c][i]=input[i];i++;}}
  142. else{while(i<l){(x=i%size)?n[c][x]=input[i]:n[++c]=[input[i]];i++;}}}
  143. else{if(preserve_keys){for(p in input){if(input.hasOwnProperty(p)){(x=i%size)?n[c][p]=input[p]:n[++c]={},n[c][p]=input[p];i++;}}}
  144. else{for(p in input){if(input.hasOwnProperty(p)){(x=i%size)?n[c][x]=input[p]:n[++c]=[input[p]];i++;}}}}
  145. return n;}
  146. function array_combine(keys,values){var new_array={},keycount=keys&&keys.length,i=0;if(typeof keys!=='object'||typeof values!=='object'||typeof keycount!=='number'||typeof values.length!=='number'||!keycount){return false;}
  147. if(keycount!=values.length){return false;}
  148. for(i=0;i<keycount;i++){new_array[keys[i]]=values[i];}
  149. return new_array;}
  150. function array_count_values(array){var tmp_arr={},key='',t='';var __getType=function(obj){var t=typeof obj;t=t.toLowerCase();if(t===";}
  151. return t;};var __countValue=function(value){switch(typeof(value)){case"peof(value)){case"number":if(Math.floor(value)!==value){return;}
  152. case"string":if(value in this&&this.hasOwnProperty(value)){++this[value];}else{this[value]=1;}}};t=__getType(array);if(t==='array'){for(key in array){if(array.hasOwnProperty(key)){__countValue.call(tmp_arr,array[key]);}}}
  153. return tmp_arr;}
  154. function array_diff(arr1){var retArr={},argl=arguments.length,k1='',i=1,k='',arr={};arr1keys:for(k1 in arr1){for(i=1;i<argl;i++){arr=arguments[i];for(k in arr){if(arr[k]===arr1[k1]){continue arr1keys;}}
  155. retArr[k1]=arr1[k1];}}
  156. return retArr;}
  157. function array_diff_assoc(arr1){var retArr={},argl=arguments.length,k1='',i=1,k='',arr={};arr1keys:for(k1 in arr1){for(i=1;i<argl;i++){arr=arguments[i];for(k in arr){if(arr[k]===arr1[k1]&&k===k1){continue arr1keys;}}
  158. retArr[k1]=arr1[k1];}}
  159. return retArr;}
  160. function array_diff_key(arr1){var argl=arguments.length,retArr={},k1='',i=1,k='',arr={};arr1keys:for(k1 in arr1){for(i=1;i<argl;i++){arr=arguments[i];for(k in arr){if(k===k1){continue arr1keys;}}
  161. retArr[k1]=arr1[k1];}}
  162. return retArr;}
  163. function array_diff_uassoc(arr1){var retArr={},arglm1=arguments.length-1,cb=arguments[arglm1],arr={},i=1,k1='',k=''string'peof cb==='string')?this.window[cb]:(Object.prototype.toString.call(cb)==='[object Array]')?this.window[cb[0]][cb[1]]:cb;arr1keys:for(k1 in arr1){for(i=1;i<arglm1;i++){arr=arguments[i];for(k in arr){if(arr[k]===arr1[k1]&&cb(k,k1)===0){continue arr1keys;}}
  164. retArr[k1]=arr1[k1];}}
  165. return retArr;}
  166. function array_diff_ukey(arr1){var retArr={},arglm1=arguments.length-1,cb=arguments[arglm1],arr={},i=1,k1='',k=''string'peof cb==='string')?this.window[cb]:(Object.prototype.toString.call(cb)==='[object Array]')?this.window[cb[0]][cb[1]]:cb;arr1keys:for(k1 in arr1){for(i=1;i<arglm1;i++){arr=arguments[i];for(k in arr){if(cb(k,k1)===0){continue arr1keys;}}
  167. retArr[k1]=arr1[k1];}}
  168. return retArr;}
  169. function array_fill(start_index,num,mixed_val){var key,tmp_arr={};if(!isNaN(start_index)&&!isNaN(num)){for(key=0;key<num;key++){tmp_arr[(key+start_index)]=mixed_val;}}
  170. return tmp_arr;}
  171. function array_fill_keys(keys,value){var retObj={},key='';for(key in keys){retObj[keys[key]]=value;}
  172. return retObj;}
  173. function array_filter(arr,func){var retObj={},k;for(k in arr){if(func(arr[k])){retObj[k]=arr[k];}}
  174. return retObj;}
  175. function array_flip(trans){var key,tmp_ar={};for(key in trans){if(!trans.hasOwnProperty(key)){continue;}
  176. tmp_ar[trans[key]]=key;}
  177. return tmp_ar;}
  178. function array_intersect(arr1){var retArr={},argl=arguments.length,arglm1=argl-1,k1='',arr={},i=0,k='';arr1keys:for(k1 in arr1){arrs:for(i=1;i<argl;i++){arr=arguments[i];for(k in arr){if(arr[k]===arr1[k1]){if(i===arglm1){retArr[k1]=arr1[k1];}
  179. continue arrs;}}
  180. continue arr1keys;}}
  181. return retArr;}
  182. function array_intersect_assoc(arr1){var retArr={},argl=arguments.length,arglm1=argl-1,k1='',arr={},i=0,k='';arr1keys:for(k1 in arr1){arrs:for(i=1;i<argl;i++){arr=arguments[i];for(k in arr){if(arr[k]===arr1[k1]&&k===k1){if(i===arglm1){retArr[k1]=arr1[k1];}
  183. continue arrs;}}
  184. continue arr1keys;}}
  185. return retArr;}
  186. function array_intersect_key(arr1){var retArr={},argl=arguments.length,arglm1=argl-1,k1='',arr={},i=0,k='';arr1keys:for(k1 in arr1){arrs:for(i=1;i<argl;i++){arr=arguments[i];for(k in arr){if(k===k1){if(i===arglm1){retArr[k1]=arr1[k1];}
  187. continue arrs;}}
  188. continue arr1keys;}}
  189. return retArr;}
  190. function array_intersect_uassoc(arr1){var retArr={},arglm1=arguments.length-1,arglm2=arglm1-1,cb=arguments[arglm1],k1='',i=1,arr={},k=''string'peof cb==='string')?this.window[cb]:(Object.prototype.toString.call(cb)==='[object Array]')?this.window[cb[0]][cb[1]]:cb;arr1keys:for(k1 in arr1){arrs:for(i=1;i<arglm1;i++){arr=arguments[i];for(k in arr){if(arr[k]===arr1[k1]&&cb(k,k1)===0){if(i===arglm2){retArr[k1]=arr1[k1];}
  191. continue arrs;}}
  192. continue arr1keys;}}
  193. return retArr;}
  194. function array_intersect_ukey(arr1){var retArr={},arglm1=arguments.length-1,arglm2=arglm1-1,cb=arguments[arglm1],k1='',i=1,arr={},k=''string'peof cb==='string')?this.window[cb]:(Object.prototype.toString.call(cb)==='[object Array]')?this.window[cb[0]][cb[1]]:cb;arr1keys:for(k1 in arr1){arrs:for(i=1;i<arglm1;i++){arr=arguments[i];for(k in arr){if(cb(k,k1)===0){if(i===arglm2){retArr[k1]=arr1[k1];}
  195. continue arrs;}}
  196. continue arr1keys;}}
  197. return retArr;}
  198. function array_key_exists(key,search){if(!search||(search.constructor!==Array&&search.constructor!==Object)){return false;}
  199. return key in search;}
  200. function array_keys(input,search_value,argStrict){var search=typeof search_value!=='undefined',tmp_arr=[],strict=!!argStrict,include=true,key='';if(input&&typeof input==='object'&&input.change_key_case){return input.keys(search_value,argStrict);}
  201. for(key in input){if(input.hasOwnProperty(key)){include=true;if(search){if(strict&&input[key]!==search_value){include=false;}
  202. else if(input[key]!=search_value){include=false;}}
  203. if(include){tmp_arr[tmp_arr.length]=key;}}}
  204. return tmp_arr;}
  205. function array_map(callback){var argc=arguments.length,argv=arguments;var j=argv[1].length,i=0,k=1,m=0;var tmp=[],tmp_ar=[];while(i<j){while(k<argc){tmp[m++]=argv[k++][i];}
  206. m=0;k=1;if(callback){if(typeof callback==='string'){callback=this.window[callback];}
  207. tmp_ar[i++]=callback.apply(null,tmp);}else{tmp_ar[i++]=tmp;}
  208. tmp=[];}
  209. return tmp_ar;}
  210. function array_merge(){var args=Array.prototype.slice.call(arguments),argl=args.length,arg,retObj={},k='',argil=0,j=0,i=0,ct=0,toStr=Object.prototype.toString,retArr=true;for(i=0;i<argl;i++){if(toStr.call(args[i])!=='[object Array]'){retArr=false;break;}}
  211. if(retArr){retArr=[];for(i=0;i<argl;i++){retArr=retArr.concat(args[i]);}
  212. return retArr;}
  213. for(i=0,ct=0;i<argl;i++){arg=args[i];if(toStr.call(arg)==='[object Array]'){for(j=0,argil=arg.length;j<argil;j++){retObj[ct++]=arg[j];}}
  214. else{for(k in arg){if(arg.hasOwnProperty(k)){if(parseInt(k,10)+''===k){retObj[ct++]=arg[k];}
  215. else{retObj[k]=arg[k];}}}}}
  216. return retObj;}
  217. function array_merge_recursive(arr1,arr2){var idx='';if(arr1&&Object.prototype.toString.call(arr1)==='[object Array]'&&arr2&&Object.prototype.toString.call(arr2)==='[object Array]'){for(idx in arr2){arr1.push(arr2[idx]);}}else if((arr1&&(arr1 instanceof Object))&&(arr2&&(arr2 instanceof Object))){for(idx in arr2){if(idx in arr1){if(typeof arr1[idx]=='object'&&typeof arr2=='object'){arr1[idx]=this.array_merge(arr1[idx],arr2[idx]);}else{arr1[idx]=arr2[idx];}}else{arr1[idx]=arr2[idx];}}}
  218. return arr1;}
  219. function array_pad(input,pad_size,pad_value){var pad=[],newArray=[],newLength,diff=0,i=0;if(Object.prototype.toString.call(input)==='[object Array]'&&!isNaN(pad_size)){newLength=((pad_size<0)?(pad_size*-1):pad_size);diff=newLength-input.length;if(diff>0){for(i=0;i<diff;i++){newArray[i]=pad_value;}
  220. pad=((pad_size<0)?newArray.concat(input):input.concat(newArray));}else{pad=input;}}
  221. return pad;}
  222. function array_pop(inputArr){var key='',lastKey='';if(inputArr.hasOwnProperty('length')){if(!inputArr.length){return null;}
  223. return inputArr.pop();}else{for(key in inputArr){if(inputArr.hasOwnProperty(key)){lastKey=key;}}
  224. if(lastKey){var tmp=inputArr[lastKey];delete(inputArr[lastKey]);return tmp;}else{return null;}}}
  225. function array_product(input){var idx=0,product=1,il=0;if(Object.prototype.toString.call(input)!=='[object Array]'){return null;}
  226. il=input.length;while(idx<il){product*=(!isNaN(input[idx])?input[idx]:0);idx++;}
  227. return product;}
  228. function array_push(inputArr){var i=0,pr='',argv=arguments,argc=argv.length,allDigits=estIdx,size=0,highestIdx=0,len=0;if(inputArr.hasOwnProperty('length')){for(i=1;i<argc;i++){inputArr[inputArr.length]=argv[i];}
  229. return inputArr.length;}
  230. for(pr in inputArr){if(inputArr.hasOwnProperty(pr)){++len;if(pr.search(allDigits)!==-1){size=parseInt(pr,10);highestIdx=size>highestIdx?size:highestIdx;}}}
  231. for(i=1;i<argc;i++){inputArr[++highestIdx]=argv[i];}
  232. return len+i-1;}
  233. function array_rand(input,num_req){var indexes=[];var ticks=num_req||1;var checkDuplicate=function(input,value){var exist=false,index=0,il=input.length;while(index<il){if(input[index]===value){exist=true;break;}
  234. index++;}
  235. return exist;};if(Object.prototype.toString.call(input)==='[object Array]'&&ticks<=input.length){while(true){var rand=Math.floor((Math.random()*input.length));if(indexes.length===ticks){break;}
  236. if(!checkDuplicate(indexes,rand)){indexes.push(rand);}}}else{indexes=null;}
  237. return((ticks==1)?indexes.join():indexes);}
  238. function array_reduce(a_input,callback){var lon=a_input.length;var res=0,i=0;var tmp=[];for(i=0;i<lon;i+=2){tmp[0]=a_input[i];if(a_input[(i+1)]){tmp[1]=a_input[(i+1)];}else{tmp[1]=0;}
  239. res+=callback.apply(null,tmp);tmp=[];}
  240. return res;}
  241. function array_reverse(array,preserve_keys){var isArray=Object.prototype.toString.call(array)==="[object Array]",tmp_arr=preserve_keys?{}:[],key;if(isArray&&!preserve_keys){return array.slice(0).reverse();}
  242. if(preserve_keys){var keys=[];for(key in array){keys.push(key);}
  243. var i=keys.length;while(i--){key=keys[i];tmp_arr[key]=array[key];}}else{for(key in array){tmp_arr.unshift(array[key]);}}
  244. return tmp_arr;}
  245. function array_search(needle,haystack,argStrict){var strict=!!argStrict,key='';if(haystack&&typeof haystack==='object'&&haystack.change_key_case){return haystack.search(needle,argStrict);}
  246. if(typeof needle==='object'&&needle.exec){if(!strict){var flags='i'+(needle.global?'g':'')+
  247. (needle.multiline?'m':'')+
  248. (needle.sticky?'y':'');needle=new RegExp(needle.source,flags);}
  249. for(key in haystack){if(needle.test(haystack[key])){return key;}}
  250. return false;}
  251. for(key in haystack){if((strict&&haystack[key]===needle)||(!strict&&haystack[key]==needle)){return key;}}
  252. return false;}
  253. function array_shift(inputArr){var props=false,shift=undefined,pr='',allDigits=checkT,int_ct=-1,_checkToUpIndices=function(arr,ct,key){if(arr[ct]!==undefined){var tmp=ct;ct+=1;if(ct===key){ct+=1;}
  254. ct=_checkToUpIndices(arr,ct,key);arr[ct]=arr[tmp];delete arr[tmp];}
  255. return ct;};if(inputArr.length===0){return null;}
  256. if(inputArr.length>0){return inputArr.shift();}}
  257. function array_slice(arr,offst,lgth,preserve_keys){var key='';if(Object.prototype.toString.call(arr)!=='[object Array]'||(preserve_keys&&offst!==0)){var lgt=0,newAssoc={};for(key in arr){lgt+=1;newAssoc[key]=arr[key];}
  258. arr=newAssoc;offst=(offst<0)?lgt+offst:offst;lgth=lgth===undefined?lgt:(lgth<0)?lgt+lgth-offst:lgth;var assoc={};var start=false,it=-1,arrlgth=0,no_pk_idx=0;for(key in arr){++it;if(arrlgth>=lgth){break;}
  259. if(it==offst){start=true;}
  260. if(!start){continue;}++arrlgth;if(this.is_int(key)&&!preserve_keys){assoc[no_pk_idx++]=arr[key];}else{assoc[key]=arr[key];}}
  261. return assoc;}
  262. if(lgth===undefined){return arr.slice(offst);}else if(lgth>=0){return arr.slice(offst,offst+lgth);}else{return arr.slice(offst,lgth);}}
  263. function array_splice(arr,offst,lgth,replacement){var _checkToUpIndices=function(arr,ct,key){if(arr[ct]!==undefined){var tmp=ct;ct+=1;if(ct===key){ct+=1;}
  264. ct=_checkToUpIndices(arr,ct,key);arr[ct]=arr[tmp];delete arr[tmp];}
  265. return ct;};if(replacement&&typeof replacement!=='object'){replacement=[replacement];}
  266. if(lgth===undefined){lgth=offst>=0?arr.length-offst:-offst;}else if(lgth<0){lgth=(offst>=0?arr.length-offst:-offst)+lgth;}
  267. if(Object.prototype.toString.call(arr)!=='[object Array]'){var lgt=0,ct=-1,rmvd=[],rmvdObj={},repl_ct=-1,int_ct=-1;var returnArr=true,rmvd_ct=0,rmvd_lgth=0,key='';for(key in arr){lgt+=1;}
  268. offst=(offst>=0)?offst:lgt+offst;for(key in arr){ct+=1;if(ct<offst){if(this.is_int(key)){int_ct+=1;if(parseInt(key,10)===int_ct){continue;}
  269. _checkToUpIndices(arr,int_ct,key);arr[int_ct]=arr[key];delete arr[key];}
  270. continue;}
  271. if(returnArr&&this.is_int(key)){rmvd.push(arr[key]);rmvdObj[rmvd_ct++]=arr[key];}else{rmvdObj[key]=arr[key];returnArr=false;}
  272. rmvd_lgth+=1;if(replacement&&replacement[++repl_ct]){arr[key]=replacement[repl_ct];}else{delete arr[key];}}
  273. return returnArr?rmvd:rmvdObj;}
  274. if(replacement){replacement.unshift(offst,lgth);return Array.prototype.splice.apply(arr,replacement);}
  275. return arr.splice(offst,lgth);}
  276. function array_sum(array){var key,sum=0;if(typeof array!=='object'){return null;}
  277. for(key in array){sum+=(array[key]*1);}
  278. return sum;}
  279. function array_udiff(arr1){var retArr={},arglm1=arguments.length-1,cb=arguments[arglm1],arr='',i=1,k1='',k=''string'peof cb==='string')?this.window[cb]:(Object.prototype.toString.call(cb)==='[object Array]')?this.window[cb[0]][cb[1]]:cb;arr1keys:for(k1 in arr1){for(i=1;i<arglm1;i++){arr=arguments[i];for(k in arr){if(cb(arr[k],arr1[k1])===0){continue arr1keys;}}
  280. retArr[k1]=arr1[k1];}}
  281. return retArr;}
  282. function array_udiff_assoc(arr1){var retArr={},arglm1=arguments.length-1,cb=arguments[arglm1],arr={},i=1,k1='',k=''string'peof cb==='string')?this.window[cb]:(Object.prototype.toString.call(cb)==='[object Array]')?this.window[cb[0]][cb[1]]:cb;arr1keys:for(k1 in arr1){for(i=1;i<arglm1;i++){arr=arguments[i];for(k in arr){if(cb(arr[k],arr1[k1])===0&&k===k1){continue arr1keys;}}
  283. retArr[k1]=arr1[k1];}}
  284. return retArr;}
  285. function array_udiff_uassoc(arr1){var retArr={},arglm1=arguments.length-1,arglm2=arglm1-1,cb=arguments[arglm1],cb0=arguments[arglm2],k1='',i=1,k='',arr={};cb=(typeof cb==='string')?this.window[cb]:(Object.prototype.toString.call(cb)==='[object Array]')?this.window[cb[0]][cb[1]]:cb;cb0=(typeof cb0==='string')?this.window[cb0]:(Object.prototype.toString.call(cb0)==='[object Array]')?this.window[cb0[0]][cb0[1]]:cb0;arr1keys:for(k1 in arr1){for(i=1;i<arglm2;i++){arr=arguments[i];for(k in arr){if(cb0(arr[k],arr1[k1])===0&&cb(k,k1)===0){continue arr1keys;}}
  286. retArr[k1]=arr1[k1];}}
  287. return retArr;}
  288. function array_uintersect(arr1){var retArr={},arglm1=arguments.length-1,arglm2=arglm1-1,cb=arguments[argm1],k1='',i=1,arr={},k=''string'peof cb==='string')?this.window[cb]:(Object.prototype.toString.call(cb)==='[object Array]')?this.window[cb[0]][cb[1]]:cb;arr1keys:for(k1 in arr1){arrs:for(i=1;i<arglm1;i++){arr=arguments[i];for(k in arr){if(cb(arr[k],arr1[k1])===0){if(i===arglm2){retArr[k1]=arr1[k1];}
  289. continue arrs;}}
  290. continue arr1keys;}}
  291. return retArr;}
  292. function array_uintersect_assoc(arr1){var retArr={},arglm1=arguments.length-1,arglm2=arglm1-2,cb=arguments[arglm1],k1='',i=1,arr={},k=''string'peof cb==='string')?this.window[cb]:(Object.prototype.toString.call(cb)==='[object Array]')?this.window[cb[0]][cb[1]]:cb;arr1keys:for(k1 in arr1){arrs:for(i=1;i<arglm1;i++){arr=arguments[i];for(k in arr){if(k===k1&&cb(arr[k],arr1[k1])===0){if(i===arglm2){retArr[k1]=arr1[k1];}
  293. continue arrs;}}
  294. continue arr1keys;}}
  295. return retArr;}
  296. function array_uintersect_uassoc(arr1){var retArr={},arglm1=arguments.length-1,arglm2=arglm1-1,cb=arguments[arglm1],cb0=arguments[arglm2],k1='',i=1,k='',arr={};cb=(typeof cb==='string')?this.window[cb]:(Object.prototype.toString.call(cb)==='[object Array]')?this.window[cb[0]][cb[1]]:cb;cb0=(typeof cb0==='string')?this.window[cb0]:(Object.prototype.toString.call(cb0)==='[object Array]')?this.window[cb0[0]][cb0[1]]:cb0;arr1keys:for(k1 in arr1){arrs:for(i=1;i<arglm2;i++){arr=arguments[i];for(k in arr){if(cb0(arr[k],arr1[k1])===0&&cb(k,k1)===0){if(i===arguments.length-3){retArr[k1]=arr1[k1];}
  297. continue arrs;}}
  298. continue arr1keys;}}
  299. return retArr;}
  300. function array_unique(inputArr){var key='''tmp_arr2={},val='';var __array_search=function(needle,haystack){var fkey='';for(fkey in haystack){if(haystack.hasOwnProperty(fkey)){if((haystack[fkey]+'')===(needle+'')){return fkey;}}}
  301. return false;};for(key in inputArr){if(inputArr.hasOwnProperty(key)){val=inputArr[key];if(false===__array_search(val,tmp_arr2)){tmp_arr2[key]=val;}}}
  302. return tmp_arr2;}
  303. function array_unshift(array){var i=arguments.length;while(--i!==0){arguments[0].unshift(arguments[i]);}
  304. return arguments[0].length;}
  305. function array_values(input){var tmp_arr=[],key='';if(input&&typeof input==='object'&&input.change_key_case){return input.values();}
  306. for(key in input){tmp_arr[tmp_arr.length]=input[key];}
  307. return tmp_arr;}
  308. function array_walk(array,funcname,userdata){var key;if(typeof array!=='object'||array===null){return false;}
  309. for(key in array){if(typeof(userdata)!=='undefined'){eval(funcname+'( array [key] , key , userdata  )');}else{eval(funcname+'(  userdata ) ');}}
  310. return true;}
  311. function array_walk_recursive(array,funcname,userdata){var key;if(typeof array!='object'){return false;}
  312. for(key in array){if(typeof array[key]=='object'){return this.array_walk_recursive(array[key],funcname,userdata);}
  313. if(typeof(userdata)!='undefined'){eval(funcname+'( array [key] , key , userdata  )');}else{eval(funcname+'(  userdata ) ');}}
  314. return true;}
  315. function arsort(inputArr,sort_flags){var valArr=[],valArrLen=0,k,i,ret,sorter,that=this,strictForIn=false,populateArr={};switch(sort_flags){case'SORT_STRING':sorter=function(a,b){return that.strnatcmp(b,a);};break;case'SORT_LOCALE_STRING':var loc=this.i18n_loc_get_default();sorter=this.php_js.i18nLocales[loc].sorting;break;case'SORT_NUMERIC':sorter=function(a,b){return(a-b);};break;case'SORT_REGULAR':default:sorter=function(b,a){var aFloat=parseFloat(a),bFloat=parseFloat(b),aNumeric=aFloat+''===a,bNumeric=bFloat+''===b;if(aNumeric&&bNumeric){return aFloat>bFloat?1:aFloat<bFloat?-1:0;}else if(aNumeric&&!bNumeric){return 1;}else if(!aNumeric&&bNumeric){return-1;}
  316. return a>b?1:a<b?-1:0;};break;}
  317. this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(k in inputArr){if(inputArr.hasOwnProperty(k)){valArr.push([k,inputArr[k]]);if(strictForIn){delete inputArr[k];}}}
  318. valArr.sort(function(a,b){return sorter(a[1],b[1]);});for(i=0,valArrLen=valArr.length;i<valArrLen;i++){populateArr[valArr[i][0]]=valArr[i][1];}
  319. return strictForIn||populateArr;}
  320. function asin(arg){return Math.asin(arg);}
  321. function asinh(arg){return Math.log(arg+Math.sqrt(arg*arg+1));}
  322. function asort(inputArr,sort_flags){var valArr=[],valArrLen=0,k,i,ret,sorter,that=this,strictForIn=false,populateArr={};switch(sort_flags){case'SORT_STRING':sorter=function(a,b){return that.strnatcmp(a,b);};break;case'SORT_LOCALE_STRING':var loc=this.i18n_loc_get_default();sorter=this.php_js.i18nLocales[loc].sorting;break;case'SORT_NUMERIC':sorter=function(a,b){return(a-b);};break;case'SORT_REGULAR':default:sorter=function(a,b){var aFloat=parseFloat(a),bFloat=parseFloat(b),aNumeric=aFloat+''===a,bNumeric=bFloat+''===b;if(aNumeric&&bNumeric){return aFloat>bFloat?1:aFloat<bFloat?-1:0;}else if(aNumeric&&!bNumeric){return 1;}else if(!aNumeric&&bNumeric){return-1;}
  323. return a>b?1:a<b?-1:0;};break;}
  324. this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(k in inputArr){if(inputArr.hasOwnProperty(k)){valArr.push([k,inputArr[k]]);if(strictForIn){delete inputArr[k];}}}
  325. valArr.sort(function(a,b){return sorter(a[1],b[1]);});for(i=0,valArrLen=valArr.length;i<valArrLen;i++){populateArr[valArr[i][0]]=valArr[i][1];}
  326. return strictForIn||populateArr;}
  327. function atan(arg){return Math.atan(arg);}
  328. function atan2(y,x){return Math.atan2(y,x);}
  329. function atanh(arg){return 0.5*Math.log((1+arg)/(1-arg));}
  330. function base64_decode(data){var b64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var o1,o2,o3,h1,h2,h3,h4,bits,i=0,ac=0,dec="",tmp_arr=[];if(!data){return data;}
  331. data+='';do{h1=b64.indexOf(data.charAt(i++));h2=b64.indexOf(data.charAt(i++));h3=b64.indexOf(data.charAt(i++));h4=b64.indexOf(data.charAt(i++));bits=h1<<18|h2<<12|h3<<6|h4;o1=bits>>16&0xff;o2=bits>>8&0xff;o3=bits&0xff;if(h3==64){tmp_arr[ac++]=String.fromCharCode(o1);}else if(h4==64){tmp_arr[ac++]=String.fromCharCode(o1,o2);}else{tmp_arr[ac++]=String.fromCharCode(o1,o2,o3);}}while(i<data.length);dec=tmp_arr.join('');dec=this.utf8_decode(dec);return dec;}
  332. function base64_encode(data){var b64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var o1,o2,o3,h1,h2,h3,h4,bits,i=0,ac=0,enc="",tmp_arr=[];if(!data){return data;}
  333. data=this.utf8_encode(data+'');do{o1=data.charCodeAt(i++);o2=data.charCodeAt(i++);o3=data.charCodeAt(i++);bits=o1<<16|o2<<8|o3;h1=bits>>18&0x3f;h2=bits>>12&0x3f;h3=bits>>6&0x3f;h4=bits&0x3f;tmp_arr[ac++]=b64.charAt(h1)+b64.charAt(h2)+b64.charAt(h3)+b64.charAt(h4);}while(i<data.length);enc=tmp_arr.join('');var r=data.length%3;return(r?enc.slice(0,r-3):enc)+'==='.slice(r||3);}
  334. function base_convert(number,frombase,tobase){return parseInt(number+'',frombase|0).toString(tobase|0);}
  335. function bin2hex(s){var i,f=0,a=[];s+='';f=s.length;for(i=0;i<f;i++){a[i]=s.charCodeAt(i).toString(16).replace(");}
  336. return a,"0$1");}
  337. return a.join('');}
  338. function bindec(binary_string){binary_string=(binary_string+'').replace(rn parseI,'');return parseInt(binary_string,2);}
  339. function ceil(value){return Math.ceil(value);}
  340. function checkdate(m,d,y){return m>0&&m<13&&y>0&&y<32768&&d>0&&d<=(new Date(y,m,0)).getDate();}
  341. function chop(str,charlist){return this.rtrim(str,charlist);}
  342. function chr(codePt){if(codePt>0xFFFF){codePt-=0x10000;return String.fromCharCode(0xD800+(codePt>>10),0xDC00+(codePt&0x3FF));}
  343. return String.fromCharCode(codePt);}
  344. function chunk_split(body,chunklen,end){chunklen=parseInt(chunklen,10)||76;end=end||'\r\n';if(chunklen<1){return false;}
  345. return body.match(new RegExp(","0,"+chunklen+"}","g")).join(end);}
  346. function class_exists(cls){var i='';cls=this.window[cls];if(typeof cls!=='function'){return false;}
  347. for(i in cls.prototype){return true;}
  348. for(i in cls){if(i!=='prototype'){return true;}}
  349. if(cls.toSource&&cls.toSource().match(true;}
  350. r)){return true;}
  351. return false;}
  352. function compact(){var matrix={},that=this;var process=function(value){var i=0,l=value.length,key_value='';for(i=0;i<l;i++){key_value=value[i];if(Object.prototype.toString.call(key_value)==='[object Array]'){process(key_value);}else{if(typeof that.window[key_value]!=='undefined'){matrix[key_value]=that.window[key_value];}}}
  353. return true;};process(arguments);return matrix;}
  354. function cos(arg){return Math.cos(arg);}
  355. function cosh(arg){return(Math.exp(arg)+Math.exp(-arg))/2;}
  356. function count(mixed_var,mode){var key,cnt=0;if(mixed_var===null||typeof mixed_var==='undefined'){return 0;}else if(mixed_var.constructor!==Array&&mixed_var.constructor!==Object){return 1;}
  357. if(mode==='COUNT_RECURSIVE'){mode=1;}
  358. if(mode!=1){mode=0;}
  359. for(key in mixed_var){if(mixed_var.hasOwnProperty(key)){cnt++;if(mode==1&&mixed_var[key]&&(mixed_var[key].constructor===Array||mixed_var[key].constructor===Object)){cnt+=this.count(mixed_var[key],1);}}}
  360. return cnt;}
  361. function count_chars(str,mode){var result={},resultArr=[],i;str=(''+str).split('').sort().join('').match(e&1)==0){);if((mode&1)==0){for(i=0;i!=256;i++){result[i]=0;}}
  362. if(mode===2||mode===4){for(i=0;i!=str.length;i+=1){delete result[str[i].charCodeAt(0)];}
  363. for(i in result){result[i]=(mode===4)?String.fromCharCode(i):0;}}else if(mode===3){for(i=0;i!=str.length;i+=1){result[i]=str[i].slice(0,1);}}else{for(i=0;i!=str.length;i+=1){result[str[i].charCodeAt(0)]=str[i].length;}}
  364. if(mode<3){return result;}
  365. for(i in result){resultArr.push(result[i]);}
  366. return resultArr.join('');}
  367. function crc32(str){str=this.utf8_encode(str);var table="00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D";var crc=0;var x=0;var y=0;crc=crc^(-1);for(var i=0,iTop=str.length;i<iTop;i++){y=(crc^str.charCodeAt(i))&0xFF;x="0x"+table.substr(y*9,8);crc=(crc>>>8)^x;}
  368. return crc^(-1);}
  369. function date(format,timestamp){var that=this,jsdate,f,formatChr=matChrCb,_pad=,formatChrCb,_pad=function(n,c){if((n=n+'').length<c){return new Array((++c)-n.length).join('0')+n;}
  370. return n;},txt_words=["Sun","Mon"Thurs"","Wednes","Thurs","Fri","Satur","January","February"May"rch","April",","y","June"September"ugust","September","October","November","December"];formatChrCb=function(t,s){return f[t]?f[t]():s;};f={d:function(){return _pad(f.j(),2);},D:function(){return f.l().slice(0,3);},j:function(){return jsdate.getDate();},l:function(){return txt_words[f.w()]+'day';},N:function(){return f.w()||7;},S:function(){var j=f.j();return j>4&&j<21?',3:'{1:'st',2:'nd',3:'rd'}[j%10]||'th';},w:function(){return jsdate.getDay();},z:function(){var a=new Date(f.Y(),f.n()-1,f.j()),b=new Date(f.Y(),0,1);return Math.round((a-b)/864e5)+1;},W:function(){var a=new Date(f.Y(),f.n()-1,f.j()-f.N()+3),b=new Date(a.getFullYear(),0,4);return _pad(1+Math.round((a-b)/864e5/7),2);},F:function(){return txt_words[6+f.n()];},m:function(){return _pad(f.n(),2);},M:function(){return f.F().slice(0,3);},n:function(){return jsdate.getMonth()+1;},t:function(){return(new Date(f.Y(),f.n(),0)).getDate();},L:function(){return new Date(f.Y(),1,29).getMonth()===1|0;},o:function(){var n=f.n(),W=f.W(),Y=f.Y();return Y+(n===12&&W<9?-1:n===1&&W>9);},Y:function(){return jsdate.getFullYear();},y:function(){return(f.Y()+"").slice(-2);},a:function(){return jsdate.getHours()>11?"pm":"am";},A:function(){return f.a().toUpperCase();},B:function(){var H=jsdate.getUTCHours()*36e2,i=jsdate.getUTCMinutes()*60,s=jsdate.getUTCSeconds();return _pad(Math.floor((H+i+s+36e2)/86.4)%1e3,3);},g:function(){return f.G()%12||12;},G:function(){return jsdate.getHours();},h:function(){return _pad(f.g(),2);},H:function(){return _pad(f.G(),2);},i:function(){return _pad(jsdate.getMinutes(),2);},s:function(){return _pad(jsdate.getSeconds(),2);},u:function(){return _pad(jsdate.getMilliseconds()*1000,6);},e:function(){throw'Not supported (see source code of date() for timezone on how to add support)';},I:function(){var a=new Date(f.Y(),0),c=Date.UTC(f.Y(),0),b=new Date(f.Y(),6),d=Date.UTC(f.Y(),6);return 0+((a-c)!==(b-d));},O:function(){var tzo=jsdate.getTimezoneOffset(),a=Math.abs(tzo);return(tzo>0?"-":"+")+_pad(Math.floor(a/60)*100+a%60,4);},P:function(){var O=f.O();return(O.substr(0,3)+":"+O.substr(3,2));},T:function(){return'UTC';},Z:function(){return-jsdate.getTimezoneOffset()*60;},c:function(){return'Y-m-d\\Th:i:sP'.replace(formatChr,formatChrCb);},r:function(){return'D, d M Y H:i:s O'.replace(formatChr,formatChrCb);},U:function(){return jsdate.getTime()/1000|0;}};this.date=function(format,timestamp){that=this;jsdate=((typeof timestamp==='undefined')?new Date():(timestamp instanceof Date)?new Date(timestamp):new Date(timestamp*1000));return format.replace(formatChr,formatChrCb);};return this.date(format,timestamp);}
  371. function decbin(number){if(number<0){number=0xFFFFFFFF+number+1;}
  372. return parseInt(number,10).toString(2);}
  373. function dechex(number){if(number<0){number=0xFFFFFFFF+number+1;}
  374. return parseInt(number,10).toString(16);}
  375. function decoct(number){if(number<0){number=0xFFFFFFFF+number+1;}
  376. return parseInt(number,10).toString(8);}
  377. function deg2rad(angle){return(angle/180)*Math.PI;}
  378. function doubleval(mixed_var){return this.floatval(mixed_var);}
  379. function echo(){var arg='',argc=arguments.length,argv=arguments,i=0,holder,win=this.window,d=win.docume//www.w3.org/1999/xhtml',ns_xul='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';var stringToDOM=function(str,parent,ns,container){var extraNSs='';if(ns===ns_xul){extraNSs=' xmlns:html="'+ns_xhtml+'"';}
  380. "'+ns_xhtml+'"';}
  381. var stringContainer='<'+container+' xmlns="'>'s+'"'+extraNSs+'>'+str+'</'+container+'>';var dils=win.DOMImplementationLS,dp=win.DOMParser,ax=win.ActiveXObject;if(dils&&dils.createLSInput&&dils.createLSParser){var lsInput=dils.createLSInput();lsInput.stringData=stringContainer;var lsParser=dils.createLSParser(1,null);return lsParser.parse(lsInput).firstChild;}else if(dp){try{var fc=new dp().parseFromString(stringContainer,'text/xml');if(fc&&fc.documentElement&&fc.documentElement.localName!=='parsererror'&&fc.documentElement.nam//www.mozilla.org/newlayout/xml/parsererror.xml'){return fc.documentElement.firstChild;}}catch(e){}}else if(ax){var axo=new ax('MSXML2.DOMDocument');axo.loadXML(str);return axo.documentElement;}
  382. documentElement;}
  383. if(d.createElementNS&&(d.documentElement.namespaceURI||d.documentElement.nodeName.toLowerCase()!=='html'||(d.contentType&&d.contentType!=='text/html'))){holder=d.createElementNS(ns,container);}else{holder=d.createElement(container);}
  384. holder.innerHTML=str;while(holder.firstChild){parent.appendChild(holder.firstChild);}
  385. return false;};var ieFix=function(node){if(node.nodeType===1){var newNode=d.createElement(node.nodeName);var i,len;if(node.attributes&&node.attributes.length>0){for(i=0,len=node.attributes.length;i<len;i++){newNode.setAttribute(node.attributes[i].nodeName,node.getAttribute(node.attributes[i].nodeName));}}
  386. if(node.childNodes&&node.childNodes.length>0){for(i=0,len=node.childNodes.length;i<len;i++){newNode.appendChild(ieFix(node.childNodes[i]));}}
  387. return newNode;}else{return d.createTextNode(node.nodeValue);}};var replacer=function(s,m1,m2){if(m1!=='\\'){return m1+eval(m2);}else{return s;}};this.php_js=this.php_js||{};var phpjs=this.php_js,ini=phpjs.ini,obs=phpjs.obs;for(i=0;i<argc;i++){arg=argv[i];if(ini&&ini['phpjs.echo_embedded_vars']){arg=arg.replace(\w*)/g,replacer);}
  388. if(!p,replacer);}
  389. if(!phpjs.flushing&&obs&&obs.length){obs[obs.length-1].buffer+=arg;continue;}
  390. if(d.appendChild){if(d.body){if(win.navigator.appName==='Microsoft Internet Explorer'){d.body.appendChild(stringToDOM(ieFix(arg)));}else{var unappendedLeft=stringToDOM(arg,d.body,ns_xhtml,'div').cloneNode(true);if(unappendedLeft){d.body.appendChild(unappendedLeft);}}}else{d.documentElement.appendChild(stringToDOM(arg,d.documentElement,ns_xul,'description'));}}else if(d.write){d.write(arg);}}}
  391. function end(arr){this.php_js=this.php_js||{};this.php_js.pointers=this.php_js.pointers||[];var indexOf=function(value){for(var i=0,length=this.length;i<length;i++){if(this[i]===value){return i;}}
  392. return-1;};var pointers=this.php_js.pointers;if(!pointers.indexOf){pointers.indexOf=indexOf;}
  393. if(pointers.indexOf(arr)===-1){pointers.push(arr,0);}
  394. var arrpos=pointers.indexOf(arr);if(Object.prototype.toString.call(arr)!=='[object Array]'){var ct=0;for(var k in arr){ct++;var val=arr[k];}
  395. if(ct===0){return false;}
  396. pointers[arrpos+1]=ct-1;return val;}
  397. if(arr.length===0){return false;}
  398. pointers[arrpos+1]=arr.length-1;return arr[pointers[arrpos+1]];}
  399. function exp(arg){return Math.exp(arg);}
  400. function explode(delimiter,string,limit){var emptyArray={0:''};if(arguments.length<2||typeof arguments[0]=='undefined'||typeof arguments[1]=='undefined'){return null;}
  401. if(delimiter===''||delimiter===false||delimiter===null){return false;}
  402. if(typeof delimiter=='function'||typeof delimiter=='object'function'string=='function'object'f string=='object'){return emptyArray;}
  403. if(delimiter===true){delimiter='1';}
  404. if(!limit){return string.toString().split(delimiter.toString());}
  405. var splitted=string.toString().split(delimiter.toString());var partA=splitted.splice(0,limit-1);var partB=splitted.join(delimiter.toString());partA.push(partB);return partA;}
  406. function expm1(x){var ret=0,n=50;var factorial=function factorial(n){if((n===0)||(n===1)){return 1;}else{var result=(n*factorial(n-1));return result;}};for(var i=1;i<n;i++){ret+=Math.pow(x,i)/factorial(i);}
  407. return ret;}
  408. function floatval(mixed_var){return(parseFloat(mixed_var)||0);}
  409. function floor(value){return Math.floor(value);}
  410. function fmod(x,y){var tmp,tmp2,p=0,pY=0,l=0.0,l2=0.0;tmp=x.toExponential().match(;p=parseInt(tmp[2);p=parseInt(tmp[2],10)-(tmp[1]+'').length;tmp=y.toExponential().match(;pY=parseInt(tmp[);pY=parseInt(tmp[2],10)-(tmp[1]+'').length;if(pY>p){p=pY;}
  411. tmp2=(x%y);if(p<-100||p>20){l=Math.round(Math.log(tmp2)/Math.log(10));l2=Math.pow(10,l);return(tmp2/l2).toFixed(l-p)*l2;}else{return parseFloat(tmp2.toFixed(-p));}}
  412. function get_class(obj){if(obj&&typeof obj==='object'&&Object.prototype.toString.call(obj)!=='[object Array]'&&obj.constructor&&obj!=this.window){var arr=obj.constructor.toString().match();if(arr&&arr.leng);if(arr&&arr.length==2){return arr[1];}}
  413. return false;}
  414. function get_defined_vars(){var i='',arr=[],already={};for(i in this.window){try{if(typeof this.window[i]==='object'){for(var j in this.window[i]){if(this.window[j]&&!already[j]){already[j]=1;arr.push(j);}}}else if(!already[i]){already[i]=1;arr.push(i);}}catch(e){if(!already[i]){already[i]=1;arr.push(i);}}}
  415. return arr;}
  416. function get_headers(url,format){var req=this.window.ActiveXObject?new ActiveXObject("):new XMLHttpRequest();if(!req){throw new Error('XMLHttpRequest not supported');}
  417. var tmp,headers,pair,i,j=0;req.open('HEAD',url,false);req.send(null);if(req.readyState<3){return false;}
  418. tmp=req.getAllResponseHeaders();tmp=tmp.split('\)');tmp=this.array_filter(tmp,function(value){return value.substring(1)!=='';});headers=format?{}:[];for(i in tmp){if(format){pair=tmp[i].split(':');headers[pair.splice(0,1)]=pair.join(':').substring(1);}else{headers[j++]=tmp[i];}}
  419. return headers;}
  420. function get_html_translation_table(table,quote_style){var entities={},hash_map={},decimal;var constMappingTable={},constMappingQuoteStyle={};var useTable={},useQuoteStyle={};constMappingTable[0]='HTML_SPECIALCHARS';constMappingTable[1]='HTML_ENTITIES';constMappingQuoteStyle[0]='ENT_NOQUOTES';constMappingQuoteStyle[2]='ENT_COMPAT';constMappingQuoteStyle[3]='ENT_QUOTES';useTable=!isNaN(table)?constMappingTable[table]:table?table.toUpperCase():'HTML_SPECIALCHARS';useQuoteStyle=!isNaN(quote_style)?constMappingQuoteStyle[quote_style]:quote_style?quote_style.toUpperCase():'ENT_COMPAT';if(useTable!=='HTML_SPECIALCHARS'&&useTable!=='HTML_ENTITIES'){throw new Error("{throw new Error("Table: "+useTable+' not supported');}
  421. entities['38']='&amp;';if(useTable==='HTML_ENTITIES'){entities['160']='161'p;'&iexcl;'s['161']='&iexcl;'&cent;'es['162']='163't;'&pound;'s['163']='&pound;'&curren;'['164']='&curren;'&yen;'ies['165']='&yen;'&brvbar;'['166']='&brvbar;'&sect;'es['167']='168't;'&uml;'ies['168']='&uml;'&copy;'es['169']='170'y;'&ordf;'es['170']='171'f;'&laquo;'s['171']='&laquo;'&not;'ies['172']='&not;'&shy;'ies['173']='&shy;'&reg;'ies['174']='&reg;'&macr;'es['175']='176'r;'&deg;'ies['176']='&deg;'&plusmn;'['177']='&plusmn;'&sup2;'es['178']='179'2;'&sup3;'es['179']='180'3;'&acute;'s['180']='&acute;'&micro;'s['181']='&micro;'&para;'es['182']='183'a;'&middot;'['183']='&middot;'&cedil;'s['184']='&cedil;'&sup1;'es['185']='186'1;'&ordm;'es['186']='187'm;'&raquo;'s['187']='&raquo;'&frac14;'['188']='&frac14;'&frac12;'['189']='&frac12;'&frac34;'['190']='&frac34;'&iquest;'['191']='&iquest;'&Agrave;'['192']='&Agrave;'&Aacute;'['193']='&Aacute;'&Acirc;'s['194']='&Acirc;'&Atilde;'['195']='&Atilde;'&Auml;'es['196']='197'l;'&Aring;'s['197']='&Aring;'&AElig;'s['198']='&AElig;'&Ccedil;'['199']='&Ccedil;'&Egrave;'['200']='&Egrave;'&Eacute;'['201']='&Eacute;'&Ecirc;'s['202']='&Ecirc;'&Euml;'es['203']='204'l;'&Igrave;'['204']='&Igrave;'&Iacute;'['205']='&Iacute;'&Icirc;'s['206']='&Icirc;'&Iuml;'es['207']='208'l;'&ETH;'ies['208']='&ETH;'&Ntilde;'['209']='&Ntilde;'&Ograve;'['210']='&Ograve;'&Oacute;'['211']='&Oacute;'&Ocirc;'s['212']='&Ocirc;'&Otilde;'['213']='&Otilde;'&Ouml;'es['214']='215'l;'&times;'s['215']='&times;'&Oslash;'['216']='&Oslash;'&Ugrave;'['217']='&Ugrave;'&Uacute;'['218']='&Uacute;'&Ucirc;'s['219']='&Ucirc;'&Uuml;'es['220']='221'l;'&Yacute;'['221']='&Yacute;'&THORN;'s['222']='&THORN;'&szlig;'s['223']='&szlig;'&agrave;'['224']='&agrave;'&aacute;'['225']='&aacute;'&acirc;'s['226']='&acirc;'&atilde;'['227']='&atilde;'&auml;'es['228']='229'l;'&aring;'s['229']='&aring;'&aelig;'s['230']='&aelig;'&ccedil;'['231']='&ccedil;'&egrave;'['232']='&egrave;'&eacute;'['233']='&eacute;'&ecirc;'s['234']='&ecirc;'&euml;'es['235']='236'l;'&igrave;'['236']='&igrave;'&iacute;'['237']='&iacute;'&icirc;'s['238']='&icirc;'&iuml;'es['239']='240'l;'&eth;'ies['240']='&eth;'&ntilde;'['241']='&ntilde;'&ograve;'['242']='&ograve;'&oacute;'['243']='&oacute;'&ocirc;'s['244']='&ocirc;'&otilde;'['245']='&otilde;'&ouml;'es['246']='247'l;'&divide;'['247']='&divide;'&oslash;'['248']='&oslash;'&ugrave;'['249']='&ugrave;'&uacute;'['250']='&uacute;'&ucirc;'s['251']='&ucirc;'&uuml;'es['252']='253'l;'&yacute;'['253']='&yacute;'&thorn;'s['254']='&thorn;'&yuml;'es['255']='&yuml;';}
  422. if(useQuoteStyle!=='ENT_NOQUOTES'&quot;'ies['34']='&quot;';}
  423. if(useQuoteStyle==='ENT_QUOTES'&#39;'ties['39']='&#39;';}
  424. entities['60']='&lt;';entities['62']='&gt;';for(decimal in entities){if(entities.hasOwnProperty(decimal)){hash_map[String.fromCharCode(decimal)]=entities[decimal];}}
  425. return hash_map;}
  426. function getdate(timestamp){var _w=['Sun','Mon'Thurs'','Wednes','Thurs','Fri','Satur'];var _m=['January','February'May'rch','April',','y','June'September'ugust','September','October','November','December'];var d=((typeof(timestamp)=='undefined')?new Date():(typeof(timestamp)=='object')?new Date(timestamp):new Date(timestamp*1000));var w=d.getDay();var m=d.getMonth();var y=d.getFullYear();var r={};r.seconds=d.getSeconds();r.minutes=d.getMinutes();r.hours=d.getHours();r.mday=d.getDate();r.wday=w;r.mon=m+1;r.year=y;r.yday=Math.floor((d-(new Date(y,0,1)))/86400000);r.weekday=_w[w]+'day'0'.month=_m[m];r['0']=parseInt(d.getTime()/1000,10);return r;}
  427. function getrandmax(){return 2147483647;}
  428. function hexdec(hex_string){hex_string=(hex_string+'').replace(return parseI,'');return parseInt(hex_string,16);}
  429. function html_entity_decode(string,quote_style){var hash_map={},symbol='',tmp_str='',entity='';tmp_str=string.toString();if(false===(hash_map=this.get_html_translation_table('HTML_ENTITIES',quote_style))){return false;}
  430. delete(hash_map['&'&amp;'h_map['&']='&amp;';for(symbol in hash_map){entity=hash_map[symbol];tmp_str=tmp_str.split(entity).join(symbol);}
  431. tmp_str=tmp_str.split('&#039;').join("'");return tmp_str;}
  432. function htmlentities(string,quote_style,charset,double_encode){var hash_map=this.get_html_translation_table('HTML_ENTITIES',quote_style),symbol='';string=string==null?'':string+'';if(!hash_map){return false;}
  433. if(quote_style&&quote_style==='ENT_QUOTES'){hash_map["'"]='&#039;';}
  434. if(!!double_encode||double_encode==null){for(symbol in hash_map){if(hash_map.hasOwnProperty(symbol)){string=string.split(symbol).join(hash_map[symbol]);}}}else{string=string.replace(d+|#x[\da-f]+|[a-zA-Z][\da-z]*);|$)/g,function(ignore,t,function(ignore,text,entity){for(symbol in hash_map){if(hash_map.hasOwnProperty(symbol)){text=text.split(symbol).join(hash_map[symbol]);}}
  435. return text+entity;});}
  436. return string;}
  437. function htmlspecialchars(string,quote_style,charset,double_encode){var optTemp=0,i=0,noquotes=false;if(typeof quote_style==='undefined'||quote_style===null){quote_style=2;}
  438. string=string.toString();if(double_encode!==false){string=string.replace(ring,'&amp;');}
  439. string=string.replace(ce(/,'&lt;').replace(PTS=,'ENT_NOQUOTES'TS={'ENT_NOQUOTES':0,'ENT_HTML_QUOTE_SINGLE':1,'ENT_HTML_QUOTE_DOUBLE':2,'ENT_COMPAT':2,'ENT_QUOTES':3,'ENT_IGNORE':4};if(quote_style===0){noquotes=true;}
  440. if(typeof quote_style!=='number'){quote_style=[].concat(quote_style);for(i=0;i<quote_style.length;i++){if(OPTS[quote_style[i]]===0){noquotes=true;}
  441. else if(OPTS[quote_style[i]]){optTemp=optTemp|OPTS[quote_style[i]];}}
  442. quote_style=optTemp;}
  443. if(quote_style&OPTS.ENT_HTML_QUOTE_SINGLE){string=string.replace(f(!n,'&#039;');}
  444. if(!noquotes){string=string.replace(etur,'&quot;');}
  445. return string;}
  446. function htmlspecialchars_decode(string,quote_style){var optTemp=0,i=0,noquotes=false;if(typeof quote_style==='undefined'){quote_style=2;}
  447. string=string.toString().replace(ce(/&gt,'<').replace(PTS={'E,'>');var OPTS={'ENT_NOQUOTES':0,'ENT_HTML_QUOTE_SINGLE':1,'ENT_HTML_QUOTE_DOUBLE':2,'ENT_COMPAT':2,'ENT_QUOTES':3,'ENT_IGNORE':4};if(quote_style===0){noquotes=true;}
  448. if(typeof quote_style!=='number'){quote_style=[].concat(quote_style);for(i=0;i<quote_style.length;i++){if(OPTS[quote_style[i]]===0){noquotes=true;}else if(OPTS[quote_style[i]]){optTemp=optTemp|OPTS[quote_style[i]];}}
  449. quote_style=optTemp;}
  450. if(quote_style&OPTS.ENT_HTML_QUOTE_SINGLE){string=string.replace(if(!noquot,"'");}
  451. if(!noquotes){string=string.replace(tring=str,'"');}
  452. string=string.replace(rn strin,'&');return string;}
  453. function http_build_query(formdata,numeric_prefix,arg_separator){var value,key,tmp=[],that=this;var _http_build_query_helper=function(key,val,arg_separator){var k,tmp=[];if(val===true){val="1";}else if(val===false){val="0";}
  454. if(val!==null&&typeof(val)==="object"){for(k in val){if(val[k]!==null){tmp.push(_http_build_query_helper(key+"["+k+"]",val[k],arg_separator));}}
  455. return tmp.join(arg_separator);}else if(typeof(val)!=="function"){return that.urlencode(key)+"="+that.urlencode(val);}else{throw new Error('There was an error processing for http_build_query().');}};if(!arg_separator){arg_separator="&";}
  456. for(key in formdata){value=formdata[key];if(numeric_prefix&&!isNaN(key)){key=String(numeric_prefix)+key;}
  457. tmp.push(_http_build_query_helper(key,value,arg_separator));}
  458. return tmp.join(arg_separator);}
  459. function hypot(x,y){return Math.sqrt(x*x+y*y)||0;}
  460. function implode(glue,pieces){var i='''retVal='',tGlue='';if(arguments.length===1){pieces=glue;glue='';}
  461. if(typeof(pieces)==='object'){if(Object.prototype.toString.call(pieces)==='[object Array]'){return pieces.join(glue);}
  462. for(i in pieces){retVal+=tGlue+pieces[i];tGlue=glue;}
  463. return retVal;}
  464. return pieces;}
  465. function in_array(needle,haystack,argStrict){var key='',strict=!!argStrict;if(strict){for(key in haystack){if(haystack[key]===needle){return true;}}}else{for(key in haystack){if(haystack[key]==needle){return true;}}}
  466. return false;}
  467. function intval(mixed_var,base){var tmp;var type=typeof(mixed_var);if(type==='boolean'){return+mixed_var;}else if(type==='string'){tmp=parseInt(mixed_var,base||10);return(isNaN(tmp)||!isFinite(tmp))?0:tmp;}else if(type==='number'&&isFinite(mixed_var)){return mixed_var|0;}else{return 0;}}
  468. function ip2long(IP){var i=0;IP=IP.match(*|0x[\da-f]+)(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?$/i);if(!IP){return f);if(!IP){return false;}
  469. IP[0]=0;for(i=1;i<5;i+=1){IP[0]+=!!((IP[i]||'').length);IP[i]=parseInt(IP[i])||0;}
  470. IP.push(256,256,256,256);IP[4+IP[0]]*=Math.pow(256,4-IP[0]);if(IP[1]>=IP[5]||IP[2]>=IP[6]||IP[3]>=IP[7]||IP[4]>=IP[8]){return false;}
  471. return IP[1]*(IP[0]===1||16777216)+IP[2]*(IP[0]<=2||65536)+IP[3]*(IP[0]<=3||256)+IP[4]*1;}
  472. function is_bool(mixed_var){return(typeof mixed_var==='boolean');}
  473. function is_double(mixed_var){return this.is_float(mixed_var);}
  474. function is_finite(val){var warningType='';if(val===Infinity||val===-Infinity){return false;}
  475. if(typeof val=='object'){warningType=(Object.prototype.toString.call(val)==='[object Array]'?'array':'object');}else if(typeof val=='string'&&!val.match(ningType='st)){warningType='string';}
  476. if(warningType){throw new Error('Warning: is_finite() expects parameter 1 to be double, '+warningType+' given');}
  477. return true;}
  478. function is_float(mixed_var){return+mixed_var===mixed_var&&!!(mixed_var%1);}
  479. function is_infinite(val){var warningType='';if(val===Infinity||val===-Infinity){return true;}
  480. if(typeof val=='object'){warningType=(Object.prototype.toString.call(val)==='[object Array]'?'array':'object');}else if(typeof val=='string'&&!val.match(ningType='st)){warningType='string';}
  481. if(warningType){throw new Error('Warning: is_infinite() expects parameter 1 to be double, '+warningType+' given');}
  482. return false;}
  483. function is_int(mixed_var){return mixed_var===~~mixed_var;}
  484. function is_integer(mixed_var){return this.is_int(mixed_var);}
  485. function is_long(mixed_var){return this.is_float(mixed_var);}
  486. function is_nan(val){var warningType='number'peof val=='number'&&isNaN(val)){return true;}
  487. if(typeof val=='object'){warningType=(Object.prototype.toString.call(val)==='[object Array]'?'array':'object');}
  488. else if(typeof val=='string'&&!val.match(ningType='st)){warningType='string';}
  489. if(warningType){throw new Error('Warning: is_nan() expects parameter 1 to be double, '+warningType+' given');}
  490. return false;}
  491. function is_null(mixed_var){return(mixed_var===null);}
  492. function is_numeric(mixed_var){return(typeof(mixed_var)==='number'||typeof(mixed_var)==='string')&&mixed_var!==''&&!isNaN(mixed_var);}
  493. function is_real(mixed_var){return this.is_float(mixed_var);}
  494. function is_scalar(mixed_var){return(ring/).test(typeof mixe).test(typeof mixed_var);}
  495. function is_string(mixed_var){return(typeof(mixed_var)=='string');}
  496. function join(glue,pieces){return this.implode(glue,pieces);}
  497. function json_decode(str_json){var json=this.window.JSON;if(typeof json==='object'&&typeof json.parse==='function'){try{return json.parse(str_json);}catch(err){if(!(err instanceof SyntaxError)){throw new Error('Unexpected error type in json_decode()');}
  498. this.php_js=this.php_js||{};this.php_js.last_error_json=4;return null;}}
  499. var cx=00-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;var j;var text=st;var j;var text=str_json;cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
  500. if((est(text.replac).test(text.replace(|u[0-9a-fA-F]{4})/g,'@').replace(/"[^,'@').replace(e|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:,']').replace()+/g,''))){j=eval('('+,''))){j=eval('('+text+')');return j;}
  501. this.php_js=this.php_js||{};this.php_js.last_error_json=4;return null;}
  502. function json_encode(mixed_val){var retVal,json=this.window.JSON;try{if(typeof json==='object'&&typeof json.stringify==='function'){retVal=json.stringify(mixed_val);if(retVal===undefined){throw new SyntaxError('json_encode');}
  503. return retVal;}
  504. var value=mixed_val;var quote=function(string){var escapable=f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;var meta={'\b':'\;var meta={'\b':'\\b'\'n'':'\\t'\'f'':'\\n'\'r'':'\\f','\r'\''\r','"'};escapable.lastIndex=0;return escapable.test(string)?'ble.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='0000'g'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';};var str=function(key,holder){var gap='';var i=0;var k=' ';var i=0;var k='';var v='';var length=0;var mind=gap;var partial=[];var value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
  505. switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
  506. if((this.PHPJS_Resource&&value instanceof this.PHPJS_Resource)||(window.PHPJS_Resource&&value instanceof window.PHPJS_Resource)){throw new SyntaxError('json_encode');}
  507. gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
  508. v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v;}
  509. for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}
  510. v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;case'undefined':case'function':default:throw new SyntaxError('json_encode',{'};return str('',{'':value});}catch(err){if(!(err instanceof SyntaxError)){throw new Error('Unexpected error type in json_encode()');}
  511. this.php_js=this.php_js||{};this.php_js.last_error_json=4;return null;}}
  512. function krsort(inputArr,sort_flags){var tmp_arr={},keys=[],sorter,i,k,that=this,strictForIn=false,populateArr={};switch(sort_flags){case'SORT_STRING':sorter=function(a,b){return that.strnatcmp(b,a);};break;case'SORT_LOCALE_STRING':var loc=this.i18n_loc_get_default();sorter=this.php_js.i18nLocales[loc].sorting;break;case'SORT_NUMERIC':sorter=function(a,b){return(b-a);};break;case'SORT_REGULAR':default:sorter=function(b,a){var aFloat=parseFloat(a),bFloat=parseFloat(b),aNumeric=aFloat+''===a,bNumeric=bFloat+''===b;if(aNumeric&&bNumeric){return aFloat>bFloat?1:aFloat<bFloat?-1:0;}else if(aNumeric&&!bNumeric){return 1;}else if(!aNumeric&&bNumeric){return-1;}
  513. return a>b?1:a<b?-1:0;};break;}
  514. for(k in inputArr){if(inputArr.hasOwnProperty(k)){keys.push(k);}}
  515. keys.sort(sorter);this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(i=0;i<keys.length;i++){k=keys[i];tmp_arr[k]=inputArr[k];if(strictForIn){delete inputArr[k];}}
  516. for(i in tmp_arr){if(tmp_arr.hasOwnProperty(i)){populateArr[i]=tmp_arr[i];}}
  517. return strictForIn||populateArr;}
  518. function ksort(inputArr,sort_flags){var tmp_arr={},keys=[],sorter,i,k,that=this,strictForIn=false,populateArr={};switch(sort_flags){case'SORT_STRING':sorter=function(a,b){return that.strnatcmp(a,b);};break;case'SORT_LOCALE_STRING':var loc=this.i18n_loc_get_default();sorter=this.php_js.i18nLocales[loc].sorting;break;case'SORT_NUMERIC':sorter=function(a,b){return((a+0)-(b+0));};break;default:sorter=function(a,b){var aFloat=parseFloat(a),bFloat=parseFloat(b),aNumeric=aFloat+''===a,bNumeric=bFloat+''===b;if(aNumeric&&bNumeric){return aFloat>bFloat?1:aFloat<bFloat?-1:0;}else if(aNumeric&&!bNumeric){return 1;}else if(!aNumeric&&bNumeric){return-1;}
  519. return a>b?1:a<b?-1:0;};break;}
  520. for(k in inputArr){if(inputArr.hasOwnProperty(k)){keys.push(k);}}
  521. keys.sort(sorter);this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(i=0;i<keys.length;i++){k=keys[i];tmp_arr[k]=inputArr[k];if(strictForIn){delete inputArr[k];}}
  522. for(i in tmp_arr){if(tmp_arr.hasOwnProperty(i)){populateArr[i]=tmp_arr[i];}}
  523. return strictForIn||populateArr;}
  524. function lcfirst(str){str+='';var f=str.charAt(0).toLowerCase();return f+str.substr(1);}
  525. function lcg_value(){return Math.random();}
  526. function levenshtein(s1,s2){if(s1==s2){return 0;}
  527. var s1_len=s1.length;var s2_len=s2.length;if(s1_len===0){return s2_len;}
  528. if(s2_len===0){return s1_len;}
  529. var split=false;try{split=!('0')[0];}catch(e){split=true;}
  530. if(split){s1=s1.split('');s2=s2.split('');}
  531. var v0=new Array(s1_len+1);var v1=new Array(s1_len+1);var s1_idx=0,s2_idx=0,cost=0;for(s1_idx=0;s1_idx<s1_len+1;s1_idx++){v0[s1_idx]=s1_idx;}
  532. var char_s1='',char_s2='';for(s2_idx=1;s2_idx<=s2_len;s2_idx++){v1[0]=s2_idx;char_s2=s2[s2_idx-1];for(s1_idx=0;s1_idx<s1_len;s1_idx++){char_s1=s1[s1_idx];cost=(char_s1==char_s2)?0:1;var m_min=v0[s1_idx+1]+1;var b=v1[s1_idx]+1;var c=v0[s1_idx]+cost;if(b<m_min){m_min=b;}
  533. if(c<m_min){m_min=c;}
  534. v1[s1_idx+1]=m_min;}
  535. var v_tmp=v0;v0=v1;v1=v_tmp;}
  536. return v0[s1_len];}
  537. function log(arg,base){return(typeof base==='undefined')?Math.log(arg):Math.log(arg)/Math.log(base);}
  538. function log10(arg){return Math.log(arg)/2.302585092994046;}
  539. function log1p(x){var ret=0,n=50;if(x<=-1){return'-INF';}
  540. if(x<0||x>1){return Math.log(1+x);}
  541. for(var i=1;i<n;i++){if((i%2)===0){ret-=Math.pow(x,i)/i;}else{ret+=Math.pow(x,i)/i;}}
  542. return ret;}
  543. function long2ip(proper_address){var output=false;if(!isNaN(proper_address)&&(proper_address>=0||proper_address<=4294967295)){output=Math.floor(proper_address/Math.pow(256,3))+'.'+Math.floor((proper_address%Math.pow(256,3))/Math.pow(256,2))+'.'+Math.floor(((proper_address%Math.pow(256,3))%Math.pow(256,2))/Math.pow(256,1))+'.'+Math.floor((((proper_address%Math.pow(256,3))%Math.pow(256,2))%Math.pow(256,1))/Math.pow(256,0));}
  544. return output;}
  545. function ltrim(str,charlist){charlist=!charlist?' \\s\u00A0':(charlist+'').replace(*\{\}\+\$\^\:])/g,'$1');var re=new ,'$1');var re=new RegExp('^[');return(str+','g');return(str+'').replace(re,'');}
  546. function max(){var ar,retVal,i=0,n=0,argv=arguments,argc=argv.length,_obj2Array=function(obj){if(Object.prototype.toString.call(obj)==='[object Array]'){return obj;}
  547. else{var ar=[];for(var i in obj){if(obj.hasOwnProperty(i)){ar.push(obj[i]);}}
  548. return ar;}},_compare=function(current,next){var i=0,n=0,tmp=0,nl=0,cl=0;if(current===next){return 0;}
  549. else if(typeof current==='object'){if(typeof next==='object'){current=_obj2Array(current);next=_obj2Array(next);cl=current.length;nl=next.length;if(nl>cl){return 1;}
  550. else if(nl<cl){return-1;}
  551. for(i=0,n=cl;i<n;++i){tmp=_compare(current[i],next[i]);if(tmp==1){return 1;}
  552. else if(tmp==-1){return-1;}}
  553. return 0;}
  554. return-1;}
  555. else if(typeof next=='object'){return 1;}
  556. else if(isNaN(next)&&!isNaN(current)){if(current==0){return 0;}
  557. return(current<0?1:-1);}
  558. else if(isNaN(current)&&!isNaN(next)){if(next==0){return 0;}
  559. return(next>0?1:-1);}
  560. if(next==current){return 0;}
  561. return(next>current?1:-1);};if(argc===0){throw new Error('At least one value should be passed to max()');}
  562. else if(argc===1){if(typeof argv[0]==='object'){ar=_obj2Array(argv[0]);}
  563. else{throw new Error('Wrong parameter count for max()');}
  564. if(ar.length===0){throw new Error('Array must contain at least one element for max()');}}
  565. else{ar=argv;}
  566. retVal=ar[0];for(i=1,n=ar.length;i<n;++i){if(_compare(retVal,ar[i])==1){retVal=ar[i];}}
  567. return retVal;}
  568. function md5(str){var xl;var rotateLeft=function(lValue,iShiftBits){return(lValue<<iShiftBits)|(lValue>>>(32-iShiftBits));};var addUnsigned=function(lX,lY){var lX4,lY4,lX8,lY8,lResult;lX8=(lX&0x80000000);lY8=(lY&0x80000000);lX4=(lX&0x40000000);lY4=(lY&0x40000000);lResult=(lX&0x3FFFFFFF)+(lY&0x3FFFFFFF);if(lX4&lY4){return(lResult^0x80000000^lX8^lY8);}
  569. if(lX4|lY4){if(lResult&0x40000000){return(lResult^0xC0000000^lX8^lY8);}else{return(lResult^0x40000000^lX8^lY8);}}else{return(lResult^lX8^lY8);}};var _F=function(x,y,z){return(x&y)|((~x)&z);};var _G=function(x,y,z){return(x&z)|(y&(~z));};var _H=function(x,y,z){return(x^y^z);};var _I=function(x,y,z){return(y^(x|(~z)));};var _FF=function(a,b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(_F(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b);};var _GG=function(a,b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(_G(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b);};var _HH=function(a,b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(_H(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b);};var _II=function(a,b,c,d,x,s,ac){a=addUnsigned(a,addUnsigned(addUnsigned(_I(b,c,d),x),ac));return addUnsigned(rotateLeft(a,s),b);};var convertToWordArray=function(str){var lWordCount;var lMessageLength=str.length;var lNumberOfWords_temp1=lMessageLength+8;var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1%64))/64;var lNumberOfWords=(lNumberOfWords_temp2+1)*16;var lWordArray=new Array(lNumberOfWords-1);var lBytePosition=0;var lByteCount=0;while(lByteCount<lMessageLength){lWordCount=(lByteCount-(lByteCount%4))/4;lBytePosition=(lByteCount%4)*8;lWordArray[lWordCount]=(lWordArray[lWordCount]|(str.charCodeAt(lByteCount)<<lBytePosition));lByteCount++;}
  570. lWordCount=(lByteCount-(lByteCount%4))/4;lBytePosition=(lByteCount%4)*8;lWordArray[lWordCount]=lWordArray[lWordCount]|(0x80<<lBytePosition);lWordArray[lNumberOfWords-2]=lMessageLength<<3;lWordArray[lNumberOfWords-1]=lMessageLength>>>29;return lWordArray;};var wordToHex=function(lValue){var wordToHexValue="",wordToHexValue_temp="",lByte,lCount;for(lCount=0;lCount<=3;lCount++){lByte=(lValue>>>(lCount*8))&255;wordToHexValue_temp="0"+lByte.toString(16);wordToHexValue=wordToHexValue+wordToHexValue_temp.substr(wordToHexValue_temp.length-2,2);}
  571. return wordToHexValue;};var x=[],k,AA,BB,CC,DD,a,b,c,d,S11=7,S12=12,S13=17,S14=22,S21=5,S22=9,S23=14,S24=20,S31=4,S32=11,S33=16,S34=23,S41=6,S42=10,S43=15,S44=21;str=this.utf8_encode(str);x=convertToWordArray(str);a=0x67452301;b=0xEFCDAB89;c=0x98BADCFE;d=0x10325476;xl=x.length;for(k=0;k<xl;k+=16){AA=a;BB=b;CC=c;DD=d;a=_FF(a,b,c,d,x[k+0],S11,0xD76AA478);d=_FF(d,a,b,c,x[k+1],S12,0xE8C7B756);c=_FF(c,d,a,b,x[k+2],S13,0x242070DB);b=_FF(b,c,d,a,x[k+3],S14,0xC1BDCEEE);a=_FF(a,b,c,d,x[k+4],S11,0xF57C0FAF);d=_FF(d,a,b,c,x[k+5],S12,0x4787C62A);c=_FF(c,d,a,b,x[k+6],S13,0xA8304613);b=_FF(b,c,d,a,x[k+7],S14,0xFD469501);a=_FF(a,b,c,d,x[k+8],S11,0x698098D8);d=_FF(d,a,b,c,x[k+9],S12,0x8B44F7AF);c=_FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);b=_FF(b,c,d,a,x[k+11],S14,0x895CD7BE);a=_FF(a,b,c,d,x[k+12],S11,0x6B901122);d=_FF(d,a,b,c,x[k+13],S12,0xFD987193);c=_FF(c,d,a,b,x[k+14],S13,0xA679438E);b=_FF(b,c,d,a,x[k+15],S14,0x49B40821);a=_GG(a,b,c,d,x[k+1],S21,0xF61E2562);d=_GG(d,a,b,c,x[k+6],S22,0xC040B340);c=_GG(c,d,a,b,x[k+11],S23,0x265E5A51);b=_GG(b,c,d,a,x[k+0],S24,0xE9B6C7AA);a=_GG(a,b,c,d,x[k+5],S21,0xD62F105D);d=_GG(d,a,b,c,x[k+10],S22,0x2441453);c=_GG(c,d,a,b,x[k+15],S23,0xD8A1E681);b=_GG(b,c,d,a,x[k+4],S24,0xE7D3FBC8);a=_GG(a,b,c,d,x[k+9],S21,0x21E1CDE6);d=_GG(d,a,b,c,x[k+14],S22,0xC33707D6);c=_GG(c,d,a,b,x[k+3],S23,0xF4D50D87);b=_GG(b,c,d,a,x[k+8],S24,0x455A14ED);a=_GG(a,b,c,d,x[k+13],S21,0xA9E3E905);d=_GG(d,a,b,c,x[k+2],S22,0xFCEFA3F8);c=_GG(c,d,a,b,x[k+7],S23,0x676F02D9);b=_GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);a=_HH(a,b,c,d,x[k+5],S31,0xFFFA3942);d=_HH(d,a,b,c,x[k+8],S32,0x8771F681);c=_HH(c,d,a,b,x[k+11],S33,0x6D9D6122);b=_HH(b,c,d,a,x[k+14],S34,0xFDE5380C);a=_HH(a,b,c,d,x[k+1],S31,0xA4BEEA44);d=_HH(d,a,b,c,x[k+4],S32,0x4BDECFA9);c=_HH(c,d,a,b,x[k+7],S33,0xF6BB4B60);b=_HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);a=_HH(a,b,c,d,x[k+13],S31,0x289B7EC6);d=_HH(d,a,b,c,x[k+0],S32,0xEAA127FA);c=_HH(c,d,a,b,x[k+3],S33,0xD4EF3085);b=_HH(b,c,d,a,x[k+6],S34,0x4881D05);a=_HH(a,b,c,d,x[k+9],S31,0xD9D4D039);d=_HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);c=_HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);b=_HH(b,c,d,a,x[k+2],S34,0xC4AC5665);a=_II(a,b,c,d,x[k+0],S41,0xF4292244);d=_II(d,a,b,c,x[k+7],S42,0x432AFF97);c=_II(c,d,a,b,x[k+14],S43,0xAB9423A7);b=_II(b,c,d,a,x[k+5],S44,0xFC93A039);a=_II(a,b,c,d,x[k+12],S41,0x655B59C3);d=_II(d,a,b,c,x[k+3],S42,0x8F0CCC92);c=_II(c,d,a,b,x[k+10],S43,0xFFEFF47D);b=_II(b,c,d,a,x[k+1],S44,0x85845DD1);a=_II(a,b,c,d,x[k+8],S41,0x6FA87E4F);d=_II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);c=_II(c,d,a,b,x[k+6],S43,0xA3014314);b=_II(b,c,d,a,x[k+13],S44,0x4E0811A1);a=_II(a,b,c,d,x[k+4],S41,0xF7537E82);d=_II(d,a,b,c,x[k+11],S42,0xBD3AF235);c=_II(c,d,a,b,x[k+2],S43,0x2AD7D2BB);b=_II(b,c,d,a,x[k+9],S44,0xEB86D391);a=addUnsigned(a,AA);b=addUnsigned(b,BB);c=addUnsigned(c,CC);d=addUnsigned(d,DD);}
  572. var temp=wordToHex(a)+wordToHex(b)+wordToHex(c)+wordToHex(d);return temp.toLowerCase();}
  573. function method_exists(obj,method){if(typeof obj==='string'){return this.window[obj]&&typeof this.window[obj][method]==='function';}
  574. return typeof obj[method]==='function';}
  575. function microtime(get_as_float){var now=new Date().getTime()/1000;var s=parseInt(now,10);return(get_as_float)?now:(Math.round((now-s)*1000)/1000)+' '+s;}
  576. function min(){var ar,retVal,i=0,n=0,argv=arguments,argc=argv.length,_obj2Array=function(obj){if(Object.prototype.toString.call(obj)==='[object Array]'){return obj;}
  577. var ar=[];for(var i in obj){if(obj.hasOwnProperty(i)){ar.push(obj[i]);}}
  578. return ar;},_compare=function(current,next){var i=0,n=0,tmp=0,nl=0,cl=0;if(current===next){return 0;}
  579. else if(typeof current==='object'){if(typeof next==='object'){current=_obj2Array(current);next=_obj2Array(next);cl=current.length;nl=next.length;if(nl>cl){return 1;}
  580. else if(nl<cl){return-1;}
  581. for(i=0,n=cl;i<n;++i){tmp=_compare(current[i],next[i]);if(tmp==1){return 1;}
  582. else if(tmp==-1){return-1;}}
  583. return 0;}
  584. return-1;}
  585. else if(typeof next=='object'){return 1;}
  586. else if(isNaN(next)&&!isNaN(current)){if(current==0){return 0;}
  587. return(current<0?1:-1);}
  588. else if(isNaN(current)&&!isNaN(next)){if(next==0){return 0;}
  589. return(next>0?1:-1);}
  590. if(next==current){return 0;}
  591. return(next>current?1:-1);};if(argc===0){throw new Error('At least one value should be passed to min()');}
  592. else if(argc===1){if(typeof argv[0]==='object'){ar=_obj2Array(argv[0]);}
  593. else{throw new Error('Wrong parameter count for min()');}
  594. if(ar.length===0){throw new Error('Array must contain at least one element for min()');}}
  595. else{ar=argv;}
  596. retVal=ar[0];for(i=1,n=ar.length;i<n;++i){if(_compare(retVal,ar[i])==-1){retVal=ar[i];}}
  597. return retVal;}
  598. function mktime(){var d=new Date(),r=arguments,i=0,e=['Seconds'Minutes','Seconds','Month'];for(i=0;i<e.length;i++){if(typeof r[i]==='if(typeof r[i]==='undefined'){r[i]=d['get'+e[i]]();r[i]+=(i===3);}else{r[i]=parseInt(r[i],10);if(isNaN(r[i])){return false;}}}
  599. r[5]+=(r[5]>=0?(r[5]<=69?2e3:(r[5]<=100?1900:0)):0);d.setFullYear(r[5],r[3]-1,r[4]);d.setHours(r[0],r[1],r[2]);return(d.getTime()/1e3>>0)-(d.getTime()<0);}
  600. function mt_getrandmax(){return 2147483647;}
  601. function mt_rand(min,max){var argc=arguments.length;if(argc===0){min=0;max=2147483647;}else if(argc===1){throw new Error('Warning: mt_rand() expects exactly 2 parameters, 1 given');}
  602. return Math.floor(Math.random()*(max-min+1))+min;}
  603. function natcasesort(inputArr){var valArr=[],k,i,ret,that=this,strictForIn=false,populateArr={};this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(k in inputArr){if(inputArr.hasOwnProperty(k)){valArr.push([k,inputArr[k]]);if(strictForIn){delete inputArr[k];}}}
  604. valArr.sort(function(a,b){return that.strnatcasecmp(a[1],b[1]);});for(i=0;i<valArr.length;i++){populateArr[valArr[i][0]]=valArr[i][1];}
  605. return strictForIn||populateArr;}
  606. function natsort(inputArr){var valArr=[],k,i,ret,that=this,strictForIn=false,populateArr={};this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(k in inputArr){if(inputArr.hasOwnProperty(k)){valArr.push([k,inputArr[k]]);if(strictForIn){delete inputArr[k];}}}
  607. valArr.sort(function(a,b){return that.strnatcmp(a[1],b[1]);});for(i=0;i<valArr.length;i++){populateArr[valArr[i][0]]=valArr[i][1];}
  608. return strictForIn||populateArr;}
  609. function nl2br(str,is_xhtml){var breakTag=(is_xhtml||typeof is_xhtml==='undefined')?'<br />':''br>';return(str+'').replace(\n\r|\r|\n)/g,'$1'+breakTag+'$2,'$1'+breakTag+'$2');}
  610. function number_format(number,decimals,dec_point,thousands_sep){number=(number+'').replace();var n=!isFini,'');var n=!isFinite(+number)?0:+number,prec=!isFinite(+decimals)?0:Math.abs(decimals),sep=(typeof thousands_sep==='undefined')?',':thousands_sep,dec=(typeof dec_point==='undefined')?'.':dec_point,s='',toFixedFix=function(n,prec){var k=Math.pow(10,prec);return''+Math.round(n*k)/k;};s=(prec?toFixedFix(n,prec):''+Math.round(n)).split('.');if(s[0].length>3){s[0]=s[0].replace(!\d))/g,sep);}
  611. if((s[1]||,sep);}
  612. if((s[1]||'').length<prec){s[1]=s[1]||'';s[1]+=new Array(prec-s[1].length+1).join('0');}
  613. return s.join(dec);}
  614. function octdec(oct_string){oct_string=(oct_string+'').replace(urn parseI,'');return parseInt(oct_string,8);}
  615. function ord(string){var str=string+'',code=str.charCodeAt(0);if(0xD800<=code&&code<=0xDBFF){var hi=code;if(str.length===1){return code;}
  616. var low=str.charCodeAt(1);return((hi-0xD800)*0x400)+(low-0xDC00)+0x10000;}
  617. if(0xDC00<=code&&code<=0xDFFF){return code;}
  618. return code;}
  619. function parse_str(str,array){var glue1='=',glue2='&',array2=String(str).replace(,'$1').split(glue2,'$1').split(glue2),i,j,chr,tmp,key,value,bracket,keys,evalStr,that=this,fixStr=function(str){return that.urldecode(str).replace().replace(/,'\\$1').replace(ce(/\,'\\n').replace(!arra,'\\r');};if(!array){array=this.window;}
  620. for(i=0;i<array2.length;i++){tmp=array2[i].split(glue1);if(tmp.length<2){tmp=[tmp,''];}
  621. key=fixStr(tmp[0]);value=fixStr(tmp[1]);while(key.charAt(0)===' '){key=key.substr(1);}
  622. if(key.indexOf('\0')!==-1){key=key.substr(0,key.indexOf('\0'));}
  623. if(key&&key.charAt(0)!=='['){keys=[];bracket=0;for(j=0;j<key.length;j++){if(key.charAt(j)==='['&&!bracket){bracket=j+1;}else if(key.charAt(j)===']'){if(bracket){if(!keys.length){keys.push(key.substr(0,bracket-1));}
  624. keys.push(key.substr(bracket,j-bracket));bracket=0;if(key.charAt(j+1)!=='['){break;}}}}
  625. if(!keys.length){keys=[key];}
  626. for(j=0;j<keys[0].length;j++){chr=keys[0].charAt(j);if(chr===' '||chr==='.'||chr==='['){keys[0]=keys[0].substr(0,j)+'_'+keys[0].substr(j+1);}
  627. if(chr==='['){break;}}
  628. evalStr='array';for(j=0;j<keys.length;j++){key=keys[j];if((key!==''&&key!=='"+key+"'=0){key="'"+key+"'";}else{key=eval(evalStr+'.push([]);'+key+'evalStr+='['+key+']';if(j!==keys.length-1&&eval('typeof '+evalStr)==='undefined'){eval(evalStr+' = [];');}}
  629. evalStr+=";eval(evalStr);}}}
  630. function parse_url(str,component){var key=['source','scheme','authority','userInfo','user','pass','host','port','relative','path','directory','file','query','fragment'],ini=(this.php_js&&this.php_js.ini)||{},mode=(ini['phpjs.parse_url.mode']&&ini['phpjs.parse_url.mode'].local_value)||'php',parser={php:/^(?:([^:\e?#]+):)?(?:\(\^()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:\(?#]*)(?::(\?*))?))?()(?:(()(?:(?:[^?#\)]*\()*)()(?:[^?#]*))(?:\)([^#]*))?(?:#(.*))?)/,strict:/^(?:([^:\,?#]+):)?(?:\(\^((?:(([^:@]*):?([^:@]*))?@)?([^:\(?#]*)(?::(\?*))?))?((((?:[^?#\*]*\))*)([^?#]*))(?:\\([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\(]*@)([^:\]?#.]+):)?(?:\[\:\/?)?((?:(([^:@]*):?([^:@]*))?@)?([^:\(?#]*)(?::(\?*))?)(((\*(?:[^?#](?![^?#\\]*\:[^?#\(.]+(?:[?#]|$)))*\/?)?([^?#\]]*))(?:\?([^#]*))?(?:#(.*))?)/};var m=parser[mode].exec(str),uri={},i=14;while(i--){if(m[i]){uri[key[i]]=m[i];}}
  631. if(component){return uri[component.replace('PHP_URL_','').toLowerCase()];}
  632. if(mode!=='php'){var name=(ini['phpjs.parse_url.queryKey']&&ini['phpjs.parse_url.queryKey'].local_value)||'queryKey';parser=/(?:^|&)([^&=]*)=?([^&]*)/g;uri[name]={};uri[key[12]].replace(parser,function($0,$1,$2){if($1){uri[name][$1]=$2;}});}
  633. delete uri.source;return uri;}
  634. function pi(){return 3.141592653589793;}
  635. function pow(base,exp){return Math.pow(base,exp);}
  636. function preg_grep(pattern,input,flags){var p='',retObj={};var invert=(flags===1||flags==='PREG_GREP_INVERT');if(typeof pattern==='string'){pattern=eval(pattern);}
  637. if(invert){for(p in input){if(input[p].search(pattern)===-1){retObj[p]=input[p];}}}else{for(p in input){if(input[p].search(pattern)!==-1){retObj[p]=input[p];}}}
  638. return retObj;}
  639. function preg_quote(str,delimiter){return(str+'').replace(new RegExp('[.\c\(+*?\R[\E^\(]$(){}=!<>|:\\'+(delimiter||'')+'-]','g'),'\|$&');}
  640. function print_r(array,return_val){var output='',pad_char=' ',pad_val=4,d=this.window.document,getFuncName=function(fn){var name=(/\n*function\a+([\/\W]+)\c*\o/).exec(fn);if(!name){return'(Anonymous)';}
  641. return name[1];},repeat_char=function(len,pad_char){var str='';for(var i=0;i<len;i++){str+=pad_char;}
  642. return str;},formatArray=function(obj,cur_depth,pad_val,pad_char){if(cur_depth>0){cur_depth++;}
  643. var base_pad=repeat_char(pad_val*cur_depth,pad_char);var thick_pad=repeat_char(pad_val*(cur_depth+1),pad_char);var str='';if(typeof obj==='object'&&obj!==null&&obj.constructor&&getFuncName(obj.constructor)!=='PHPJS_Resource'){str+='Array\r'+base_pad+'(\a';for(var key in obj){if(Object.prototype.toString.call(obj[key])==='[object Array]'){str+=thick_pad+'['+key+'] => '+formatArray(obj[key],cur_depth+1,pad_val,pad_char);}
  644. else{str+=thick_pad+'['+key+'] => '+obj[key]+'\]';}}
  645. str+=base_pad+')\
  646. ';}
  647. else if(obj===null||obj===undefined){str='';}
  648. else{str=obj.toString();}
  649. return str;};output=formatArray(array,0,pad_val,pad_char);if(return_val!==true){if(d.body){this.echo(output);}
  650. else{try{d=XULDocument;this.echo('<pre xmlns="echo(//www.w3.org/1999/xhtml" style="white-space:pre;">'+output+'</pre>');}catch(e){this.echo(output);}}
  651. s.echo(output);}}
  652. return true;}
  653. return output;}
  654. function printf(){var body,elmt,d=this.window.document;var ret=''//www.w3.org/1999/xhtml';body=d.getElementsByTagNameNS?(d.getElementsByTagNameNS(HTMLNS,'body')[0]?d.getElementsByTagNameNS(HTMLNS,'body')[0]:d.documentElement.lastChild):d.getElementsByTagName('body')[0];if(!body){return false;}
  655. y){return false;}
  656. ret=this.sprintf.apply(this,arguments);elmt=d.createTextNode(ret);body.appendChild(elmt);return ret.length;}
  657. function property_exists(cls,prop){cls=(typeof cls==='string')?this.window[cls]:cls;if(typeof cls==='function'&&cls.toSource&&cls.toSource().match(new RegExp('this\\.'+prop+'\\s'))){return true;}
  658. return(cls[prop]!==undefined&&typeof cls[prop]!=='function')||(cls.prototype!==undefined&&cls.prototype[prop]!==undefined&&typeof cls.prototype[prop]!=='function')||(cls.constructor&&cls.constructor[prop]!==undefined&&typeof cls.constructor[prop]!=='function');}
  659. function quotemeta(str){return(str+'').replace(]\$\(\)])/g,'\\$1');}
  660. functio,'\\$1');}
  661. function rad2deg(angle){return angle*57.29577951308232;}
  662. function rand(min,max){var argc=arguments.length;if(argc===0){min=0;max=2147483647;}else if(argc===1){throw new Error('Warning: rand() expects exactly 2 parameters, 1 given');}
  663. return Math.floor(Math.random()*(max-min+1))+min;}
  664. function range(low,high,step){var matrix=[];var inival,endval,plus;var walker=step||1;var chars=false;if(!isNaN(low)&&!isNaN(high)){inival=low;endval=high;}else if(isNaN(low)&&isNaN(high)){chars=true;inival=low.charCodeAt(0);endval=high.charCodeAt(0);}else{inival=(isNaN(low)?0:low);endval=(isNaN(high)?0:high);}
  665. plus=((inival>endval)?false:true);if(plus){while(inival<=endval){matrix.push(((chars)?String.fromCharCode(inival):inival));inival+=walker;}}else{while(inival>=endval){matrix.push(((chars)?String.fromCharCode(inival):inival));inival-=walker;}}
  666. return matrix;}
  667. function rawurldecode(str){return decodeURIComponent(str+'');}
  668. function rawurlencode(str){str=(str+'').toString();return encodeURIComponent(str).replace(e(/','%21').replace(e(/\,'%27').replace(ce(/\,'%28').replace(ce(/\,'%29').replace(ction,'%2A');}
  669. function reset(arr){this.php_js=this.php_js||{};this.php_js.pointers=this.php_js.pointers||[];var indexOf=function(value){for(var i=0,length=this.length;i<length;i++){if(this[i]===value){return i;}}
  670. return-1;};var pointers=this.php_js.pointers;if(!pointers.indexOf){pointers.indexOf=indexOf;}
  671. if(pointers.indexOf(arr)===-1){pointers.push(arr,0);}
  672. var arrpos=pointers.indexOf(arr);if(Object.prototype.toString.call(arr)!=='[object Array]'){for(var k in arr){if(pointers.indexOf(arr)===-1){pointers.push(arr,0);}else{pointers[arrpos+1]=0;}
  673. return arr[k];}
  674. return false;}
  675. if(arr.length===0){return false;}
  676. pointers[arrpos+1]=0;return arr[pointers[arrpos+1]];}
  677. function round(value,precision,mode){var m,f,isHalf,sgn;precision|=0;m=Math.pow(10,precision);value*=m;sgn=(value>0)|-(value<0);isHalf=value%1===0.5*sgn;f=Math.floor(value);if(isHalf){switch(mode){case'PHP_ROUND_HALF_DOWN':value=f+(sgn<0);break;case'PHP_ROUND_HALF_EVEN':value=f+(f%2*sgn);break;case'PHP_ROUND_HALF_ODD':value=f+!(f%2);break;default:value=f+(sgn>0);}}
  678. return(isHalf?value:Math.round(value))/m;}
  679. function rsort(inputArr,sort_flags){var valArr=[],k='',i=0,sorter=false,that=this,strictForIn=false,populateArr=[];switch(sort_flags){case'SORT_STRING':sorter=function(a,b){return that.strnatcmp(b,a);};break;case'SORT_LOCALE_STRING':var loc=this.i18n_loc_get_default();sorter=this.php_js.i18nLocales[loc].sorting;break;case'SORT_NUMERIC':sorter=function(a,b){return(b-a);};break;case'SORT_REGULAR':default:sorter=function(b,a){var aFloat=parseFloat(a),bFloat=parseFloat(b),aNumeric=aFloat+''===a,bNumeric=bFloat+''===b;if(aNumeric&&bNumeric){return aFloat>bFloat?1:aFloat<bFloat?-1:0;}else if(aNumeric&&!bNumeric){return 1;}else if(!aNumeric&&bNumeric){return-1;}
  680. return a>b?1:a<b?-1:0;};break;}
  681. this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(k in inputArr){if(inputArr.hasOwnProperty(k)){valArr.push(inputArr[k]);if(strictForIn){delete inputArr[k];}}}
  682. valArr.sort(sorter);for(i=0;i<valArr.length;i++){populateArr[i]=valArr[i];}
  683. return strictForIn||populateArr;}
  684. function rtrim(str,charlist){charlist=!charlist?' \\s\u00A0':(charlist+'').replace(*\{\}\+\$\^\:])/g,'\\$1');var re=ne,'\\$1');var re=new RegExp('['+charlist+']+$'''g');return(str+'').replace(re,'');}
  685. function serialize(mixed_value){var _utf8Size=function(str){var size=0,i=0,l=str.length,code='';for(i=0;i<l;i++){code=str.charCodeAt(i);if(code<0x0080){size+=1;}else if(code<0x0800){size+=2;}else{size+=3;}}
  686. return size;};var _getType=function(inp){var type=typeof inp,match;var key;if(type==='object'&&!inp){return'null';}
  687. if(type==="object"){if(!inp.constructor){return'object';}
  688. var cons=inp.constructor.toString();match=cons.match(h){cons=m);if(match){cons=match[1].toLowerCase();}
  689. var types=["boolean","number","string","array"];for(key in types){if(cons==types[key]){type=types[key];break;}}}
  690. return type;};var type=_getType(mixed_value);var val,ktype='';switch(type){case"function":val="";break;case"boolean":val="1""+(mixed_value?"1":"0");break;case"number":val=(Math.round(mixed_value)==mixed_value?"i":"d")+":"+mixed_value;break;case"string":val="s:"+_utf8Size(mixed_value)+"\\""+mixed_value+"\"":case";case"array":case"object":val="a";var count=0;var vals="";var okey;var key;for(key in mixed_value){if(mixed_value.hasOwnProperty(key)){ktype=_getType(mixed_value[key]);if(ktype==="function"){continue;}
  691. okey=(key.match(nt(key,10))?parseInt(key,10):key);vals+=this.serialize(okey)+this.serialize(mixed_value[key]);count++;}}
  692. val+=":"}"ount+":{"+vals+"}";break;case"undefined":default:val="N";break;}
  693. if(type!=="object"&&type!=="array"){val+=";";}
  694. return val;}
  695. function setcookie(name,value,expires,path,domain,secure){return this.setrawcookie(name,encodeURIComponent(value),expires,path,domain,secure);}
  696. function setrawcookie(name,value,expires,path,domain,secure){if(typeof expires==='string'&&(res)){e).test(expires)){expires=parseInt(expires,10);}
  697. if(expires instanceof Date){expires=expires.toGMTString();}else if(typeof(expires)==='number'){expires=(new Date(expires*1e3)).toGMTString();}
  698. var r=[name+'''+value],s={},i='';s={expires:expires,path:path,domain:domain};for(i in s){if(s.hasOwnProperty(i)){s[i]&&r.push(i+'='+s[i]);}}
  699. return secure&&r.push('secure'),this.window.document.cookie=r.join(";"),true;}
  700. function settype(vr,type){var is_array=function(arr){return typeof arr==='object'&&typeof arr.length==='number'&&!(arr.propertyIsEnumerable('length'))&&typeof arr.splice==='function';};var v,mtch,i,obj;v=this[vr]?this[vr]:vr;try{switch(type){case'boolean':if(is_array(v)&&v.length===0){this[vr]=false;}else if(v==='0'){this[vr]=false;}else if(typeof v==='object'&&!is_array(v)){var lgth=false;for(i in v){lgth=true;}
  701. this[vr]=lgth;}else{this[vr]=!!v;}
  702. break;case'integer':if(typeof v==='number'){this[vr]=parseInt(v,10);}else if(typeof v==='string'){mtch=v.match(if(!mtch){this[v);if(!mtch){this[vr]=0;}else{this[vr]=parseInt(v,10);}}else if(v===true){this[vr]=1;}else if(v===false||v===null){this[vr]=0;}else if(is_array(v)&&v.length===0){this[vr]=0;}else if(typeof v==='object'){this[vr]=1;}
  703. break;case'float':if(typeof v==='string'){mtch=v.match(d+)?|\.\d+)([eE][+\-]?\d+)?/);if(!mtch){this[v);if(!mtch){this[vr]=0;}else{this[vr]=parseFloat(v,10);}}else if(v===true){this[vr]=1;}else if(v===false||v===null){this[vr]=0;}else if(is_array(v)&&v.length===0){this[vr]=0;}else if(typeof v==='object'){this[vr]=1;}
  704. break;case'string':if(v===null||v===false){this[vr]='';}else if(is_array(v)){this[vr]='Array';}else if(typeof v==='object'){this[vr]='Object';}else if(v===true){this[vr]='1''}else{this[vr]+='';}
  705. break;case'array':if(v===null){this[vr]=[];}else if(typeof v!=='object'){this[vr]=[v];}
  706. break;case'object':if(v===null){this[vr]={};}else if(is_array(v)){for(i=0,obj={};i<v.length;i++){obj[i]=v;}
  707. this[vr]=obj;}else if(typeof v!=='object'){this[vr]={scalar:v};}
  708. break;case'null':delete this[vr];break;}
  709. return true;}catch(e){return false;}}
  710. function sha1(str){var rotate_left=function(n,s){var t4=(n<<s)|(n>>>(32-s));return t4;};var cvt_hex=function(val){var str="";var i;var v;for(i=7;i>=0;i--){v=(val>>>(i*4))&0x0f;str+=v.toString(16);}
  711. return str;};var blockstart;var i,j;var W=new Array(80);var H0=0x67452301;var H1=0xEFCDAB89;var H2=0x98BADCFE;var H3=0x10325476;var H4=0xC3D2E1F0;var A,B,C,D,E;var temp;str=this.utf8_encode(str);var str_len=str.length;var word_array=[];for(i=0;i<str_len-3;i+=4){j=str.charCodeAt(i)<<24|str.charCodeAt(i+1)<<16|str.charCodeAt(i+2)<<8|str.charCodeAt(i+3);word_array.push(j);}
  712. switch(str_len%4){case 0:i=0x080000000;break;case 1:i=str.charCodeAt(str_len-1)<<24|0x0800000;break;case 2:i=str.charCodeAt(str_len-2)<<24|str.charCodeAt(str_len-1)<<16|0x08000;break;case 3:i=str.charCodeAt(str_len-3)<<24|str.charCodeAt(str_len-2)<<16|str.charCodeAt(str_len-1)<<8|0x80;break;}
  713. word_array.push(i);while((word_array.length%16)!=14){word_array.push(0);}
  714. word_array.push(str_len>>>29);word_array.push((str_len<<3)&0x0ffffffff);for(blockstart=0;blockstart<word_array.length;blockstart+=16){for(i=0;i<16;i++){W[i]=word_array[blockstart+i];}
  715. for(i=16;i<=79;i++){W[i]=rotate_left(W[i-3]^W[i-8]^W[i-14]^W[i-16],1);}
  716. A=H0;B=H1;C=H2;D=H3;E=H4;for(i=0;i<=19;i++){temp=(rotate_left(A,5)+((B&C)|(~B&D))+E+W[i]+0x5A827999)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;}
  717. for(i=20;i<=39;i++){temp=(rotate_left(A,5)+(B^C^D)+E+W[i]+0x6ED9EBA1)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;}
  718. for(i=40;i<=59;i++){temp=(rotate_left(A,5)+((B&C)|(B&D)|(C&D))+E+W[i]+0x8F1BBCDC)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;}
  719. for(i=60;i<=79;i++){temp=(rotate_left(A,5)+(B^C^D)+E+W[i]+0xCA62C1D6)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;}
  720. H0=(H0+A)&0x0ffffffff;H1=(H1+B)&0x0ffffffff;H2=(H2+C)&0x0ffffffff;H3=(H3+D)&0x0ffffffff;H4=(H4+E)&0x0ffffffff;}
  721. temp=cvt_hex(H0)+cvt_hex(H1)+cvt_hex(H2)+cvt_hex(H3)+cvt_hex(H4);return temp.toLowerCase();}
  722. function shuffle(inputArr){var valArr=[],k='',i=0,strictForIn=false,populateArr=[];for(k in inputArr){if(inputArr.hasOwnProperty(k)){valArr.push(inputArr[k]);if(strictForIn){delete inputArr[k];}}}
  723. valArr.sort(function(){return 0.5-Math.random();});this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(i=0;i<valArr.length;i++){populateArr[i]=valArr[i];}
  724. return strictForIn||populateArr;}
  725. function sin(arg){return Math.sin(arg);}
  726. function sinh(arg){return(Math.exp(arg)-Math.exp(-arg))/2;}
  727. function sizeof(mixed_var,mode){return this.count(mixed_var,mode);}
  728. function sort(inputArr,sort_flags){var valArr=[],keyArr=[],k='',i=0,sorter=false,that=this,strictForIn=false,populateArr=[];switch(sort_flags){case'SORT_STRING':sorter=function(a,b){return that.strnatcmp(a,b);};break;case'SORT_LOCALE_STRING':var loc=this.i18n_loc_get_default();sorter=this.php_js.i18nLocales[loc].sorting;break;case'SORT_NUMERIC':sorter=function(a,b){return(a-b);};break;case'SORT_REGULAR':default:sorter=function(a,b){var aFloat=parseFloat(a),bFloat=parseFloat(b),aNumeric=aFloat+''===a,bNumeric=bFloat+''===b;if(aNumeric&&bNumeric){return aFloat>bFloat?1:aFloat<bFloat?-1:0;}else if(aNumeric&&!bNumeric){return 1;}else if(!aNumeric&&bNumeric){return-1;}
  729. return a>b?1:a<b?-1:0;};break;}
  730. this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(k in inputArr){if(inputArr.hasOwnProperty(k)){valArr.push(inputArr[k]);if(strictForIn){delete inputArr[k];}}}
  731. valArr.sort(sorter);for(i=0;i<valArr.length;i++){populateArr[i]=valArr[i];}
  732. return strictForIn||populateArr;}
  733. function soundex(str){str=(str+'').toUpperCase();if(!str){return'';}
  734. var sdx=[0,0,0,0],m={B:1,F:1,P:1,V:1,C:2,G:2,J:2,K:2,Q:2,S:2,X:2,Z:2,D:3,T:3,L:4,M:5,N:5,R:6},i=0,j,s=0,c,p;while((c=str.charAt(i++))&&s<4){if(j=m[c]){if(j!==p){sdx[s++]=p=j;}}else{s+=i===1;p=0;}}
  735. sdx[0]=str.charAt(0);return sdx.join('');}
  736. function split(delimiter,string){return this.explode(delimiter,string);}
  737. function sprintf(){var regex='#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g;var a=arguments,i;var a=arguments,i=0,format=a[i++];var pad=function(str,len,chr,leftJustify){if(!chr){chr=' ';}
  738. var padding=(str.length>=len)?'':Array(1+len-str.length>>>0).join(chr);return leftJustify?str+padding:padding+str;};var justify=function(value,prefix,leftJustify,minWidth,zeroPad,customPadChar){var diff=minWidth-value.length;if(diff>0){if(leftJustify||!zeroPad){value=pad(value,minWidth,customPadChar,leftJustify);}else{value=value.slice(0,prefix.length)+pad('',diff,'0',true)+value.slice(prefix.length);}}
  739. return value;};var formatBaseX=function(value,base,prefix,leftJustify,minWidth,precision,zeroPad){var number=value>>>0;prefix=prefix&&number&&{'2':'0b'}[base]||'16':'0x'}[base]||'';value=prefix+pad(number.toString(base),precision||0,'0',false);return justify(value,prefix,leftJustify,minWidth,zeroPad);};var formatString=function(value,leftJustify,minWidth,precision,zeroPad,customPadChar){if(precision!=null){value=value.slice(0,precision);}
  740. return justify(value,'',leftJustify,minWidth,zeroPad,customPadChar);};var doFormat=function(substring,valueIndex,flags,minWidth,_,precision,type){var number;var prefix;var method;var textTransform;var value;if(substring=='%%'){return'%';}
  741. var leftJustify=false,positivePrefix='',zeroPad=false,prefixBaseX=false,customPadChar=' ';var flagsl=flags.length;for(var j=0;flags&&j<flagsl;j++){switch(flags.charAt(j)){case' ':positivePrefix=' ';break;case'+':positivePrefix='+';break;case'-':leftJustify=true;break;case"'":customPadChar=flags.charAt(j+1);break;case'0':zeroPad=true;break;case'#':prefixBaseX=true;break;}}
  742. if(!minWidth){minWidth=0;}else if(minWidth=='*'){minWidth=+a[i++];}else if(minWidth.charAt(0)=='*'){minWidth=+a[minWidth.slice(1,-1)];}else{minWidth=+minWidth;}
  743. if(minWidth<0){minWidth=-minWidth;leftJustify=true;}
  744. if(!isFinite(minWidth)){throw new Error('sprintf: (minimum-)width must be finite');}
  745. if(!precision){precision='fFeE'.indexOf(type)>-1?6:(type=='d')?0:undefined;}else if(precision=='*'){precision=+a[i++];}else if(precision.charAt(0)=='*'){precision=+a[precision.slice(1,-1)];}else{precision=+precision;}
  746. value=valueIndex?a[valueIndex.slice(0,-1)]:a[i++];switch(type){case's':return formatString(String(value),leftJustify,minWidth,precision,zeroPad,customPadChar);case'c':return formatString(String.fromCharCode(+value),leftJustify,minWidth,precision,zeroPad);case'b':return formatBaseX(value,2,prefixBaseX,leftJustify,minWidth,precision,zeroPad);case'o':return formatBaseX(value,8,prefixBaseX,leftJustify,minWidth,precision,zeroPad);case'x':return formatBaseX(value,16,prefixBaseX,leftJustify,minWidth,precision,zeroPad);case'X':return formatBaseX(value,16,prefixBaseX,leftJustify,minWidth,precision,zeroPad).toUpperCase();case'u':return formatBaseX(value,10,prefixBaseX,leftJustify,minWidth,precision,zeroPad);case'i':case'd':number=(+value)|0;prefix=number<0?'-':positivePrefix;value=prefix+pad(String(Math.abs(number)),precision,'0',false);return justify(value,prefix,leftJustify,minWidth,zeroPad);case':case'e':case'e':case'e':number=+value;prefix=number<0?';prefix=number<0?'-':positivePrefix;method=['toExponential','toFixed','toPrecision']['efg'.indexOf(type.toLowerCase())];textTransform=['toString','toUpperCase']['eEfFgG'.indexOf(type)%2];value=prefix+Math.abs(number)[method](precision);return justify(value,prefix,leftJustify,minWidth,zeroPad)[textTransform]();default:return substring;}};return format.replace(regex,doFormat);}
  747. function sql_regcase(str){this.setlocale('LC_ALL',0);var i=0,upper='',lower='',pos=0,retStr='';upper=this.php_js.locales[this.php_js.localeCategories.LC_CTYPE].LC_CTYPE.upper;lower=this.php_js.locales[this.php_js.localeCategories.LC_CTYPE].LC_CTYPE.lower;for(i=0;i<str.length;i++){if(((pos=upper.indexOf(str.charAt(i)))!==-1)||((pos=lower.indexOf(str.charAt(i)))!==-1)){retStr+='['+upper.charAt(pos)+lower.charAt(pos)+']';}else{retStr+=str.charAt(i);}}
  748. return retStr;}
  749. function sqrt(arg){return Math.sqrt(arg);}
  750. function str_getcsv(input,delimiter,enclosure,escape){var output=[];var backwards=function(str){return str.split('''.reverse().join('');};var pq=function(str){return(str+'').replace(]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1");};delimit,"\\$1");};delimiter=delimiter||',';enclosure=enclosure||'"';escape=escape||'\\';input=input.replace(new RegExp('^\\s*').replace(new RegExp(pq(enclosure)+'xp(pq(enclosure)+'\\s*$'),'');input=backwards(input).split(new RegExp(pq(enclosure)+'\\s*'+pq(delimiter)+'\\s*'+pq(enclosure)+'(?!'+pq(escape)+')','g')).reverse();for(var i=0;i<input.length;i++){output.push(backwards(input[i]).replace(new RegExp(pq(escape)+pq(enclosure),'g'),enclosure));}
  751. return output;}
  752. function str_ireplace(search,replace,subject){var i,k='';var searchl=0;var reg;var escapeRegex=function(s){return s.replace(.=!:(|)])/g,'\\$1');};search+,''\$1');};search+='';searchl=search.length;if(Object.prototype.toString.call(replace)!=='[object Array]'){replace=[replace];if(Object.prototype.toString.call(search)==='[object Array]'){while(searchl>replace.length){replace[replace.length]=replace[0];}}}
  753. if(Object.prototype.toString.call(search)!=='[object Array]'){search=[search];}
  754. while(search.length>replace.length){replace[replace.length]='';}
  755. if(Object.prototype.toString.call(subject)==='[object Array]'){for(k in subject){if(subject.hasOwnProperty(k)){subject[k]=str_ireplace(search,replace,subject[k]);}}
  756. return subject;}
  757. searchl=search.length;for(i=0;i<searchl;i++){reg=new RegExp(escapeRegex(search[i]),'gi');subject=subject.replace(reg,replace[i]);}
  758. return subject;}
  759. function str_pad(input,pad_length,pad_string,pad_type){var half='',pad_to_go;var str_pad_repeater=function(s,len){var collect='',i;while(collect.length<len){collect+=s;}
  760. collect=collect.substr(0,len);return collect;};input+='';pad_string=pad_string!==undefined?pad_string:' ';if(pad_type!='STR_PAD_LEFT'&&pad_type!='STR_PAD_RIGHT'&&pad_type!='STR_PAD_BOTH'){pad_type='STR_PAD_RIGHT';}
  761. if((pad_to_go=pad_length-input.length)>0){if(pad_type=='STR_PAD_LEFT'){input=str_pad_repeater(pad_string,pad_to_go)+input;}else if(pad_type=='STR_PAD_RIGHT'){input=input+str_pad_repeater(pad_string,pad_to_go);}else if(pad_type=='STR_PAD_BOTH'){half=str_pad_repeater(pad_string,Math.ceil(pad_to_go/2));input=half+input+half;input=input.substr(0,pad_length);}}
  762. return input;}
  763. function str_repeat(input,multiplier){return new Array(multiplier+1).join(input);}
  764. function str_replace(search,replace,subject,count){var i=0,j=0,temp='',repl='',sl=0,fl=0,f=[].concat(search),r=[].concat(replace),s=subject,ra=Object.prototype.toString.call(r)==='[object Array]',sa=Object.prototype.toString.call(s)==='[object Array]';s=[].concat(s);if(count){this.window[count]=0;}
  765. for(i=0,sl=s.length;i<sl;i++){if(s[i]===''){continue;}
  766. for(j=0,fl=f.length;j<fl;j++){temp=s[i]+'';repl=ra?(r[j]!==undefined?r[j]:''):r[0];s[i]=(temp).split(f[j]).join(repl);if(count&&s[i]!==temp){this.window[count]+=(temp.length-s[i].length)/f[j].length;}}}
  767. return sa?s:s[0];}
  768. function str_rot13(str){return(str+'').replace((s){retur,function(s){return String.fromCharCode(s.charCodeAt(0)+(s.toLowerCase()<'n'?13:-13));});}
  769. function str_shuffle(str){if(str==undefined){throw'Wrong parameter count for str_shuffle()';}
  770. var getRandomInt=function(max){return Math.floor(Math.random()*(max+1));};var newStr='',rand=0;while(str.length){rand=getRandomInt(str.length-1);newStr+=str.charAt(rand);str=str.substring(0,rand)+str.substr(rand+1);}
  771. return newStr;}
  772. function str_split(string,split_length){if(split_length===null){split_length=1;}
  773. if(string===null||split_length<1){return false;}
  774. string+='';var chunks=[],pos=0,len=string.length;while(pos<len){chunks.push(string.slice(pos,pos+=split_length));}
  775. return chunks;}
  776. function str_word_count(str,format,charlist){var len=str.length,cl=charlist&&charlist.length,chr='''tmpStr='',i=0,c='',wArr=[],wC=0,assoc={},aC=0,reg='',match=false;var _preg_quote=function(str){return(str+'').replace(]\$\(\)\{\}\=\!<>\|\:])/g,'\\$1');},_getWho,'\\$1');},_getWholeChar=function(str,i){var code=str.charCodeAt(i);if(code<0xD800||code>0xDFFF){return str.charAt(i);}
  777. if(0xD800<=code&&code<=0xDBFF){if(str.length<=(i+1)){throw'High surrogate without following low surrogate';}
  778. var next=str.charCodeAt(i+1);if(0xDC00>next||next>0xDFFF){throw'High surrogate without following low surrogate';}
  779. return str.charAt(i)+str.charAt(i+1);}
  780. if(i===0){throw'Low surrogate without preceding high surrogate';}
  781. var prev=str.charCodeAt(i-1);if(0xD800>prev||prev>0xDBFF){throw'Low surrogate without preceding high surrogate';}
  782. return false;};if(cl){reg='^('+_preg_quote(_getWholeChar(charlist,0));for(i=1;i<cl;i++){if((chr=_getWholeChar(charlist,i))===false){continue;}
  783. reg+='|'+_preg_quote(chr);}
  784. reg+=')$';reg=new RegExp(reg);}
  785. for(i=0;i<len;i++){if((c=_getWholeChar(str,i))===false){continue;}
  786. match=this.ctype_alpha(c)||(reg&&c.search(reg)!==-1)||((i!==0&&i!==len-1)&&c==='-')||(i!==0&&c==="'");if(match){if(tmpStr===''&&format===2){aC=i;}
  787. tmpStr=tmpStr+c;}
  788. if(i===len-1||!match&&tmpStr!==''){if(format!==2){wArr[wArr.length]=tmpStr;}else{assoc[aC]=tmpStr;}
  789. tmpStr='';wC++;}}
  790. if(!format){return wC;}else if(format===1){return wArr;}else if(format===2){return assoc;}
  791. throw'You have supplied an incorrect format';}
  792. function strcasecmp(f_string1,f_string2){var string1=(f_string1+'').toLowerCase();var string2=(f_string2+'').toLowerCase();if(string1>string2){return 1;}else if(string1==string2){return 0;}
  793. return-1;}
  794. function strchr(haystack,needle,bool){return this.strstr(haystack,needle,bool);}
  795. function strcmp(str1,str2){return((str1==str2)?0:((str1>str2)?1:-1));}
  796. function strcspn(str,mask,start,length){start=start?start:0;var count=(length&&((start+length)<str.length))?start+length:str.length;strct:for(var i=start,lgth=0;i<count;i++){for(var j=0;j<mask.length;j++){if(str.charAt(i).indexOf(mask[j])!==-1){continue strct;}}++lgth;}
  797. return lgth;}
  798. function strip_tags(input,allowed){allowed=(((allowed||"")+"").toLowerCase().match(g)||[]).join('');va)||[]).join('');var tags=]*)\b[^>]*>/gi,commentsAndPhpTag,commentsAndPhpTags=\?(?:php)?[\s\S]*?\?>/gi;return input.repl;return input.replace(commentsAndPhpTags,'').replace(tags,function($0,$1){return allowed.indexOf('<'+$1.toLowerCase()+'>')>-1?$0:'';});}
  799. function stripos(f_haystack,f_needle,f_offset){var haystack=(f_haystack+'').toLowerCase();var needle=(f_needle+'').toLowerCase();var index=0;if((index=haystack.indexOf(needle,f_offset))!==-1){return index;}
  800. return false;}
  801. function stripslashes(str){return(str+'').replace((s,n1){sw,function(s,n1){switch(n1){case'\\':return'\\';case'0':return'\u0000';case'':return'';default:return n1;}});}
  802. function stristr(haystack,needle,bool){var pos=0;haystack+='';pos=haystack.toLowerCase().indexOf((needle+'').toLowerCase());if(pos==-1){return false;}else{if(bool){return haystack.substr(0,pos);}else{return haystack.slice(pos);}}}
  803. function strlen(string){var str=string+'';var i=0,chr='',lgth=0;if(!this.php_js||!this.php_js.ini||!this.php_js.ini[']||this.php_js.ini['|this.php_js.ini['].local_value.toLowerCase()!=='.toLowerCase()!=='on'){return string.length;}
  804. var getWholeChar=function(str,i){var code=str.charCodeAt(i);var next='',prev='';if(0xD800<=code&&code<=0xDBFF){if(str.length<=(i+1)){throw'High surrogate without following low surrogate';}
  805. next=str.charCodeAt(i+1);if(0xDC00>next||next>0xDFFF){throw'High surrogate without following low surrogate';}
  806. return str.charAt(i)+str.charAt(i+1);}else if(0xDC00<=code&&code<=0xDFFF){if(i===0){throw'Low surrogate without preceding high surrogate';}
  807. prev=str.charCodeAt(i-1);if(0xD800>prev||prev>0xDBFF){throw'Low surrogate without preceding high surrogate';}
  808. return false;}
  809. return str.charAt(i);};for(i=0,lgth=0;i<str.length;i++){if((chr=getWholeChar(str,i))===false){continue;}
  810. lgth++;}
  811. return lgth;}
  812. function strnatcasecmp(str1,str2){var a=(str1+'').toLowerCase();var b=(str2+'').toLowerCase();var isWhitespaceChar=function(a){return a.charCodeAt(0)<=32;};var isDigitChar=function(a){var charCode=a.charCodeAt(0);return(charCode>=48&&charCode<=57);};var compareRight=function(a,b){var bias=0;var ia=0;var ib=0;var ca;var cb;for(var cnt=0;true;ia++,ib++){ca=a.charAt(ia);cb=b.charAt(ib);if(!isDigitChar(ca)&&!isDigitChar(cb)){return bias;}else if(!isDigitChar(ca)){return-1;}else if(!isDigitChar(cb)){return 1;}else if(ca<cb){if(bias===0){bias=-1;}}else if(ca>cb){if(bias===0){bias=1;}}else if(ca==='0'&&cb==='0'){return bias;}}};var ia=0,ib=0;var nza=0,nzb=0;var ca,cb;var result;while(true){nza=nzb=0;ca=a.charAt(ia);cb=b.charAt(ib);while(isWhitespaceChar(ca)||ca==='0'){if(ca==='0'){nza++;}else{nza=0;}
  813. ca=a.charAt(++ia);}
  814. while(isWhitespaceChar(cb)||cb==='0'){if(cb==='0'){nzb++;}else{nzb=0;}
  815. cb=b.charAt(++ib);}
  816. if(isDigitChar(ca)&&isDigitChar(cb)){if((result=compareRight(a.substring(ia),b.substring(ib)))!==0){return result;}}
  817. if(ca==='0'&&cb==='0'){return nza-nzb;}
  818. if(ca<cb){return-1;}else if(ca>cb){return+1;}
  819. ++ia;++ib;}}
  820. function strnatcmp(f_string1,f_string2,f_version){var i=0;if(f_version==undefined){f_version=false;}
  821. var __strnatcmp_split=function(f_string){var result=[];var buffer='';var chr='';var i=0,f_stringl=0;var text=true;f_stringl=f_string.length;for(i=0;i<f_stringl;i++){chr=f_string.substring(i,i+1);if(chr.match((buf)){if(text){if(buffer.length>0){result[result.length]=buffer;buffer='';}
  822. text=false;}
  823. buffer+=chr;}else if((text==false)&&(chr=='.')&&(i<(f_string.length-1))&&(f_string.substring(i+1,i+2).match(ult.))){result[result.length]=buffer;buffer='';}else{if(text==false){if(buffer.length>0){result[result.length]=parseInt(buffer,10);buffer='';}
  824. text=true;}
  825. buffer+=chr;}}
  826. if(buffer.length>0){if(text){result[result.length]=buffer;}else{result[result.length]=parseInt(buffer,10);}}
  827. return result;};var array1=__strnatcmp_split(f_string1+'');var array2=__strnatcmp_split(f_string2+'');var len=array1.length;var text=true;var result=-1;var r=0;if(len>array2.length){len=array2.length;result=1;}
  828. for(i=0;i<len;i++){if(isNaN(array1[i])){if(isNaN(array2[i])){text=true;if((r=this.strcmp(array1[i],array2[i]))!=0){return r;}}else if(text){return 1;}else{return-1;}}else if(isNaN(array2[i])){if(text){return-1;}else{return 1;}}else{if(text||f_version){if((r=(array1[i]-array2[i]))!=0){return r;}}else{if((r=this.strcmp(array1[i].toString(),array2[i].toString()))!=0){return r;}}
  829. text=false;}}
  830. return result;}
  831. function strncasecmp(argStr1,argStr2,len){var diff,i=0;var str1=(argStr1+'').toLowerCase().substr(0,len);var str2=(argStr2+'').toLowerCase().substr(0,len);if(str1.length!==str2.length){if(str1.length<str2.length){len=str1.length;if(str2.substr(0,str1.length)==str1){return str1.length-str2.length;}}else{len=str2.length;if(str1.substr(0,str2.length)==str2){return str1.length-str2.length;}}}else{len=str1.length;}
  832. for(diff=0,i=0;i<len;i++){diff=str1.charCodeAt(i)-str2.charCodeAt(i);if(diff!==0){return diff;}}
  833. return 0;}
  834. function strncmp(str1,str2,lgth){var s1=(str1+'').substr(0,lgth);var s2=(str2+'').substr(0,lgth);return((s1==s2)?0:((s1>s2)?1:-1));}
  835. function strpbrk(haystack,char_list){for(var i=0,len=haystack.length;i<len;++i){if(char_list.indexOf(haystack.charAt(i))>=0){return haystack.slice(i);}}
  836. return false;}
  837. function strpos(haystack,needle,offset){var i=(haystack+'').indexOf(needle,(offset||0));return i===-1?false:i;}
  838. function strrchr(haystack,needle){var pos=0;if(typeof needle!=='string'){needle=String.fromCharCode(parseInt(needle,10));}
  839. needle=needle.charAt(0);pos=haystack.lastIndexOf(needle);if(pos===-1){return false;}
  840. return haystack.substr(pos);}
  841. function strrev(string){string=string+'';var grapheme_extend=F\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065E\u0670\u06D6-\u06DC\u06DE-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0901-\u0903\u093C\u093E-\u094D\u0951-\u0954\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C01-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C82\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D02\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F90-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B6-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAA\u1C24-\u1C37\u1DC0-\u1DE6\u1DFE\u1DFF\u20D0-\u20F0\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA67C\uA67D\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA926-\uA92D\uA947-\uA953\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uFB1E\uFE00-\uFE0F\uFE20-\uFE26]+)/g;string=string.rep;string=string.replace(grapheme_extend,'$2$1');return string.split('''.reverse().join('');}
  842. function strripos(haystack,needle,offset){haystack=(haystack+'').toLowerCase();needle=(needle+'').toLowerCase();var i=-1;if(offset){i=(haystack+'').slice(offset).lastIndexOf(needle);if(i!==-1){i+=offset;}}else{i=(haystack+'').lastIndexOf(needle);}
  843. return i>=0?i:false;}
  844. function strrpos(haystack,needle,offset){var i=-1;if(offset){i=(haystack+'').slice(offset).lastIndexOf(needle);if(i!==-1){i+=offset;}}else{i=(haystack+'').lastIndexOf(needle);}
  845. return i>=0?i:false;}
  846. function strspn(str1,str2,start,lgth){var found;var stri;var strj;var j=0;var i=0;start=start?(start<0?(str1.length+start):start):0;lgth=lgth?((lgth<0)?(str1.length+lgth-start):lgth):str1.length-start;str1=str1.substr(start,lgth);for(i=0;i<str1.length;i++){found=0;stri=str1.substring(i,i+1);for(j=0;j<=str2.length;j++){strj=str2.substring(j,j+1);if(stri==strj){found=1;break;}}
  847. if(found!=1){return i;}}
  848. return i;}
  849. function strstr(haystack,needle,bool){var pos=0;haystack+='';pos=haystack.indexOf(needle);if(pos==-1){return false;}else{if(bool){return haystack.substr(0,pos);}else{return haystack.slice(pos);}}}
  850. function strtok(str,tokens){this.php_js=this.php_js||{};if(tokens===undefined){tokens=str;str=this.php_js.strtokleftOver;}
  851. if(str.length===0){return false;}
  852. if(tokens.indexOf(str.charAt(0))!==-1){return this.strtok(str.substr(1),tokens);}
  853. for(var i=0;i<str.length;i++){if(tokens.indexOf(str.charAt(i))!==-1){break;}}
  854. this.php_js.strtokleftOver=str.substr(i+1);return str.substring(0,i);}
  855. function strtolower(str){return(str+'').toLowerCase();}
  856. function strtotime(str,now){var i,match,s,strTmp='',parse='';strTmp=str;strTmp=strTmp.replace(' ');strTmp=strTm,' ');strTmp=strTmp.replace((strTmp=='n,''){return(new Date()).getTime()/1000;}else if(!isNaN(parse=Date.parse(strTmp))){return(parse/1000);}else if(now){now=new Date(now*1000);}else{now=new Date();}
  857. strTmp=strTmp.toLowerCase();var __is={day:{');var __is={day:{'sun':0,'mon':1,'tue':2,'wed':3,'thu':4,'fri'jan'sat'feb'mon:{'jan':0,'feb':1,'mar':2,'apr':3,'may':4,'jun':5,'jul':6,'aug':7,'sep':8,'oct':9,'nov':10,'dec':11}};var process=function(m){var ago=(m[2]&&m[2]=='ago');var num=(num=m[0]=='last'?-1:1)*(ago?-1:1);switch(m[0]){case'last':case'next':switch(m[1].substring(0,3)){case'yea':now.setFullYear(now.getFullYear()+num);break;case'mon':now.setMonth(now.getMonth()+num);break;case'wee':now.setDate(now.getDate()+(num*7));break;case'day':now.setDate(now.getDate()+num);break;case'hou':now.setHours(now.getHours()+num);break;case'min':now.setMinutes(now.getMinutes()+num);break;case'sec':now.setSeconds(now.getSeconds()+num);break;default:var day;if(typeof(day=__is.day[m[1].substring(0,3)])!='undefined'){var diff=day-now.getDay();if(diff==0){diff=7*num;}else if(diff>0){if(m[0]=='last'){diff-=7;}}else{if(m[0]=='next'){diff+=7;}}
  858. now.setDate(now.getDate()+diff);}}
  859. break;default:if(num*=.test(m[0])){num*=parseInt(m[0],10);switch(m[1].substring(0,3)){case'yea':now.setFullYear(now.getFullYear()+num);break;case'mon':now.setMonth(now.getMonth()+num);break;case'wee':now.setDate(now.getDate()+(num*7));break;case'day':now.setDate(now.getDate()+num);break;case'hou':now.setHours(now.getHours()+num);break;case'min':now.setMinutes(now.getMinutes()+num);break;case'sec':now.setSeconds(now.getSeconds()+num);break;}}else{return false;}
  860. break;}
  861. return true;};match=strTmp.match(d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if(match!=null){);if(match!=null){if(!match[2]){match[2]='00:00:00';}else if(!match[3]){match[2]+=':00';}
  862. s=match[1].split(s.mo);for(i in __is.mon){if(__is.mon[i]==s[1]-1){s[1]=i;}}
  863. s[0]=parseInt(s[0],10);s[0]=(s[0]>=0&&s[0]<=69)?'20'+(s[0]<10?'0'+s[0]:s[0]+''):(s[0]>=70&&s[0]<=99)?'19'+s[0]:s[0]+'';return parseInt(this.strtotime(s[2]+' '+s[1]+' '+s[0]+' '+match[2])+(match[4]?match[4]/1000:''),10);}
  864. var regex='([+-]?\\d+\\s'+'(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?'+'|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday'+'|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)'+'|(last|next)\\s'+'(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?'+'|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday'+'|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))'+'(\\sago)?';match=strTmp.match(new RegExp(regex,'gi'));if(match==null){return false;}
  865. for(i=0;i<match.length;i++){if(!process(match[i].split(' '))){return false;}}
  866. return(now.getTime()/1000);}
  867. function strtoupper(str){return(str+'').toUpperCase();}
  868. function strtr(str,from,to){var fr='',i=0,j=0,lenStr=0,lenFrom=0,tmpStrictForIn=false,fromTypeStr='',toTypeStr='',istr='';var tmpFrom=[];var tmpTo=[];var ret='';var match=false;if(typeof from==='object'){tmpStrictForIn=this.ini_set(',false);from=this.krsort(from);this.ini_set('om);this.ini_set(',tmpStrictForIn);for(fr in from){if(from.hasOwnProperty(fr)){tmpFrom.push(fr);tmpTo.push(from[fr]);}}
  869. from=tmpFrom;to=tmpTo;}
  870. lenStr=str.length;lenFrom=from.length;fromTypeStr=typeof from==='tr=typeof from==='string';toTypeStr=typeof to==='string';for(i=0;i<lenStr;i++){match=false;if(fromTypeStr){istr=str.charAt(i);for(j=0;j<lenFrom;j++){if(istr==from.charAt(j)){match=true;break;}}}else{for(j=0;j<lenFrom;j++){if(str.substr(i,from[j].length)==from[j]){match=true;i=(i+from[j].length)-1;break;}}}
  871. if(match){ret+=toTypeStr?to.charAt(j):to[j];}else{ret+=str.charAt(i);}}
  872. return ret;}
  873. function substr(str,start,len){var i=0,allBMP=true,es=0,el=0,se=0,ret='';str+='';var end=str.length;this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};switch((this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value.toLowerCase())){case'owerCase())){case'on':for(i=0;i<str.length;i++){if(test(str.charAt(i.test(str.charAt(i))&&/[\uDC00-\uDFFF]/.test(str.charAt(i+1))){allBMP=false;break;}}
  874. if(!allBMP){if(start<0){for(i=end-1,es=(start+=end);i>=es;i--){if(test(str.charAt(i.test(str.charAt(i))&&/[\uD800-\uDBFF]/.test(str.charAt(i-1))){start--;es--;}}}else{var surrogatePairs=uDC00-\uDFFF]/g;while((surrogateP;while((surrogatePairs.exec(str))!=null){var li=surrogatePairs.lastIndex;if(li-2<start){start++;}else{break;}}}
  875. if(start>=end||start<0){return false;}
  876. if(len<0){for(i=end-1,el=(end+=len);i>=el;i--){if(test(str.charAt(i.test(str.charAt(i))&&/[\uD800-\uDBFF]/.test(str.charAt(i-1))){end--;el--;}}
  877. if(start>end){return false;}
  878. return str.slice(start,end);}else{se=start+len;for(i=start;i<se;i++){ret+=str.charAt(i);if(test(str.charAt(i.test(str.charAt(i))&&/[\uDC00-\uDFFF]/.test(str.charAt(i+1))){se++;}}
  879. return ret;}
  880. break;}
  881. case'off':default:if(start<0){start+=end;}
  882. end=typeof len==='undefined'?end:(len<0?len+end:len+start);return start>=str.length||start<0||start>end?!1:str.slice(start,end);}
  883. return undefined;}
  884. function substr_compare(main_str,str,offset,length,case_insensitivity){if(!offset&&offset!==0){throw'Missing offset for substr_compare()';}
  885. if(offset<0){offset=main_str.length+offset;}
  886. if(length&&length>(main_str.length-offset)){return false;}
  887. length=length||main_str.length-offset;main_str=main_str.substr(offset,length);str=str.substr(0,length);if(case_insensitivity){main_str=(main_str+'').toLowerCase();str=(str+'').toLowerCase();if(main_str==str){return 0;}
  888. return(main_str>str)?1:-1;}
  889. return((main_str==str)?0:((main_str>str)?1:-1));}
  890. function substr_count(haystack,needle,offset,length){var pos=0,cnt=0;haystack+='';needle+='';if(isNaN(offset)){offset=0;}
  891. if(isNaN(length)){length=0;}
  892. offset--;while((offset=haystack.indexOf(needle,offset+1))!=-1){if(length>0&&(offset+needle.length)>length){return false;}else{cnt++;}}
  893. return cnt;}
  894. function substr_replace(str,replace,start,length){if(start<0){start=start+str.length;}
  895. length=length!==undefined?length:str.length;if(length<0){length=length+str.length-start;}
  896. return str.slice(0,start)+replace.substr(0,length)+replace.slice(length)+str.slice(start+length);}
  897. function tan(arg){return Math.tan(arg);}
  898. function tanh(arg){return(Math.exp(arg)-Math.exp(-arg))/(Math.exp(arg)+Math.exp(-arg));}
  899. function time(){return Math.floor(new Date().getTime()/1000);}
  900. function trim(str,charlist){var whitespace,l=0,i=0;str+='';if(!charlist){whitespace=" \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000";}else{charlist+='';whitespace=charlist.replace(*\{\}\+\$\^\:])/g,'$1');}
  901. l=str.len,'$1');}
  902. l=str.length;for(i=0;i<l;i++){if(whitespace.indexOf(str.charAt(i))===-1){str=str.substring(i);break;}}
  903. l=str.length;for(i=l-1;i>=0;i--){if(whitespace.indexOf(str.charAt(i))===-1){str=str.substring(0,i+1);break;}}
  904. return whitespace.indexOf(str.charAt(0))===-1?str:'';}
  905. function uasort(inputArr,sorter){var valArr=[],tempKeyVal,tempValue,ret,k='',i=0,strictForIn=false,populateArr={};if(typeof sorter==='string'){sorter=this[sorter];}else if(Object.prototype.toString.call(sorter)==='[object Array]'){sorter=this[sorter[0]][sorter[1]];}
  906. this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(k in inputArr){if(inputArr.hasOwnProperty(k)){valArr.push([k,inputArr[k]]);if(strictForIn){delete inputArr[k];}}}
  907. valArr.sort(function(a,b){return sorter(a[1],b[1]);});for(i=0;i<valArr.length;i++){populateArr[valArr[i][0]]=valArr[i][1];}
  908. return strictForIn||populateArr;}
  909. function ucfirst(str){str+='';var f=str.charAt(0).toUpperCase();return f+str.substr(1);}
  910. function ucwords(str){return(str+'').replace(])/g,function($1){retu,function($1){return $1.toUpperCase();});}
  911. function uksort(inputArr,sorter){var tmp_arr={},keys=[],i=0,k='',strictForIn=false,populateArr={};if(typeof sorter==='string'){sorter=this.window[sorter];}
  912. for(k in inputArr){if(inputArr.hasOwnProperty(k)){keys.push(k);}}
  913. try{if(sorter){keys.sort(sorter);}else{keys.sort();}}catch(e){return false;}
  914. this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(i=0;i<keys.length;i++){k=keys[i];tmp_arr[k]=inputArr[k];if(strictForIn){delete inputArr[k];}}
  915. for(i in tmp_arr){if(tmp_arr.hasOwnProperty(i)){populateArr[i]=tmp_arr[i];}}
  916. return strictForIn||populateArr;}
  917. function unserialize(data){var that=this;var utf8Overhead=function(chr){var code=chr.charCodeAt(0);if(code<0x0080){return 0;}
  918. if(code<0x0800){return 1;}
  919. return 2;};var error=function(type,msg,filename,line){throw new that.window[type](msg,filename,line);};var read_until=function(data,offset,stopchr){var buf=[];var chr=data.slice(offset,offset+1);var i=2;while(chr!=stopchr){if((i+offset)>data.length){error('Error','Invalid');}
  920. buf.push(chr);chr=data.slice(offset+(i-1),offset+i);i+=1;}
  921. return[buf.length,buf.join('')];};var read_chrs=function(data,offset,length){var buf;buf=[];for(var i=0;i<length;i++){var chr=data.slice(offset+(i-1),offset+i);buf.push(chr);length-=utf8Overhead(chr);}
  922. return[buf.length,buf.join('')];};var _unserialize=function(data,offset){var readdata;var readData;var chrs=0;var ccount;var stringlength;var keyandchrs;var keys;if(!offset){offset=0;}
  923. var dtype=(data.slice(offset,offset+1)).toLowerCase();var dataoffset=offset+2;var typeconvert=function(x){return x;};switch(dtype){case'i':typeconvert=function(x){return parseInt(x,10);};readData=read_until(data,dataoffset,';');chrs=readData[0];readdata=readData[1];dataoffset+=chrs+1;break;case'b':typeconvert=function(x){return parseInt(x,10)!==0;};readData=read_until(data,dataoffset,';');chrs=readData[0];readdata=readData[1];dataoffset+=chrs+1;break;case'd':typeconvert=function(x){return parseFloat(x);};readData=read_until(data,dataoffset,';');chrs=readData[0];readdata=readData[1];dataoffset+=chrs+1;break;case'n':readdata=null;break;case's':ccount=read_until(data,dataoffset,':');chrs=ccount[0];stringlength=ccount[1];dataoffset+=chrs+2;readData=read_chrs(data,dataoffset+1,parseInt(stringlength,10));chrs=readData[0];readdata=readData[1];dataoffset+=chrs+2;if(chrs!=parseInt(stringlength,10)&&chrs!=readdata.length){error('SyntaxError','String length mismatch');}
  924. readdata=that.utf8_decode(readdata);break;case'a':readdata={};keyandchrs=read_until(data,dataoffset,':');chrs=keyandchrs[0];keys=keyandchrs[1];dataoffset+=chrs+2;for(var i=0;i<parseInt(keys,10);i++){var kprops=_unserialize(data,dataoffset);var kchrs=kprops[1];var key=kprops[2];dataoffset+=kchrs;var vprops=_unserialize(data,dataoffset);var vchrs=vprops[1];var value=vprops[2];dataoffset+=vchrs;readdata[key]=value;}
  925. dataoffset+=1;break;default:error('SyntaxError','Unknown / Unhandled data type(s): '+dtype);break;}
  926. return[dtype,dataoffset-offset,typeconvert(readdata)];};return _unserialize((data+''),0)[2];}
  927. function urldecode(str){return decodeURIComponent((str+'%20'eplace(nctio,'%20'));}
  928. function urlencode(str){str=(str+'').toString();return encodeURIComponent(str).replace(e(/','%21').replace(e(/\,'%27').replace(ce(/\,'%28').replace(ce(/\,'%29').replace(ce(/%,'%2A'+'replace(tion u,'+');}
  929. function usort(inputArr,sorter){var valArr=[],k='',i=0,strictForIn=false,populateArr={};if(typeof sorter==='string'){sorter=this[sorter];}else if(Object.prototype.toString.call(sorter)==='[object Array]'){sorter=this[sorter[0]][sorter[1]];}
  930. this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};strictForIn=this.php_js.ini[']&&this.php_js.ini['&this.php_js.ini['].local_value&&this.php_js.ini['&this.php_js.ini['].local_value!==''].local_value!=='off';populateArr=strictForIn?inputArr:populateArr;for(k in inputArr){if(inputArr.hasOwnProperty(k)){valArr.push(inputArr[k]);if(strictForIn){delete inputArr[k];}}}
  931. try{valArr.sort(sorter);}catch(e){return false;}
  932. for(i=0;i<valArr.length;i++){populateArr[i]=valArr[i];}
  933. return strictForIn||populateArr;}
  934. function utf8_decode(str_data){var tmp_arr=[],i=0,ac=0,c1=0,c2=0,c3=0;str_data+='';while(i<str_data.length){c1=str_data.charCodeAt(i);if(c1<128){tmp_arr[ac++]=String.fromCharCode(c1);i++;}else if(c1>191&&c1<224){c2=str_data.charCodeAt(i+1);tmp_arr[ac++]=String.fromCharCode(((c1&31)<<6)|(c2&63));i+=2;}else{c2=str_data.charCodeAt(i+1);c3=str_data.charCodeAt(i+2);tmp_arr[ac++]=String.fromCharCode(((c1&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
  935. return tmp_arr.join('');}
  936. function utf8_encode(argString){if(argString===null||typeof argString==="undefined"){return"";}
  937. var string=(argString+'');var utftext="",start,end,stringl=0;start=end=0;stringl=string.length;for(var n=0;n<stringl;n++){var c1=string.charCodeAt(n);var enc=null;if(c1<128){end++;}else if(c1>127&&c1<2048){enc=String.fromCharCode((c1>>6)|192)+String.fromCharCode((c1&63)|128);}else{enc=String.fromCharCode((c1>>12)|224)+String.fromCharCode(((c1>>6)&63)|128)+String.fromCharCode((c1&63)|128);}
  938. if(enc!==null){if(end>start){utftext+=string.slice(start,end);}
  939. utftext+=enc;start=end=n+1;}}
  940. if(end>start){utftext+=string.slice(start,stringl);}
  941. return utftext;}
  942. function var_dump(){var output='',pad_char=' ',pad_val=4,lgth=0,i=0,d=this.window.document;var _getFuncName=function(fn){var name=(w\$]+)\s*\(/).exec(fn);if(!nam).exec(fn);if(!name){return'(Anonymous)';}
  943. return name[1];};var _repeat_char=function(len,pad_char){var str='';for(var i=0;i<len;i++){str+=pad_char;}
  944. return str;};var _getInnerVal=function(val,thick_pad){var ret='';if(val===null){ret='NULL';}else if(typeof val==='boolean'){ret='bool('+val+')';}else if(typeof val==='string'){ret='string('+val.length+') "'+val+'"';}else if(typeof val==='number'){if(parseFloat(val)==parseInt(val,10)){ret='int('+val+')';}else{ret='float('+val+')';}}
  945. else if(typeof val==='undefined'){ret='undefined';}else if(typeof val==='function'){var funcLines=val.toString().split('\n');ret='';for(var i=0,fll=funcLines.length;i<fll;i++){ret+=(i!==0?'\n'+thick_pad:'')+funcLines[i];}}else if(val instanceof Date){ret='Date('+val+')';}else if(val instanceof RegExp){ret='RegExp('+val+')';}else if(val.nodeName){switch(val.nodeType){case 1:if(typeof val.namespaceURI==='undefined'||val.nam//www.w3.org/1999/xhtml'){ret='HTMLElement("'+val.nodeName+'")';}else{ret='XML Element("'+val.nodeName+'")';}
  946. l.nodeName+'")';}
  947. break;case 2:ret='ATTRIBUTE_NODE('+val.nodeName+')';break;case 3:ret='TEXT_NODE(';break;case 4:ret='break;case 4:ret='CDATA_SECTION_NODE(';break;case 5:ret='break;case 5:ret='ENTITY_REFERENCE_NODE';break;case 6:ret='ENTITY_NODE';break;case 7:ret='PROCESSING_INSTRUCTION_NODE('+val.nodeName+')'+val.nodeValue+')';break;case 8:ret='COMMENT_NODE(';break;case 9:ret='break;case 9:ret='DOCUMENT_NODE';break;case 10:ret='DOCUMENT_TYPE_NODE';break;case 11:ret='DOCUMENT_FRAGMENT_NODE';break;case 12:ret='NOTATION_NODE';break;}}
  948. return ret;};var _formatArray=function(obj,cur_depth,pad_val,pad_char){var someProp='';if(cur_depth>0){cur_depth++;}
  949. var base_pad=_repeat_char(pad_val*(cur_depth-1),pad_char);var thick_pad=_repeat_char(pad_val*(cur_depth+1),pad_char);var str='';var val=''object'eof obj==='object'&&obj!==null){if(obj.constructor&&_getFuncName(obj.constructor)==='PHPJS_Resource'){return obj.var_dump();}
  950. lgth=0;for(someProp in obj){lgth++;}
  951. str+='array('+lgth+') {\n';for(var key in obj){var objVal=obj[key];if(typeof objVal==='object'&&objVal!==null&&!(objVal instanceof Date)&&!(objVal instanceof RegExp)&&!objVal.nodeName){str+=thick_pad+'['+key+'] =>\n'+thick_pad+_formatArray(objVal,cur_depth+1,pad_val,pad_char);}else{val=_getInnerVal(objVal,thick_pad);str+=thick_pad+'['+key+'] =>\n'+thick_pad+val+'\n';}}
  952. str+=base_pad+'}\n';}else{str=_getInnerVal(obj,thick_pad);}
  953. return str;};output=_formatArray(arguments[0],0,pad_val,pad_char);for(i=1;i<arguments.length;i++){output+='\n'+_formatArray(arguments[i],0,pad_val,pad_char);}
  954. if(d.body){this.echo(output);}else{try{d=XULDocument;this.echo(//www.w3.org/1999/xhtml" style="white-space:pre;">'+output+'</pre>');}catch(e){this.echo(output);}}}
  955. .echo(output);}}}
  956. function var_export(mixed_expression,bool_return){var retstr='',iret='',cnt=0,x=[],i=0,funcParts=[],idtLevel=arguments[2]||2,innerIndent='',outerIndent='';var getFuncName=function(fn){var name=(w\$]+)\s*\(/).exec(fn);if(!nam).exec(fn);if(!name){return'(Anonymous)';}
  957. return name[1];};var _makeIndent=function(idtLevel){return(new Array(idtLevel+1)).join(' ');};var __getType=function(inp){var i=0;var match,type=typeof inp;if(type==='object'&&inp.constructor&&getFuncName(inp.constructor)==='PHPJS_Resource';}
  958. if(type==='rce';}
  959. if(type==='function'){return'function';}
  960. if(type==='object'&&!inp){return'null';}
  961. if(type==="object"){if(!inp.constructor){return'object';}
  962. var cons=inp.constructor.toString();match=cons.match(h){cons=m);if(match){cons=match[1].toLowerCase();}
  963. var types=["boolean","number","string","array"];for(i=0;i<types.length;i++){if(cons===types[i]){type=types[i];break;}}}
  964. return type;};var type=__getType(mixed_expression);if(type===null){retstr="NULL";}else if(type==='array'||type==='object'){outerIndent=_makeIndent(idtLevel-2);innerIndent=_makeIndent(idtLevel);for(i in mixed_expression){var value=this.var_export(mixed_expression[i],true,idtLevel+2);value=typeof value==='string'?value.replace(ce(/,'&lt;').replace(;x[c,'&gt;'):value;x[cnt++]=innerIndent+i+' => '+(__getType(mixed_expression[i])==='array'?'\n':'')+value;}
  965. iret=x.join(',\n');retstr=outerIndent+"array (\n"+iret+'\n'+outerIndent+')'function'(type==='function'){funcParts=mixed_expression.toString().match(?)\) \{([\s\S]*)\}/);retstr="create_f);retstr="create_function ('"+funcParts[1]+"', '"+funcParts[2].replace(new RegExp("'",'g'),"\\'")+"')";}else if(type==='resource'){retstr='NULL';}else{retstr=(typeof(mixed_expression)!=='string')?mixed_expression:"'"+mixed_expression.replace(replace(/,"\\$1").replace(
  966. if(b,"\\0")+"'";}
  967. if(bool_return!==true){this.echo(retstr);return null;}else{return retstr;}}
  968. function vprintf(format,args){var body,elmt;var ret='',d=this.window.document//www.w3.org/1999/xhtml';body=d.getElementsByTagNameNS?(d.getElementsByTagNameNS(HTMLNS,'body')[0]?d.getElementsByTagNameNS(HTMLNS,'body')[0]:d.documentElement.lastChild):d.getElementsByTagName('body')[0];if(!body){return false;}
  969. y){return false;}
  970. ret=this.sprintf.apply(this,[format].concat(args));elmt=d.createTextNode(ret);body.appendChild(elmt);return ret.length;}
  971. function vsprintf(format,args){return this.sprintf.apply(this,[format].concat(args));}
  972. function wordwrap(str,int_width,str_break,cut){var m=((arguments.length>=2)?arguments[1]:75);var b=((arguments.length>=3)?arguments[2]:"\n");var c=((arguments.length>=4)?arguments[3]:false);var i,j,l,s,r;str+='';if(m<1){return str;}
  973. for(i=-1,l=(r=str.split(gth;++i<l;r[)).length;++i<l;r[i]+=s){for(s=r[i],r[i]="";s.length>m;r[i]+=s.slice(0,j)+((s=s.slice(j)).length?b:"")){j=c==2||(j=s.slice(0,m+1).match(:j.input.le))[1]?m:j.input.length-j[0].length||c==1&&m||j.input.length+(j=s.slice(m).match(gth;}})).input.length;}}
  974. ret

Raw Paste