pdf.combined.js 1.7 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052
  1. /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
  3. /* Copyright 2012 Mozilla Foundation
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /*jshint globalstrict: false */
  18. // Initializing PDFJS global object (if still undefined)
  19. if (typeof PDFJS === 'undefined') {
  20. (typeof window !== 'undefined' ? window : this).PDFJS = {};
  21. }
  22. PDFJS.version = '1.0.112';
  23. PDFJS.build = 'e62f18c';
  24. (function pdfjsWrapper() {
  25. // Use strict in our context only - users might not want it
  26. 'use strict';
  27. /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  28. /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
  29. /* Copyright 2012 Mozilla Foundation
  30. *
  31. * Licensed under the Apache License, Version 2.0 (the "License");
  32. * you may not use this file except in compliance with the License.
  33. * You may obtain a copy of the License at
  34. *
  35. * http://www.apache.org/licenses/LICENSE-2.0
  36. *
  37. * Unless required by applicable law or agreed to in writing, software
  38. * distributed under the License is distributed on an "AS IS" BASIS,
  39. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  40. * See the License for the specific language governing permissions and
  41. * limitations under the License.
  42. */
  43. /* globals Cmd, ColorSpace, Dict, MozBlobBuilder, Name, PDFJS, Ref, URL,
  44. Promise */
  45. 'use strict';
  46. var globalScope = (typeof window === 'undefined') ? this : window;
  47. var isWorker = (typeof window == 'undefined');
  48. var FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
  49. var TextRenderingMode = {
  50. FILL: 0,
  51. STROKE: 1,
  52. FILL_STROKE: 2,
  53. INVISIBLE: 3,
  54. FILL_ADD_TO_PATH: 4,
  55. STROKE_ADD_TO_PATH: 5,
  56. FILL_STROKE_ADD_TO_PATH: 6,
  57. ADD_TO_PATH: 7,
  58. FILL_STROKE_MASK: 3,
  59. ADD_TO_PATH_FLAG: 4
  60. };
  61. var ImageKind = {
  62. GRAYSCALE_1BPP: 1,
  63. RGB_24BPP: 2,
  64. RGBA_32BPP: 3
  65. };
  66. // The global PDFJS object exposes the API
  67. // In production, it will be declared outside a global wrapper
  68. // In development, it will be declared here
  69. if (!globalScope.PDFJS) {
  70. globalScope.PDFJS = {};
  71. }
  72. globalScope.PDFJS.pdfBug = false;
  73. PDFJS.VERBOSITY_LEVELS = {
  74. errors: 0,
  75. warnings: 1,
  76. infos: 5
  77. };
  78. // All the possible operations for an operator list.
  79. var OPS = PDFJS.OPS = {
  80. // Intentionally start from 1 so it is easy to spot bad operators that will be
  81. // 0's.
  82. dependency: 1,
  83. setLineWidth: 2,
  84. setLineCap: 3,
  85. setLineJoin: 4,
  86. setMiterLimit: 5,
  87. setDash: 6,
  88. setRenderingIntent: 7,
  89. setFlatness: 8,
  90. setGState: 9,
  91. save: 10,
  92. restore: 11,
  93. transform: 12,
  94. moveTo: 13,
  95. lineTo: 14,
  96. curveTo: 15,
  97. curveTo2: 16,
  98. curveTo3: 17,
  99. closePath: 18,
  100. rectangle: 19,
  101. stroke: 20,
  102. closeStroke: 21,
  103. fill: 22,
  104. eoFill: 23,
  105. fillStroke: 24,
  106. eoFillStroke: 25,
  107. closeFillStroke: 26,
  108. closeEOFillStroke: 27,
  109. endPath: 28,
  110. clip: 29,
  111. eoClip: 30,
  112. beginText: 31,
  113. endText: 32,
  114. setCharSpacing: 33,
  115. setWordSpacing: 34,
  116. setHScale: 35,
  117. setLeading: 36,
  118. setFont: 37,
  119. setTextRenderingMode: 38,
  120. setTextRise: 39,
  121. moveText: 40,
  122. setLeadingMoveText: 41,
  123. setTextMatrix: 42,
  124. nextLine: 43,
  125. showText: 44,
  126. showSpacedText: 45,
  127. nextLineShowText: 46,
  128. nextLineSetSpacingShowText: 47,
  129. setCharWidth: 48,
  130. setCharWidthAndBounds: 49,
  131. setStrokeColorSpace: 50,
  132. setFillColorSpace: 51,
  133. setStrokeColor: 52,
  134. setStrokeColorN: 53,
  135. setFillColor: 54,
  136. setFillColorN: 55,
  137. setStrokeGray: 56,
  138. setFillGray: 57,
  139. setStrokeRGBColor: 58,
  140. setFillRGBColor: 59,
  141. setStrokeCMYKColor: 60,
  142. setFillCMYKColor: 61,
  143. shadingFill: 62,
  144. beginInlineImage: 63,
  145. beginImageData: 64,
  146. endInlineImage: 65,
  147. paintXObject: 66,
  148. markPoint: 67,
  149. markPointProps: 68,
  150. beginMarkedContent: 69,
  151. beginMarkedContentProps: 70,
  152. endMarkedContent: 71,
  153. beginCompat: 72,
  154. endCompat: 73,
  155. paintFormXObjectBegin: 74,
  156. paintFormXObjectEnd: 75,
  157. beginGroup: 76,
  158. endGroup: 77,
  159. beginAnnotations: 78,
  160. endAnnotations: 79,
  161. beginAnnotation: 80,
  162. endAnnotation: 81,
  163. paintJpegXObject: 82,
  164. paintImageMaskXObject: 83,
  165. paintImageMaskXObjectGroup: 84,
  166. paintImageXObject: 85,
  167. paintInlineImageXObject: 86,
  168. paintInlineImageXObjectGroup: 87,
  169. paintImageXObjectRepeat: 88,
  170. paintImageMaskXObjectRepeat: 89,
  171. paintSolidColorImageMask: 90
  172. };
  173. // A notice for devs. These are good for things that are helpful to devs, such
  174. // as warning that Workers were disabled, which is important to devs but not
  175. // end users.
  176. function info(msg) {
  177. if (PDFJS.verbosity >= PDFJS.VERBOSITY_LEVELS.infos) {
  178. console.log('Info: ' + msg);
  179. }
  180. }
  181. // Non-fatal warnings.
  182. function warn(msg) {
  183. if (PDFJS.verbosity >= PDFJS.VERBOSITY_LEVELS.warnings) {
  184. console.log('Warning: ' + msg);
  185. }
  186. }
  187. // Fatal errors that should trigger the fallback UI and halt execution by
  188. // throwing an exception.
  189. function error(msg) {
  190. // If multiple arguments were passed, pass them all to the log function.
  191. if (arguments.length > 1) {
  192. var logArguments = ['Error:'];
  193. logArguments.push.apply(logArguments, arguments);
  194. console.log.apply(console, logArguments);
  195. // Join the arguments into a single string for the lines below.
  196. msg = [].join.call(arguments, ' ');
  197. } else {
  198. console.log('Error: ' + msg);
  199. }
  200. console.log(backtrace());
  201. UnsupportedManager.notify(UNSUPPORTED_FEATURES.unknown);
  202. throw new Error(msg);
  203. }
  204. function backtrace() {
  205. try {
  206. throw new Error();
  207. } catch (e) {
  208. return e.stack ? e.stack.split('\n').slice(2).join('\n') : '';
  209. }
  210. }
  211. function assert(cond, msg) {
  212. if (!cond) {
  213. error(msg);
  214. }
  215. }
  216. var UNSUPPORTED_FEATURES = PDFJS.UNSUPPORTED_FEATURES = {
  217. unknown: 'unknown',
  218. forms: 'forms',
  219. javaScript: 'javaScript',
  220. smask: 'smask',
  221. shadingPattern: 'shadingPattern',
  222. font: 'font'
  223. };
  224. var UnsupportedManager = PDFJS.UnsupportedManager =
  225. (function UnsupportedManagerClosure() {
  226. var listeners = [];
  227. return {
  228. listen: function (cb) {
  229. listeners.push(cb);
  230. },
  231. notify: function (featureId) {
  232. warn('Unsupported feature "' + featureId + '"');
  233. for (var i = 0, ii = listeners.length; i < ii; i++) {
  234. listeners[i](featureId);
  235. }
  236. }
  237. };
  238. })();
  239. // Combines two URLs. The baseUrl shall be absolute URL. If the url is an
  240. // absolute URL, it will be returned as is.
  241. function combineUrl(baseUrl, url) {
  242. if (!url) {
  243. return baseUrl;
  244. }
  245. if (/^[a-z][a-z0-9+\-.]*:/i.test(url)) {
  246. return url;
  247. }
  248. var i;
  249. if (url.charAt(0) == '/') {
  250. // absolute path
  251. i = baseUrl.indexOf('://');
  252. if (url.charAt(1) === '/') {
  253. ++i;
  254. } else {
  255. i = baseUrl.indexOf('/', i + 3);
  256. }
  257. return baseUrl.substring(0, i) + url;
  258. } else {
  259. // relative path
  260. var pathLength = baseUrl.length;
  261. i = baseUrl.lastIndexOf('#');
  262. pathLength = i >= 0 ? i : pathLength;
  263. i = baseUrl.lastIndexOf('?', pathLength);
  264. pathLength = i >= 0 ? i : pathLength;
  265. var prefixLength = baseUrl.lastIndexOf('/', pathLength);
  266. return baseUrl.substring(0, prefixLength + 1) + url;
  267. }
  268. }
  269. // Validates if URL is safe and allowed, e.g. to avoid XSS.
  270. function isValidUrl(url, allowRelative) {
  271. if (!url) {
  272. return false;
  273. }
  274. // RFC 3986 (http://tools.ietf.org/html/rfc3986#section-3.1)
  275. // scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  276. var protocol = /^[a-z][a-z0-9+\-.]*(?=:)/i.exec(url);
  277. if (!protocol) {
  278. return allowRelative;
  279. }
  280. protocol = protocol[0].toLowerCase();
  281. switch (protocol) {
  282. case 'http':
  283. case 'https':
  284. case 'ftp':
  285. case 'mailto':
  286. return true;
  287. default:
  288. return false;
  289. }
  290. }
  291. PDFJS.isValidUrl = isValidUrl;
  292. function shadow(obj, prop, value) {
  293. Object.defineProperty(obj, prop, { value: value,
  294. enumerable: true,
  295. configurable: true,
  296. writable: false });
  297. return value;
  298. }
  299. var PasswordResponses = PDFJS.PasswordResponses = {
  300. NEED_PASSWORD: 1,
  301. INCORRECT_PASSWORD: 2
  302. };
  303. var PasswordException = (function PasswordExceptionClosure() {
  304. function PasswordException(msg, code) {
  305. this.name = 'PasswordException';
  306. this.message = msg;
  307. this.code = code;
  308. }
  309. PasswordException.prototype = new Error();
  310. PasswordException.constructor = PasswordException;
  311. return PasswordException;
  312. })();
  313. var UnknownErrorException = (function UnknownErrorExceptionClosure() {
  314. function UnknownErrorException(msg, details) {
  315. this.name = 'UnknownErrorException';
  316. this.message = msg;
  317. this.details = details;
  318. }
  319. UnknownErrorException.prototype = new Error();
  320. UnknownErrorException.constructor = UnknownErrorException;
  321. return UnknownErrorException;
  322. })();
  323. var InvalidPDFException = (function InvalidPDFExceptionClosure() {
  324. function InvalidPDFException(msg) {
  325. this.name = 'InvalidPDFException';
  326. this.message = msg;
  327. }
  328. InvalidPDFException.prototype = new Error();
  329. InvalidPDFException.constructor = InvalidPDFException;
  330. return InvalidPDFException;
  331. })();
  332. var MissingPDFException = (function MissingPDFExceptionClosure() {
  333. function MissingPDFException(msg) {
  334. this.name = 'MissingPDFException';
  335. this.message = msg;
  336. }
  337. MissingPDFException.prototype = new Error();
  338. MissingPDFException.constructor = MissingPDFException;
  339. return MissingPDFException;
  340. })();
  341. var NotImplementedException = (function NotImplementedExceptionClosure() {
  342. function NotImplementedException(msg) {
  343. this.message = msg;
  344. }
  345. NotImplementedException.prototype = new Error();
  346. NotImplementedException.prototype.name = 'NotImplementedException';
  347. NotImplementedException.constructor = NotImplementedException;
  348. return NotImplementedException;
  349. })();
  350. var MissingDataException = (function MissingDataExceptionClosure() {
  351. function MissingDataException(begin, end) {
  352. this.begin = begin;
  353. this.end = end;
  354. this.message = 'Missing data [' + begin + ', ' + end + ')';
  355. }
  356. MissingDataException.prototype = new Error();
  357. MissingDataException.prototype.name = 'MissingDataException';
  358. MissingDataException.constructor = MissingDataException;
  359. return MissingDataException;
  360. })();
  361. var XRefParseException = (function XRefParseExceptionClosure() {
  362. function XRefParseException(msg) {
  363. this.message = msg;
  364. }
  365. XRefParseException.prototype = new Error();
  366. XRefParseException.prototype.name = 'XRefParseException';
  367. XRefParseException.constructor = XRefParseException;
  368. return XRefParseException;
  369. })();
  370. function bytesToString(bytes) {
  371. var length = bytes.length;
  372. var MAX_ARGUMENT_COUNT = 8192;
  373. if (length < MAX_ARGUMENT_COUNT) {
  374. return String.fromCharCode.apply(null, bytes);
  375. }
  376. var strBuf = [];
  377. for (var i = 0; i < length; i += MAX_ARGUMENT_COUNT) {
  378. var chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);
  379. var chunk = bytes.subarray(i, chunkEnd);
  380. strBuf.push(String.fromCharCode.apply(null, chunk));
  381. }
  382. return strBuf.join('');
  383. }
  384. function stringToArray(str) {
  385. var length = str.length;
  386. var array = [];
  387. for (var i = 0; i < length; ++i) {
  388. array[i] = str.charCodeAt(i);
  389. }
  390. return array;
  391. }
  392. function stringToBytes(str) {
  393. var length = str.length;
  394. var bytes = new Uint8Array(length);
  395. for (var i = 0; i < length; ++i) {
  396. bytes[i] = str.charCodeAt(i) & 0xFF;
  397. }
  398. return bytes;
  399. }
  400. function string32(value) {
  401. return String.fromCharCode((value >> 24) & 0xff, (value >> 16) & 0xff,
  402. (value >> 8) & 0xff, value & 0xff);
  403. }
  404. function log2(x) {
  405. var n = 1, i = 0;
  406. while (x > n) {
  407. n <<= 1;
  408. i++;
  409. }
  410. return i;
  411. }
  412. function readInt8(data, start) {
  413. return (data[start] << 24) >> 24;
  414. }
  415. function readUint16(data, offset) {
  416. return (data[offset] << 8) | data[offset + 1];
  417. }
  418. function readUint32(data, offset) {
  419. return ((data[offset] << 24) | (data[offset + 1] << 16) |
  420. (data[offset + 2] << 8) | data[offset + 3]) >>> 0;
  421. }
  422. // Lazy test the endianness of the platform
  423. // NOTE: This will be 'true' for simulated TypedArrays
  424. function isLittleEndian() {
  425. var buffer8 = new Uint8Array(2);
  426. buffer8[0] = 1;
  427. var buffer16 = new Uint16Array(buffer8.buffer);
  428. return (buffer16[0] === 1);
  429. }
  430. Object.defineProperty(PDFJS, 'isLittleEndian', {
  431. configurable: true,
  432. get: function PDFJS_isLittleEndian() {
  433. return shadow(PDFJS, 'isLittleEndian', isLittleEndian());
  434. }
  435. });
  436. // Lazy test if the userAgant support CanvasTypedArrays
  437. function hasCanvasTypedArrays() {
  438. var canvas = document.createElement('canvas');
  439. canvas.width = canvas.height = 1;
  440. var ctx = canvas.getContext('2d');
  441. var imageData = ctx.createImageData(1, 1);
  442. return (typeof imageData.data.buffer !== 'undefined');
  443. }
  444. Object.defineProperty(PDFJS, 'hasCanvasTypedArrays', {
  445. configurable: true,
  446. get: function PDFJS_hasCanvasTypedArrays() {
  447. return shadow(PDFJS, 'hasCanvasTypedArrays', hasCanvasTypedArrays());
  448. }
  449. });
  450. var Uint32ArrayView = (function Uint32ArrayViewClosure() {
  451. function Uint32ArrayView(buffer, length) {
  452. this.buffer = buffer;
  453. this.byteLength = buffer.length;
  454. this.length = length === undefined ? (this.byteLength >> 2) : length;
  455. ensureUint32ArrayViewProps(this.length);
  456. }
  457. Uint32ArrayView.prototype = Object.create(null);
  458. var uint32ArrayViewSetters = 0;
  459. function createUint32ArrayProp(index) {
  460. return {
  461. get: function () {
  462. var buffer = this.buffer, offset = index << 2;
  463. return (buffer[offset] | (buffer[offset + 1] << 8) |
  464. (buffer[offset + 2] << 16) | (buffer[offset + 3] << 24)) >>> 0;
  465. },
  466. set: function (value) {
  467. var buffer = this.buffer, offset = index << 2;
  468. buffer[offset] = value & 255;
  469. buffer[offset + 1] = (value >> 8) & 255;
  470. buffer[offset + 2] = (value >> 16) & 255;
  471. buffer[offset + 3] = (value >>> 24) & 255;
  472. }
  473. };
  474. }
  475. function ensureUint32ArrayViewProps(length) {
  476. while (uint32ArrayViewSetters < length) {
  477. Object.defineProperty(Uint32ArrayView.prototype,
  478. uint32ArrayViewSetters,
  479. createUint32ArrayProp(uint32ArrayViewSetters));
  480. uint32ArrayViewSetters++;
  481. }
  482. }
  483. return Uint32ArrayView;
  484. })();
  485. var IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
  486. var Util = PDFJS.Util = (function UtilClosure() {
  487. function Util() {}
  488. Util.makeCssRgb = function Util_makeCssRgb(rgb) {
  489. return 'rgb(' + rgb[0] + ',' + rgb[1] + ',' + rgb[2] + ')';
  490. };
  491. Util.makeCssCmyk = function Util_makeCssCmyk(cmyk) {
  492. var rgb = ColorSpace.singletons.cmyk.getRgb(cmyk, 0);
  493. return Util.makeCssRgb(rgb);
  494. };
  495. // Concatenates two transformation matrices together and returns the result.
  496. Util.transform = function Util_transform(m1, m2) {
  497. return [
  498. m1[0] * m2[0] + m1[2] * m2[1],
  499. m1[1] * m2[0] + m1[3] * m2[1],
  500. m1[0] * m2[2] + m1[2] * m2[3],
  501. m1[1] * m2[2] + m1[3] * m2[3],
  502. m1[0] * m2[4] + m1[2] * m2[5] + m1[4],
  503. m1[1] * m2[4] + m1[3] * m2[5] + m1[5]
  504. ];
  505. };
  506. // For 2d affine transforms
  507. Util.applyTransform = function Util_applyTransform(p, m) {
  508. var xt = p[0] * m[0] + p[1] * m[2] + m[4];
  509. var yt = p[0] * m[1] + p[1] * m[3] + m[5];
  510. return [xt, yt];
  511. };
  512. Util.applyInverseTransform = function Util_applyInverseTransform(p, m) {
  513. var d = m[0] * m[3] - m[1] * m[2];
  514. var xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;
  515. var yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;
  516. return [xt, yt];
  517. };
  518. // Applies the transform to the rectangle and finds the minimum axially
  519. // aligned bounding box.
  520. Util.getAxialAlignedBoundingBox =
  521. function Util_getAxialAlignedBoundingBox(r, m) {
  522. var p1 = Util.applyTransform(r, m);
  523. var p2 = Util.applyTransform(r.slice(2, 4), m);
  524. var p3 = Util.applyTransform([r[0], r[3]], m);
  525. var p4 = Util.applyTransform([r[2], r[1]], m);
  526. return [
  527. Math.min(p1[0], p2[0], p3[0], p4[0]),
  528. Math.min(p1[1], p2[1], p3[1], p4[1]),
  529. Math.max(p1[0], p2[0], p3[0], p4[0]),
  530. Math.max(p1[1], p2[1], p3[1], p4[1])
  531. ];
  532. };
  533. Util.inverseTransform = function Util_inverseTransform(m) {
  534. var d = m[0] * m[3] - m[1] * m[2];
  535. return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d,
  536. (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d];
  537. };
  538. // Apply a generic 3d matrix M on a 3-vector v:
  539. // | a b c | | X |
  540. // | d e f | x | Y |
  541. // | g h i | | Z |
  542. // M is assumed to be serialized as [a,b,c,d,e,f,g,h,i],
  543. // with v as [X,Y,Z]
  544. Util.apply3dTransform = function Util_apply3dTransform(m, v) {
  545. return [
  546. m[0] * v[0] + m[1] * v[1] + m[2] * v[2],
  547. m[3] * v[0] + m[4] * v[1] + m[5] * v[2],
  548. m[6] * v[0] + m[7] * v[1] + m[8] * v[2]
  549. ];
  550. };
  551. // This calculation uses Singular Value Decomposition.
  552. // The SVD can be represented with formula A = USV. We are interested in the
  553. // matrix S here because it represents the scale values.
  554. Util.singularValueDecompose2dScale =
  555. function Util_singularValueDecompose2dScale(m) {
  556. var transpose = [m[0], m[2], m[1], m[3]];
  557. // Multiply matrix m with its transpose.
  558. var a = m[0] * transpose[0] + m[1] * transpose[2];
  559. var b = m[0] * transpose[1] + m[1] * transpose[3];
  560. var c = m[2] * transpose[0] + m[3] * transpose[2];
  561. var d = m[2] * transpose[1] + m[3] * transpose[3];
  562. // Solve the second degree polynomial to get roots.
  563. var first = (a + d) / 2;
  564. var second = Math.sqrt((a + d) * (a + d) - 4 * (a * d - c * b)) / 2;
  565. var sx = first + second || 1;
  566. var sy = first - second || 1;
  567. // Scale values are the square roots of the eigenvalues.
  568. return [Math.sqrt(sx), Math.sqrt(sy)];
  569. };
  570. // Normalize rectangle rect=[x1, y1, x2, y2] so that (x1,y1) < (x2,y2)
  571. // For coordinate systems whose origin lies in the bottom-left, this
  572. // means normalization to (BL,TR) ordering. For systems with origin in the
  573. // top-left, this means (TL,BR) ordering.
  574. Util.normalizeRect = function Util_normalizeRect(rect) {
  575. var r = rect.slice(0); // clone rect
  576. if (rect[0] > rect[2]) {
  577. r[0] = rect[2];
  578. r[2] = rect[0];
  579. }
  580. if (rect[1] > rect[3]) {
  581. r[1] = rect[3];
  582. r[3] = rect[1];
  583. }
  584. return r;
  585. };
  586. // Returns a rectangle [x1, y1, x2, y2] corresponding to the
  587. // intersection of rect1 and rect2. If no intersection, returns 'false'
  588. // The rectangle coordinates of rect1, rect2 should be [x1, y1, x2, y2]
  589. Util.intersect = function Util_intersect(rect1, rect2) {
  590. function compare(a, b) {
  591. return a - b;
  592. }
  593. // Order points along the axes
  594. var orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare),
  595. orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare),
  596. result = [];
  597. rect1 = Util.normalizeRect(rect1);
  598. rect2 = Util.normalizeRect(rect2);
  599. // X: first and second points belong to different rectangles?
  600. if ((orderedX[0] === rect1[0] && orderedX[1] === rect2[0]) ||
  601. (orderedX[0] === rect2[0] && orderedX[1] === rect1[0])) {
  602. // Intersection must be between second and third points
  603. result[0] = orderedX[1];
  604. result[2] = orderedX[2];
  605. } else {
  606. return false;
  607. }
  608. // Y: first and second points belong to different rectangles?
  609. if ((orderedY[0] === rect1[1] && orderedY[1] === rect2[1]) ||
  610. (orderedY[0] === rect2[1] && orderedY[1] === rect1[1])) {
  611. // Intersection must be between second and third points
  612. result[1] = orderedY[1];
  613. result[3] = orderedY[2];
  614. } else {
  615. return false;
  616. }
  617. return result;
  618. };
  619. Util.sign = function Util_sign(num) {
  620. return num < 0 ? -1 : 1;
  621. };
  622. // TODO(mack): Rename appendToArray
  623. Util.concatenateToArray = function concatenateToArray(arr1, arr2) {
  624. Array.prototype.push.apply(arr1, arr2);
  625. };
  626. Util.prependToArray = function concatenateToArray(arr1, arr2) {
  627. Array.prototype.unshift.apply(arr1, arr2);
  628. };
  629. Util.extendObj = function extendObj(obj1, obj2) {
  630. for (var key in obj2) {
  631. obj1[key] = obj2[key];
  632. }
  633. };
  634. Util.getInheritableProperty = function Util_getInheritableProperty(dict,
  635. name) {
  636. while (dict && !dict.has(name)) {
  637. dict = dict.get('Parent');
  638. }
  639. if (!dict) {
  640. return null;
  641. }
  642. return dict.get(name);
  643. };
  644. Util.inherit = function Util_inherit(sub, base, prototype) {
  645. sub.prototype = Object.create(base.prototype);
  646. sub.prototype.constructor = sub;
  647. for (var prop in prototype) {
  648. sub.prototype[prop] = prototype[prop];
  649. }
  650. };
  651. Util.loadScript = function Util_loadScript(src, callback) {
  652. var script = document.createElement('script');
  653. var loaded = false;
  654. script.setAttribute('src', src);
  655. if (callback) {
  656. script.onload = function() {
  657. if (!loaded) {
  658. callback();
  659. }
  660. loaded = true;
  661. };
  662. }
  663. document.getElementsByTagName('head')[0].appendChild(script);
  664. };
  665. return Util;
  666. })();
  667. var PageViewport = PDFJS.PageViewport = (function PageViewportClosure() {
  668. function PageViewport(viewBox, scale, rotation, offsetX, offsetY, dontFlip) {
  669. this.viewBox = viewBox;
  670. this.scale = scale;
  671. this.rotation = rotation;
  672. this.offsetX = offsetX;
  673. this.offsetY = offsetY;
  674. // creating transform to convert pdf coordinate system to the normal
  675. // canvas like coordinates taking in account scale and rotation
  676. var centerX = (viewBox[2] + viewBox[0]) / 2;
  677. var centerY = (viewBox[3] + viewBox[1]) / 2;
  678. var rotateA, rotateB, rotateC, rotateD;
  679. rotation = rotation % 360;
  680. rotation = rotation < 0 ? rotation + 360 : rotation;
  681. switch (rotation) {
  682. case 180:
  683. rotateA = -1; rotateB = 0; rotateC = 0; rotateD = 1;
  684. break;
  685. case 90:
  686. rotateA = 0; rotateB = 1; rotateC = 1; rotateD = 0;
  687. break;
  688. case 270:
  689. rotateA = 0; rotateB = -1; rotateC = -1; rotateD = 0;
  690. break;
  691. //case 0:
  692. default:
  693. rotateA = 1; rotateB = 0; rotateC = 0; rotateD = -1;
  694. break;
  695. }
  696. if (dontFlip) {
  697. rotateC = -rotateC; rotateD = -rotateD;
  698. }
  699. var offsetCanvasX, offsetCanvasY;
  700. var width, height;
  701. if (rotateA === 0) {
  702. offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;
  703. offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;
  704. width = Math.abs(viewBox[3] - viewBox[1]) * scale;
  705. height = Math.abs(viewBox[2] - viewBox[0]) * scale;
  706. } else {
  707. offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;
  708. offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;
  709. width = Math.abs(viewBox[2] - viewBox[0]) * scale;
  710. height = Math.abs(viewBox[3] - viewBox[1]) * scale;
  711. }
  712. // creating transform for the following operations:
  713. // translate(-centerX, -centerY), rotate and flip vertically,
  714. // scale, and translate(offsetCanvasX, offsetCanvasY)
  715. this.transform = [
  716. rotateA * scale,
  717. rotateB * scale,
  718. rotateC * scale,
  719. rotateD * scale,
  720. offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY,
  721. offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY
  722. ];
  723. this.width = width;
  724. this.height = height;
  725. this.fontScale = scale;
  726. }
  727. PageViewport.prototype = {
  728. clone: function PageViewPort_clone(args) {
  729. args = args || {};
  730. var scale = 'scale' in args ? args.scale : this.scale;
  731. var rotation = 'rotation' in args ? args.rotation : this.rotation;
  732. return new PageViewport(this.viewBox.slice(), scale, rotation,
  733. this.offsetX, this.offsetY, args.dontFlip);
  734. },
  735. convertToViewportPoint: function PageViewport_convertToViewportPoint(x, y) {
  736. return Util.applyTransform([x, y], this.transform);
  737. },
  738. convertToViewportRectangle:
  739. function PageViewport_convertToViewportRectangle(rect) {
  740. var tl = Util.applyTransform([rect[0], rect[1]], this.transform);
  741. var br = Util.applyTransform([rect[2], rect[3]], this.transform);
  742. return [tl[0], tl[1], br[0], br[1]];
  743. },
  744. convertToPdfPoint: function PageViewport_convertToPdfPoint(x, y) {
  745. return Util.applyInverseTransform([x, y], this.transform);
  746. }
  747. };
  748. return PageViewport;
  749. })();
  750. var PDFStringTranslateTable = [
  751. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  752. 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0,
  753. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  754. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  755. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  756. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014,
  757. 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C,
  758. 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160,
  759. 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC
  760. ];
  761. function stringToPDFString(str) {
  762. var i, n = str.length, strBuf = [];
  763. if (str[0] === '\xFE' && str[1] === '\xFF') {
  764. // UTF16BE BOM
  765. for (i = 2; i < n; i += 2) {
  766. strBuf.push(String.fromCharCode(
  767. (str.charCodeAt(i) << 8) | str.charCodeAt(i + 1)));
  768. }
  769. } else {
  770. for (i = 0; i < n; ++i) {
  771. var code = PDFStringTranslateTable[str.charCodeAt(i)];
  772. strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));
  773. }
  774. }
  775. return strBuf.join('');
  776. }
  777. function stringToUTF8String(str) {
  778. return decodeURIComponent(escape(str));
  779. }
  780. function isEmptyObj(obj) {
  781. for (var key in obj) {
  782. return false;
  783. }
  784. return true;
  785. }
  786. function isBool(v) {
  787. return typeof v == 'boolean';
  788. }
  789. function isInt(v) {
  790. return typeof v == 'number' && ((v | 0) == v);
  791. }
  792. function isNum(v) {
  793. return typeof v == 'number';
  794. }
  795. function isString(v) {
  796. return typeof v == 'string';
  797. }
  798. function isNull(v) {
  799. return v === null;
  800. }
  801. function isName(v) {
  802. return v instanceof Name;
  803. }
  804. function isCmd(v, cmd) {
  805. return v instanceof Cmd && (!cmd || v.cmd == cmd);
  806. }
  807. function isDict(v, type) {
  808. if (!(v instanceof Dict)) {
  809. return false;
  810. }
  811. if (!type) {
  812. return true;
  813. }
  814. var dictType = v.get('Type');
  815. return isName(dictType) && dictType.name == type;
  816. }
  817. function isArray(v) {
  818. return v instanceof Array;
  819. }
  820. function isStream(v) {
  821. return typeof v == 'object' && v !== null && v !== undefined &&
  822. ('getBytes' in v);
  823. }
  824. function isArrayBuffer(v) {
  825. return typeof v == 'object' && v !== null && v !== undefined &&
  826. ('byteLength' in v);
  827. }
  828. function isRef(v) {
  829. return v instanceof Ref;
  830. }
  831. function isPDFFunction(v) {
  832. var fnDict;
  833. if (typeof v != 'object') {
  834. return false;
  835. } else if (isDict(v)) {
  836. fnDict = v;
  837. } else if (isStream(v)) {
  838. fnDict = v.dict;
  839. } else {
  840. return false;
  841. }
  842. return fnDict.has('FunctionType');
  843. }
  844. /**
  845. * Legacy support for PDFJS Promise implementation.
  846. * TODO remove eventually
  847. * @ignore
  848. */
  849. var LegacyPromise = PDFJS.LegacyPromise = (function LegacyPromiseClosure() {
  850. return function LegacyPromise() {
  851. var resolve, reject;
  852. var promise = new Promise(function (resolve_, reject_) {
  853. resolve = resolve_;
  854. reject = reject_;
  855. });
  856. promise.resolve = resolve;
  857. promise.reject = reject;
  858. return promise;
  859. };
  860. })();
  861. /**
  862. * Polyfill for Promises:
  863. * The following promise implementation tries to generally implment the
  864. * Promise/A+ spec. Some notable differences from other promise libaries are:
  865. * - There currently isn't a seperate deferred and promise object.
  866. * - Unhandled rejections eventually show an error if they aren't handled.
  867. *
  868. * Based off of the work in:
  869. * https://bugzilla.mozilla.org/show_bug.cgi?id=810490
  870. */
  871. (function PromiseClosure() {
  872. if (globalScope.Promise) {
  873. // Promises existing in the DOM/Worker, checking presence of all/resolve
  874. if (typeof globalScope.Promise.all !== 'function') {
  875. globalScope.Promise.all = function (iterable) {
  876. var count = 0, results = [], resolve, reject;
  877. var promise = new globalScope.Promise(function (resolve_, reject_) {
  878. resolve = resolve_;
  879. reject = reject_;
  880. });
  881. iterable.forEach(function (p, i) {
  882. count++;
  883. p.then(function (result) {
  884. results[i] = result;
  885. count--;
  886. if (count === 0) {
  887. resolve(results);
  888. }
  889. }, reject);
  890. });
  891. if (count === 0) {
  892. resolve(results);
  893. }
  894. return promise;
  895. };
  896. }
  897. if (typeof globalScope.Promise.resolve !== 'function') {
  898. globalScope.Promise.resolve = function (x) {
  899. return new globalScope.Promise(function (resolve) { resolve(x); });
  900. };
  901. }
  902. return;
  903. }
  904. var STATUS_PENDING = 0;
  905. var STATUS_RESOLVED = 1;
  906. var STATUS_REJECTED = 2;
  907. // In an attempt to avoid silent exceptions, unhandled rejections are
  908. // tracked and if they aren't handled in a certain amount of time an
  909. // error is logged.
  910. var REJECTION_TIMEOUT = 500;
  911. var HandlerManager = {
  912. handlers: [],
  913. running: false,
  914. unhandledRejections: [],
  915. pendingRejectionCheck: false,
  916. scheduleHandlers: function scheduleHandlers(promise) {
  917. if (promise._status == STATUS_PENDING) {
  918. return;
  919. }
  920. this.handlers = this.handlers.concat(promise._handlers);
  921. promise._handlers = [];
  922. if (this.running) {
  923. return;
  924. }
  925. this.running = true;
  926. setTimeout(this.runHandlers.bind(this), 0);
  927. },
  928. runHandlers: function runHandlers() {
  929. var RUN_TIMEOUT = 1; // ms
  930. var timeoutAt = Date.now() + RUN_TIMEOUT;
  931. while (this.handlers.length > 0) {
  932. var handler = this.handlers.shift();
  933. var nextStatus = handler.thisPromise._status;
  934. var nextValue = handler.thisPromise._value;
  935. try {
  936. if (nextStatus === STATUS_RESOLVED) {
  937. if (typeof(handler.onResolve) == 'function') {
  938. nextValue = handler.onResolve(nextValue);
  939. }
  940. } else if (typeof(handler.onReject) === 'function') {
  941. nextValue = handler.onReject(nextValue);
  942. nextStatus = STATUS_RESOLVED;
  943. if (handler.thisPromise._unhandledRejection) {
  944. this.removeUnhandeledRejection(handler.thisPromise);
  945. }
  946. }
  947. } catch (ex) {
  948. nextStatus = STATUS_REJECTED;
  949. nextValue = ex;
  950. }
  951. handler.nextPromise._updateStatus(nextStatus, nextValue);
  952. if (Date.now() >= timeoutAt) {
  953. break;
  954. }
  955. }
  956. if (this.handlers.length > 0) {
  957. setTimeout(this.runHandlers.bind(this), 0);
  958. return;
  959. }
  960. this.running = false;
  961. },
  962. addUnhandledRejection: function addUnhandledRejection(promise) {
  963. this.unhandledRejections.push({
  964. promise: promise,
  965. time: Date.now()
  966. });
  967. this.scheduleRejectionCheck();
  968. },
  969. removeUnhandeledRejection: function removeUnhandeledRejection(promise) {
  970. promise._unhandledRejection = false;
  971. for (var i = 0; i < this.unhandledRejections.length; i++) {
  972. if (this.unhandledRejections[i].promise === promise) {
  973. this.unhandledRejections.splice(i);
  974. i--;
  975. }
  976. }
  977. },
  978. scheduleRejectionCheck: function scheduleRejectionCheck() {
  979. if (this.pendingRejectionCheck) {
  980. return;
  981. }
  982. this.pendingRejectionCheck = true;
  983. setTimeout(function rejectionCheck() {
  984. this.pendingRejectionCheck = false;
  985. var now = Date.now();
  986. for (var i = 0; i < this.unhandledRejections.length; i++) {
  987. if (now - this.unhandledRejections[i].time > REJECTION_TIMEOUT) {
  988. var unhandled = this.unhandledRejections[i].promise._value;
  989. var msg = 'Unhandled rejection: ' + unhandled;
  990. if (unhandled.stack) {
  991. msg += '\n' + unhandled.stack;
  992. }
  993. warn(msg);
  994. this.unhandledRejections.splice(i);
  995. i--;
  996. }
  997. }
  998. if (this.unhandledRejections.length) {
  999. this.scheduleRejectionCheck();
  1000. }
  1001. }.bind(this), REJECTION_TIMEOUT);
  1002. }
  1003. };
  1004. function Promise(resolver) {
  1005. this._status = STATUS_PENDING;
  1006. this._handlers = [];
  1007. resolver.call(this, this._resolve.bind(this), this._reject.bind(this));
  1008. }
  1009. /**
  1010. * Builds a promise that is resolved when all the passed in promises are
  1011. * resolved.
  1012. * @param {array} array of data and/or promises to wait for.
  1013. * @return {Promise} New dependant promise.
  1014. */
  1015. Promise.all = function Promise_all(promises) {
  1016. var resolveAll, rejectAll;
  1017. var deferred = new Promise(function (resolve, reject) {
  1018. resolveAll = resolve;
  1019. rejectAll = reject;
  1020. });
  1021. var unresolved = promises.length;
  1022. var results = [];
  1023. if (unresolved === 0) {
  1024. resolveAll(results);
  1025. return deferred;
  1026. }
  1027. function reject(reason) {
  1028. if (deferred._status === STATUS_REJECTED) {
  1029. return;
  1030. }
  1031. results = [];
  1032. rejectAll(reason);
  1033. }
  1034. for (var i = 0, ii = promises.length; i < ii; ++i) {
  1035. var promise = promises[i];
  1036. var resolve = (function(i) {
  1037. return function(value) {
  1038. if (deferred._status === STATUS_REJECTED) {
  1039. return;
  1040. }
  1041. results[i] = value;
  1042. unresolved--;
  1043. if (unresolved === 0) {
  1044. resolveAll(results);
  1045. }
  1046. };
  1047. })(i);
  1048. if (Promise.isPromise(promise)) {
  1049. promise.then(resolve, reject);
  1050. } else {
  1051. resolve(promise);
  1052. }
  1053. }
  1054. return deferred;
  1055. };
  1056. /**
  1057. * Checks if the value is likely a promise (has a 'then' function).
  1058. * @return {boolean} true if x is thenable
  1059. */
  1060. Promise.isPromise = function Promise_isPromise(value) {
  1061. return value && typeof value.then === 'function';
  1062. };
  1063. /**
  1064. * Creates resolved promise
  1065. * @param x resolve value
  1066. * @returns {Promise}
  1067. */
  1068. Promise.resolve = function Promise_resolve(x) {
  1069. return new Promise(function (resolve) { resolve(x); });
  1070. };
  1071. Promise.prototype = {
  1072. _status: null,
  1073. _value: null,
  1074. _handlers: null,
  1075. _unhandledRejection: null,
  1076. _updateStatus: function Promise__updateStatus(status, value) {
  1077. if (this._status === STATUS_RESOLVED ||
  1078. this._status === STATUS_REJECTED) {
  1079. return;
  1080. }
  1081. if (status == STATUS_RESOLVED &&
  1082. Promise.isPromise(value)) {
  1083. value.then(this._updateStatus.bind(this, STATUS_RESOLVED),
  1084. this._updateStatus.bind(this, STATUS_REJECTED));
  1085. return;
  1086. }
  1087. this._status = status;
  1088. this._value = value;
  1089. if (status === STATUS_REJECTED && this._handlers.length === 0) {
  1090. this._unhandledRejection = true;
  1091. HandlerManager.addUnhandledRejection(this);
  1092. }
  1093. HandlerManager.scheduleHandlers(this);
  1094. },
  1095. _resolve: function Promise_resolve(value) {
  1096. this._updateStatus(STATUS_RESOLVED, value);
  1097. },
  1098. _reject: function Promise_reject(reason) {
  1099. this._updateStatus(STATUS_REJECTED, reason);
  1100. },
  1101. then: function Promise_then(onResolve, onReject) {
  1102. var nextPromise = new Promise(function (resolve, reject) {
  1103. this.resolve = reject;
  1104. this.reject = reject;
  1105. });
  1106. this._handlers.push({
  1107. thisPromise: this,
  1108. onResolve: onResolve,
  1109. onReject: onReject,
  1110. nextPromise: nextPromise
  1111. });
  1112. HandlerManager.scheduleHandlers(this);
  1113. return nextPromise;
  1114. }
  1115. };
  1116. globalScope.Promise = Promise;
  1117. })();
  1118. var StatTimer = (function StatTimerClosure() {
  1119. function rpad(str, pad, length) {
  1120. while (str.length < length) {
  1121. str += pad;
  1122. }
  1123. return str;
  1124. }
  1125. function StatTimer() {
  1126. this.started = {};
  1127. this.times = [];
  1128. this.enabled = true;
  1129. }
  1130. StatTimer.prototype = {
  1131. time: function StatTimer_time(name) {
  1132. if (!this.enabled) {
  1133. return;
  1134. }
  1135. if (name in this.started) {
  1136. warn('Timer is already running for ' + name);
  1137. }
  1138. this.started[name] = Date.now();
  1139. },
  1140. timeEnd: function StatTimer_timeEnd(name) {
  1141. if (!this.enabled) {
  1142. return;
  1143. }
  1144. if (!(name in this.started)) {
  1145. warn('Timer has not been started for ' + name);
  1146. }
  1147. this.times.push({
  1148. 'name': name,
  1149. 'start': this.started[name],
  1150. 'end': Date.now()
  1151. });
  1152. // Remove timer from started so it can be called again.
  1153. delete this.started[name];
  1154. },
  1155. toString: function StatTimer_toString() {
  1156. var i, ii;
  1157. var times = this.times;
  1158. var out = '';
  1159. // Find the longest name for padding purposes.
  1160. var longest = 0;
  1161. for (i = 0, ii = times.length; i < ii; ++i) {
  1162. var name = times[i]['name'];
  1163. if (name.length > longest) {
  1164. longest = name.length;
  1165. }
  1166. }
  1167. for (i = 0, ii = times.length; i < ii; ++i) {
  1168. var span = times[i];
  1169. var duration = span.end - span.start;
  1170. out += rpad(span['name'], ' ', longest) + ' ' + duration + 'ms\n';
  1171. }
  1172. return out;
  1173. }
  1174. };
  1175. return StatTimer;
  1176. })();
  1177. PDFJS.createBlob = function createBlob(data, contentType) {
  1178. if (typeof Blob !== 'undefined') {
  1179. return new Blob([data], { type: contentType });
  1180. }
  1181. // Blob builder is deprecated in FF14 and removed in FF18.
  1182. var bb = new MozBlobBuilder();
  1183. bb.append(data);
  1184. return bb.getBlob(contentType);
  1185. };
  1186. PDFJS.createObjectURL = (function createObjectURLClosure() {
  1187. // Blob/createObjectURL is not available, falling back to data schema.
  1188. var digits =
  1189. 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1190. return function createObjectURL(data, contentType) {
  1191. if (!PDFJS.disableCreateObjectURL &&
  1192. typeof URL !== 'undefined' && URL.createObjectURL) {
  1193. var blob = PDFJS.createBlob(data, contentType);
  1194. return URL.createObjectURL(blob);
  1195. }
  1196. var buffer = 'data:' + contentType + ';base64,';
  1197. for (var i = 0, ii = data.length; i < ii; i += 3) {
  1198. var b1 = data[i] & 0xFF;
  1199. var b2 = data[i + 1] & 0xFF;
  1200. var b3 = data[i + 2] & 0xFF;
  1201. var d1 = b1 >> 2, d2 = ((b1 & 3) << 4) | (b2 >> 4);
  1202. var d3 = i + 1 < ii ? ((b2 & 0xF) << 2) | (b3 >> 6) : 64;
  1203. var d4 = i + 2 < ii ? (b3 & 0x3F) : 64;
  1204. buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4];
  1205. }
  1206. return buffer;
  1207. };
  1208. })();
  1209. function MessageHandler(name, comObj) {
  1210. this.name = name;
  1211. this.comObj = comObj;
  1212. this.callbackIndex = 1;
  1213. this.postMessageTransfers = true;
  1214. var callbacks = this.callbacks = {};
  1215. var ah = this.actionHandler = {};
  1216. ah['console_log'] = [function ahConsoleLog(data) {
  1217. console.log.apply(console, data);
  1218. }];
  1219. ah['console_error'] = [function ahConsoleError(data) {
  1220. console.error.apply(console, data);
  1221. }];
  1222. ah['_unsupported_feature'] = [function ah_unsupportedFeature(data) {
  1223. UnsupportedManager.notify(data);
  1224. }];
  1225. comObj.onmessage = function messageHandlerComObjOnMessage(event) {
  1226. var data = event.data;
  1227. if (data.isReply) {
  1228. var callbackId = data.callbackId;
  1229. if (data.callbackId in callbacks) {
  1230. var callback = callbacks[callbackId];
  1231. delete callbacks[callbackId];
  1232. callback(data.data);
  1233. } else {
  1234. error('Cannot resolve callback ' + callbackId);
  1235. }
  1236. } else if (data.action in ah) {
  1237. var action = ah[data.action];
  1238. if (data.callbackId) {
  1239. var deferred = {};
  1240. var promise = new Promise(function (resolve, reject) {
  1241. deferred.resolve = resolve;
  1242. deferred.reject = reject;
  1243. });
  1244. deferred.promise = promise;
  1245. promise.then(function(resolvedData) {
  1246. comObj.postMessage({
  1247. isReply: true,
  1248. callbackId: data.callbackId,
  1249. data: resolvedData
  1250. });
  1251. });
  1252. action[0].call(action[1], data.data, deferred);
  1253. } else {
  1254. action[0].call(action[1], data.data);
  1255. }
  1256. } else {
  1257. error('Unkown action from worker: ' + data.action);
  1258. }
  1259. };
  1260. }
  1261. MessageHandler.prototype = {
  1262. on: function messageHandlerOn(actionName, handler, scope) {
  1263. var ah = this.actionHandler;
  1264. if (ah[actionName]) {
  1265. error('There is already an actionName called "' + actionName + '"');
  1266. }
  1267. ah[actionName] = [handler, scope];
  1268. },
  1269. /**
  1270. * Sends a message to the comObj to invoke the action with the supplied data.
  1271. * @param {String} actionName Action to call.
  1272. * @param {JSON} data JSON data to send.
  1273. * @param {function} [callback] Optional callback that will handle a reply.
  1274. * @param {Array} [transfers] Optional list of transfers/ArrayBuffers
  1275. */
  1276. send: function messageHandlerSend(actionName, data, callback, transfers) {
  1277. var message = {
  1278. action: actionName,
  1279. data: data
  1280. };
  1281. if (callback) {
  1282. var callbackId = this.callbackIndex++;
  1283. this.callbacks[callbackId] = callback;
  1284. message.callbackId = callbackId;
  1285. }
  1286. if (transfers && this.postMessageTransfers) {
  1287. this.comObj.postMessage(message, transfers);
  1288. } else {
  1289. this.comObj.postMessage(message);
  1290. }
  1291. }
  1292. };
  1293. function loadJpegStream(id, imageUrl, objs) {
  1294. var img = new Image();
  1295. img.onload = (function loadJpegStream_onloadClosure() {
  1296. objs.resolve(id, img);
  1297. });
  1298. img.src = imageUrl;
  1299. }
  1300. var ColorSpace = (function ColorSpaceClosure() {
  1301. // Constructor should define this.numComps, this.defaultColor, this.name
  1302. function ColorSpace() {
  1303. error('should not call ColorSpace constructor');
  1304. }
  1305. ColorSpace.prototype = {
  1306. /**
  1307. * Converts the color value to the RGB color. The color components are
  1308. * located in the src array starting from the srcOffset. Returns the array
  1309. * of the rgb components, each value ranging from [0,255].
  1310. */
  1311. getRgb: function ColorSpace_getRgb(src, srcOffset) {
  1312. var rgb = new Uint8Array(3);
  1313. this.getRgbItem(src, srcOffset, rgb, 0);
  1314. return rgb;
  1315. },
  1316. /**
  1317. * Converts the color value to the RGB color, similar to the getRgb method.
  1318. * The result placed into the dest array starting from the destOffset.
  1319. */
  1320. getRgbItem: function ColorSpace_getRgbItem(src, srcOffset,
  1321. dest, destOffset) {
  1322. error('Should not call ColorSpace.getRgbItem');
  1323. },
  1324. /**
  1325. * Converts the specified number of the color values to the RGB colors.
  1326. * The colors are located in the src array starting from the srcOffset.
  1327. * The result is placed into the dest array starting from the destOffset.
  1328. * The src array items shall be in [0,2^bits) range, the dest array items
  1329. * will be in [0,255] range. alpha01 indicates how many alpha components
  1330. * there are in the dest array; it will be either 0 (RGB array) or 1 (RGBA
  1331. * array).
  1332. */
  1333. getRgbBuffer: function ColorSpace_getRgbBuffer(src, srcOffset, count,
  1334. dest, destOffset, bits,
  1335. alpha01) {
  1336. error('Should not call ColorSpace.getRgbBuffer');
  1337. },
  1338. /**
  1339. * Determines the number of bytes required to store the result of the
  1340. * conversion done by the getRgbBuffer method. As in getRgbBuffer,
  1341. * |alpha01| is either 0 (RGB output) or 1 (RGBA output).
  1342. */
  1343. getOutputLength: function ColorSpace_getOutputLength(inputLength,
  1344. alpha01) {
  1345. error('Should not call ColorSpace.getOutputLength');
  1346. },
  1347. /**
  1348. * Returns true if source data will be equal the result/output data.
  1349. */
  1350. isPassthrough: function ColorSpace_isPassthrough(bits) {
  1351. return false;
  1352. },
  1353. /**
  1354. * Fills in the RGB colors in the destination buffer. alpha01 indicates
  1355. * how many alpha components there are in the dest array; it will be either
  1356. * 0 (RGB array) or 1 (RGBA array).
  1357. */
  1358. fillRgb: function ColorSpace_fillRgb(dest, originalWidth,
  1359. originalHeight, width, height,
  1360. actualHeight, bpc, comps, alpha01) {
  1361. var count = originalWidth * originalHeight;
  1362. var rgbBuf = null;
  1363. var numComponentColors = 1 << bpc;
  1364. var needsResizing = originalHeight != height || originalWidth != width;
  1365. var i, ii;
  1366. if (this.isPassthrough(bpc)) {
  1367. rgbBuf = comps;
  1368. } else if (this.numComps === 1 && count > numComponentColors &&
  1369. this.name !== 'DeviceGray' && this.name !== 'DeviceRGB') {
  1370. // Optimization: create a color map when there is just one component and
  1371. // we are converting more colors than the size of the color map. We
  1372. // don't build the map if the colorspace is gray or rgb since those
  1373. // methods are faster than building a map. This mainly offers big speed
  1374. // ups for indexed and alternate colorspaces.
  1375. //
  1376. // TODO it may be worth while to cache the color map. While running
  1377. // testing I never hit a cache so I will leave that out for now (perhaps
  1378. // we are reparsing colorspaces too much?).
  1379. var allColors = bpc <= 8 ? new Uint8Array(numComponentColors) :
  1380. new Uint16Array(numComponentColors);
  1381. var key;
  1382. for (i = 0; i < numComponentColors; i++) {
  1383. allColors[i] = i;
  1384. }
  1385. var colorMap = new Uint8Array(numComponentColors * 3);
  1386. this.getRgbBuffer(allColors, 0, numComponentColors, colorMap, 0, bpc,
  1387. /* alpha01 = */ 0);
  1388. var destPos, rgbPos;
  1389. if (!needsResizing) {
  1390. // Fill in the RGB values directly into |dest|.
  1391. destPos = 0;
  1392. for (i = 0; i < count; ++i) {
  1393. key = comps[i] * 3;
  1394. dest[destPos++] = colorMap[key];
  1395. dest[destPos++] = colorMap[key + 1];
  1396. dest[destPos++] = colorMap[key + 2];
  1397. destPos += alpha01;
  1398. }
  1399. } else {
  1400. rgbBuf = new Uint8Array(count * 3);
  1401. rgbPos = 0;
  1402. for (i = 0; i < count; ++i) {
  1403. key = comps[i] * 3;
  1404. rgbBuf[rgbPos++] = colorMap[key];
  1405. rgbBuf[rgbPos++] = colorMap[key + 1];
  1406. rgbBuf[rgbPos++] = colorMap[key + 2];
  1407. }
  1408. }
  1409. } else {
  1410. if (!needsResizing) {
  1411. // Fill in the RGB values directly into |dest|.
  1412. this.getRgbBuffer(comps, 0, width * actualHeight, dest, 0, bpc,
  1413. alpha01);
  1414. } else {
  1415. rgbBuf = new Uint8Array(count * 3);
  1416. this.getRgbBuffer(comps, 0, count, rgbBuf, 0, bpc,
  1417. /* alpha01 = */ 0);
  1418. }
  1419. }
  1420. if (rgbBuf) {
  1421. if (needsResizing) {
  1422. PDFImage.resize(rgbBuf, bpc, 3, originalWidth, originalHeight, width,
  1423. height, dest, alpha01);
  1424. } else {
  1425. rgbPos = 0;
  1426. destPos = 0;
  1427. for (i = 0, ii = width * actualHeight; i < ii; i++) {
  1428. dest[destPos++] = rgbBuf[rgbPos++];
  1429. dest[destPos++] = rgbBuf[rgbPos++];
  1430. dest[destPos++] = rgbBuf[rgbPos++];
  1431. destPos += alpha01;
  1432. }
  1433. }
  1434. }
  1435. },
  1436. /**
  1437. * True if the colorspace has components in the default range of [0, 1].
  1438. * This should be true for all colorspaces except for lab color spaces
  1439. * which are [0,100], [-128, 127], [-128, 127].
  1440. */
  1441. usesZeroToOneRange: true
  1442. };
  1443. ColorSpace.parse = function ColorSpace_parse(cs, xref, res) {
  1444. var IR = ColorSpace.parseToIR(cs, xref, res);
  1445. if (IR instanceof AlternateCS) {
  1446. return IR;
  1447. }
  1448. return ColorSpace.fromIR(IR);
  1449. };
  1450. ColorSpace.fromIR = function ColorSpace_fromIR(IR) {
  1451. var name = isArray(IR) ? IR[0] : IR;
  1452. var whitePoint, blackPoint;
  1453. switch (name) {
  1454. case 'DeviceGrayCS':
  1455. return this.singletons.gray;
  1456. case 'DeviceRgbCS':
  1457. return this.singletons.rgb;
  1458. case 'DeviceCmykCS':
  1459. return this.singletons.cmyk;
  1460. case 'CalGrayCS':
  1461. whitePoint = IR[1].WhitePoint;
  1462. blackPoint = IR[1].BlackPoint;
  1463. var gamma = IR[1].Gamma;
  1464. return new CalGrayCS(whitePoint, blackPoint, gamma);
  1465. case 'PatternCS':
  1466. var basePatternCS = IR[1];
  1467. if (basePatternCS) {
  1468. basePatternCS = ColorSpace.fromIR(basePatternCS);
  1469. }
  1470. return new PatternCS(basePatternCS);
  1471. case 'IndexedCS':
  1472. var baseIndexedCS = IR[1];
  1473. var hiVal = IR[2];
  1474. var lookup = IR[3];
  1475. return new IndexedCS(ColorSpace.fromIR(baseIndexedCS), hiVal, lookup);
  1476. case 'AlternateCS':
  1477. var numComps = IR[1];
  1478. var alt = IR[2];
  1479. var tintFnIR = IR[3];
  1480. return new AlternateCS(numComps, ColorSpace.fromIR(alt),
  1481. PDFFunction.fromIR(tintFnIR));
  1482. case 'LabCS':
  1483. whitePoint = IR[1].WhitePoint;
  1484. blackPoint = IR[1].BlackPoint;
  1485. var range = IR[1].Range;
  1486. return new LabCS(whitePoint, blackPoint, range);
  1487. default:
  1488. error('Unkown name ' + name);
  1489. }
  1490. return null;
  1491. };
  1492. ColorSpace.parseToIR = function ColorSpace_parseToIR(cs, xref, res) {
  1493. if (isName(cs)) {
  1494. var colorSpaces = res.get('ColorSpace');
  1495. if (isDict(colorSpaces)) {
  1496. var refcs = colorSpaces.get(cs.name);
  1497. if (refcs) {
  1498. cs = refcs;
  1499. }
  1500. }
  1501. }
  1502. cs = xref.fetchIfRef(cs);
  1503. var mode;
  1504. if (isName(cs)) {
  1505. mode = cs.name;
  1506. this.mode = mode;
  1507. switch (mode) {
  1508. case 'DeviceGray':
  1509. case 'G':
  1510. return 'DeviceGrayCS';
  1511. case 'DeviceRGB':
  1512. case 'RGB':
  1513. return 'DeviceRgbCS';
  1514. case 'DeviceCMYK':
  1515. case 'CMYK':
  1516. return 'DeviceCmykCS';
  1517. case 'Pattern':
  1518. return ['PatternCS', null];
  1519. default:
  1520. error('unrecognized colorspace ' + mode);
  1521. }
  1522. } else if (isArray(cs)) {
  1523. mode = cs[0].name;
  1524. this.mode = mode;
  1525. var numComps, params;
  1526. switch (mode) {
  1527. case 'DeviceGray':
  1528. case 'G':
  1529. return 'DeviceGrayCS';
  1530. case 'DeviceRGB':
  1531. case 'RGB':
  1532. return 'DeviceRgbCS';
  1533. case 'DeviceCMYK':
  1534. case 'CMYK':
  1535. return 'DeviceCmykCS';
  1536. case 'CalGray':
  1537. params = cs[1].getAll();
  1538. return ['CalGrayCS', params];
  1539. case 'CalRGB':
  1540. return 'DeviceRgbCS';
  1541. case 'ICCBased':
  1542. var stream = xref.fetchIfRef(cs[1]);
  1543. var dict = stream.dict;
  1544. numComps = dict.get('N');
  1545. if (numComps == 1) {
  1546. return 'DeviceGrayCS';
  1547. } else if (numComps == 3) {
  1548. return 'DeviceRgbCS';
  1549. } else if (numComps == 4) {
  1550. return 'DeviceCmykCS';
  1551. }
  1552. break;
  1553. case 'Pattern':
  1554. var basePatternCS = cs[1];
  1555. if (basePatternCS) {
  1556. basePatternCS = ColorSpace.parseToIR(basePatternCS, xref, res);
  1557. }
  1558. return ['PatternCS', basePatternCS];
  1559. case 'Indexed':
  1560. case 'I':
  1561. var baseIndexedCS = ColorSpace.parseToIR(cs[1], xref, res);
  1562. var hiVal = cs[2] + 1;
  1563. var lookup = xref.fetchIfRef(cs[3]);
  1564. if (isStream(lookup)) {
  1565. lookup = lookup.getBytes();
  1566. }
  1567. return ['IndexedCS', baseIndexedCS, hiVal, lookup];
  1568. case 'Separation':
  1569. case 'DeviceN':
  1570. var name = cs[1];
  1571. numComps = 1;
  1572. if (isName(name)) {
  1573. numComps = 1;
  1574. } else if (isArray(name)) {
  1575. numComps = name.length;
  1576. }
  1577. var alt = ColorSpace.parseToIR(cs[2], xref, res);
  1578. var tintFnIR = PDFFunction.getIR(xref, xref.fetchIfRef(cs[3]));
  1579. return ['AlternateCS', numComps, alt, tintFnIR];
  1580. case 'Lab':
  1581. params = cs[1].getAll();
  1582. return ['LabCS', params];
  1583. default:
  1584. error('unimplemented color space object "' + mode + '"');
  1585. }
  1586. } else {
  1587. error('unrecognized color space object: "' + cs + '"');
  1588. }
  1589. return null;
  1590. };
  1591. /**
  1592. * Checks if a decode map matches the default decode map for a color space.
  1593. * This handles the general decode maps where there are two values per
  1594. * component. e.g. [0, 1, 0, 1, 0, 1] for a RGB color.
  1595. * This does not handle Lab, Indexed, or Pattern decode maps since they are
  1596. * slightly different.
  1597. * @param {Array} decode Decode map (usually from an image).
  1598. * @param {Number} n Number of components the color space has.
  1599. */
  1600. ColorSpace.isDefaultDecode = function ColorSpace_isDefaultDecode(decode, n) {
  1601. if (!decode) {
  1602. return true;
  1603. }
  1604. if (n * 2 !== decode.length) {
  1605. warn('The decode map is not the correct length');
  1606. return true;
  1607. }
  1608. for (var i = 0, ii = decode.length; i < ii; i += 2) {
  1609. if (decode[i] !== 0 || decode[i + 1] != 1) {
  1610. return false;
  1611. }
  1612. }
  1613. return true;
  1614. };
  1615. ColorSpace.singletons = {
  1616. get gray() {
  1617. return shadow(this, 'gray', new DeviceGrayCS());
  1618. },
  1619. get rgb() {
  1620. return shadow(this, 'rgb', new DeviceRgbCS());
  1621. },
  1622. get cmyk() {
  1623. return shadow(this, 'cmyk', new DeviceCmykCS());
  1624. }
  1625. };
  1626. return ColorSpace;
  1627. })();
  1628. /**
  1629. * Alternate color space handles both Separation and DeviceN color spaces. A
  1630. * Separation color space is actually just a DeviceN with one color component.
  1631. * Both color spaces use a tinting function to convert colors to a base color
  1632. * space.
  1633. */
  1634. var AlternateCS = (function AlternateCSClosure() {
  1635. function AlternateCS(numComps, base, tintFn) {
  1636. this.name = 'Alternate';
  1637. this.numComps = numComps;
  1638. this.defaultColor = new Float32Array(numComps);
  1639. for (var i = 0; i < numComps; ++i) {
  1640. this.defaultColor[i] = 1;
  1641. }
  1642. this.base = base;
  1643. this.tintFn = tintFn;
  1644. }
  1645. AlternateCS.prototype = {
  1646. getRgb: ColorSpace.prototype.getRgb,
  1647. getRgbItem: function AlternateCS_getRgbItem(src, srcOffset,
  1648. dest, destOffset) {
  1649. var baseNumComps = this.base.numComps;
  1650. var input = 'subarray' in src ?
  1651. src.subarray(srcOffset, srcOffset + this.numComps) :
  1652. Array.prototype.slice.call(src, srcOffset, srcOffset + this.numComps);
  1653. var tinted = this.tintFn(input);
  1654. this.base.getRgbItem(tinted, 0, dest, destOffset);
  1655. },
  1656. getRgbBuffer: function AlternateCS_getRgbBuffer(src, srcOffset, count,
  1657. dest, destOffset, bits,
  1658. alpha01) {
  1659. var tintFn = this.tintFn;
  1660. var base = this.base;
  1661. var scale = 1 / ((1 << bits) - 1);
  1662. var baseNumComps = base.numComps;
  1663. var usesZeroToOneRange = base.usesZeroToOneRange;
  1664. var isPassthrough = (base.isPassthrough(8) || !usesZeroToOneRange) &&
  1665. alpha01 === 0;
  1666. var pos = isPassthrough ? destOffset : 0;
  1667. var baseBuf = isPassthrough ? dest : new Uint8Array(baseNumComps * count);
  1668. var numComps = this.numComps;
  1669. var scaled = new Float32Array(numComps);
  1670. var i, j;
  1671. for (i = 0; i < count; i++) {
  1672. for (j = 0; j < numComps; j++) {
  1673. scaled[j] = src[srcOffset++] * scale;
  1674. }
  1675. var tinted = tintFn(scaled);
  1676. if (usesZeroToOneRange) {
  1677. for (j = 0; j < baseNumComps; j++) {
  1678. baseBuf[pos++] = tinted[j] * 255;
  1679. }
  1680. } else {
  1681. base.getRgbItem(tinted, 0, baseBuf, pos);
  1682. pos += baseNumComps;
  1683. }
  1684. }
  1685. if (!isPassthrough) {
  1686. base.getRgbBuffer(baseBuf, 0, count, dest, destOffset, 8, alpha01);
  1687. }
  1688. },
  1689. getOutputLength: function AlternateCS_getOutputLength(inputLength,
  1690. alpha01) {
  1691. return this.base.getOutputLength(inputLength *
  1692. this.base.numComps / this.numComps,
  1693. alpha01);
  1694. },
  1695. isPassthrough: ColorSpace.prototype.isPassthrough,
  1696. fillRgb: ColorSpace.prototype.fillRgb,
  1697. isDefaultDecode: function AlternateCS_isDefaultDecode(decodeMap) {
  1698. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  1699. },
  1700. usesZeroToOneRange: true
  1701. };
  1702. return AlternateCS;
  1703. })();
  1704. var PatternCS = (function PatternCSClosure() {
  1705. function PatternCS(baseCS) {
  1706. this.name = 'Pattern';
  1707. this.base = baseCS;
  1708. }
  1709. PatternCS.prototype = {};
  1710. return PatternCS;
  1711. })();
  1712. var IndexedCS = (function IndexedCSClosure() {
  1713. function IndexedCS(base, highVal, lookup) {
  1714. this.name = 'Indexed';
  1715. this.numComps = 1;
  1716. this.defaultColor = new Uint8Array([0]);
  1717. this.base = base;
  1718. this.highVal = highVal;
  1719. var baseNumComps = base.numComps;
  1720. var length = baseNumComps * highVal;
  1721. var lookupArray;
  1722. if (isStream(lookup)) {
  1723. lookupArray = new Uint8Array(length);
  1724. var bytes = lookup.getBytes(length);
  1725. lookupArray.set(bytes);
  1726. } else if (isString(lookup)) {
  1727. lookupArray = new Uint8Array(length);
  1728. for (var i = 0; i < length; ++i) {
  1729. lookupArray[i] = lookup.charCodeAt(i);
  1730. }
  1731. } else if (lookup instanceof Uint8Array || lookup instanceof Array) {
  1732. lookupArray = lookup;
  1733. } else {
  1734. error('Unrecognized lookup table: ' + lookup);
  1735. }
  1736. this.lookup = lookupArray;
  1737. }
  1738. IndexedCS.prototype = {
  1739. getRgb: ColorSpace.prototype.getRgb,
  1740. getRgbItem: function IndexedCS_getRgbItem(src, srcOffset,
  1741. dest, destOffset) {
  1742. var numComps = this.base.numComps;
  1743. var start = src[srcOffset] * numComps;
  1744. this.base.getRgbItem(this.lookup, start, dest, destOffset);
  1745. },
  1746. getRgbBuffer: function IndexedCS_getRgbBuffer(src, srcOffset, count,
  1747. dest, destOffset, bits,
  1748. alpha01) {
  1749. var base = this.base;
  1750. var numComps = base.numComps;
  1751. var outputDelta = base.getOutputLength(numComps, alpha01);
  1752. var lookup = this.lookup;
  1753. for (var i = 0; i < count; ++i) {
  1754. var lookupPos = src[srcOffset++] * numComps;
  1755. base.getRgbBuffer(lookup, lookupPos, 1, dest, destOffset, 8, alpha01);
  1756. destOffset += outputDelta;
  1757. }
  1758. },
  1759. getOutputLength: function IndexedCS_getOutputLength(inputLength, alpha01) {
  1760. return this.base.getOutputLength(inputLength * this.base.numComps,
  1761. alpha01);
  1762. },
  1763. isPassthrough: ColorSpace.prototype.isPassthrough,
  1764. fillRgb: ColorSpace.prototype.fillRgb,
  1765. isDefaultDecode: function IndexedCS_isDefaultDecode(decodeMap) {
  1766. // indexed color maps shouldn't be changed
  1767. return true;
  1768. },
  1769. usesZeroToOneRange: true
  1770. };
  1771. return IndexedCS;
  1772. })();
  1773. var DeviceGrayCS = (function DeviceGrayCSClosure() {
  1774. function DeviceGrayCS() {
  1775. this.name = 'DeviceGray';
  1776. this.numComps = 1;
  1777. this.defaultColor = new Float32Array([0]);
  1778. }
  1779. DeviceGrayCS.prototype = {
  1780. getRgb: ColorSpace.prototype.getRgb,
  1781. getRgbItem: function DeviceGrayCS_getRgbItem(src, srcOffset,
  1782. dest, destOffset) {
  1783. var c = (src[srcOffset] * 255) | 0;
  1784. c = c < 0 ? 0 : c > 255 ? 255 : c;
  1785. dest[destOffset] = dest[destOffset + 1] = dest[destOffset + 2] = c;
  1786. },
  1787. getRgbBuffer: function DeviceGrayCS_getRgbBuffer(src, srcOffset, count,
  1788. dest, destOffset, bits,
  1789. alpha01) {
  1790. var scale = 255 / ((1 << bits) - 1);
  1791. var j = srcOffset, q = destOffset;
  1792. for (var i = 0; i < count; ++i) {
  1793. var c = (scale * src[j++]) | 0;
  1794. dest[q++] = c;
  1795. dest[q++] = c;
  1796. dest[q++] = c;
  1797. q += alpha01;
  1798. }
  1799. },
  1800. getOutputLength: function DeviceGrayCS_getOutputLength(inputLength,
  1801. alpha01) {
  1802. return inputLength * (3 + alpha01);
  1803. },
  1804. isPassthrough: ColorSpace.prototype.isPassthrough,
  1805. fillRgb: ColorSpace.prototype.fillRgb,
  1806. isDefaultDecode: function DeviceGrayCS_isDefaultDecode(decodeMap) {
  1807. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  1808. },
  1809. usesZeroToOneRange: true
  1810. };
  1811. return DeviceGrayCS;
  1812. })();
  1813. var DeviceRgbCS = (function DeviceRgbCSClosure() {
  1814. function DeviceRgbCS() {
  1815. this.name = 'DeviceRGB';
  1816. this.numComps = 3;
  1817. this.defaultColor = new Float32Array([0, 0, 0]);
  1818. }
  1819. DeviceRgbCS.prototype = {
  1820. getRgb: ColorSpace.prototype.getRgb,
  1821. getRgbItem: function DeviceRgbCS_getRgbItem(src, srcOffset,
  1822. dest, destOffset) {
  1823. var r = (src[srcOffset] * 255) | 0;
  1824. var g = (src[srcOffset + 1] * 255) | 0;
  1825. var b = (src[srcOffset + 2] * 255) | 0;
  1826. dest[destOffset] = r < 0 ? 0 : r > 255 ? 255 : r;
  1827. dest[destOffset + 1] = g < 0 ? 0 : g > 255 ? 255 : g;
  1828. dest[destOffset + 2] = b < 0 ? 0 : b > 255 ? 255 : b;
  1829. },
  1830. getRgbBuffer: function DeviceRgbCS_getRgbBuffer(src, srcOffset, count,
  1831. dest, destOffset, bits,
  1832. alpha01) {
  1833. if (bits === 8 && alpha01 === 0) {
  1834. dest.set(src.subarray(srcOffset, srcOffset + count * 3), destOffset);
  1835. return;
  1836. }
  1837. var scale = 255 / ((1 << bits) - 1);
  1838. var j = srcOffset, q = destOffset;
  1839. for (var i = 0; i < count; ++i) {
  1840. dest[q++] = (scale * src[j++]) | 0;
  1841. dest[q++] = (scale * src[j++]) | 0;
  1842. dest[q++] = (scale * src[j++]) | 0;
  1843. q += alpha01;
  1844. }
  1845. },
  1846. getOutputLength: function DeviceRgbCS_getOutputLength(inputLength,
  1847. alpha01) {
  1848. return (inputLength * (3 + alpha01) / 3) | 0;
  1849. },
  1850. isPassthrough: function DeviceRgbCS_isPassthrough(bits) {
  1851. return bits == 8;
  1852. },
  1853. fillRgb: ColorSpace.prototype.fillRgb,
  1854. isDefaultDecode: function DeviceRgbCS_isDefaultDecode(decodeMap) {
  1855. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  1856. },
  1857. usesZeroToOneRange: true
  1858. };
  1859. return DeviceRgbCS;
  1860. })();
  1861. var DeviceCmykCS = (function DeviceCmykCSClosure() {
  1862. // The coefficients below was found using numerical analysis: the method of
  1863. // steepest descent for the sum((f_i - color_value_i)^2) for r/g/b colors,
  1864. // where color_value is the tabular value from the table of sampled RGB colors
  1865. // from CMYK US Web Coated (SWOP) colorspace, and f_i is the corresponding
  1866. // CMYK color conversion using the estimation below:
  1867. // f(A, B,.. N) = Acc+Bcm+Ccy+Dck+c+Fmm+Gmy+Hmk+Im+Jyy+Kyk+Ly+Mkk+Nk+255
  1868. function convertToRgb(src, srcOffset, srcScale, dest, destOffset) {
  1869. var c = src[srcOffset + 0] * srcScale;
  1870. var m = src[srcOffset + 1] * srcScale;
  1871. var y = src[srcOffset + 2] * srcScale;
  1872. var k = src[srcOffset + 3] * srcScale;
  1873. var r =
  1874. (c * (-4.387332384609988 * c + 54.48615194189176 * m +
  1875. 18.82290502165302 * y + 212.25662451639585 * k +
  1876. -285.2331026137004) +
  1877. m * (1.7149763477362134 * m - 5.6096736904047315 * y +
  1878. -17.873870861415444 * k - 5.497006427196366) +
  1879. y * (-2.5217340131683033 * y - 21.248923337353073 * k +
  1880. 17.5119270841813) +
  1881. k * (-21.86122147463605 * k - 189.48180835922747) + 255) | 0;
  1882. var g =
  1883. (c * (8.841041422036149 * c + 60.118027045597366 * m +
  1884. 6.871425592049007 * y + 31.159100130055922 * k +
  1885. -79.2970844816548) +
  1886. m * (-15.310361306967817 * m + 17.575251261109482 * y +
  1887. 131.35250912493976 * k - 190.9453302588951) +
  1888. y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) +
  1889. k * (-20.737325471181034 * k - 187.80453709719578) + 255) | 0;
  1890. var b =
  1891. (c * (0.8842522430003296 * c + 8.078677503112928 * m +
  1892. 30.89978309703729 * y - 0.23883238689178934 * k +
  1893. -14.183576799673286) +
  1894. m * (10.49593273432072 * m + 63.02378494754052 * y +
  1895. 50.606957656360734 * k - 112.23884253719248) +
  1896. y * (0.03296041114873217 * y + 115.60384449646641 * k +
  1897. -193.58209356861505) +
  1898. k * (-22.33816807309886 * k - 180.12613974708367) + 255) | 0;
  1899. dest[destOffset] = r > 255 ? 255 : r < 0 ? 0 : r;
  1900. dest[destOffset + 1] = g > 255 ? 255 : g < 0 ? 0 : g;
  1901. dest[destOffset + 2] = b > 255 ? 255 : b < 0 ? 0 : b;
  1902. }
  1903. function DeviceCmykCS() {
  1904. this.name = 'DeviceCMYK';
  1905. this.numComps = 4;
  1906. this.defaultColor = new Float32Array([0, 0, 0, 1]);
  1907. }
  1908. DeviceCmykCS.prototype = {
  1909. getRgb: ColorSpace.prototype.getRgb,
  1910. getRgbItem: function DeviceCmykCS_getRgbItem(src, srcOffset,
  1911. dest, destOffset) {
  1912. convertToRgb(src, srcOffset, 1, dest, destOffset);
  1913. },
  1914. getRgbBuffer: function DeviceCmykCS_getRgbBuffer(src, srcOffset, count,
  1915. dest, destOffset, bits,
  1916. alpha01) {
  1917. var scale = 1 / ((1 << bits) - 1);
  1918. for (var i = 0; i < count; i++) {
  1919. convertToRgb(src, srcOffset, scale, dest, destOffset);
  1920. srcOffset += 4;
  1921. destOffset += 3 + alpha01;
  1922. }
  1923. },
  1924. getOutputLength: function DeviceCmykCS_getOutputLength(inputLength,
  1925. alpha01) {
  1926. return (inputLength / 4 * (3 + alpha01)) | 0;
  1927. },
  1928. isPassthrough: ColorSpace.prototype.isPassthrough,
  1929. fillRgb: ColorSpace.prototype.fillRgb,
  1930. isDefaultDecode: function DeviceCmykCS_isDefaultDecode(decodeMap) {
  1931. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  1932. },
  1933. usesZeroToOneRange: true
  1934. };
  1935. return DeviceCmykCS;
  1936. })();
  1937. //
  1938. // CalGrayCS: Based on "PDF Reference, Sixth Ed", p.245
  1939. //
  1940. var CalGrayCS = (function CalGrayCSClosure() {
  1941. function CalGrayCS(whitePoint, blackPoint, gamma) {
  1942. this.name = 'CalGray';
  1943. this.numComps = 1;
  1944. this.defaultColor = new Float32Array([0]);
  1945. if (!whitePoint) {
  1946. error('WhitePoint missing - required for color space CalGray');
  1947. }
  1948. blackPoint = blackPoint || [0, 0, 0];
  1949. gamma = gamma || 1;
  1950. // Translate arguments to spec variables.
  1951. this.XW = whitePoint[0];
  1952. this.YW = whitePoint[1];
  1953. this.ZW = whitePoint[2];
  1954. this.XB = blackPoint[0];
  1955. this.YB = blackPoint[1];
  1956. this.ZB = blackPoint[2];
  1957. this.G = gamma;
  1958. // Validate variables as per spec.
  1959. if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) {
  1960. error('Invalid WhitePoint components for ' + this.name +
  1961. ', no fallback available');
  1962. }
  1963. if (this.XB < 0 || this.YB < 0 || this.ZB < 0) {
  1964. info('Invalid BlackPoint for ' + this.name + ', falling back to default');
  1965. this.XB = this.YB = this.ZB = 0;
  1966. }
  1967. if (this.XB !== 0 || this.YB !== 0 || this.ZB !== 0) {
  1968. warn(this.name + ', BlackPoint: XB: ' + this.XB + ', YB: ' + this.YB +
  1969. ', ZB: ' + this.ZB + ', only default values are supported.');
  1970. }
  1971. if (this.G < 1) {
  1972. info('Invalid Gamma: ' + this.G + ' for ' + this.name +
  1973. ', falling back to default');
  1974. this.G = 1;
  1975. }
  1976. }
  1977. function convertToRgb(cs, src, srcOffset, dest, destOffset, scale) {
  1978. // A represents a gray component of a calibrated gray space.
  1979. // A <---> AG in the spec
  1980. var A = src[srcOffset] * scale;
  1981. var AG = Math.pow(A, cs.G);
  1982. // Computes intermediate variables M, L, N as per spec.
  1983. // Except if other than default BlackPoint values are used.
  1984. var M = cs.XW * AG;
  1985. var L = cs.YW * AG;
  1986. var N = cs.ZW * AG;
  1987. // Decode XYZ, as per spec.
  1988. var X = M;
  1989. var Y = L;
  1990. var Z = N;
  1991. // http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html, Ch 4.
  1992. // This yields values in range [0, 100].
  1993. var Lstar = Math.max(116 * Math.pow(Y, 1 / 3) - 16, 0);
  1994. // Convert values to rgb range [0, 255].
  1995. dest[destOffset] = Lstar * 255 / 100;
  1996. dest[destOffset + 1] = Lstar * 255 / 100;
  1997. dest[destOffset + 2] = Lstar * 255 / 100;
  1998. }
  1999. CalGrayCS.prototype = {
  2000. getRgb: ColorSpace.prototype.getRgb,
  2001. getRgbItem: function CalGrayCS_getRgbItem(src, srcOffset,
  2002. dest, destOffset) {
  2003. convertToRgb(this, src, srcOffset, dest, destOffset, 1);
  2004. },
  2005. getRgbBuffer: function CalGrayCS_getRgbBuffer(src, srcOffset, count,
  2006. dest, destOffset, bits,
  2007. alpha01) {
  2008. var scale = 1 / ((1 << bits) - 1);
  2009. for (var i = 0; i < count; ++i) {
  2010. convertToRgb(this, src, srcOffset, dest, destOffset, scale);
  2011. srcOffset += 1;
  2012. destOffset += 3 + alpha01;
  2013. }
  2014. },
  2015. getOutputLength: function CalGrayCS_getOutputLength(inputLength, alpha01) {
  2016. return inputLength * (3 + alpha01);
  2017. },
  2018. isPassthrough: ColorSpace.prototype.isPassthrough,
  2019. fillRgb: ColorSpace.prototype.fillRgb,
  2020. isDefaultDecode: function CalGrayCS_isDefaultDecode(decodeMap) {
  2021. return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
  2022. },
  2023. usesZeroToOneRange: true
  2024. };
  2025. return CalGrayCS;
  2026. })();
  2027. //
  2028. // LabCS: Based on "PDF Reference, Sixth Ed", p.250
  2029. //
  2030. var LabCS = (function LabCSClosure() {
  2031. function LabCS(whitePoint, blackPoint, range) {
  2032. this.name = 'Lab';
  2033. this.numComps = 3;
  2034. this.defaultColor = new Float32Array([0, 0, 0]);
  2035. if (!whitePoint) {
  2036. error('WhitePoint missing - required for color space Lab');
  2037. }
  2038. blackPoint = blackPoint || [0, 0, 0];
  2039. range = range || [-100, 100, -100, 100];
  2040. // Translate args to spec variables
  2041. this.XW = whitePoint[0];
  2042. this.YW = whitePoint[1];
  2043. this.ZW = whitePoint[2];
  2044. this.amin = range[0];
  2045. this.amax = range[1];
  2046. this.bmin = range[2];
  2047. this.bmax = range[3];
  2048. // These are here just for completeness - the spec doesn't offer any
  2049. // formulas that use BlackPoint in Lab
  2050. this.XB = blackPoint[0];
  2051. this.YB = blackPoint[1];
  2052. this.ZB = blackPoint[2];
  2053. // Validate vars as per spec
  2054. if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) {
  2055. error('Invalid WhitePoint components, no fallback available');
  2056. }
  2057. if (this.XB < 0 || this.YB < 0 || this.ZB < 0) {
  2058. info('Invalid BlackPoint, falling back to default');
  2059. this.XB = this.YB = this.ZB = 0;
  2060. }
  2061. if (this.amin > this.amax || this.bmin > this.bmax) {
  2062. info('Invalid Range, falling back to defaults');
  2063. this.amin = -100;
  2064. this.amax = 100;
  2065. this.bmin = -100;
  2066. this.bmax = 100;
  2067. }
  2068. }
  2069. // Function g(x) from spec
  2070. function fn_g(x) {
  2071. if (x >= 6 / 29) {
  2072. return x * x * x;
  2073. } else {
  2074. return (108 / 841) * (x - 4 / 29);
  2075. }
  2076. }
  2077. function decode(value, high1, low2, high2) {
  2078. return low2 + (value) * (high2 - low2) / (high1);
  2079. }
  2080. // If decoding is needed maxVal should be 2^bits per component - 1.
  2081. function convertToRgb(cs, src, srcOffset, maxVal, dest, destOffset) {
  2082. // XXX: Lab input is in the range of [0, 100], [amin, amax], [bmin, bmax]
  2083. // not the usual [0, 1]. If a command like setFillColor is used the src
  2084. // values will already be within the correct range. However, if we are
  2085. // converting an image we have to map the values to the correct range given
  2086. // above.
  2087. // Ls,as,bs <---> L*,a*,b* in the spec
  2088. var Ls = src[srcOffset];
  2089. var as = src[srcOffset + 1];
  2090. var bs = src[srcOffset + 2];
  2091. if (maxVal !== false) {
  2092. Ls = decode(Ls, maxVal, 0, 100);
  2093. as = decode(as, maxVal, cs.amin, cs.amax);
  2094. bs = decode(bs, maxVal, cs.bmin, cs.bmax);
  2095. }
  2096. // Adjust limits of 'as' and 'bs'
  2097. as = as > cs.amax ? cs.amax : as < cs.amin ? cs.amin : as;
  2098. bs = bs > cs.bmax ? cs.bmax : bs < cs.bmin ? cs.bmin : bs;
  2099. // Computes intermediate variables X,Y,Z as per spec
  2100. var M = (Ls + 16) / 116;
  2101. var L = M + (as / 500);
  2102. var N = M - (bs / 200);
  2103. var X = cs.XW * fn_g(L);
  2104. var Y = cs.YW * fn_g(M);
  2105. var Z = cs.ZW * fn_g(N);
  2106. var r, g, b;
  2107. // Using different conversions for D50 and D65 white points,
  2108. // per http://www.color.org/srgb.pdf
  2109. if (cs.ZW < 1) {
  2110. // Assuming D50 (X=0.9642, Y=1.00, Z=0.8249)
  2111. r = X * 3.1339 + Y * -1.6170 + Z * -0.4906;
  2112. g = X * -0.9785 + Y * 1.9160 + Z * 0.0333;
  2113. b = X * 0.0720 + Y * -0.2290 + Z * 1.4057;
  2114. } else {
  2115. // Assuming D65 (X=0.9505, Y=1.00, Z=1.0888)
  2116. r = X * 3.2406 + Y * -1.5372 + Z * -0.4986;
  2117. g = X * -0.9689 + Y * 1.8758 + Z * 0.0415;
  2118. b = X * 0.0557 + Y * -0.2040 + Z * 1.0570;
  2119. }
  2120. // clamp color values to [0,1] range then convert to [0,255] range.
  2121. dest[destOffset] = r <= 0 ? 0 : r >= 1 ? 255 : Math.sqrt(r) * 255 | 0;
  2122. dest[destOffset + 1] = g <= 0 ? 0 : g >= 1 ? 255 : Math.sqrt(g) * 255 | 0;
  2123. dest[destOffset + 2] = b <= 0 ? 0 : b >= 1 ? 255 : Math.sqrt(b) * 255 | 0;
  2124. }
  2125. LabCS.prototype = {
  2126. getRgb: ColorSpace.prototype.getRgb,
  2127. getRgbItem: function LabCS_getRgbItem(src, srcOffset, dest, destOffset) {
  2128. convertToRgb(this, src, srcOffset, false, dest, destOffset);
  2129. },
  2130. getRgbBuffer: function LabCS_getRgbBuffer(src, srcOffset, count,
  2131. dest, destOffset, bits,
  2132. alpha01) {
  2133. var maxVal = (1 << bits) - 1;
  2134. for (var i = 0; i < count; i++) {
  2135. convertToRgb(this, src, srcOffset, maxVal, dest, destOffset);
  2136. srcOffset += 3;
  2137. destOffset += 3 + alpha01;
  2138. }
  2139. },
  2140. getOutputLength: function LabCS_getOutputLength(inputLength, alpha01) {
  2141. return (inputLength * (3 + alpha01) / 3) | 0;
  2142. },
  2143. isPassthrough: ColorSpace.prototype.isPassthrough,
  2144. isDefaultDecode: function LabCS_isDefaultDecode(decodeMap) {
  2145. // XXX: Decoding is handled with the lab conversion because of the strange
  2146. // ranges that are used.
  2147. return true;
  2148. },
  2149. usesZeroToOneRange: false
  2150. };
  2151. return LabCS;
  2152. })();
  2153. var PDFFunction = (function PDFFunctionClosure() {
  2154. var CONSTRUCT_SAMPLED = 0;
  2155. var CONSTRUCT_INTERPOLATED = 2;
  2156. var CONSTRUCT_STICHED = 3;
  2157. var CONSTRUCT_POSTSCRIPT = 4;
  2158. return {
  2159. getSampleArray: function PDFFunction_getSampleArray(size, outputSize, bps,
  2160. str) {
  2161. var i, ii;
  2162. var length = 1;
  2163. for (i = 0, ii = size.length; i < ii; i++) {
  2164. length *= size[i];
  2165. }
  2166. length *= outputSize;
  2167. var array = [];
  2168. var codeSize = 0;
  2169. var codeBuf = 0;
  2170. // 32 is a valid bps so shifting won't work
  2171. var sampleMul = 1.0 / (Math.pow(2.0, bps) - 1);
  2172. var strBytes = str.getBytes((length * bps + 7) / 8);
  2173. var strIdx = 0;
  2174. for (i = 0; i < length; i++) {
  2175. while (codeSize < bps) {
  2176. codeBuf <<= 8;
  2177. codeBuf |= strBytes[strIdx++];
  2178. codeSize += 8;
  2179. }
  2180. codeSize -= bps;
  2181. array.push((codeBuf >> codeSize) * sampleMul);
  2182. codeBuf &= (1 << codeSize) - 1;
  2183. }
  2184. return array;
  2185. },
  2186. getIR: function PDFFunction_getIR(xref, fn) {
  2187. var dict = fn.dict;
  2188. if (!dict) {
  2189. dict = fn;
  2190. }
  2191. var types = [this.constructSampled,
  2192. null,
  2193. this.constructInterpolated,
  2194. this.constructStiched,
  2195. this.constructPostScript];
  2196. var typeNum = dict.get('FunctionType');
  2197. var typeFn = types[typeNum];
  2198. if (!typeFn) {
  2199. error('Unknown type of function');
  2200. }
  2201. return typeFn.call(this, fn, dict, xref);
  2202. },
  2203. fromIR: function PDFFunction_fromIR(IR) {
  2204. var type = IR[0];
  2205. switch (type) {
  2206. case CONSTRUCT_SAMPLED:
  2207. return this.constructSampledFromIR(IR);
  2208. case CONSTRUCT_INTERPOLATED:
  2209. return this.constructInterpolatedFromIR(IR);
  2210. case CONSTRUCT_STICHED:
  2211. return this.constructStichedFromIR(IR);
  2212. //case CONSTRUCT_POSTSCRIPT:
  2213. default:
  2214. return this.constructPostScriptFromIR(IR);
  2215. }
  2216. },
  2217. parse: function PDFFunction_parse(xref, fn) {
  2218. var IR = this.getIR(xref, fn);
  2219. return this.fromIR(IR);
  2220. },
  2221. constructSampled: function PDFFunction_constructSampled(str, dict) {
  2222. function toMultiArray(arr) {
  2223. var inputLength = arr.length;
  2224. var out = [];
  2225. var index = 0;
  2226. for (var i = 0; i < inputLength; i += 2) {
  2227. out[index] = [arr[i], arr[i + 1]];
  2228. ++index;
  2229. }
  2230. return out;
  2231. }
  2232. var domain = dict.get('Domain');
  2233. var range = dict.get('Range');
  2234. if (!domain || !range) {
  2235. error('No domain or range');
  2236. }
  2237. var inputSize = domain.length / 2;
  2238. var outputSize = range.length / 2;
  2239. domain = toMultiArray(domain);
  2240. range = toMultiArray(range);
  2241. var size = dict.get('Size');
  2242. var bps = dict.get('BitsPerSample');
  2243. var order = dict.get('Order') || 1;
  2244. if (order !== 1) {
  2245. // No description how cubic spline interpolation works in PDF32000:2008
  2246. // As in poppler, ignoring order, linear interpolation may work as good
  2247. info('No support for cubic spline interpolation: ' + order);
  2248. }
  2249. var encode = dict.get('Encode');
  2250. if (!encode) {
  2251. encode = [];
  2252. for (var i = 0; i < inputSize; ++i) {
  2253. encode.push(0);
  2254. encode.push(size[i] - 1);
  2255. }
  2256. }
  2257. encode = toMultiArray(encode);
  2258. var decode = dict.get('Decode');
  2259. if (!decode) {
  2260. decode = range;
  2261. } else {
  2262. decode = toMultiArray(decode);
  2263. }
  2264. var samples = this.getSampleArray(size, outputSize, bps, str);
  2265. return [
  2266. CONSTRUCT_SAMPLED, inputSize, domain, encode, decode, samples, size,
  2267. outputSize, Math.pow(2, bps) - 1, range
  2268. ];
  2269. },
  2270. constructSampledFromIR: function PDFFunction_constructSampledFromIR(IR) {
  2271. // See chapter 3, page 109 of the PDF reference
  2272. function interpolate(x, xmin, xmax, ymin, ymax) {
  2273. return ymin + ((x - xmin) * ((ymax - ymin) / (xmax - xmin)));
  2274. }
  2275. return function constructSampledFromIRResult(args) {
  2276. // See chapter 3, page 110 of the PDF reference.
  2277. var m = IR[1];
  2278. var domain = IR[2];
  2279. var encode = IR[3];
  2280. var decode = IR[4];
  2281. var samples = IR[5];
  2282. var size = IR[6];
  2283. var n = IR[7];
  2284. //var mask = IR[8];
  2285. var range = IR[9];
  2286. if (m != args.length) {
  2287. error('Incorrect number of arguments: ' + m + ' != ' +
  2288. args.length);
  2289. }
  2290. var x = args;
  2291. // Building the cube vertices: its part and sample index
  2292. // http://rjwagner49.com/Mathematics/Interpolation.pdf
  2293. var cubeVertices = 1 << m;
  2294. var cubeN = new Float64Array(cubeVertices);
  2295. var cubeVertex = new Uint32Array(cubeVertices);
  2296. var i, j;
  2297. for (j = 0; j < cubeVertices; j++) {
  2298. cubeN[j] = 1;
  2299. }
  2300. var k = n, pos = 1;
  2301. // Map x_i to y_j for 0 <= i < m using the sampled function.
  2302. for (i = 0; i < m; ++i) {
  2303. // x_i' = min(max(x_i, Domain_2i), Domain_2i+1)
  2304. var domain_2i = domain[i][0];
  2305. var domain_2i_1 = domain[i][1];
  2306. var xi = Math.min(Math.max(x[i], domain_2i), domain_2i_1);
  2307. // e_i = Interpolate(x_i', Domain_2i, Domain_2i+1,
  2308. // Encode_2i, Encode_2i+1)
  2309. var e = interpolate(xi, domain_2i, domain_2i_1,
  2310. encode[i][0], encode[i][1]);
  2311. // e_i' = min(max(e_i, 0), Size_i - 1)
  2312. var size_i = size[i];
  2313. e = Math.min(Math.max(e, 0), size_i - 1);
  2314. // Adjusting the cube: N and vertex sample index
  2315. var e0 = e < size_i - 1 ? Math.floor(e) : e - 1; // e1 = e0 + 1;
  2316. var n0 = e0 + 1 - e; // (e1 - e) / (e1 - e0);
  2317. var n1 = e - e0; // (e - e0) / (e1 - e0);
  2318. var offset0 = e0 * k;
  2319. var offset1 = offset0 + k; // e1 * k
  2320. for (j = 0; j < cubeVertices; j++) {
  2321. if (j & pos) {
  2322. cubeN[j] *= n1;
  2323. cubeVertex[j] += offset1;
  2324. } else {
  2325. cubeN[j] *= n0;
  2326. cubeVertex[j] += offset0;
  2327. }
  2328. }
  2329. k *= size_i;
  2330. pos <<= 1;
  2331. }
  2332. var y = new Float64Array(n);
  2333. for (j = 0; j < n; ++j) {
  2334. // Sum all cube vertices' samples portions
  2335. var rj = 0;
  2336. for (i = 0; i < cubeVertices; i++) {
  2337. rj += samples[cubeVertex[i] + j] * cubeN[i];
  2338. }
  2339. // r_j' = Interpolate(r_j, 0, 2^BitsPerSample - 1,
  2340. // Decode_2j, Decode_2j+1)
  2341. rj = interpolate(rj, 0, 1, decode[j][0], decode[j][1]);
  2342. // y_j = min(max(r_j, range_2j), range_2j+1)
  2343. y[j] = Math.min(Math.max(rj, range[j][0]), range[j][1]);
  2344. }
  2345. return y;
  2346. };
  2347. },
  2348. constructInterpolated: function PDFFunction_constructInterpolated(str,
  2349. dict) {
  2350. var c0 = dict.get('C0') || [0];
  2351. var c1 = dict.get('C1') || [1];
  2352. var n = dict.get('N');
  2353. if (!isArray(c0) || !isArray(c1)) {
  2354. error('Illegal dictionary for interpolated function');
  2355. }
  2356. var length = c0.length;
  2357. var diff = [];
  2358. for (var i = 0; i < length; ++i) {
  2359. diff.push(c1[i] - c0[i]);
  2360. }
  2361. return [CONSTRUCT_INTERPOLATED, c0, diff, n];
  2362. },
  2363. constructInterpolatedFromIR:
  2364. function PDFFunction_constructInterpolatedFromIR(IR) {
  2365. var c0 = IR[1];
  2366. var diff = IR[2];
  2367. var n = IR[3];
  2368. var length = diff.length;
  2369. return function constructInterpolatedFromIRResult(args) {
  2370. var x = n == 1 ? args[0] : Math.pow(args[0], n);
  2371. var out = [];
  2372. for (var j = 0; j < length; ++j) {
  2373. out.push(c0[j] + (x * diff[j]));
  2374. }
  2375. return out;
  2376. };
  2377. },
  2378. constructStiched: function PDFFunction_constructStiched(fn, dict, xref) {
  2379. var domain = dict.get('Domain');
  2380. if (!domain) {
  2381. error('No domain');
  2382. }
  2383. var inputSize = domain.length / 2;
  2384. if (inputSize != 1) {
  2385. error('Bad domain for stiched function');
  2386. }
  2387. var fnRefs = dict.get('Functions');
  2388. var fns = [];
  2389. for (var i = 0, ii = fnRefs.length; i < ii; ++i) {
  2390. fns.push(PDFFunction.getIR(xref, xref.fetchIfRef(fnRefs[i])));
  2391. }
  2392. var bounds = dict.get('Bounds');
  2393. var encode = dict.get('Encode');
  2394. return [CONSTRUCT_STICHED, domain, bounds, encode, fns];
  2395. },
  2396. constructStichedFromIR: function PDFFunction_constructStichedFromIR(IR) {
  2397. var domain = IR[1];
  2398. var bounds = IR[2];
  2399. var encode = IR[3];
  2400. var fnsIR = IR[4];
  2401. var fns = [];
  2402. for (var i = 0, ii = fnsIR.length; i < ii; i++) {
  2403. fns.push(PDFFunction.fromIR(fnsIR[i]));
  2404. }
  2405. return function constructStichedFromIRResult(args) {
  2406. var clip = function constructStichedFromIRClip(v, min, max) {
  2407. if (v > max) {
  2408. v = max;
  2409. } else if (v < min) {
  2410. v = min;
  2411. }
  2412. return v;
  2413. };
  2414. // clip to domain
  2415. var v = clip(args[0], domain[0], domain[1]);
  2416. // calulate which bound the value is in
  2417. for (var i = 0, ii = bounds.length; i < ii; ++i) {
  2418. if (v < bounds[i]) {
  2419. break;
  2420. }
  2421. }
  2422. // encode value into domain of function
  2423. var dmin = domain[0];
  2424. if (i > 0) {
  2425. dmin = bounds[i - 1];
  2426. }
  2427. var dmax = domain[1];
  2428. if (i < bounds.length) {
  2429. dmax = bounds[i];
  2430. }
  2431. var rmin = encode[2 * i];
  2432. var rmax = encode[2 * i + 1];
  2433. var v2 = rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin);
  2434. // call the appropriate function
  2435. return fns[i]([v2]);
  2436. };
  2437. },
  2438. constructPostScript: function PDFFunction_constructPostScript(fn, dict,
  2439. xref) {
  2440. var domain = dict.get('Domain');
  2441. var range = dict.get('Range');
  2442. if (!domain) {
  2443. error('No domain.');
  2444. }
  2445. if (!range) {
  2446. error('No range.');
  2447. }
  2448. var lexer = new PostScriptLexer(fn);
  2449. var parser = new PostScriptParser(lexer);
  2450. var code = parser.parse();
  2451. return [CONSTRUCT_POSTSCRIPT, domain, range, code];
  2452. },
  2453. constructPostScriptFromIR: function PDFFunction_constructPostScriptFromIR(
  2454. IR) {
  2455. var domain = IR[1];
  2456. var range = IR[2];
  2457. var code = IR[3];
  2458. var numOutputs = range.length / 2;
  2459. var evaluator = new PostScriptEvaluator(code);
  2460. // Cache the values for a big speed up, the cache size is limited though
  2461. // since the number of possible values can be huge from a PS function.
  2462. var cache = new FunctionCache();
  2463. return function constructPostScriptFromIRResult(args) {
  2464. var initialStack = [];
  2465. for (var i = 0, ii = (domain.length / 2); i < ii; ++i) {
  2466. initialStack.push(args[i]);
  2467. }
  2468. var key = initialStack.join('_');
  2469. if (cache.has(key)) {
  2470. return cache.get(key);
  2471. }
  2472. var stack = evaluator.execute(initialStack);
  2473. var transformed = [];
  2474. for (i = numOutputs - 1; i >= 0; --i) {
  2475. var out = stack.pop();
  2476. var rangeIndex = 2 * i;
  2477. if (out < range[rangeIndex]) {
  2478. out = range[rangeIndex];
  2479. } else if (out > range[rangeIndex + 1]) {
  2480. out = range[rangeIndex + 1];
  2481. }
  2482. transformed[i] = out;
  2483. }
  2484. cache.set(key, transformed);
  2485. return transformed;
  2486. };
  2487. }
  2488. };
  2489. })();
  2490. var FunctionCache = (function FunctionCacheClosure() {
  2491. // Of 10 PDF's with type4 functions the maxium number of distinct values seen
  2492. // was 256. This still may need some tweaking in the future though.
  2493. var MAX_CACHE_SIZE = 1024;
  2494. function FunctionCache() {
  2495. this.cache = {};
  2496. this.total = 0;
  2497. }
  2498. FunctionCache.prototype = {
  2499. has: function FunctionCache_has(key) {
  2500. return key in this.cache;
  2501. },
  2502. get: function FunctionCache_get(key) {
  2503. return this.cache[key];
  2504. },
  2505. set: function FunctionCache_set(key, value) {
  2506. if (this.total < MAX_CACHE_SIZE) {
  2507. this.cache[key] = value;
  2508. this.total++;
  2509. }
  2510. }
  2511. };
  2512. return FunctionCache;
  2513. })();
  2514. var PostScriptStack = (function PostScriptStackClosure() {
  2515. var MAX_STACK_SIZE = 100;
  2516. function PostScriptStack(initialStack) {
  2517. this.stack = initialStack || [];
  2518. }
  2519. PostScriptStack.prototype = {
  2520. push: function PostScriptStack_push(value) {
  2521. if (this.stack.length >= MAX_STACK_SIZE) {
  2522. error('PostScript function stack overflow.');
  2523. }
  2524. this.stack.push(value);
  2525. },
  2526. pop: function PostScriptStack_pop() {
  2527. if (this.stack.length <= 0) {
  2528. error('PostScript function stack underflow.');
  2529. }
  2530. return this.stack.pop();
  2531. },
  2532. copy: function PostScriptStack_copy(n) {
  2533. if (this.stack.length + n >= MAX_STACK_SIZE) {
  2534. error('PostScript function stack overflow.');
  2535. }
  2536. var stack = this.stack;
  2537. for (var i = stack.length - n, j = n - 1; j >= 0; j--, i++) {
  2538. stack.push(stack[i]);
  2539. }
  2540. },
  2541. index: function PostScriptStack_index(n) {
  2542. this.push(this.stack[this.stack.length - n - 1]);
  2543. },
  2544. // rotate the last n stack elements p times
  2545. roll: function PostScriptStack_roll(n, p) {
  2546. var stack = this.stack;
  2547. var l = stack.length - n;
  2548. var r = stack.length - 1, c = l + (p - Math.floor(p / n) * n), i, j, t;
  2549. for (i = l, j = r; i < j; i++, j--) {
  2550. t = stack[i]; stack[i] = stack[j]; stack[j] = t;
  2551. }
  2552. for (i = l, j = c - 1; i < j; i++, j--) {
  2553. t = stack[i]; stack[i] = stack[j]; stack[j] = t;
  2554. }
  2555. for (i = c, j = r; i < j; i++, j--) {
  2556. t = stack[i]; stack[i] = stack[j]; stack[j] = t;
  2557. }
  2558. }
  2559. };
  2560. return PostScriptStack;
  2561. })();
  2562. var PostScriptEvaluator = (function PostScriptEvaluatorClosure() {
  2563. function PostScriptEvaluator(operators) {
  2564. this.operators = operators;
  2565. }
  2566. PostScriptEvaluator.prototype = {
  2567. execute: function PostScriptEvaluator_execute(initialStack) {
  2568. var stack = new PostScriptStack(initialStack);
  2569. var counter = 0;
  2570. var operators = this.operators;
  2571. var length = operators.length;
  2572. var operator, a, b;
  2573. while (counter < length) {
  2574. operator = operators[counter++];
  2575. if (typeof operator == 'number') {
  2576. // Operator is really an operand and should be pushed to the stack.
  2577. stack.push(operator);
  2578. continue;
  2579. }
  2580. switch (operator) {
  2581. // non standard ps operators
  2582. case 'jz': // jump if false
  2583. b = stack.pop();
  2584. a = stack.pop();
  2585. if (!a) {
  2586. counter = b;
  2587. }
  2588. break;
  2589. case 'j': // jump
  2590. a = stack.pop();
  2591. counter = a;
  2592. break;
  2593. // all ps operators in alphabetical order (excluding if/ifelse)
  2594. case 'abs':
  2595. a = stack.pop();
  2596. stack.push(Math.abs(a));
  2597. break;
  2598. case 'add':
  2599. b = stack.pop();
  2600. a = stack.pop();
  2601. stack.push(a + b);
  2602. break;
  2603. case 'and':
  2604. b = stack.pop();
  2605. a = stack.pop();
  2606. if (isBool(a) && isBool(b)) {
  2607. stack.push(a && b);
  2608. } else {
  2609. stack.push(a & b);
  2610. }
  2611. break;
  2612. case 'atan':
  2613. a = stack.pop();
  2614. stack.push(Math.atan(a));
  2615. break;
  2616. case 'bitshift':
  2617. b = stack.pop();
  2618. a = stack.pop();
  2619. if (a > 0) {
  2620. stack.push(a << b);
  2621. } else {
  2622. stack.push(a >> b);
  2623. }
  2624. break;
  2625. case 'ceiling':
  2626. a = stack.pop();
  2627. stack.push(Math.ceil(a));
  2628. break;
  2629. case 'copy':
  2630. a = stack.pop();
  2631. stack.copy(a);
  2632. break;
  2633. case 'cos':
  2634. a = stack.pop();
  2635. stack.push(Math.cos(a));
  2636. break;
  2637. case 'cvi':
  2638. a = stack.pop() | 0;
  2639. stack.push(a);
  2640. break;
  2641. case 'cvr':
  2642. // noop
  2643. break;
  2644. case 'div':
  2645. b = stack.pop();
  2646. a = stack.pop();
  2647. stack.push(a / b);
  2648. break;
  2649. case 'dup':
  2650. stack.copy(1);
  2651. break;
  2652. case 'eq':
  2653. b = stack.pop();
  2654. a = stack.pop();
  2655. stack.push(a == b);
  2656. break;
  2657. case 'exch':
  2658. stack.roll(2, 1);
  2659. break;
  2660. case 'exp':
  2661. b = stack.pop();
  2662. a = stack.pop();
  2663. stack.push(Math.pow(a, b));
  2664. break;
  2665. case 'false':
  2666. stack.push(false);
  2667. break;
  2668. case 'floor':
  2669. a = stack.pop();
  2670. stack.push(Math.floor(a));
  2671. break;
  2672. case 'ge':
  2673. b = stack.pop();
  2674. a = stack.pop();
  2675. stack.push(a >= b);
  2676. break;
  2677. case 'gt':
  2678. b = stack.pop();
  2679. a = stack.pop();
  2680. stack.push(a > b);
  2681. break;
  2682. case 'idiv':
  2683. b = stack.pop();
  2684. a = stack.pop();
  2685. stack.push((a / b) | 0);
  2686. break;
  2687. case 'index':
  2688. a = stack.pop();
  2689. stack.index(a);
  2690. break;
  2691. case 'le':
  2692. b = stack.pop();
  2693. a = stack.pop();
  2694. stack.push(a <= b);
  2695. break;
  2696. case 'ln':
  2697. a = stack.pop();
  2698. stack.push(Math.log(a));
  2699. break;
  2700. case 'log':
  2701. a = stack.pop();
  2702. stack.push(Math.log(a) / Math.LN10);
  2703. break;
  2704. case 'lt':
  2705. b = stack.pop();
  2706. a = stack.pop();
  2707. stack.push(a < b);
  2708. break;
  2709. case 'mod':
  2710. b = stack.pop();
  2711. a = stack.pop();
  2712. stack.push(a % b);
  2713. break;
  2714. case 'mul':
  2715. b = stack.pop();
  2716. a = stack.pop();
  2717. stack.push(a * b);
  2718. break;
  2719. case 'ne':
  2720. b = stack.pop();
  2721. a = stack.pop();
  2722. stack.push(a != b);
  2723. break;
  2724. case 'neg':
  2725. a = stack.pop();
  2726. stack.push(-b);
  2727. break;
  2728. case 'not':
  2729. a = stack.pop();
  2730. if (isBool(a) && isBool(b)) {
  2731. stack.push(a && b);
  2732. } else {
  2733. stack.push(a & b);
  2734. }
  2735. break;
  2736. case 'or':
  2737. b = stack.pop();
  2738. a = stack.pop();
  2739. if (isBool(a) && isBool(b)) {
  2740. stack.push(a || b);
  2741. } else {
  2742. stack.push(a | b);
  2743. }
  2744. break;
  2745. case 'pop':
  2746. stack.pop();
  2747. break;
  2748. case 'roll':
  2749. b = stack.pop();
  2750. a = stack.pop();
  2751. stack.roll(a, b);
  2752. break;
  2753. case 'round':
  2754. a = stack.pop();
  2755. stack.push(Math.round(a));
  2756. break;
  2757. case 'sin':
  2758. a = stack.pop();
  2759. stack.push(Math.sin(a));
  2760. break;
  2761. case 'sqrt':
  2762. a = stack.pop();
  2763. stack.push(Math.sqrt(a));
  2764. break;
  2765. case 'sub':
  2766. b = stack.pop();
  2767. a = stack.pop();
  2768. stack.push(a - b);
  2769. break;
  2770. case 'true':
  2771. stack.push(true);
  2772. break;
  2773. case 'truncate':
  2774. a = stack.pop();
  2775. a = a < 0 ? Math.ceil(a) : Math.floor(a);
  2776. stack.push(a);
  2777. break;
  2778. case 'xor':
  2779. b = stack.pop();
  2780. a = stack.pop();
  2781. if (isBool(a) && isBool(b)) {
  2782. stack.push(a != b);
  2783. } else {
  2784. stack.push(a ^ b);
  2785. }
  2786. break;
  2787. default:
  2788. error('Unknown operator ' + operator);
  2789. break;
  2790. }
  2791. }
  2792. return stack.stack;
  2793. }
  2794. };
  2795. return PostScriptEvaluator;
  2796. })();
  2797. var DEFAULT_ICON_SIZE = 22; // px
  2798. var HIGHLIGHT_OFFSET = 4; // px
  2799. var SUPPORTED_TYPES = ['Link', 'Text', 'Widget'];
  2800. var Annotation = (function AnnotationClosure() {
  2801. // 12.5.5: Algorithm: Appearance streams
  2802. function getTransformMatrix(rect, bbox, matrix) {
  2803. var bounds = Util.getAxialAlignedBoundingBox(bbox, matrix);
  2804. var minX = bounds[0];
  2805. var minY = bounds[1];
  2806. var maxX = bounds[2];
  2807. var maxY = bounds[3];
  2808. if (minX === maxX || minY === maxY) {
  2809. // From real-life file, bbox was [0, 0, 0, 0]. In this case,
  2810. // just apply the transform for rect
  2811. return [1, 0, 0, 1, rect[0], rect[1]];
  2812. }
  2813. var xRatio = (rect[2] - rect[0]) / (maxX - minX);
  2814. var yRatio = (rect[3] - rect[1]) / (maxY - minY);
  2815. return [
  2816. xRatio,
  2817. 0,
  2818. 0,
  2819. yRatio,
  2820. rect[0] - minX * xRatio,
  2821. rect[1] - minY * yRatio
  2822. ];
  2823. }
  2824. function getDefaultAppearance(dict) {
  2825. var appearanceState = dict.get('AP');
  2826. if (!isDict(appearanceState)) {
  2827. return;
  2828. }
  2829. var appearance;
  2830. var appearances = appearanceState.get('N');
  2831. if (isDict(appearances)) {
  2832. var as = dict.get('AS');
  2833. if (as && appearances.has(as.name)) {
  2834. appearance = appearances.get(as.name);
  2835. }
  2836. } else {
  2837. appearance = appearances;
  2838. }
  2839. return appearance;
  2840. }
  2841. function Annotation(params) {
  2842. if (params.data) {
  2843. this.data = params.data;
  2844. return;
  2845. }
  2846. var dict = params.dict;
  2847. var data = this.data = {};
  2848. data.subtype = dict.get('Subtype').name;
  2849. var rect = dict.get('Rect') || [0, 0, 0, 0];
  2850. data.rect = Util.normalizeRect(rect);
  2851. data.annotationFlags = dict.get('F');
  2852. var color = dict.get('C');
  2853. if (isArray(color) && color.length === 3) {
  2854. // TODO(mack): currently only supporting rgb; need support different
  2855. // colorspaces
  2856. data.color = color;
  2857. } else {
  2858. data.color = [0, 0, 0];
  2859. }
  2860. // Some types of annotations have border style dict which has more
  2861. // info than the border array
  2862. if (dict.has('BS')) {
  2863. var borderStyle = dict.get('BS');
  2864. data.borderWidth = borderStyle.has('W') ? borderStyle.get('W') : 1;
  2865. } else {
  2866. var borderArray = dict.get('Border') || [0, 0, 1];
  2867. data.borderWidth = borderArray[2] || 0;
  2868. // TODO: implement proper support for annotations with line dash patterns.
  2869. var dashArray = borderArray[3];
  2870. if (data.borderWidth > 0 && dashArray && isArray(dashArray)) {
  2871. var dashArrayLength = dashArray.length;
  2872. if (dashArrayLength > 0) {
  2873. // According to the PDF specification: the elements in a dashArray
  2874. // shall be numbers that are nonnegative and not all equal to zero.
  2875. var isInvalid = false;
  2876. var numPositive = 0;
  2877. for (var i = 0; i < dashArrayLength; i++) {
  2878. var validNumber = (+dashArray[i] >= 0);
  2879. if (!validNumber) {
  2880. isInvalid = true;
  2881. break;
  2882. } else if (dashArray[i] > 0) {
  2883. numPositive++;
  2884. }
  2885. }
  2886. if (isInvalid || numPositive === 0) {
  2887. data.borderWidth = 0;
  2888. }
  2889. }
  2890. }
  2891. }
  2892. this.appearance = getDefaultAppearance(dict);
  2893. data.hasAppearance = !!this.appearance;
  2894. data.id = params.ref.num;
  2895. }
  2896. Annotation.prototype = {
  2897. getData: function Annotation_getData() {
  2898. return this.data;
  2899. },
  2900. hasHtml: function Annotation_hasHtml() {
  2901. return false;
  2902. },
  2903. getHtmlElement: function Annotation_getHtmlElement(commonObjs) {
  2904. throw new NotImplementedException(
  2905. 'getHtmlElement() should be implemented in subclass');
  2906. },
  2907. // TODO(mack): Remove this, it's not really that helpful.
  2908. getEmptyContainer: function Annotation_getEmptyContainer(tagName, rect,
  2909. borderWidth) {
  2910. assert(!isWorker,
  2911. 'getEmptyContainer() should be called from main thread');
  2912. var bWidth = borderWidth || 0;
  2913. rect = rect || this.data.rect;
  2914. var element = document.createElement(tagName);
  2915. element.style.borderWidth = bWidth + 'px';
  2916. var width = rect[2] - rect[0] - 2 * bWidth;
  2917. var height = rect[3] - rect[1] - 2 * bWidth;
  2918. element.style.width = width + 'px';
  2919. element.style.height = height + 'px';
  2920. return element;
  2921. },
  2922. isInvisible: function Annotation_isInvisible() {
  2923. var data = this.data;
  2924. if (data && SUPPORTED_TYPES.indexOf(data.subtype) !== -1) {
  2925. return false;
  2926. } else {
  2927. return !!(data &&
  2928. data.annotationFlags && // Default: not invisible
  2929. data.annotationFlags & 0x1); // Invisible
  2930. }
  2931. },
  2932. isViewable: function Annotation_isViewable() {
  2933. var data = this.data;
  2934. return !!(!this.isInvisible() &&
  2935. data &&
  2936. (!data.annotationFlags ||
  2937. !(data.annotationFlags & 0x22)) && // Hidden or NoView
  2938. data.rect); // rectangle is nessessary
  2939. },
  2940. isPrintable: function Annotation_isPrintable() {
  2941. var data = this.data;
  2942. return !!(!this.isInvisible() &&
  2943. data &&
  2944. data.annotationFlags && // Default: not printable
  2945. data.annotationFlags & 0x4 && // Print
  2946. data.rect); // rectangle is nessessary
  2947. },
  2948. loadResources: function(keys) {
  2949. var promise = new LegacyPromise();
  2950. this.appearance.dict.getAsync('Resources').then(function(resources) {
  2951. if (!resources) {
  2952. promise.resolve();
  2953. return;
  2954. }
  2955. var objectLoader = new ObjectLoader(resources.map,
  2956. keys,
  2957. resources.xref);
  2958. objectLoader.load().then(function() {
  2959. promise.resolve(resources);
  2960. });
  2961. }.bind(this));
  2962. return promise;
  2963. },
  2964. getOperatorList: function Annotation_getOperatorList(evaluator) {
  2965. var promise = new LegacyPromise();
  2966. if (!this.appearance) {
  2967. promise.resolve(new OperatorList());
  2968. return promise;
  2969. }
  2970. var data = this.data;
  2971. var appearanceDict = this.appearance.dict;
  2972. var resourcesPromise = this.loadResources([
  2973. 'ExtGState',
  2974. 'ColorSpace',
  2975. 'Pattern',
  2976. 'Shading',
  2977. 'XObject',
  2978. 'Font'
  2979. // ProcSet
  2980. // Properties
  2981. ]);
  2982. var bbox = appearanceDict.get('BBox') || [0, 0, 1, 1];
  2983. var matrix = appearanceDict.get('Matrix') || [1, 0, 0, 1, 0 ,0];
  2984. var transform = getTransformMatrix(data.rect, bbox, matrix);
  2985. resourcesPromise.then(function(resources) {
  2986. var opList = new OperatorList();
  2987. opList.addOp(OPS.beginAnnotation, [data.rect, transform, matrix]);
  2988. evaluator.getOperatorList(this.appearance, resources, opList);
  2989. opList.addOp(OPS.endAnnotation, []);
  2990. promise.resolve(opList);
  2991. this.appearance.reset();
  2992. }.bind(this));
  2993. return promise;
  2994. }
  2995. };
  2996. Annotation.getConstructor =
  2997. function Annotation_getConstructor(subtype, fieldType) {
  2998. if (!subtype) {
  2999. return;
  3000. }
  3001. // TODO(mack): Implement FreeText annotations
  3002. if (subtype === 'Link') {
  3003. return LinkAnnotation;
  3004. } else if (subtype === 'Text') {
  3005. return TextAnnotation;
  3006. } else if (subtype === 'Widget') {
  3007. if (!fieldType) {
  3008. return;
  3009. }
  3010. if (fieldType === 'Tx') {
  3011. return TextWidgetAnnotation;
  3012. } else {
  3013. return WidgetAnnotation;
  3014. }
  3015. } else {
  3016. return Annotation;
  3017. }
  3018. };
  3019. // TODO(mack): Support loading annotation from data
  3020. Annotation.fromData = function Annotation_fromData(data) {
  3021. var subtype = data.subtype;
  3022. var fieldType = data.fieldType;
  3023. var Constructor = Annotation.getConstructor(subtype, fieldType);
  3024. if (Constructor) {
  3025. return new Constructor({ data: data });
  3026. }
  3027. };
  3028. Annotation.fromRef = function Annotation_fromRef(xref, ref) {
  3029. var dict = xref.fetchIfRef(ref);
  3030. if (!isDict(dict)) {
  3031. return;
  3032. }
  3033. var subtype = dict.get('Subtype');
  3034. subtype = isName(subtype) ? subtype.name : '';
  3035. if (!subtype) {
  3036. return;
  3037. }
  3038. var fieldType = Util.getInheritableProperty(dict, 'FT');
  3039. fieldType = isName(fieldType) ? fieldType.name : '';
  3040. var Constructor = Annotation.getConstructor(subtype, fieldType);
  3041. if (!Constructor) {
  3042. return;
  3043. }
  3044. var params = {
  3045. dict: dict,
  3046. ref: ref,
  3047. };
  3048. var annotation = new Constructor(params);
  3049. if (annotation.isViewable() || annotation.isPrintable()) {
  3050. return annotation;
  3051. } else {
  3052. warn('unimplemented annotation type: ' + subtype);
  3053. }
  3054. };
  3055. Annotation.appendToOperatorList = function Annotation_appendToOperatorList(
  3056. annotations, opList, pdfManager, partialEvaluator, intent) {
  3057. function reject(e) {
  3058. annotationsReadyPromise.reject(e);
  3059. }
  3060. var annotationsReadyPromise = new LegacyPromise();
  3061. var annotationPromises = [];
  3062. for (var i = 0, n = annotations.length; i < n; ++i) {
  3063. if (intent === 'display' && annotations[i].isViewable() ||
  3064. intent === 'print' && annotations[i].isPrintable()) {
  3065. annotationPromises.push(
  3066. annotations[i].getOperatorList(partialEvaluator));
  3067. }
  3068. }
  3069. Promise.all(annotationPromises).then(function(datas) {
  3070. opList.addOp(OPS.beginAnnotations, []);
  3071. for (var i = 0, n = datas.length; i < n; ++i) {
  3072. var annotOpList = datas[i];
  3073. opList.addOpList(annotOpList);
  3074. }
  3075. opList.addOp(OPS.endAnnotations, []);
  3076. annotationsReadyPromise.resolve();
  3077. }, reject);
  3078. return annotationsReadyPromise;
  3079. };
  3080. return Annotation;
  3081. })();
  3082. PDFJS.Annotation = Annotation;
  3083. var WidgetAnnotation = (function WidgetAnnotationClosure() {
  3084. function WidgetAnnotation(params) {
  3085. Annotation.call(this, params);
  3086. if (params.data) {
  3087. return;
  3088. }
  3089. var dict = params.dict;
  3090. var data = this.data;
  3091. data.fieldValue = stringToPDFString(
  3092. Util.getInheritableProperty(dict, 'V') || '');
  3093. data.alternativeText = stringToPDFString(dict.get('TU') || '');
  3094. data.defaultAppearance = Util.getInheritableProperty(dict, 'DA') || '';
  3095. var fieldType = Util.getInheritableProperty(dict, 'FT');
  3096. data.fieldType = isName(fieldType) ? fieldType.name : '';
  3097. data.fieldFlags = Util.getInheritableProperty(dict, 'Ff') || 0;
  3098. this.fieldResources = Util.getInheritableProperty(dict, 'DR') || Dict.empty;
  3099. // Building the full field name by collecting the field and
  3100. // its ancestors 'T' data and joining them using '.'.
  3101. var fieldName = [];
  3102. var namedItem = dict;
  3103. var ref = params.ref;
  3104. while (namedItem) {
  3105. var parent = namedItem.get('Parent');
  3106. var parentRef = namedItem.getRaw('Parent');
  3107. var name = namedItem.get('T');
  3108. if (name) {
  3109. fieldName.unshift(stringToPDFString(name));
  3110. } else {
  3111. // The field name is absent, that means more than one field
  3112. // with the same name may exist. Replacing the empty name
  3113. // with the '`' plus index in the parent's 'Kids' array.
  3114. // This is not in the PDF spec but necessary to id the
  3115. // the input controls.
  3116. var kids = parent.get('Kids');
  3117. var j, jj;
  3118. for (j = 0, jj = kids.length; j < jj; j++) {
  3119. var kidRef = kids[j];
  3120. if (kidRef.num == ref.num && kidRef.gen == ref.gen) {
  3121. break;
  3122. }
  3123. }
  3124. fieldName.unshift('`' + j);
  3125. }
  3126. namedItem = parent;
  3127. ref = parentRef;
  3128. }
  3129. data.fullName = fieldName.join('.');
  3130. }
  3131. var parent = Annotation.prototype;
  3132. Util.inherit(WidgetAnnotation, Annotation, {
  3133. isViewable: function WidgetAnnotation_isViewable() {
  3134. if (this.data.fieldType === 'Sig') {
  3135. warn('unimplemented annotation type: Widget signature');
  3136. return false;
  3137. }
  3138. return parent.isViewable.call(this);
  3139. }
  3140. });
  3141. return WidgetAnnotation;
  3142. })();
  3143. var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
  3144. function TextWidgetAnnotation(params) {
  3145. WidgetAnnotation.call(this, params);
  3146. if (params.data) {
  3147. return;
  3148. }
  3149. this.data.textAlignment = Util.getInheritableProperty(params.dict, 'Q');
  3150. }
  3151. // TODO(mack): This dupes some of the logic in CanvasGraphics.setFont()
  3152. function setTextStyles(element, item, fontObj) {
  3153. var style = element.style;
  3154. style.fontSize = item.fontSize + 'px';
  3155. style.direction = item.fontDirection < 0 ? 'rtl': 'ltr';
  3156. if (!fontObj) {
  3157. return;
  3158. }
  3159. style.fontWeight = fontObj.black ?
  3160. (fontObj.bold ? 'bolder' : 'bold') :
  3161. (fontObj.bold ? 'bold' : 'normal');
  3162. style.fontStyle = fontObj.italic ? 'italic' : 'normal';
  3163. var fontName = fontObj.loadedName;
  3164. var fontFamily = fontName ? '"' + fontName + '", ' : '';
  3165. // Use a reasonable default font if the font doesn't specify a fallback
  3166. var fallbackName = fontObj.fallbackName || 'Helvetica, sans-serif';
  3167. style.fontFamily = fontFamily + fallbackName;
  3168. }
  3169. Util.inherit(TextWidgetAnnotation, WidgetAnnotation, {
  3170. hasHtml: function TextWidgetAnnotation_hasHtml() {
  3171. return !this.data.hasAppearance && !!this.data.fieldValue;
  3172. },
  3173. getHtmlElement: function TextWidgetAnnotation_getHtmlElement(commonObjs) {
  3174. assert(!isWorker, 'getHtmlElement() shall be called from main thread');
  3175. var item = this.data;
  3176. var element = this.getEmptyContainer('div');
  3177. element.style.display = 'table';
  3178. var content = document.createElement('div');
  3179. content.textContent = item.fieldValue;
  3180. var textAlignment = item.textAlignment;
  3181. content.style.textAlign = ['left', 'center', 'right'][textAlignment];
  3182. content.style.verticalAlign = 'middle';
  3183. content.style.display = 'table-cell';
  3184. var fontObj = item.fontRefName ?
  3185. commonObjs.getData(item.fontRefName) : null;
  3186. setTextStyles(content, item, fontObj);
  3187. element.appendChild(content);
  3188. return element;
  3189. },
  3190. getOperatorList: function TextWidgetAnnotation_getOperatorList(evaluator) {
  3191. if (this.appearance) {
  3192. return Annotation.prototype.getOperatorList.call(this, evaluator);
  3193. }
  3194. var promise = new LegacyPromise();
  3195. var opList = new OperatorList();
  3196. var data = this.data;
  3197. // Even if there is an appearance stream, ignore it. This is the
  3198. // behaviour used by Adobe Reader.
  3199. var defaultAppearance = data.defaultAppearance;
  3200. if (!defaultAppearance) {
  3201. promise.resolve(opList);
  3202. return promise;
  3203. }
  3204. // Include any font resources found in the default appearance
  3205. var stream = new Stream(stringToBytes(defaultAppearance));
  3206. evaluator.getOperatorList(stream, this.fieldResources, opList);
  3207. var appearanceFnArray = opList.fnArray;
  3208. var appearanceArgsArray = opList.argsArray;
  3209. var fnArray = [];
  3210. // TODO(mack): Add support for stroke color
  3211. data.rgb = [0, 0, 0];
  3212. // TODO THIS DOESN'T MAKE ANY SENSE SINCE THE fnArray IS EMPTY!
  3213. for (var i = 0, n = fnArray.length; i < n; ++i) {
  3214. var fnId = appearanceFnArray[i];
  3215. var args = appearanceArgsArray[i];
  3216. if (fnId === OPS.setFont) {
  3217. data.fontRefName = args[0];
  3218. var size = args[1];
  3219. if (size < 0) {
  3220. data.fontDirection = -1;
  3221. data.fontSize = -size;
  3222. } else {
  3223. data.fontDirection = 1;
  3224. data.fontSize = size;
  3225. }
  3226. } else if (fnId === OPS.setFillRGBColor) {
  3227. data.rgb = args;
  3228. } else if (fnId === OPS.setFillGray) {
  3229. var rgbValue = args[0] * 255;
  3230. data.rgb = [rgbValue, rgbValue, rgbValue];
  3231. }
  3232. }
  3233. promise.resolve(opList);
  3234. return promise;
  3235. }
  3236. });
  3237. return TextWidgetAnnotation;
  3238. })();
  3239. var InteractiveAnnotation = (function InteractiveAnnotationClosure() {
  3240. function InteractiveAnnotation(params) {
  3241. Annotation.call(this, params);
  3242. }
  3243. Util.inherit(InteractiveAnnotation, Annotation, {
  3244. hasHtml: function InteractiveAnnotation_hasHtml() {
  3245. return true;
  3246. },
  3247. highlight: function InteractiveAnnotation_highlight() {
  3248. if (this.highlightElement &&
  3249. this.highlightElement.hasAttribute('hidden')) {
  3250. this.highlightElement.removeAttribute('hidden');
  3251. }
  3252. },
  3253. unhighlight: function InteractiveAnnotation_unhighlight() {
  3254. if (this.highlightElement &&
  3255. !this.highlightElement.hasAttribute('hidden')) {
  3256. this.highlightElement.setAttribute('hidden', true);
  3257. }
  3258. },
  3259. initContainer: function InteractiveAnnotation_initContainer() {
  3260. var item = this.data;
  3261. var rect = item.rect;
  3262. var container = this.getEmptyContainer('section', rect, item.borderWidth);
  3263. container.style.backgroundColor = item.color;
  3264. var color = item.color;
  3265. var rgb = [];
  3266. for (var i = 0; i < 3; ++i) {
  3267. rgb[i] = Math.round(color[i] * 255);
  3268. }
  3269. item.colorCssRgb = Util.makeCssRgb(rgb);
  3270. var highlight = document.createElement('div');
  3271. highlight.className = 'annotationHighlight';
  3272. highlight.style.left = highlight.style.top = -HIGHLIGHT_OFFSET + 'px';
  3273. highlight.style.right = highlight.style.bottom = -HIGHLIGHT_OFFSET + 'px';
  3274. highlight.setAttribute('hidden', true);
  3275. this.highlightElement = highlight;
  3276. container.appendChild(this.highlightElement);
  3277. return container;
  3278. }
  3279. });
  3280. return InteractiveAnnotation;
  3281. })();
  3282. var TextAnnotation = (function TextAnnotationClosure() {
  3283. function TextAnnotation(params) {
  3284. InteractiveAnnotation.call(this, params);
  3285. if (params.data) {
  3286. return;
  3287. }
  3288. var dict = params.dict;
  3289. var data = this.data;
  3290. var content = dict.get('Contents');
  3291. var title = dict.get('T');
  3292. data.content = stringToPDFString(content || '');
  3293. data.title = stringToPDFString(title || '');
  3294. if (data.hasAppearance) {
  3295. data.name = 'NoIcon';
  3296. } else {
  3297. data.rect[1] = data.rect[3] - DEFAULT_ICON_SIZE;
  3298. data.rect[2] = data.rect[0] + DEFAULT_ICON_SIZE;
  3299. data.name = dict.has('Name') ? dict.get('Name').name : 'Note';
  3300. }
  3301. if (dict.has('C')) {
  3302. data.hasBgColor = true;
  3303. }
  3304. }
  3305. var ANNOT_MIN_SIZE = 10;
  3306. Util.inherit(TextAnnotation, InteractiveAnnotation, {
  3307. getHtmlElement: function TextAnnotation_getHtmlElement(commonObjs) {
  3308. assert(!isWorker, 'getHtmlElement() shall be called from main thread');
  3309. var item = this.data;
  3310. var rect = item.rect;
  3311. // sanity check because of OOo-generated PDFs
  3312. if ((rect[3] - rect[1]) < ANNOT_MIN_SIZE) {
  3313. rect[3] = rect[1] + ANNOT_MIN_SIZE;
  3314. }
  3315. if ((rect[2] - rect[0]) < ANNOT_MIN_SIZE) {
  3316. rect[2] = rect[0] + (rect[3] - rect[1]); // make it square
  3317. }
  3318. var container = this.initContainer();
  3319. container.className = 'annotText';
  3320. var image = document.createElement('img');
  3321. image.style.height = container.style.height;
  3322. image.style.width = container.style.width;
  3323. var iconName = item.name;
  3324. image.src = PDFJS.imageResourcesPath + 'annotation-' +
  3325. iconName.toLowerCase() + '.svg';
  3326. image.alt = '[{{type}} Annotation]';
  3327. image.dataset.l10nId = 'text_annotation_type';
  3328. image.dataset.l10nArgs = JSON.stringify({type: iconName});
  3329. var contentWrapper = document.createElement('div');
  3330. contentWrapper.className = 'annotTextContentWrapper';
  3331. contentWrapper.style.left = Math.floor(rect[2] - rect[0] + 5) + 'px';
  3332. contentWrapper.style.top = '-10px';
  3333. var content = document.createElement('div');
  3334. content.className = 'annotTextContent';
  3335. content.setAttribute('hidden', true);
  3336. var i, ii;
  3337. if (item.hasBgColor) {
  3338. var color = item.color;
  3339. var rgb = [];
  3340. for (i = 0; i < 3; ++i) {
  3341. // Enlighten the color (70%)
  3342. var c = Math.round(color[i] * 255);
  3343. rgb[i] = Math.round((255 - c) * 0.7) + c;
  3344. }
  3345. content.style.backgroundColor = Util.makeCssRgb(rgb);
  3346. }
  3347. var title = document.createElement('h1');
  3348. var text = document.createElement('p');
  3349. title.textContent = item.title;
  3350. if (!item.content && !item.title) {
  3351. content.setAttribute('hidden', true);
  3352. } else {
  3353. var e = document.createElement('span');
  3354. var lines = item.content.split(/(?:\r\n?|\n)/);
  3355. for (i = 0, ii = lines.length; i < ii; ++i) {
  3356. var line = lines[i];
  3357. e.appendChild(document.createTextNode(line));
  3358. if (i < (ii - 1)) {
  3359. e.appendChild(document.createElement('br'));
  3360. }
  3361. }
  3362. text.appendChild(e);
  3363. var pinned = false;
  3364. var showAnnotation = function showAnnotation(pin) {
  3365. if (pin) {
  3366. pinned = true;
  3367. }
  3368. if (content.hasAttribute('hidden')) {
  3369. container.style.zIndex += 1;
  3370. content.removeAttribute('hidden');
  3371. }
  3372. };
  3373. var hideAnnotation = function hideAnnotation(unpin) {
  3374. if (unpin) {
  3375. pinned = false;
  3376. }
  3377. if (!content.hasAttribute('hidden') && !pinned) {
  3378. container.style.zIndex -= 1;
  3379. content.setAttribute('hidden', true);
  3380. }
  3381. };
  3382. var toggleAnnotation = function toggleAnnotation() {
  3383. if (pinned) {
  3384. hideAnnotation(true);
  3385. } else {
  3386. showAnnotation(true);
  3387. }
  3388. };
  3389. image.addEventListener('click', function image_clickHandler() {
  3390. toggleAnnotation();
  3391. }, false);
  3392. image.addEventListener('mouseover', function image_mouseOverHandler() {
  3393. showAnnotation();
  3394. }, false);
  3395. image.addEventListener('mouseout', function image_mouseOutHandler() {
  3396. hideAnnotation();
  3397. }, false);
  3398. content.addEventListener('click', function content_clickHandler() {
  3399. hideAnnotation(true);
  3400. }, false);
  3401. }
  3402. content.appendChild(title);
  3403. content.appendChild(text);
  3404. contentWrapper.appendChild(content);
  3405. container.appendChild(image);
  3406. container.appendChild(contentWrapper);
  3407. return container;
  3408. }
  3409. });
  3410. return TextAnnotation;
  3411. })();
  3412. var LinkAnnotation = (function LinkAnnotationClosure() {
  3413. function LinkAnnotation(params) {
  3414. InteractiveAnnotation.call(this, params);
  3415. if (params.data) {
  3416. return;
  3417. }
  3418. var dict = params.dict;
  3419. var data = this.data;
  3420. var action = dict.get('A');
  3421. if (action) {
  3422. var linkType = action.get('S').name;
  3423. if (linkType === 'URI') {
  3424. var url = action.get('URI');
  3425. if (isName(url)) {
  3426. // Some bad PDFs do not put parentheses around relative URLs.
  3427. url = '/' + url.name;
  3428. } else if (url) {
  3429. url = addDefaultProtocolToUrl(url);
  3430. }
  3431. // TODO: pdf spec mentions urls can be relative to a Base
  3432. // entry in the dictionary.
  3433. if (!isValidUrl(url, false)) {
  3434. url = '';
  3435. }
  3436. data.url = url;
  3437. } else if (linkType === 'GoTo') {
  3438. data.dest = action.get('D');
  3439. } else if (linkType === 'GoToR') {
  3440. var urlDict = action.get('F');
  3441. if (isDict(urlDict)) {
  3442. // We assume that the 'url' is a Filspec dictionary
  3443. // and fetch the url without checking any further
  3444. url = urlDict.get('F') || '';
  3445. }
  3446. // TODO: pdf reference says that GoToR
  3447. // can also have 'NewWindow' attribute
  3448. if (!isValidUrl(url, false)) {
  3449. url = '';
  3450. }
  3451. data.url = url;
  3452. data.dest = action.get('D');
  3453. } else if (linkType === 'Named') {
  3454. data.action = action.get('N').name;
  3455. } else {
  3456. warn('unrecognized link type: ' + linkType);
  3457. }
  3458. } else if (dict.has('Dest')) {
  3459. // simple destination link
  3460. var dest = dict.get('Dest');
  3461. data.dest = isName(dest) ? dest.name : dest;
  3462. }
  3463. }
  3464. // Lets URLs beginning with 'www.' default to using the 'http://' protocol.
  3465. function addDefaultProtocolToUrl(url) {
  3466. if (url && url.indexOf('www.') === 0) {
  3467. return ('http://' + url);
  3468. }
  3469. return url;
  3470. }
  3471. Util.inherit(LinkAnnotation, InteractiveAnnotation, {
  3472. hasOperatorList: function LinkAnnotation_hasOperatorList() {
  3473. return false;
  3474. },
  3475. getHtmlElement: function LinkAnnotation_getHtmlElement(commonObjs) {
  3476. var container = this.initContainer();
  3477. container.className = 'annotLink';
  3478. var item = this.data;
  3479. container.style.borderColor = item.colorCssRgb;
  3480. container.style.borderStyle = 'solid';
  3481. var link = document.createElement('a');
  3482. link.href = link.title = this.data.url || '';
  3483. container.appendChild(link);
  3484. return container;
  3485. }
  3486. });
  3487. return LinkAnnotation;
  3488. })();
  3489. /**
  3490. * The maximum allowed image size in total pixels e.g. width * height. Images
  3491. * above this value will not be drawn. Use -1 for no limit.
  3492. * @var {number}
  3493. */
  3494. PDFJS.maxImageSize = (PDFJS.maxImageSize === undefined ?
  3495. -1 : PDFJS.maxImageSize);
  3496. /**
  3497. * The url of where the predefined Adobe CMaps are located. Include trailing
  3498. * slash.
  3499. * @var {string}
  3500. */
  3501. PDFJS.cMapUrl = (PDFJS.cMapUrl === undefined ? null : PDFJS.cMapUrl);
  3502. /**
  3503. * Specifies if CMaps are binary packed.
  3504. * @var {boolean}
  3505. */
  3506. PDFJS.cMapPacked = PDFJS.cMapPacked === undefined ? false : PDFJS.cMapPacked;
  3507. /*
  3508. * By default fonts are converted to OpenType fonts and loaded via font face
  3509. * rules. If disabled, the font will be rendered using a built in font renderer
  3510. * that constructs the glyphs with primitive path commands.
  3511. * @var {boolean}
  3512. */
  3513. PDFJS.disableFontFace = (PDFJS.disableFontFace === undefined ?
  3514. false : PDFJS.disableFontFace);
  3515. /**
  3516. * Path for image resources, mainly for annotation icons. Include trailing
  3517. * slash.
  3518. * @var {string}
  3519. */
  3520. PDFJS.imageResourcesPath = (PDFJS.imageResourcesPath === undefined ?
  3521. '' : PDFJS.imageResourcesPath);
  3522. /**
  3523. * Disable the web worker and run all code on the main thread. This will happen
  3524. * automatically if the browser doesn't support workers or sending typed arrays
  3525. * to workers.
  3526. * @var {boolean}
  3527. */
  3528. PDFJS.disableWorker = (PDFJS.disableWorker === undefined ?
  3529. false : PDFJS.disableWorker);
  3530. /**
  3531. * Path and filename of the worker file. Required when the worker is enabled in
  3532. * development mode. If unspecified in the production build, the worker will be
  3533. * loaded based on the location of the pdf.js file.
  3534. * @var {string}
  3535. */
  3536. PDFJS.workerSrc = (PDFJS.workerSrc === undefined ? null : PDFJS.workerSrc);
  3537. /**
  3538. * Disable range request loading of PDF files. When enabled and if the server
  3539. * supports partial content requests then the PDF will be fetched in chunks.
  3540. * Enabled (false) by default.
  3541. * @var {boolean}
  3542. */
  3543. PDFJS.disableRange = (PDFJS.disableRange === undefined ?
  3544. false : PDFJS.disableRange);
  3545. /**
  3546. * Disable pre-fetching of PDF file data. When range requests are enabled PDF.js
  3547. * will automatically keep fetching more data even if it isn't needed to display
  3548. * the current page. This default behavior can be disabled.
  3549. * @var {boolean}
  3550. */
  3551. PDFJS.disableAutoFetch = (PDFJS.disableAutoFetch === undefined ?
  3552. false : PDFJS.disableAutoFetch);
  3553. /**
  3554. * Enables special hooks for debugging PDF.js.
  3555. * @var {boolean}
  3556. */
  3557. PDFJS.pdfBug = (PDFJS.pdfBug === undefined ? false : PDFJS.pdfBug);
  3558. /**
  3559. * Enables transfer usage in postMessage for ArrayBuffers.
  3560. * @var {boolean}
  3561. */
  3562. PDFJS.postMessageTransfers = (PDFJS.postMessageTransfers === undefined ?
  3563. true : PDFJS.postMessageTransfers);
  3564. /**
  3565. * Disables URL.createObjectURL usage.
  3566. * @var {boolean}
  3567. */
  3568. PDFJS.disableCreateObjectURL = (PDFJS.disableCreateObjectURL === undefined ?
  3569. false : PDFJS.disableCreateObjectURL);
  3570. /**
  3571. * Disables WebGL usage.
  3572. * @var {boolean}
  3573. */
  3574. PDFJS.disableWebGL = (PDFJS.disableWebGL === undefined ?
  3575. true : PDFJS.disableWebGL);
  3576. /**
  3577. * Controls the logging level.
  3578. * The constants from PDFJS.VERBOSITY_LEVELS should be used:
  3579. * - errors
  3580. * - warnings [default]
  3581. * - infos
  3582. * @var {number}
  3583. */
  3584. PDFJS.verbosity = (PDFJS.verbosity === undefined ?
  3585. PDFJS.VERBOSITY_LEVELS.warnings : PDFJS.verbosity);
  3586. /**
  3587. * Document initialization / loading parameters object.
  3588. *
  3589. * @typedef {Object} DocumentInitParameters
  3590. * @property {string} url - The URL of the PDF.
  3591. * @property {TypedArray} data - A typed array with PDF data.
  3592. * @property {Object} httpHeaders - Basic authentication headers.
  3593. * @property {boolean} withCredentials - Indicates whether or not cross-site
  3594. * Access-Control requests should be made using credentials such as cookies
  3595. * or authorization headers. The default is false.
  3596. * @property {string} password - For decrypting password-protected PDFs.
  3597. * @property {TypedArray} initialData - A typed array with the first portion or
  3598. * all of the pdf data. Used by the extension since some data is already
  3599. * loaded before the switch to range requests.
  3600. */
  3601. /**
  3602. * This is the main entry point for loading a PDF and interacting with it.
  3603. * NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR)
  3604. * is used, which means it must follow the same origin rules that any XHR does
  3605. * e.g. No cross domain requests without CORS.
  3606. *
  3607. * @param {string|TypedArray|DocumentInitParameters} source Can be a url to
  3608. * where a PDF is located, a typed array (Uint8Array) already populated with
  3609. * data or parameter object.
  3610. *
  3611. * @param {Object} pdfDataRangeTransport is optional. It is used if you want
  3612. * to manually serve range requests for data in the PDF. See viewer.js for
  3613. * an example of pdfDataRangeTransport's interface.
  3614. *
  3615. * @param {function} passwordCallback is optional. It is used to request a
  3616. * password if wrong or no password was provided. The callback receives two
  3617. * parameters: function that needs to be called with new password and reason
  3618. * (see {PasswordResponses}).
  3619. *
  3620. * @return {Promise} A promise that is resolved with {@link PDFDocumentProxy}
  3621. * object.
  3622. */
  3623. PDFJS.getDocument = function getDocument(source,
  3624. pdfDataRangeTransport,
  3625. passwordCallback,
  3626. progressCallback) {
  3627. var workerInitializedPromise, workerReadyPromise, transport;
  3628. if (typeof source === 'string') {
  3629. source = { url: source };
  3630. } else if (isArrayBuffer(source)) {
  3631. source = { data: source };
  3632. } else if (typeof source !== 'object') {
  3633. error('Invalid parameter in getDocument, need either Uint8Array, ' +
  3634. 'string or a parameter object');
  3635. }
  3636. if (!source.url && !source.data) {
  3637. error('Invalid parameter array, need either .data or .url');
  3638. }
  3639. // copy/use all keys as is except 'url' -- full path is required
  3640. var params = {};
  3641. for (var key in source) {
  3642. if (key === 'url' && typeof window !== 'undefined') {
  3643. params[key] = combineUrl(window.location.href, source[key]);
  3644. continue;
  3645. }
  3646. params[key] = source[key];
  3647. }
  3648. workerInitializedPromise = new PDFJS.LegacyPromise();
  3649. workerReadyPromise = new PDFJS.LegacyPromise();
  3650. transport = new WorkerTransport(workerInitializedPromise, workerReadyPromise,
  3651. pdfDataRangeTransport, progressCallback);
  3652. workerInitializedPromise.then(function transportInitialized() {
  3653. transport.passwordCallback = passwordCallback;
  3654. transport.fetchDocument(params);
  3655. });
  3656. return workerReadyPromise;
  3657. };
  3658. /**
  3659. * Proxy to a PDFDocument in the worker thread. Also, contains commonly used
  3660. * properties that can be read synchronously.
  3661. * @class
  3662. */
  3663. var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
  3664. function PDFDocumentProxy(pdfInfo, transport) {
  3665. this.pdfInfo = pdfInfo;
  3666. this.transport = transport;
  3667. }
  3668. PDFDocumentProxy.prototype = /** @lends PDFDocumentProxy.prototype */ {
  3669. /**
  3670. * @return {number} Total number of pages the PDF contains.
  3671. */
  3672. get numPages() {
  3673. return this.pdfInfo.numPages;
  3674. },
  3675. /**
  3676. * @return {string} A unique ID to identify a PDF. Not guaranteed to be
  3677. * unique.
  3678. */
  3679. get fingerprint() {
  3680. return this.pdfInfo.fingerprint;
  3681. },
  3682. /**
  3683. * @param {number} pageNumber The page number to get. The first page is 1.
  3684. * @return {Promise} A promise that is resolved with a {@link PDFPageProxy}
  3685. * object.
  3686. */
  3687. getPage: function PDFDocumentProxy_getPage(pageNumber) {
  3688. return this.transport.getPage(pageNumber);
  3689. },
  3690. /**
  3691. * @param {{num: number, gen: number}} ref The page reference. Must have
  3692. * the 'num' and 'gen' properties.
  3693. * @return {Promise} A promise that is resolved with the page index that is
  3694. * associated with the reference.
  3695. */
  3696. getPageIndex: function PDFDocumentProxy_getPageIndex(ref) {
  3697. return this.transport.getPageIndex(ref);
  3698. },
  3699. /**
  3700. * @return {Promise} A promise that is resolved with a lookup table for
  3701. * mapping named destinations to reference numbers.
  3702. */
  3703. getDestinations: function PDFDocumentProxy_getDestinations() {
  3704. return this.transport.getDestinations();
  3705. },
  3706. /**
  3707. * @return {Promise} A promise that is resolved with a lookup table for
  3708. * mapping named attachments to their content.
  3709. */
  3710. getAttachments: function PDFDocumentProxy_getAttachments() {
  3711. return this.transport.getAttachments();
  3712. },
  3713. /**
  3714. * @return {Promise} A promise that is resolved with an array of all the
  3715. * JavaScript strings in the name tree.
  3716. */
  3717. getJavaScript: function PDFDocumentProxy_getJavaScript() {
  3718. var promise = new PDFJS.LegacyPromise();
  3719. var js = this.pdfInfo.javaScript;
  3720. promise.resolve(js);
  3721. return promise;
  3722. },
  3723. /**
  3724. * @return {Promise} A promise that is resolved with an {Array} that is a
  3725. * tree outline (if it has one) of the PDF. The tree is in the format of:
  3726. * [
  3727. * {
  3728. * title: string,
  3729. * bold: boolean,
  3730. * italic: boolean,
  3731. * color: rgb array,
  3732. * dest: dest obj,
  3733. * items: array of more items like this
  3734. * },
  3735. * ...
  3736. * ].
  3737. */
  3738. getOutline: function PDFDocumentProxy_getOutline() {
  3739. var promise = new PDFJS.LegacyPromise();
  3740. var outline = this.pdfInfo.outline;
  3741. promise.resolve(outline);
  3742. return promise;
  3743. },
  3744. /**
  3745. * @return {Promise} A promise that is resolved with an {Object} that has
  3746. * info and metadata properties. Info is an {Object} filled with anything
  3747. * available in the information dictionary and similarly metadata is a
  3748. * {Metadata} object with information from the metadata section of the PDF.
  3749. */
  3750. getMetadata: function PDFDocumentProxy_getMetadata() {
  3751. var promise = new PDFJS.LegacyPromise();
  3752. var info = this.pdfInfo.info;
  3753. var metadata = this.pdfInfo.metadata;
  3754. promise.resolve({
  3755. info: info,
  3756. metadata: (metadata ? new PDFJS.Metadata(metadata) : null)
  3757. });
  3758. return promise;
  3759. },
  3760. /**
  3761. * @return {Promise} A promise that is resolved with a TypedArray that has
  3762. * the raw data from the PDF.
  3763. */
  3764. getData: function PDFDocumentProxy_getData() {
  3765. var promise = new PDFJS.LegacyPromise();
  3766. this.transport.getData(promise);
  3767. return promise;
  3768. },
  3769. /**
  3770. * @return {Promise} A promise that is resolved when the document's data
  3771. * is loaded. It is resolved with an {Object} that contains the length
  3772. * property that indicates size of the PDF data in bytes.
  3773. */
  3774. getDownloadInfo: function PDFDocumentProxy_getDownloadInfo() {
  3775. return this.transport.downloadInfoPromise;
  3776. },
  3777. /**
  3778. * Cleans up resources allocated by the document, e.g. created @font-face.
  3779. */
  3780. cleanup: function PDFDocumentProxy_cleanup() {
  3781. this.transport.startCleanup();
  3782. },
  3783. /**
  3784. * Destroys current document instance and terminates worker.
  3785. */
  3786. destroy: function PDFDocumentProxy_destroy() {
  3787. this.transport.destroy();
  3788. }
  3789. };
  3790. return PDFDocumentProxy;
  3791. })();
  3792. /**
  3793. * Page text content.
  3794. *
  3795. * @typedef {Object} TextContent
  3796. * @property {array} items - array of {@link TextItem}
  3797. * @property {Object} styles - {@link TextStyles} objects, indexed by font
  3798. * name.
  3799. */
  3800. /**
  3801. * Page text content part.
  3802. *
  3803. * @typedef {Object} TextItem
  3804. * @property {string} str - text content.
  3805. * @property {string} dir - text direction: 'ttb', 'ltr' or 'rtl'.
  3806. * @property {array} transform - transformation matrix.
  3807. * @property {number} width - width in device space.
  3808. * @property {number} height - height in device space.
  3809. * @property {string} fontName - font name used by pdf.js for converted font.
  3810. */
  3811. /**
  3812. * Text style.
  3813. *
  3814. * @typedef {Object} TextStyle
  3815. * @property {number} ascent - font ascent.
  3816. * @property {number} descent - font descent.
  3817. * @property {boolean} vertical - text is in vertical mode.
  3818. * @property {string} fontFamily - possible font family
  3819. */
  3820. /**
  3821. * Page render parameters.
  3822. *
  3823. * @typedef {Object} RenderParameters
  3824. * @property {Object} canvasContext - A 2D context of a DOM Canvas object.
  3825. * @property {PageViewport} viewport - Rendering viewport obtained by
  3826. * calling of PDFPage.getViewport method.
  3827. * @property {string} intent - Rendering intent, can be 'display' or 'print'
  3828. * (default value is 'display').
  3829. * @property {Object} imageLayer - (optional) An object that has beginLayout,
  3830. * endLayout and appendImage functions.
  3831. * @property {function} continueCallback - (optional) A function that will be
  3832. * called each time the rendering is paused. To continue
  3833. * rendering call the function that is the first argument
  3834. * to the callback.
  3835. */
  3836. /**
  3837. * Proxy to a PDFPage in the worker thread.
  3838. * @class
  3839. */
  3840. var PDFPageProxy = (function PDFPageProxyClosure() {
  3841. function PDFPageProxy(pageInfo, transport) {
  3842. this.pageInfo = pageInfo;
  3843. this.transport = transport;
  3844. this.stats = new StatTimer();
  3845. this.stats.enabled = !!globalScope.PDFJS.enableStats;
  3846. this.commonObjs = transport.commonObjs;
  3847. this.objs = new PDFObjects();
  3848. this.cleanupAfterRender = false;
  3849. this.pendingDestroy = false;
  3850. this.intentStates = {};
  3851. }
  3852. PDFPageProxy.prototype = /** @lends PDFPageProxy.prototype */ {
  3853. /**
  3854. * @return {number} Page number of the page. First page is 1.
  3855. */
  3856. get pageNumber() {
  3857. return this.pageInfo.pageIndex + 1;
  3858. },
  3859. /**
  3860. * @return {number} The number of degrees the page is rotated clockwise.
  3861. */
  3862. get rotate() {
  3863. return this.pageInfo.rotate;
  3864. },
  3865. /**
  3866. * @return {Object} The reference that points to this page. It has 'num' and
  3867. * 'gen' properties.
  3868. */
  3869. get ref() {
  3870. return this.pageInfo.ref;
  3871. },
  3872. /**
  3873. * @return {Array} An array of the visible portion of the PDF page in the
  3874. * user space units - [x1, y1, x2, y2].
  3875. */
  3876. get view() {
  3877. return this.pageInfo.view;
  3878. },
  3879. /**
  3880. * @param {number} scale The desired scale of the viewport.
  3881. * @param {number} rotate Degrees to rotate the viewport. If omitted this
  3882. * defaults to the page rotation.
  3883. * @return {PageViewport} Contains 'width' and 'height' properties along
  3884. * with transforms required for rendering.
  3885. */
  3886. getViewport: function PDFPageProxy_getViewport(scale, rotate) {
  3887. if (arguments.length < 2) {
  3888. rotate = this.rotate;
  3889. }
  3890. return new PDFJS.PageViewport(this.view, scale, rotate, 0, 0);
  3891. },
  3892. /**
  3893. * @return {Promise} A promise that is resolved with an {Array} of the
  3894. * annotation objects.
  3895. */
  3896. getAnnotations: function PDFPageProxy_getAnnotations() {
  3897. if (this.annotationsPromise) {
  3898. return this.annotationsPromise;
  3899. }
  3900. var promise = new PDFJS.LegacyPromise();
  3901. this.annotationsPromise = promise;
  3902. this.transport.getAnnotations(this.pageInfo.pageIndex);
  3903. return promise;
  3904. },
  3905. /**
  3906. * Begins the process of rendering a page to the desired context.
  3907. * @param {RenderParameters} params Page render parameters.
  3908. * @return {RenderTask} An object that contains the promise, which
  3909. * is resolved when the page finishes rendering.
  3910. */
  3911. render: function PDFPageProxy_render(params) {
  3912. var stats = this.stats;
  3913. stats.time('Overall');
  3914. // If there was a pending destroy cancel it so no cleanup happens during
  3915. // this call to render.
  3916. this.pendingDestroy = false;
  3917. var renderingIntent = ('intent' in params ?
  3918. (params.intent == 'print' ? 'print' : 'display') : 'display');
  3919. if (!this.intentStates[renderingIntent]) {
  3920. this.intentStates[renderingIntent] = {};
  3921. }
  3922. var intentState = this.intentStates[renderingIntent];
  3923. // If there is no displayReadyPromise yet, then the operatorList was never
  3924. // requested before. Make the request and create the promise.
  3925. if (!intentState.displayReadyPromise) {
  3926. intentState.receivingOperatorList = true;
  3927. intentState.displayReadyPromise = new LegacyPromise();
  3928. intentState.operatorList = {
  3929. fnArray: [],
  3930. argsArray: [],
  3931. lastChunk: false
  3932. };
  3933. this.stats.time('Page Request');
  3934. this.transport.messageHandler.send('RenderPageRequest', {
  3935. pageIndex: this.pageNumber - 1,
  3936. intent: renderingIntent
  3937. });
  3938. }
  3939. var internalRenderTask = new InternalRenderTask(complete, params,
  3940. this.objs,
  3941. this.commonObjs,
  3942. intentState.operatorList,
  3943. this.pageNumber);
  3944. if (!intentState.renderTasks) {
  3945. intentState.renderTasks = [];
  3946. }
  3947. intentState.renderTasks.push(internalRenderTask);
  3948. var renderTask = new RenderTask(internalRenderTask);
  3949. var self = this;
  3950. intentState.displayReadyPromise.then(
  3951. function pageDisplayReadyPromise(transparency) {
  3952. if (self.pendingDestroy) {
  3953. complete();
  3954. return;
  3955. }
  3956. stats.time('Rendering');
  3957. internalRenderTask.initalizeGraphics(transparency);
  3958. internalRenderTask.operatorListChanged();
  3959. },
  3960. function pageDisplayReadPromiseError(reason) {
  3961. complete(reason);
  3962. }
  3963. );
  3964. function complete(error) {
  3965. var i = intentState.renderTasks.indexOf(internalRenderTask);
  3966. if (i >= 0) {
  3967. intentState.renderTasks.splice(i, 1);
  3968. }
  3969. if (self.cleanupAfterRender) {
  3970. self.pendingDestroy = true;
  3971. }
  3972. self._tryDestroy();
  3973. if (error) {
  3974. renderTask.promise.reject(error);
  3975. } else {
  3976. renderTask.promise.resolve();
  3977. }
  3978. stats.timeEnd('Rendering');
  3979. stats.timeEnd('Overall');
  3980. }
  3981. return renderTask;
  3982. },
  3983. /**
  3984. * @return {Promise} That is resolved a {@link TextContent}
  3985. * object that represent the page text content.
  3986. */
  3987. getTextContent: function PDFPageProxy_getTextContent() {
  3988. var promise = new PDFJS.LegacyPromise();
  3989. this.transport.messageHandler.send('GetTextContent', {
  3990. pageIndex: this.pageNumber - 1
  3991. },
  3992. function textContentCallback(textContent) {
  3993. promise.resolve(textContent);
  3994. }
  3995. );
  3996. return promise;
  3997. },
  3998. /**
  3999. * Destroys resources allocated by the page.
  4000. */
  4001. destroy: function PDFPageProxy_destroy() {
  4002. this.pendingDestroy = true;
  4003. this._tryDestroy();
  4004. },
  4005. /**
  4006. * For internal use only. Attempts to clean up if rendering is in a state
  4007. * where that's possible.
  4008. * @ignore
  4009. */
  4010. _tryDestroy: function PDFPageProxy__destroy() {
  4011. if (!this.pendingDestroy ||
  4012. Object.keys(this.intentStates).some(function(intent) {
  4013. var intentState = this.intentStates[intent];
  4014. return (intentState.renderTasks.length !== 0 ||
  4015. intentState.receivingOperatorList);
  4016. }, this)) {
  4017. return;
  4018. }
  4019. Object.keys(this.intentStates).forEach(function(intent) {
  4020. delete this.intentStates[intent];
  4021. }, this);
  4022. this.objs.clear();
  4023. this.pendingDestroy = false;
  4024. },
  4025. /**
  4026. * For internal use only.
  4027. * @ignore
  4028. */
  4029. _startRenderPage: function PDFPageProxy_startRenderPage(transparency,
  4030. intent) {
  4031. var intentState = this.intentStates[intent];
  4032. intentState.displayReadyPromise.resolve(transparency);
  4033. },
  4034. /**
  4035. * For internal use only.
  4036. * @ignore
  4037. */
  4038. _renderPageChunk: function PDFPageProxy_renderPageChunk(operatorListChunk,
  4039. intent) {
  4040. var intentState = this.intentStates[intent];
  4041. var i, ii;
  4042. // Add the new chunk to the current operator list.
  4043. for (i = 0, ii = operatorListChunk.length; i < ii; i++) {
  4044. intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);
  4045. intentState.operatorList.argsArray.push(
  4046. operatorListChunk.argsArray[i]);
  4047. }
  4048. intentState.operatorList.lastChunk = operatorListChunk.lastChunk;
  4049. // Notify all the rendering tasks there are more operators to be consumed.
  4050. for (i = 0; i < intentState.renderTasks.length; i++) {
  4051. intentState.renderTasks[i].operatorListChanged();
  4052. }
  4053. if (operatorListChunk.lastChunk) {
  4054. intentState.receivingOperatorList = false;
  4055. this._tryDestroy();
  4056. }
  4057. }
  4058. };
  4059. return PDFPageProxy;
  4060. })();
  4061. /**
  4062. * For internal use only.
  4063. * @ignore
  4064. */
  4065. var WorkerTransport = (function WorkerTransportClosure() {
  4066. function WorkerTransport(workerInitializedPromise, workerReadyPromise,
  4067. pdfDataRangeTransport, progressCallback) {
  4068. this.pdfDataRangeTransport = pdfDataRangeTransport;
  4069. this.workerReadyPromise = workerReadyPromise;
  4070. this.progressCallback = progressCallback;
  4071. this.commonObjs = new PDFObjects();
  4072. this.pageCache = [];
  4073. this.pagePromises = [];
  4074. this.downloadInfoPromise = new PDFJS.LegacyPromise();
  4075. this.passwordCallback = null;
  4076. // If worker support isn't disabled explicit and the browser has worker
  4077. // support, create a new web worker and test if it/the browser fullfills
  4078. // all requirements to run parts of pdf.js in a web worker.
  4079. // Right now, the requirement is, that an Uint8Array is still an Uint8Array
  4080. // as it arrives on the worker. Chrome added this with version 15.
  4081. // Either workers are disabled, not supported or have thrown an exception.
  4082. // Thus, we fallback to a faked worker.
  4083. globalScope.PDFJS.disableWorker = true;
  4084. this.loadFakeWorkerFiles().then(function() {
  4085. this.setupFakeWorker();
  4086. workerInitializedPromise.resolve();
  4087. }.bind(this));
  4088. }
  4089. WorkerTransport.prototype = {
  4090. destroy: function WorkerTransport_destroy() {
  4091. this.pageCache = [];
  4092. this.pagePromises = [];
  4093. var self = this;
  4094. this.messageHandler.send('Terminate', null, function () {
  4095. FontLoader.clear();
  4096. if (self.worker) {
  4097. self.worker.terminate();
  4098. }
  4099. });
  4100. },
  4101. loadFakeWorkerFiles: function WorkerTransport_loadFakeWorkerFiles() {
  4102. if (!PDFJS.fakeWorkerFilesLoadedPromise) {
  4103. PDFJS.fakeWorkerFilesLoadedPromise = new LegacyPromise();
  4104. // In the developer build load worker_loader which in turn loads all the
  4105. // other files and resolves the promise. In production only the
  4106. // pdf.worker.js file is needed.
  4107. PDFJS.fakeWorkerFilesLoadedPromise.resolve();
  4108. }
  4109. return PDFJS.fakeWorkerFilesLoadedPromise;
  4110. },
  4111. setupFakeWorker: function WorkerTransport_setupFakeWorker() {
  4112. warn('Setting up fake worker.');
  4113. // If we don't use a worker, just post/sendMessage to the main thread.
  4114. var fakeWorker = {
  4115. postMessage: function WorkerTransport_postMessage(obj) {
  4116. fakeWorker.onmessage({data: obj});
  4117. },
  4118. terminate: function WorkerTransport_terminate() {}
  4119. };
  4120. var messageHandler = new MessageHandler('main', fakeWorker);
  4121. this.setupMessageHandler(messageHandler);
  4122. // If the main thread is our worker, setup the handling for the messages
  4123. // the main thread sends to it self.
  4124. PDFJS.WorkerMessageHandler.setup(messageHandler);
  4125. },
  4126. setupMessageHandler:
  4127. function WorkerTransport_setupMessageHandler(messageHandler) {
  4128. this.messageHandler = messageHandler;
  4129. function updatePassword(password) {
  4130. messageHandler.send('UpdatePassword', password);
  4131. }
  4132. var pdfDataRangeTransport = this.pdfDataRangeTransport;
  4133. if (pdfDataRangeTransport) {
  4134. pdfDataRangeTransport.addRangeListener(function(begin, chunk) {
  4135. messageHandler.send('OnDataRange', {
  4136. begin: begin,
  4137. chunk: chunk
  4138. });
  4139. });
  4140. pdfDataRangeTransport.addProgressListener(function(loaded) {
  4141. messageHandler.send('OnDataProgress', {
  4142. loaded: loaded
  4143. });
  4144. });
  4145. messageHandler.on('RequestDataRange',
  4146. function transportDataRange(data) {
  4147. pdfDataRangeTransport.requestDataRange(data.begin, data.end);
  4148. }, this);
  4149. }
  4150. messageHandler.on('GetDoc', function transportDoc(data) {
  4151. var pdfInfo = data.pdfInfo;
  4152. this.numPages = data.pdfInfo.numPages;
  4153. var pdfDocument = new PDFDocumentProxy(pdfInfo, this);
  4154. this.pdfDocument = pdfDocument;
  4155. this.workerReadyPromise.resolve(pdfDocument);
  4156. }, this);
  4157. messageHandler.on('NeedPassword', function transportPassword(data) {
  4158. if (this.passwordCallback) {
  4159. return this.passwordCallback(updatePassword,
  4160. PasswordResponses.NEED_PASSWORD);
  4161. }
  4162. this.workerReadyPromise.reject(data.exception.message, data.exception);
  4163. }, this);
  4164. messageHandler.on('IncorrectPassword', function transportBadPass(data) {
  4165. if (this.passwordCallback) {
  4166. return this.passwordCallback(updatePassword,
  4167. PasswordResponses.INCORRECT_PASSWORD);
  4168. }
  4169. this.workerReadyPromise.reject(data.exception.message, data.exception);
  4170. }, this);
  4171. messageHandler.on('InvalidPDF', function transportInvalidPDF(data) {
  4172. this.workerReadyPromise.reject(data.exception.name, data.exception);
  4173. }, this);
  4174. messageHandler.on('MissingPDF', function transportMissingPDF(data) {
  4175. this.workerReadyPromise.reject(data.exception.message, data.exception);
  4176. }, this);
  4177. messageHandler.on('UnknownError', function transportUnknownError(data) {
  4178. this.workerReadyPromise.reject(data.exception.message, data.exception);
  4179. }, this);
  4180. messageHandler.on('DataLoaded', function transportPage(data) {
  4181. this.downloadInfoPromise.resolve(data);
  4182. }, this);
  4183. messageHandler.on('GetPage', function transportPage(data) {
  4184. var pageInfo = data.pageInfo;
  4185. var page = new PDFPageProxy(pageInfo, this);
  4186. this.pageCache[pageInfo.pageIndex] = page;
  4187. var promise = this.pagePromises[pageInfo.pageIndex];
  4188. promise.resolve(page);
  4189. }, this);
  4190. messageHandler.on('GetAnnotations', function transportAnnotations(data) {
  4191. var annotations = data.annotations;
  4192. var promise = this.pageCache[data.pageIndex].annotationsPromise;
  4193. promise.resolve(annotations);
  4194. }, this);
  4195. messageHandler.on('StartRenderPage', function transportRender(data) {
  4196. var page = this.pageCache[data.pageIndex];
  4197. page.stats.timeEnd('Page Request');
  4198. page._startRenderPage(data.transparency, data.intent);
  4199. }, this);
  4200. messageHandler.on('RenderPageChunk', function transportRender(data) {
  4201. var page = this.pageCache[data.pageIndex];
  4202. page._renderPageChunk(data.operatorList, data.intent);
  4203. }, this);
  4204. messageHandler.on('commonobj', function transportObj(data) {
  4205. var id = data[0];
  4206. var type = data[1];
  4207. if (this.commonObjs.hasData(id)) {
  4208. return;
  4209. }
  4210. switch (type) {
  4211. case 'Font':
  4212. var exportedData = data[2];
  4213. var font;
  4214. if ('error' in exportedData) {
  4215. var error = exportedData.error;
  4216. warn('Error during font loading: ' + error);
  4217. this.commonObjs.resolve(id, error);
  4218. break;
  4219. } else {
  4220. font = new FontFace(exportedData);
  4221. }
  4222. FontLoader.bind(
  4223. [font],
  4224. function fontReady(fontObjs) {
  4225. this.commonObjs.resolve(id, font);
  4226. }.bind(this)
  4227. );
  4228. break;
  4229. case 'FontPath':
  4230. this.commonObjs.resolve(id, data[2]);
  4231. break;
  4232. default:
  4233. error('Got unknown common object type ' + type);
  4234. }
  4235. }, this);
  4236. messageHandler.on('obj', function transportObj(data) {
  4237. var id = data[0];
  4238. var pageIndex = data[1];
  4239. var type = data[2];
  4240. var pageProxy = this.pageCache[pageIndex];
  4241. var imageData;
  4242. if (pageProxy.objs.hasData(id)) {
  4243. return;
  4244. }
  4245. switch (type) {
  4246. case 'JpegStream':
  4247. imageData = data[3];
  4248. loadJpegStream(id, imageData, pageProxy.objs);
  4249. break;
  4250. case 'Image':
  4251. imageData = data[3];
  4252. pageProxy.objs.resolve(id, imageData);
  4253. // heuristics that will allow not to store large data
  4254. var MAX_IMAGE_SIZE_TO_STORE = 8000000;
  4255. if (imageData && 'data' in imageData &&
  4256. imageData.data.length > MAX_IMAGE_SIZE_TO_STORE) {
  4257. pageProxy.cleanupAfterRender = true;
  4258. }
  4259. break;
  4260. default:
  4261. error('Got unknown object type ' + type);
  4262. }
  4263. }, this);
  4264. messageHandler.on('DocProgress', function transportDocProgress(data) {
  4265. if (this.progressCallback) {
  4266. this.progressCallback({
  4267. loaded: data.loaded,
  4268. total: data.total
  4269. });
  4270. }
  4271. }, this);
  4272. messageHandler.on('DocError', function transportDocError(data) {
  4273. this.workerReadyPromise.reject(data);
  4274. }, this);
  4275. messageHandler.on('PageError', function transportError(data, intent) {
  4276. var page = this.pageCache[data.pageNum - 1];
  4277. var intentState = page.intentStates[intent];
  4278. if (intentState.displayReadyPromise) {
  4279. intentState.displayReadyPromise.reject(data.error);
  4280. } else {
  4281. error(data.error);
  4282. }
  4283. }, this);
  4284. messageHandler.on('JpegDecode', function(data, deferred) {
  4285. var imageUrl = data[0];
  4286. var components = data[1];
  4287. if (components != 3 && components != 1) {
  4288. error('Only 3 component or 1 component can be returned');
  4289. }
  4290. var img = new Image();
  4291. img.onload = (function messageHandler_onloadClosure() {
  4292. var width = img.width;
  4293. var height = img.height;
  4294. var size = width * height;
  4295. var rgbaLength = size * 4;
  4296. var buf = new Uint8Array(size * components);
  4297. var tmpCanvas = createScratchCanvas(width, height);
  4298. var tmpCtx = tmpCanvas.getContext('2d');
  4299. tmpCtx.drawImage(img, 0, 0);
  4300. var data = tmpCtx.getImageData(0, 0, width, height).data;
  4301. var i, j;
  4302. if (components == 3) {
  4303. for (i = 0, j = 0; i < rgbaLength; i += 4, j += 3) {
  4304. buf[j] = data[i];
  4305. buf[j + 1] = data[i + 1];
  4306. buf[j + 2] = data[i + 2];
  4307. }
  4308. } else if (components == 1) {
  4309. for (i = 0, j = 0; i < rgbaLength; i += 4, j++) {
  4310. buf[j] = data[i];
  4311. }
  4312. }
  4313. deferred.resolve({ data: buf, width: width, height: height});
  4314. }).bind(this);
  4315. img.src = imageUrl;
  4316. });
  4317. },
  4318. fetchDocument: function WorkerTransport_fetchDocument(source) {
  4319. source.disableAutoFetch = PDFJS.disableAutoFetch;
  4320. source.chunkedViewerLoading = !!this.pdfDataRangeTransport;
  4321. this.messageHandler.send('GetDocRequest', {
  4322. source: source,
  4323. disableRange: PDFJS.disableRange,
  4324. maxImageSize: PDFJS.maxImageSize,
  4325. cMapUrl: PDFJS.cMapUrl,
  4326. cMapPacked: PDFJS.cMapPacked,
  4327. disableFontFace: PDFJS.disableFontFace,
  4328. disableCreateObjectURL: PDFJS.disableCreateObjectURL,
  4329. verbosity: PDFJS.verbosity
  4330. });
  4331. },
  4332. getData: function WorkerTransport_getData(promise) {
  4333. this.messageHandler.send('GetData', null, function(data) {
  4334. promise.resolve(data);
  4335. });
  4336. },
  4337. getPage: function WorkerTransport_getPage(pageNumber, promise) {
  4338. if (pageNumber <= 0 || pageNumber > this.numPages ||
  4339. (pageNumber|0) !== pageNumber) {
  4340. var pagePromise = new PDFJS.LegacyPromise();
  4341. pagePromise.reject(new Error('Invalid page request'));
  4342. return pagePromise;
  4343. }
  4344. var pageIndex = pageNumber - 1;
  4345. if (pageIndex in this.pagePromises) {
  4346. return this.pagePromises[pageIndex];
  4347. }
  4348. promise = new PDFJS.LegacyPromise();
  4349. this.pagePromises[pageIndex] = promise;
  4350. this.messageHandler.send('GetPageRequest', { pageIndex: pageIndex });
  4351. return promise;
  4352. },
  4353. getPageIndex: function WorkerTransport_getPageIndexByRef(ref) {
  4354. var promise = new PDFJS.LegacyPromise();
  4355. this.messageHandler.send('GetPageIndex', { ref: ref },
  4356. function (pageIndex) {
  4357. promise.resolve(pageIndex);
  4358. }
  4359. );
  4360. return promise;
  4361. },
  4362. getAnnotations: function WorkerTransport_getAnnotations(pageIndex) {
  4363. this.messageHandler.send('GetAnnotationsRequest',
  4364. { pageIndex: pageIndex });
  4365. },
  4366. getDestinations: function WorkerTransport_getDestinations() {
  4367. var promise = new PDFJS.LegacyPromise();
  4368. this.messageHandler.send('GetDestinations', null,
  4369. function transportDestinations(destinations) {
  4370. promise.resolve(destinations);
  4371. }
  4372. );
  4373. return promise;
  4374. },
  4375. getAttachments: function WorkerTransport_getAttachments() {
  4376. var promise = new PDFJS.LegacyPromise();
  4377. this.messageHandler.send('GetAttachments', null,
  4378. function transportAttachments(attachments) {
  4379. promise.resolve(attachments);
  4380. }
  4381. );
  4382. return promise;
  4383. },
  4384. startCleanup: function WorkerTransport_startCleanup() {
  4385. this.messageHandler.send('Cleanup', null,
  4386. function endCleanup() {
  4387. for (var i = 0, ii = this.pageCache.length; i < ii; i++) {
  4388. var page = this.pageCache[i];
  4389. if (page) {
  4390. page.destroy();
  4391. }
  4392. }
  4393. this.commonObjs.clear();
  4394. FontLoader.clear();
  4395. }.bind(this)
  4396. );
  4397. }
  4398. };
  4399. return WorkerTransport;
  4400. })();
  4401. /**
  4402. * A PDF document and page is built of many objects. E.g. there are objects
  4403. * for fonts, images, rendering code and such. These objects might get processed
  4404. * inside of a worker. The `PDFObjects` implements some basic functions to
  4405. * manage these objects.
  4406. * @ignore
  4407. */
  4408. var PDFObjects = (function PDFObjectsClosure() {
  4409. function PDFObjects() {
  4410. this.objs = {};
  4411. }
  4412. PDFObjects.prototype = {
  4413. /**
  4414. * Internal function.
  4415. * Ensures there is an object defined for `objId`.
  4416. */
  4417. ensureObj: function PDFObjects_ensureObj(objId) {
  4418. if (this.objs[objId]) {
  4419. return this.objs[objId];
  4420. }
  4421. var obj = {
  4422. promise: new LegacyPromise(),
  4423. data: null,
  4424. resolved: false
  4425. };
  4426. this.objs[objId] = obj;
  4427. return obj;
  4428. },
  4429. /**
  4430. * If called *without* callback, this returns the data of `objId` but the
  4431. * object needs to be resolved. If it isn't, this function throws.
  4432. *
  4433. * If called *with* a callback, the callback is called with the data of the
  4434. * object once the object is resolved. That means, if you call this
  4435. * function and the object is already resolved, the callback gets called
  4436. * right away.
  4437. */
  4438. get: function PDFObjects_get(objId, callback) {
  4439. // If there is a callback, then the get can be async and the object is
  4440. // not required to be resolved right now
  4441. if (callback) {
  4442. this.ensureObj(objId).promise.then(callback);
  4443. return null;
  4444. }
  4445. // If there isn't a callback, the user expects to get the resolved data
  4446. // directly.
  4447. var obj = this.objs[objId];
  4448. // If there isn't an object yet or the object isn't resolved, then the
  4449. // data isn't ready yet!
  4450. if (!obj || !obj.resolved) {
  4451. error('Requesting object that isn\'t resolved yet ' + objId);
  4452. }
  4453. return obj.data;
  4454. },
  4455. /**
  4456. * Resolves the object `objId` with optional `data`.
  4457. */
  4458. resolve: function PDFObjects_resolve(objId, data) {
  4459. var obj = this.ensureObj(objId);
  4460. obj.resolved = true;
  4461. obj.data = data;
  4462. obj.promise.resolve(data);
  4463. },
  4464. isResolved: function PDFObjects_isResolved(objId) {
  4465. var objs = this.objs;
  4466. if (!objs[objId]) {
  4467. return false;
  4468. } else {
  4469. return objs[objId].resolved;
  4470. }
  4471. },
  4472. hasData: function PDFObjects_hasData(objId) {
  4473. return this.isResolved(objId);
  4474. },
  4475. /**
  4476. * Returns the data of `objId` if object exists, null otherwise.
  4477. */
  4478. getData: function PDFObjects_getData(objId) {
  4479. var objs = this.objs;
  4480. if (!objs[objId] || !objs[objId].resolved) {
  4481. return null;
  4482. } else {
  4483. return objs[objId].data;
  4484. }
  4485. },
  4486. clear: function PDFObjects_clear() {
  4487. this.objs = {};
  4488. }
  4489. };
  4490. return PDFObjects;
  4491. })();
  4492. /**
  4493. * Allows controlling of the rendering tasks.
  4494. * @class
  4495. */
  4496. var RenderTask = (function RenderTaskClosure() {
  4497. function RenderTask(internalRenderTask) {
  4498. this.internalRenderTask = internalRenderTask;
  4499. /**
  4500. * Promise for rendering task completion.
  4501. * @type {Promise}
  4502. */
  4503. this.promise = new PDFJS.LegacyPromise();
  4504. }
  4505. RenderTask.prototype = /** @lends RenderTask.prototype */ {
  4506. /**
  4507. * Cancels the rendering task. If the task is currently rendering it will
  4508. * not be cancelled until graphics pauses with a timeout. The promise that
  4509. * this object extends will resolved when cancelled.
  4510. */
  4511. cancel: function RenderTask_cancel() {
  4512. this.internalRenderTask.cancel();
  4513. this.promise.reject(new Error('Rendering is cancelled'));
  4514. },
  4515. /**
  4516. * Registers callback to indicate the rendering task completion.
  4517. *
  4518. * @param {function} onFulfilled The callback for the rendering completion.
  4519. * @param {function} onRejected The callback for the rendering failure.
  4520. * @return {Promise} A promise that is resolved after the onFulfilled or
  4521. * onRejected callback.
  4522. */
  4523. then: function RenderTask_then(onFulfilled, onRejected) {
  4524. return this.promise.then(onFulfilled, onRejected);
  4525. }
  4526. };
  4527. return RenderTask;
  4528. })();
  4529. /**
  4530. * For internal use only.
  4531. * @ignore
  4532. */
  4533. var InternalRenderTask = (function InternalRenderTaskClosure() {
  4534. function InternalRenderTask(callback, params, objs, commonObjs, operatorList,
  4535. pageNumber) {
  4536. this.callback = callback;
  4537. this.params = params;
  4538. this.objs = objs;
  4539. this.commonObjs = commonObjs;
  4540. this.operatorListIdx = null;
  4541. this.operatorList = operatorList;
  4542. this.pageNumber = pageNumber;
  4543. this.running = false;
  4544. this.graphicsReadyCallback = null;
  4545. this.graphicsReady = false;
  4546. this.cancelled = false;
  4547. }
  4548. InternalRenderTask.prototype = {
  4549. initalizeGraphics:
  4550. function InternalRenderTask_initalizeGraphics(transparency) {
  4551. if (this.cancelled) {
  4552. return;
  4553. }
  4554. if (PDFJS.pdfBug && 'StepperManager' in globalScope &&
  4555. globalScope.StepperManager.enabled) {
  4556. this.stepper = globalScope.StepperManager.create(this.pageNumber - 1);
  4557. this.stepper.init(this.operatorList);
  4558. this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();
  4559. }
  4560. var params = this.params;
  4561. this.gfx = new CanvasGraphics(params.canvasContext, this.commonObjs,
  4562. this.objs, params.imageLayer);
  4563. this.gfx.beginDrawing(params.viewport, transparency);
  4564. this.operatorListIdx = 0;
  4565. this.graphicsReady = true;
  4566. if (this.graphicsReadyCallback) {
  4567. this.graphicsReadyCallback();
  4568. }
  4569. },
  4570. cancel: function InternalRenderTask_cancel() {
  4571. this.running = false;
  4572. this.cancelled = true;
  4573. this.callback('cancelled');
  4574. },
  4575. operatorListChanged: function InternalRenderTask_operatorListChanged() {
  4576. if (!this.graphicsReady) {
  4577. if (!this.graphicsReadyCallback) {
  4578. this.graphicsReadyCallback = this._continue.bind(this);
  4579. }
  4580. return;
  4581. }
  4582. if (this.stepper) {
  4583. this.stepper.updateOperatorList(this.operatorList);
  4584. }
  4585. if (this.running) {
  4586. return;
  4587. }
  4588. this._continue();
  4589. },
  4590. _continue: function InternalRenderTask__continue() {
  4591. this.running = true;
  4592. if (this.cancelled) {
  4593. return;
  4594. }
  4595. if (this.params.continueCallback) {
  4596. this.params.continueCallback(this._next.bind(this));
  4597. } else {
  4598. this._next();
  4599. }
  4600. },
  4601. _next: function InternalRenderTask__next() {
  4602. if (this.cancelled) {
  4603. return;
  4604. }
  4605. this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList,
  4606. this.operatorListIdx,
  4607. this._continue.bind(this),
  4608. this.stepper);
  4609. if (this.operatorListIdx === this.operatorList.argsArray.length) {
  4610. this.running = false;
  4611. if (this.operatorList.lastChunk) {
  4612. this.gfx.endDrawing();
  4613. this.callback();
  4614. }
  4615. }
  4616. }
  4617. };
  4618. return InternalRenderTask;
  4619. })();
  4620. var Metadata = PDFJS.Metadata = (function MetadataClosure() {
  4621. function fixMetadata(meta) {
  4622. return meta.replace(/>\\376\\377([^<]+)/g, function(all, codes) {
  4623. var bytes = codes.replace(/\\([0-3])([0-7])([0-7])/g,
  4624. function(code, d1, d2, d3) {
  4625. return String.fromCharCode(d1 * 64 + d2 * 8 + d3 * 1);
  4626. });
  4627. var chars = '';
  4628. for (var i = 0; i < bytes.length; i += 2) {
  4629. var code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1);
  4630. chars += code >= 32 && code < 127 && code != 60 && code != 62 &&
  4631. code != 38 && false ? String.fromCharCode(code) :
  4632. '&#x' + (0x10000 + code).toString(16).substring(1) + ';';
  4633. }
  4634. return '>' + chars;
  4635. });
  4636. }
  4637. function Metadata(meta) {
  4638. if (typeof meta === 'string') {
  4639. // Ghostscript produces invalid metadata
  4640. meta = fixMetadata(meta);
  4641. var parser = new DOMParser();
  4642. meta = parser.parseFromString(meta, 'application/xml');
  4643. } else if (!(meta instanceof Document)) {
  4644. error('Metadata: Invalid metadata object');
  4645. }
  4646. this.metaDocument = meta;
  4647. this.metadata = {};
  4648. this.parse();
  4649. }
  4650. Metadata.prototype = {
  4651. parse: function Metadata_parse() {
  4652. var doc = this.metaDocument;
  4653. var rdf = doc.documentElement;
  4654. if (rdf.nodeName.toLowerCase() !== 'rdf:rdf') { // Wrapped in <xmpmeta>
  4655. rdf = rdf.firstChild;
  4656. while (rdf && rdf.nodeName.toLowerCase() !== 'rdf:rdf') {
  4657. rdf = rdf.nextSibling;
  4658. }
  4659. }
  4660. var nodeName = (rdf) ? rdf.nodeName.toLowerCase() : null;
  4661. if (!rdf || nodeName !== 'rdf:rdf' || !rdf.hasChildNodes()) {
  4662. return;
  4663. }
  4664. var children = rdf.childNodes, desc, entry, name, i, ii, length, iLength;
  4665. for (i = 0, length = children.length; i < length; i++) {
  4666. desc = children[i];
  4667. if (desc.nodeName.toLowerCase() !== 'rdf:description') {
  4668. continue;
  4669. }
  4670. for (ii = 0, iLength = desc.childNodes.length; ii < iLength; ii++) {
  4671. if (desc.childNodes[ii].nodeName.toLowerCase() !== '#text') {
  4672. entry = desc.childNodes[ii];
  4673. name = entry.nodeName.toLowerCase();
  4674. this.metadata[name] = entry.textContent.trim();
  4675. }
  4676. }
  4677. }
  4678. },
  4679. get: function Metadata_get(name) {
  4680. return this.metadata[name] || null;
  4681. },
  4682. has: function Metadata_has(name) {
  4683. return typeof this.metadata[name] !== 'undefined';
  4684. }
  4685. };
  4686. return Metadata;
  4687. })();
  4688. // <canvas> contexts store most of the state we need natively.
  4689. // However, PDF needs a bit more state, which we store here.
  4690. // Minimal font size that would be used during canvas fillText operations.
  4691. var MIN_FONT_SIZE = 16;
  4692. var MAX_GROUP_SIZE = 4096;
  4693. var COMPILE_TYPE3_GLYPHS = true;
  4694. function createScratchCanvas(width, height) {
  4695. var canvas = document.createElement('canvas');
  4696. canvas.width = width;
  4697. canvas.height = height;
  4698. return canvas;
  4699. }
  4700. function addContextCurrentTransform(ctx) {
  4701. // If the context doesn't expose a `mozCurrentTransform`, add a JS based on.
  4702. if (!ctx.mozCurrentTransform) {
  4703. // Store the original context
  4704. ctx._scaleX = ctx._scaleX || 1.0;
  4705. ctx._scaleY = ctx._scaleY || 1.0;
  4706. ctx._originalSave = ctx.save;
  4707. ctx._originalRestore = ctx.restore;
  4708. ctx._originalRotate = ctx.rotate;
  4709. ctx._originalScale = ctx.scale;
  4710. ctx._originalTranslate = ctx.translate;
  4711. ctx._originalTransform = ctx.transform;
  4712. ctx._originalSetTransform = ctx.setTransform;
  4713. ctx._transformMatrix = [ctx._scaleX, 0, 0, ctx._scaleY, 0, 0];
  4714. ctx._transformStack = [];
  4715. Object.defineProperty(ctx, 'mozCurrentTransform', {
  4716. get: function getCurrentTransform() {
  4717. return this._transformMatrix;
  4718. }
  4719. });
  4720. Object.defineProperty(ctx, 'mozCurrentTransformInverse', {
  4721. get: function getCurrentTransformInverse() {
  4722. // Calculation done using WolframAlpha:
  4723. // http://www.wolframalpha.com/input/?
  4724. // i=Inverse+{{a%2C+c%2C+e}%2C+{b%2C+d%2C+f}%2C+{0%2C+0%2C+1}}
  4725. var m = this._transformMatrix;
  4726. var a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5];
  4727. var ad_bc = a * d - b * c;
  4728. var bc_ad = b * c - a * d;
  4729. return [
  4730. d / ad_bc,
  4731. b / bc_ad,
  4732. c / bc_ad,
  4733. a / ad_bc,
  4734. (d * e - c * f) / bc_ad,
  4735. (b * e - a * f) / ad_bc
  4736. ];
  4737. }
  4738. });
  4739. ctx.save = function ctxSave() {
  4740. var old = this._transformMatrix;
  4741. this._transformStack.push(old);
  4742. this._transformMatrix = old.slice(0, 6);
  4743. this._originalSave();
  4744. };
  4745. ctx.restore = function ctxRestore() {
  4746. var prev = this._transformStack.pop();
  4747. if (prev) {
  4748. this._transformMatrix = prev;
  4749. this._originalRestore();
  4750. }
  4751. };
  4752. ctx.translate = function ctxTranslate(x, y) {
  4753. var m = this._transformMatrix;
  4754. m[4] = m[0] * x + m[2] * y + m[4];
  4755. m[5] = m[1] * x + m[3] * y + m[5];
  4756. this._originalTranslate(x, y);
  4757. };
  4758. ctx.scale = function ctxScale(x, y) {
  4759. var m = this._transformMatrix;
  4760. m[0] = m[0] * x;
  4761. m[1] = m[1] * x;
  4762. m[2] = m[2] * y;
  4763. m[3] = m[3] * y;
  4764. this._originalScale(x, y);
  4765. };
  4766. ctx.transform = function ctxTransform(a, b, c, d, e, f) {
  4767. var m = this._transformMatrix;
  4768. this._transformMatrix = [
  4769. m[0] * a + m[2] * b,
  4770. m[1] * a + m[3] * b,
  4771. m[0] * c + m[2] * d,
  4772. m[1] * c + m[3] * d,
  4773. m[0] * e + m[2] * f + m[4],
  4774. m[1] * e + m[3] * f + m[5]
  4775. ];
  4776. ctx._originalTransform(a, b, c, d, e, f);
  4777. };
  4778. ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {
  4779. this._transformMatrix = [a, b, c, d, e, f];
  4780. ctx._originalSetTransform(a, b, c, d, e, f);
  4781. };
  4782. ctx.rotate = function ctxRotate(angle) {
  4783. var cosValue = Math.cos(angle);
  4784. var sinValue = Math.sin(angle);
  4785. var m = this._transformMatrix;
  4786. this._transformMatrix = [
  4787. m[0] * cosValue + m[2] * sinValue,
  4788. m[1] * cosValue + m[3] * sinValue,
  4789. m[0] * (-sinValue) + m[2] * cosValue,
  4790. m[1] * (-sinValue) + m[3] * cosValue,
  4791. m[4],
  4792. m[5]
  4793. ];
  4794. this._originalRotate(angle);
  4795. };
  4796. }
  4797. }
  4798. var CachedCanvases = (function CachedCanvasesClosure() {
  4799. var cache = {};
  4800. return {
  4801. getCanvas: function CachedCanvases_getCanvas(id, width, height,
  4802. trackTransform) {
  4803. var canvasEntry;
  4804. if (id in cache) {
  4805. canvasEntry = cache[id];
  4806. canvasEntry.canvas.width = width;
  4807. canvasEntry.canvas.height = height;
  4808. // reset canvas transform for emulated mozCurrentTransform, if needed
  4809. canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0);
  4810. } else {
  4811. var canvas = createScratchCanvas(width, height);
  4812. var ctx = canvas.getContext('2d');
  4813. if (trackTransform) {
  4814. addContextCurrentTransform(ctx);
  4815. }
  4816. cache[id] = canvasEntry = {canvas: canvas, context: ctx};
  4817. }
  4818. return canvasEntry;
  4819. },
  4820. clear: function () {
  4821. cache = {};
  4822. }
  4823. };
  4824. })();
  4825. function compileType3Glyph(imgData) {
  4826. var POINT_TO_PROCESS_LIMIT = 1000;
  4827. var width = imgData.width, height = imgData.height;
  4828. var i, j, j0, width1 = width + 1;
  4829. var points = new Uint8Array(width1 * (height + 1));
  4830. var POINT_TYPES =
  4831. new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);
  4832. // decodes bit-packed mask data
  4833. var lineSize = (width + 7) & ~7, data0 = imgData.data;
  4834. var data = new Uint8Array(lineSize * height), pos = 0, ii;
  4835. for (i = 0, ii = data0.length; i < ii; i++) {
  4836. var mask = 128, elem = data0[i];
  4837. while (mask > 0) {
  4838. data[pos++] = (elem & mask) ? 0 : 255;
  4839. mask >>= 1;
  4840. }
  4841. }
  4842. // finding iteresting points: every point is located between mask pixels,
  4843. // so there will be points of the (width + 1)x(height + 1) grid. Every point
  4844. // will have flags assigned based on neighboring mask pixels:
  4845. // 4 | 8
  4846. // --P--
  4847. // 2 | 1
  4848. // We are interested only in points with the flags:
  4849. // - outside corners: 1, 2, 4, 8;
  4850. // - inside corners: 7, 11, 13, 14;
  4851. // - and, intersections: 5, 10.
  4852. var count = 0;
  4853. pos = 0;
  4854. if (data[pos] !== 0) {
  4855. points[0] = 1;
  4856. ++count;
  4857. }
  4858. for (j = 1; j < width; j++) {
  4859. if (data[pos] !== data[pos + 1]) {
  4860. points[j] = data[pos] ? 2 : 1;
  4861. ++count;
  4862. }
  4863. pos++;
  4864. }
  4865. if (data[pos] !== 0) {
  4866. points[j] = 2;
  4867. ++count;
  4868. }
  4869. for (i = 1; i < height; i++) {
  4870. pos = i * lineSize;
  4871. j0 = i * width1;
  4872. if (data[pos - lineSize] !== data[pos]) {
  4873. points[j0] = data[pos] ? 1 : 8;
  4874. ++count;
  4875. }
  4876. // 'sum' is the position of the current pixel configuration in the 'TYPES'
  4877. // array (in order 8-1-2-4, so we can use '>>2' to shift the column).
  4878. var sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0);
  4879. for (j = 1; j < width; j++) {
  4880. sum = (sum >> 2) + (data[pos + 1] ? 4 : 0) +
  4881. (data[pos - lineSize + 1] ? 8 : 0);
  4882. if (POINT_TYPES[sum]) {
  4883. points[j0 + j] = POINT_TYPES[sum];
  4884. ++count;
  4885. }
  4886. pos++;
  4887. }
  4888. if (data[pos - lineSize] !== data[pos]) {
  4889. points[j0 + j] = data[pos] ? 2 : 4;
  4890. ++count;
  4891. }
  4892. if (count > POINT_TO_PROCESS_LIMIT) {
  4893. return null;
  4894. }
  4895. }
  4896. pos = lineSize * (height - 1);
  4897. j0 = i * width1;
  4898. if (data[pos] !== 0) {
  4899. points[j0] = 8;
  4900. ++count;
  4901. }
  4902. for (j = 1; j < width; j++) {
  4903. if (data[pos] !== data[pos + 1]) {
  4904. points[j0 + j] = data[pos] ? 4 : 8;
  4905. ++count;
  4906. }
  4907. pos++;
  4908. }
  4909. if (data[pos] !== 0) {
  4910. points[j0 + j] = 4;
  4911. ++count;
  4912. }
  4913. if (count > POINT_TO_PROCESS_LIMIT) {
  4914. return null;
  4915. }
  4916. // building outlines
  4917. var steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);
  4918. var outlines = [];
  4919. for (i = 0; count && i <= height; i++) {
  4920. var p = i * width1;
  4921. var end = p + width;
  4922. while (p < end && !points[p]) {
  4923. p++;
  4924. }
  4925. if (p === end) {
  4926. continue;
  4927. }
  4928. var coords = [p % width1, i];
  4929. var type = points[p], p0 = p, pp;
  4930. do {
  4931. var step = steps[type];
  4932. do {
  4933. p += step;
  4934. } while (!points[p]);
  4935. pp = points[p];
  4936. if (pp !== 5 && pp !== 10) {
  4937. // set new direction
  4938. type = pp;
  4939. // delete mark
  4940. points[p] = 0;
  4941. } else { // type is 5 or 10, ie, a crossing
  4942. // set new direction
  4943. type = pp & ((0x33 * type) >> 4);
  4944. // set new type for "future hit"
  4945. points[p] &= (type >> 2 | type << 2);
  4946. }
  4947. coords.push(p % width1);
  4948. coords.push((p / width1) | 0);
  4949. --count;
  4950. } while (p0 !== p);
  4951. outlines.push(coords);
  4952. --i;
  4953. }
  4954. var drawOutline = function(c) {
  4955. c.save();
  4956. // the path shall be painted in [0..1]x[0..1] space
  4957. c.scale(1 / width, -1 / height);
  4958. c.translate(0, -height);
  4959. c.beginPath();
  4960. for (var i = 0, ii = outlines.length; i < ii; i++) {
  4961. var o = outlines[i];
  4962. c.moveTo(o[0], o[1]);
  4963. for (var j = 2, jj = o.length; j < jj; j += 2) {
  4964. c.lineTo(o[j], o[j+1]);
  4965. }
  4966. }
  4967. c.fill();
  4968. c.beginPath();
  4969. c.restore();
  4970. };
  4971. return drawOutline;
  4972. }
  4973. var CanvasExtraState = (function CanvasExtraStateClosure() {
  4974. function CanvasExtraState(old) {
  4975. // Are soft masks and alpha values shapes or opacities?
  4976. this.alphaIsShape = false;
  4977. this.fontSize = 0;
  4978. this.fontSizeScale = 1;
  4979. this.textMatrix = IDENTITY_MATRIX;
  4980. this.fontMatrix = FONT_IDENTITY_MATRIX;
  4981. this.leading = 0;
  4982. // Current point (in user coordinates)
  4983. this.x = 0;
  4984. this.y = 0;
  4985. // Start of text line (in text coordinates)
  4986. this.lineX = 0;
  4987. this.lineY = 0;
  4988. // Character and word spacing
  4989. this.charSpacing = 0;
  4990. this.wordSpacing = 0;
  4991. this.textHScale = 1;
  4992. this.textRenderingMode = TextRenderingMode.FILL;
  4993. this.textRise = 0;
  4994. // Color spaces
  4995. this.fillColorSpace = ColorSpace.singletons.gray;
  4996. this.fillColorSpaceObj = null;
  4997. this.strokeColorSpace = ColorSpace.singletons.gray;
  4998. this.strokeColorSpaceObj = null;
  4999. this.fillColorObj = null;
  5000. this.strokeColorObj = null;
  5001. // Default fore and background colors
  5002. this.fillColor = '#000000';
  5003. this.strokeColor = '#000000';
  5004. // Note: fill alpha applies to all non-stroking operations
  5005. this.fillAlpha = 1;
  5006. this.strokeAlpha = 1;
  5007. this.lineWidth = 1;
  5008. this.activeSMask = null; // nonclonable field (see the save method below)
  5009. this.old = old;
  5010. }
  5011. CanvasExtraState.prototype = {
  5012. clone: function CanvasExtraState_clone() {
  5013. return Object.create(this);
  5014. },
  5015. setCurrentPoint: function CanvasExtraState_setCurrentPoint(x, y) {
  5016. this.x = x;
  5017. this.y = y;
  5018. }
  5019. };
  5020. return CanvasExtraState;
  5021. })();
  5022. var CanvasGraphics = (function CanvasGraphicsClosure() {
  5023. // Defines the time the executeOperatorList is going to be executing
  5024. // before it stops and shedules a continue of execution.
  5025. var EXECUTION_TIME = 15;
  5026. function CanvasGraphics(canvasCtx, commonObjs, objs, imageLayer) {
  5027. this.ctx = canvasCtx;
  5028. this.current = new CanvasExtraState();
  5029. this.stateStack = [];
  5030. this.pendingClip = null;
  5031. this.pendingEOFill = false;
  5032. this.res = null;
  5033. this.xobjs = null;
  5034. this.commonObjs = commonObjs;
  5035. this.objs = objs;
  5036. this.imageLayer = imageLayer;
  5037. this.groupStack = [];
  5038. this.processingType3 = null;
  5039. // Patterns are painted relative to the initial page/form transform, see pdf
  5040. // spec 8.7.2 NOTE 1.
  5041. this.baseTransform = null;
  5042. this.baseTransformStack = [];
  5043. this.groupLevel = 0;
  5044. this.smaskStack = [];
  5045. this.smaskCounter = 0;
  5046. this.tempSMask = null;
  5047. if (canvasCtx) {
  5048. addContextCurrentTransform(canvasCtx);
  5049. }
  5050. }
  5051. function putBinaryImageData(ctx, imgData) {
  5052. if (typeof ImageData !== 'undefined' && imgData instanceof ImageData) {
  5053. ctx.putImageData(imgData, 0, 0);
  5054. return;
  5055. }
  5056. // Put the image data to the canvas in chunks, rather than putting the
  5057. // whole image at once. This saves JS memory, because the ImageData object
  5058. // is smaller. It also possibly saves C++ memory within the implementation
  5059. // of putImageData(). (E.g. in Firefox we make two short-lived copies of
  5060. // the data passed to putImageData()). |n| shouldn't be too small, however,
  5061. // because too many putImageData() calls will slow things down.
  5062. //
  5063. // Note: as written, if the last chunk is partial, the putImageData() call
  5064. // will (conceptually) put pixels past the bounds of the canvas. But
  5065. // that's ok; any such pixels are ignored.
  5066. var height = imgData.height, width = imgData.width;
  5067. var fullChunkHeight = 16;
  5068. var fracChunks = height / fullChunkHeight;
  5069. var fullChunks = Math.floor(fracChunks);
  5070. var totalChunks = Math.ceil(fracChunks);
  5071. var partialChunkHeight = height - fullChunks * fullChunkHeight;
  5072. var chunkImgData = ctx.createImageData(width, fullChunkHeight);
  5073. var srcPos = 0, destPos;
  5074. var src = imgData.data;
  5075. var dest = chunkImgData.data;
  5076. var i, j, thisChunkHeight, elemsInThisChunk;
  5077. // There are multiple forms in which the pixel data can be passed, and
  5078. // imgData.kind tells us which one this is.
  5079. if (imgData.kind === ImageKind.GRAYSCALE_1BPP) {
  5080. // Grayscale, 1 bit per pixel (i.e. black-and-white).
  5081. var srcLength = src.byteLength;
  5082. var dest32 = PDFJS.hasCanvasTypedArrays ? new Uint32Array(dest.buffer) :
  5083. new Uint32ArrayView(dest);
  5084. var dest32DataLength = dest32.length;
  5085. var fullSrcDiff = (width + 7) >> 3;
  5086. var white = 0xFFFFFFFF;
  5087. var black = (PDFJS.isLittleEndian || !PDFJS.hasCanvasTypedArrays) ?
  5088. 0xFF000000 : 0x000000FF;
  5089. for (i = 0; i < totalChunks; i++) {
  5090. thisChunkHeight =
  5091. (i < fullChunks) ? fullChunkHeight : partialChunkHeight;
  5092. destPos = 0;
  5093. for (j = 0; j < thisChunkHeight; j++) {
  5094. var srcDiff = srcLength - srcPos;
  5095. var k = 0;
  5096. var kEnd = (srcDiff > fullSrcDiff) ? width : srcDiff * 8 - 7;
  5097. var kEndUnrolled = kEnd & ~7;
  5098. var mask = 0;
  5099. var srcByte = 0;
  5100. for (; k < kEndUnrolled; k += 8) {
  5101. srcByte = src[srcPos++];
  5102. dest32[destPos++] = (srcByte & 128) ? white : black;
  5103. dest32[destPos++] = (srcByte & 64) ? white : black;
  5104. dest32[destPos++] = (srcByte & 32) ? white : black;
  5105. dest32[destPos++] = (srcByte & 16) ? white : black;
  5106. dest32[destPos++] = (srcByte & 8) ? white : black;
  5107. dest32[destPos++] = (srcByte & 4) ? white : black;
  5108. dest32[destPos++] = (srcByte & 2) ? white : black;
  5109. dest32[destPos++] = (srcByte & 1) ? white : black;
  5110. }
  5111. for (; k < kEnd; k++) {
  5112. if (mask === 0) {
  5113. srcByte = src[srcPos++];
  5114. mask = 128;
  5115. }
  5116. dest32[destPos++] = (srcByte & mask) ? white : black;
  5117. mask >>= 1;
  5118. }
  5119. }
  5120. // We ran out of input. Make all remaining pixels transparent.
  5121. while (destPos < dest32DataLength) {
  5122. dest32[destPos++] = 0;
  5123. }
  5124. ctx.putImageData(chunkImgData, 0, i * fullChunkHeight);
  5125. }
  5126. } else if (imgData.kind === ImageKind.RGBA_32BPP) {
  5127. // RGBA, 32-bits per pixel.
  5128. for (i = 0; i < totalChunks; i++) {
  5129. thisChunkHeight =
  5130. (i < fullChunks) ? fullChunkHeight : partialChunkHeight;
  5131. elemsInThisChunk = imgData.width * thisChunkHeight * 4;
  5132. dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));
  5133. srcPos += elemsInThisChunk;
  5134. ctx.putImageData(chunkImgData, 0, i * fullChunkHeight);
  5135. }
  5136. } else if (imgData.kind === ImageKind.RGB_24BPP) {
  5137. // RGB, 24-bits per pixel.
  5138. for (i = 0; i < totalChunks; i++) {
  5139. thisChunkHeight =
  5140. (i < fullChunks) ? fullChunkHeight : partialChunkHeight;
  5141. elemsInThisChunk = imgData.width * thisChunkHeight * 3;
  5142. destPos = 0;
  5143. for (j = 0; j < elemsInThisChunk; j += 3) {
  5144. dest[destPos++] = src[srcPos++];
  5145. dest[destPos++] = src[srcPos++];
  5146. dest[destPos++] = src[srcPos++];
  5147. dest[destPos++] = 255;
  5148. }
  5149. ctx.putImageData(chunkImgData, 0, i * fullChunkHeight);
  5150. }
  5151. } else {
  5152. error('bad image kind: ' + imgData.kind);
  5153. }
  5154. }
  5155. function putBinaryImageMask(ctx, imgData) {
  5156. var height = imgData.height, width = imgData.width;
  5157. var fullChunkHeight = 16;
  5158. var fracChunks = height / fullChunkHeight;
  5159. var fullChunks = Math.floor(fracChunks);
  5160. var totalChunks = Math.ceil(fracChunks);
  5161. var partialChunkHeight = height - fullChunks * fullChunkHeight;
  5162. var chunkImgData = ctx.createImageData(width, fullChunkHeight);
  5163. var srcPos = 0;
  5164. var src = imgData.data;
  5165. var dest = chunkImgData.data;
  5166. for (var i = 0; i < totalChunks; i++) {
  5167. var thisChunkHeight =
  5168. (i < fullChunks) ? fullChunkHeight : partialChunkHeight;
  5169. // Expand the mask so it can be used by the canvas. Any required
  5170. // inversion has already been handled.
  5171. var destPos = 3; // alpha component offset
  5172. for (var j = 0; j < thisChunkHeight; j++) {
  5173. var mask = 0;
  5174. for (var k = 0; k < width; k++) {
  5175. if (!mask) {
  5176. var elem = src[srcPos++];
  5177. mask = 128;
  5178. }
  5179. dest[destPos] = (elem & mask) ? 0 : 255;
  5180. destPos += 4;
  5181. mask >>= 1;
  5182. }
  5183. }
  5184. ctx.putImageData(chunkImgData, 0, i * fullChunkHeight);
  5185. }
  5186. }
  5187. function copyCtxState(sourceCtx, destCtx) {
  5188. var properties = ['strokeStyle', 'fillStyle', 'fillRule', 'globalAlpha',
  5189. 'lineWidth', 'lineCap', 'lineJoin', 'miterLimit',
  5190. 'globalCompositeOperation', 'font'];
  5191. for (var i = 0, ii = properties.length; i < ii; i++) {
  5192. var property = properties[i];
  5193. if (property in sourceCtx) {
  5194. destCtx[property] = sourceCtx[property];
  5195. }
  5196. }
  5197. if ('setLineDash' in sourceCtx) {
  5198. destCtx.setLineDash(sourceCtx.getLineDash());
  5199. destCtx.lineDashOffset = sourceCtx.lineDashOffset;
  5200. } else if ('mozDash' in sourceCtx) {
  5201. destCtx.mozDash = sourceCtx.mozDash;
  5202. destCtx.mozDashOffset = sourceCtx.mozDashOffset;
  5203. }
  5204. }
  5205. function genericComposeSMask(maskCtx, layerCtx, width, height,
  5206. subtype, backdrop) {
  5207. var addBackdropFn;
  5208. if (backdrop) {
  5209. addBackdropFn = function (r0, g0, b0, bytes) {
  5210. var length = bytes.length;
  5211. for (var i = 3; i < length; i += 4) {
  5212. var alpha = bytes[i] / 255;
  5213. if (alpha === 0) {
  5214. bytes[i - 3] = r0;
  5215. bytes[i - 2] = g0;
  5216. bytes[i - 1] = b0;
  5217. } else if (alpha < 1) {
  5218. var alpha_ = 1 - alpha;
  5219. bytes[i - 3] = (bytes[i - 3] * alpha + r0 * alpha_) | 0;
  5220. bytes[i - 2] = (bytes[i - 2] * alpha + g0 * alpha_) | 0;
  5221. bytes[i - 1] = (bytes[i - 1] * alpha + b0 * alpha_) | 0;
  5222. }
  5223. }
  5224. }.bind(null, backdrop[0], backdrop[1], backdrop[2]);
  5225. } else {
  5226. addBackdropFn = function () {};
  5227. }
  5228. var composeFn;
  5229. if (subtype === 'Luminosity') {
  5230. composeFn = function (maskDataBytes, layerDataBytes) {
  5231. var length = maskDataBytes.length;
  5232. for (var i = 3; i < length; i += 4) {
  5233. var y = ((maskDataBytes[i - 3] * 77) + // * 0.3 / 255 * 0x10000
  5234. (maskDataBytes[i - 2] * 152) + // * 0.59 ....
  5235. (maskDataBytes[i - 1] * 28)) | 0; // * 0.11 ....
  5236. layerDataBytes[i] = (layerDataBytes[i] * y) >> 16;
  5237. }
  5238. };
  5239. } else {
  5240. composeFn = function (maskDataBytes, layerDataBytes) {
  5241. var length = maskDataBytes.length;
  5242. for (var i = 3; i < length; i += 4) {
  5243. var alpha = maskDataBytes[i];
  5244. layerDataBytes[i] = (layerDataBytes[i] * alpha / 255) | 0;
  5245. }
  5246. };
  5247. }
  5248. // processing image in chunks to save memory
  5249. var PIXELS_TO_PROCESS = 65536;
  5250. var chunkSize = Math.min(height, Math.ceil(PIXELS_TO_PROCESS / width));
  5251. for (var row = 0; row < height; row += chunkSize) {
  5252. var chunkHeight = Math.min(chunkSize, height - row);
  5253. var maskData = maskCtx.getImageData(0, row, width, chunkHeight);
  5254. var layerData = layerCtx.getImageData(0, row, width, chunkHeight);
  5255. addBackdropFn(maskData.data);
  5256. composeFn(maskData.data, layerData.data);
  5257. maskCtx.putImageData(layerData, 0, row);
  5258. }
  5259. }
  5260. function composeSMask(ctx, smask, layerCtx) {
  5261. var mask = smask.canvas;
  5262. var maskCtx = smask.context;
  5263. ctx.setTransform(smask.scaleX, 0, 0, smask.scaleY,
  5264. smask.offsetX, smask.offsetY);
  5265. var backdrop;
  5266. if (smask.backdrop) {
  5267. var cs = smask.colorSpace || ColorSpace.singletons.rgb;
  5268. backdrop = cs.getRgb(smask.backdrop, 0);
  5269. }
  5270. if (WebGLUtils.isEnabled) {
  5271. var composed = WebGLUtils.composeSMask(layerCtx.canvas, mask,
  5272. {subtype: smask.subtype, backdrop: backdrop});
  5273. ctx.setTransform(1, 0, 0, 1, 0, 0);
  5274. ctx.drawImage(composed, smask.offsetX, smask.offsetY);
  5275. return;
  5276. }
  5277. genericComposeSMask(maskCtx, layerCtx, mask.width, mask.height,
  5278. smask.subtype, backdrop);
  5279. ctx.drawImage(mask, 0, 0);
  5280. }
  5281. var LINE_CAP_STYLES = ['butt', 'round', 'square'];
  5282. var LINE_JOIN_STYLES = ['miter', 'round', 'bevel'];
  5283. var NORMAL_CLIP = {};
  5284. var EO_CLIP = {};
  5285. CanvasGraphics.prototype = {
  5286. beginDrawing: function CanvasGraphics_beginDrawing(viewport, transparency) {
  5287. // For pdfs that use blend modes we have to clear the canvas else certain
  5288. // blend modes can look wrong since we'd be blending with a white
  5289. // backdrop. The problem with a transparent backdrop though is we then
  5290. // don't get sub pixel anti aliasing on text, so we fill with white if
  5291. // we can.
  5292. var width = this.ctx.canvas.width;
  5293. var height = this.ctx.canvas.height;
  5294. if (transparency) {
  5295. this.ctx.clearRect(0, 0, width, height);
  5296. } else {
  5297. this.ctx.mozOpaque = true;
  5298. this.ctx.save();
  5299. this.ctx.fillStyle = 'rgb(255, 255, 255)';
  5300. this.ctx.fillRect(0, 0, width, height);
  5301. this.ctx.restore();
  5302. }
  5303. var transform = viewport.transform;
  5304. this.ctx.save();
  5305. this.ctx.transform.apply(this.ctx, transform);
  5306. this.baseTransform = this.ctx.mozCurrentTransform.slice();
  5307. if (this.imageLayer) {
  5308. this.imageLayer.beginLayout();
  5309. }
  5310. },
  5311. executeOperatorList: function CanvasGraphics_executeOperatorList(
  5312. operatorList,
  5313. executionStartIdx, continueCallback,
  5314. stepper) {
  5315. var argsArray = operatorList.argsArray;
  5316. var fnArray = operatorList.fnArray;
  5317. var i = executionStartIdx || 0;
  5318. var argsArrayLen = argsArray.length;
  5319. // Sometimes the OperatorList to execute is empty.
  5320. if (argsArrayLen == i) {
  5321. return i;
  5322. }
  5323. var endTime = Date.now() + EXECUTION_TIME;
  5324. var commonObjs = this.commonObjs;
  5325. var objs = this.objs;
  5326. var fnId;
  5327. var deferred = Promise.resolve();
  5328. while (true) {
  5329. if (stepper && i === stepper.nextBreakPoint) {
  5330. stepper.breakIt(i, continueCallback);
  5331. return i;
  5332. }
  5333. fnId = fnArray[i];
  5334. if (fnId !== OPS.dependency) {
  5335. this[fnId].apply(this, argsArray[i]);
  5336. } else {
  5337. var deps = argsArray[i];
  5338. for (var n = 0, nn = deps.length; n < nn; n++) {
  5339. var depObjId = deps[n];
  5340. var common = depObjId.substring(0, 2) == 'g_';
  5341. // If the promise isn't resolved yet, add the continueCallback
  5342. // to the promise and bail out.
  5343. if (!common && !objs.isResolved(depObjId)) {
  5344. objs.get(depObjId, continueCallback);
  5345. return i;
  5346. }
  5347. if (common && !commonObjs.isResolved(depObjId)) {
  5348. commonObjs.get(depObjId, continueCallback);
  5349. return i;
  5350. }
  5351. }
  5352. }
  5353. i++;
  5354. // If the entire operatorList was executed, stop as were done.
  5355. if (i == argsArrayLen) {
  5356. return i;
  5357. }
  5358. // If the execution took longer then a certain amount of time, schedule
  5359. // to continue exeution after a short delay.
  5360. // However, this is only possible if a 'continueCallback' is passed in.
  5361. if (continueCallback && Date.now() > endTime) {
  5362. deferred.then(continueCallback);
  5363. return i;
  5364. }
  5365. // If the operatorList isn't executed completely yet OR the execution
  5366. // time was short enough, do another execution round.
  5367. }
  5368. },
  5369. endDrawing: function CanvasGraphics_endDrawing() {
  5370. this.ctx.restore();
  5371. CachedCanvases.clear();
  5372. WebGLUtils.clear();
  5373. if (this.imageLayer) {
  5374. this.imageLayer.endLayout();
  5375. }
  5376. },
  5377. // Graphics state
  5378. setLineWidth: function CanvasGraphics_setLineWidth(width) {
  5379. this.current.lineWidth = width;
  5380. this.ctx.lineWidth = width;
  5381. },
  5382. setLineCap: function CanvasGraphics_setLineCap(style) {
  5383. this.ctx.lineCap = LINE_CAP_STYLES[style];
  5384. },
  5385. setLineJoin: function CanvasGraphics_setLineJoin(style) {
  5386. this.ctx.lineJoin = LINE_JOIN_STYLES[style];
  5387. },
  5388. setMiterLimit: function CanvasGraphics_setMiterLimit(limit) {
  5389. this.ctx.miterLimit = limit;
  5390. },
  5391. setDash: function CanvasGraphics_setDash(dashArray, dashPhase) {
  5392. var ctx = this.ctx;
  5393. if ('setLineDash' in ctx) {
  5394. ctx.setLineDash(dashArray);
  5395. ctx.lineDashOffset = dashPhase;
  5396. } else {
  5397. ctx.mozDash = dashArray;
  5398. ctx.mozDashOffset = dashPhase;
  5399. }
  5400. },
  5401. setRenderingIntent: function CanvasGraphics_setRenderingIntent(intent) {
  5402. // Maybe if we one day fully support color spaces this will be important
  5403. // for now we can ignore.
  5404. // TODO set rendering intent?
  5405. },
  5406. setFlatness: function CanvasGraphics_setFlatness(flatness) {
  5407. // There's no way to control this with canvas, but we can safely ignore.
  5408. // TODO set flatness?
  5409. },
  5410. setGState: function CanvasGraphics_setGState(states) {
  5411. for (var i = 0, ii = states.length; i < ii; i++) {
  5412. var state = states[i];
  5413. var key = state[0];
  5414. var value = state[1];
  5415. switch (key) {
  5416. case 'LW':
  5417. this.setLineWidth(value);
  5418. break;
  5419. case 'LC':
  5420. this.setLineCap(value);
  5421. break;
  5422. case 'LJ':
  5423. this.setLineJoin(value);
  5424. break;
  5425. case 'ML':
  5426. this.setMiterLimit(value);
  5427. break;
  5428. case 'D':
  5429. this.setDash(value[0], value[1]);
  5430. break;
  5431. case 'RI':
  5432. this.setRenderingIntent(value);
  5433. break;
  5434. case 'FL':
  5435. this.setFlatness(value);
  5436. break;
  5437. case 'Font':
  5438. this.setFont(value[0], value[1]);
  5439. break;
  5440. case 'CA':
  5441. this.current.strokeAlpha = state[1];
  5442. break;
  5443. case 'ca':
  5444. this.current.fillAlpha = state[1];
  5445. this.ctx.globalAlpha = state[1];
  5446. break;
  5447. case 'BM':
  5448. if (value && value.name && (value.name !== 'Normal')) {
  5449. var mode = value.name.replace(/([A-Z])/g,
  5450. function(c) {
  5451. return '-' + c.toLowerCase();
  5452. }
  5453. ).substring(1);
  5454. this.ctx.globalCompositeOperation = mode;
  5455. if (this.ctx.globalCompositeOperation !== mode) {
  5456. warn('globalCompositeOperation "' + mode +
  5457. '" is not supported');
  5458. }
  5459. } else {
  5460. this.ctx.globalCompositeOperation = 'source-over';
  5461. }
  5462. break;
  5463. case 'SMask':
  5464. if (this.current.activeSMask) {
  5465. this.endSMaskGroup();
  5466. }
  5467. this.current.activeSMask = value ? this.tempSMask : null;
  5468. if (this.current.activeSMask) {
  5469. this.beginSMaskGroup();
  5470. }
  5471. this.tempSMask = null;
  5472. break;
  5473. }
  5474. }
  5475. },
  5476. beginSMaskGroup: function CanvasGraphics_beginSMaskGroup() {
  5477. var activeSMask = this.current.activeSMask;
  5478. var drawnWidth = activeSMask.canvas.width;
  5479. var drawnHeight = activeSMask.canvas.height;
  5480. var cacheId = 'smaskGroupAt' + this.groupLevel;
  5481. var scratchCanvas = CachedCanvases.getCanvas(
  5482. cacheId, drawnWidth, drawnHeight, true);
  5483. var currentCtx = this.ctx;
  5484. var currentTransform = currentCtx.mozCurrentTransform;
  5485. this.ctx.save();
  5486. var groupCtx = scratchCanvas.context;
  5487. groupCtx.scale(1 / activeSMask.scaleX, 1 / activeSMask.scaleY);
  5488. groupCtx.translate(-activeSMask.offsetX, -activeSMask.offsetY);
  5489. groupCtx.transform.apply(groupCtx, currentTransform);
  5490. copyCtxState(currentCtx, groupCtx);
  5491. this.ctx = groupCtx;
  5492. this.setGState([
  5493. ['BM', 'Normal'],
  5494. ['ca', 1],
  5495. ['CA', 1]
  5496. ]);
  5497. this.groupStack.push(currentCtx);
  5498. this.groupLevel++;
  5499. },
  5500. endSMaskGroup: function CanvasGraphics_endSMaskGroup() {
  5501. var groupCtx = this.ctx;
  5502. this.groupLevel--;
  5503. this.ctx = this.groupStack.pop();
  5504. composeSMask(this.ctx, this.current.activeSMask, groupCtx);
  5505. this.ctx.restore();
  5506. },
  5507. save: function CanvasGraphics_save() {
  5508. this.ctx.save();
  5509. var old = this.current;
  5510. this.stateStack.push(old);
  5511. this.current = old.clone();
  5512. if (this.current.activeSMask) {
  5513. this.current.activeSMask = null;
  5514. }
  5515. },
  5516. restore: function CanvasGraphics_restore() {
  5517. var prev = this.stateStack.pop();
  5518. if (prev) {
  5519. if (this.current.activeSMask) {
  5520. this.endSMaskGroup();
  5521. }
  5522. this.current = prev;
  5523. this.ctx.restore();
  5524. }
  5525. },
  5526. transform: function CanvasGraphics_transform(a, b, c, d, e, f) {
  5527. this.ctx.transform(a, b, c, d, e, f);
  5528. },
  5529. // Path
  5530. moveTo: function CanvasGraphics_moveTo(x, y) {
  5531. this.ctx.moveTo(x, y);
  5532. this.current.setCurrentPoint(x, y);
  5533. },
  5534. lineTo: function CanvasGraphics_lineTo(x, y) {
  5535. this.ctx.lineTo(x, y);
  5536. this.current.setCurrentPoint(x, y);
  5537. },
  5538. curveTo: function CanvasGraphics_curveTo(x1, y1, x2, y2, x3, y3) {
  5539. this.ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3);
  5540. this.current.setCurrentPoint(x3, y3);
  5541. },
  5542. curveTo2: function CanvasGraphics_curveTo2(x2, y2, x3, y3) {
  5543. var current = this.current;
  5544. this.ctx.bezierCurveTo(current.x, current.y, x2, y2, x3, y3);
  5545. current.setCurrentPoint(x3, y3);
  5546. },
  5547. curveTo3: function CanvasGraphics_curveTo3(x1, y1, x3, y3) {
  5548. this.curveTo(x1, y1, x3, y3, x3, y3);
  5549. this.current.setCurrentPoint(x3, y3);
  5550. },
  5551. closePath: function CanvasGraphics_closePath() {
  5552. this.ctx.closePath();
  5553. },
  5554. rectangle: function CanvasGraphics_rectangle(x, y, width, height) {
  5555. if (width === 0) {
  5556. width = this.getSinglePixelWidth();
  5557. }
  5558. if (height === 0) {
  5559. height = this.getSinglePixelWidth();
  5560. }
  5561. this.ctx.rect(x, y, width, height);
  5562. },
  5563. stroke: function CanvasGraphics_stroke(consumePath) {
  5564. consumePath = typeof consumePath !== 'undefined' ? consumePath : true;
  5565. var ctx = this.ctx;
  5566. var strokeColor = this.current.strokeColor;
  5567. if (this.current.lineWidth === 0) {
  5568. ctx.lineWidth = this.getSinglePixelWidth();
  5569. }
  5570. // For stroke we want to temporarily change the global alpha to the
  5571. // stroking alpha.
  5572. ctx.globalAlpha = this.current.strokeAlpha;
  5573. if (strokeColor && strokeColor.hasOwnProperty('type') &&
  5574. strokeColor.type === 'Pattern') {
  5575. // for patterns, we transform to pattern space, calculate
  5576. // the pattern, call stroke, and restore to user space
  5577. ctx.save();
  5578. ctx.strokeStyle = strokeColor.getPattern(ctx, this);
  5579. ctx.stroke();
  5580. ctx.restore();
  5581. } else {
  5582. ctx.stroke();
  5583. }
  5584. if (consumePath) {
  5585. this.consumePath();
  5586. }
  5587. // Restore the global alpha to the fill alpha
  5588. ctx.globalAlpha = this.current.fillAlpha;
  5589. },
  5590. closeStroke: function CanvasGraphics_closeStroke() {
  5591. this.closePath();
  5592. this.stroke();
  5593. },
  5594. fill: function CanvasGraphics_fill(consumePath) {
  5595. consumePath = typeof consumePath !== 'undefined' ? consumePath : true;
  5596. var ctx = this.ctx;
  5597. var fillColor = this.current.fillColor;
  5598. var needRestore = false;
  5599. if (fillColor && fillColor.hasOwnProperty('type') &&
  5600. fillColor.type === 'Pattern') {
  5601. ctx.save();
  5602. ctx.fillStyle = fillColor.getPattern(ctx, this);
  5603. needRestore = true;
  5604. }
  5605. if (this.pendingEOFill) {
  5606. if ('mozFillRule' in this.ctx) {
  5607. this.ctx.mozFillRule = 'evenodd';
  5608. this.ctx.fill();
  5609. this.ctx.mozFillRule = 'nonzero';
  5610. } else {
  5611. try {
  5612. this.ctx.fill('evenodd');
  5613. } catch (ex) {
  5614. // shouldn't really happen, but browsers might think differently
  5615. this.ctx.fill();
  5616. }
  5617. }
  5618. this.pendingEOFill = false;
  5619. } else {
  5620. this.ctx.fill();
  5621. }
  5622. if (needRestore) {
  5623. ctx.restore();
  5624. }
  5625. if (consumePath) {
  5626. this.consumePath();
  5627. }
  5628. },
  5629. eoFill: function CanvasGraphics_eoFill() {
  5630. this.pendingEOFill = true;
  5631. this.fill();
  5632. },
  5633. fillStroke: function CanvasGraphics_fillStroke() {
  5634. this.fill(false);
  5635. this.stroke(false);
  5636. this.consumePath();
  5637. },
  5638. eoFillStroke: function CanvasGraphics_eoFillStroke() {
  5639. this.pendingEOFill = true;
  5640. this.fillStroke();
  5641. },
  5642. closeFillStroke: function CanvasGraphics_closeFillStroke() {
  5643. this.closePath();
  5644. this.fillStroke();
  5645. },
  5646. closeEOFillStroke: function CanvasGraphics_closeEOFillStroke() {
  5647. this.pendingEOFill = true;
  5648. this.closePath();
  5649. this.fillStroke();
  5650. },
  5651. endPath: function CanvasGraphics_endPath() {
  5652. this.consumePath();
  5653. },
  5654. // Clipping
  5655. clip: function CanvasGraphics_clip() {
  5656. this.pendingClip = NORMAL_CLIP;
  5657. },
  5658. eoClip: function CanvasGraphics_eoClip() {
  5659. this.pendingClip = EO_CLIP;
  5660. },
  5661. // Text
  5662. beginText: function CanvasGraphics_beginText() {
  5663. this.current.textMatrix = IDENTITY_MATRIX;
  5664. this.current.x = this.current.lineX = 0;
  5665. this.current.y = this.current.lineY = 0;
  5666. },
  5667. endText: function CanvasGraphics_endText() {
  5668. if (!('pendingTextPaths' in this)) {
  5669. this.ctx.beginPath();
  5670. return;
  5671. }
  5672. var paths = this.pendingTextPaths;
  5673. var ctx = this.ctx;
  5674. ctx.save();
  5675. ctx.beginPath();
  5676. for (var i = 0; i < paths.length; i++) {
  5677. var path = paths[i];
  5678. ctx.setTransform.apply(ctx, path.transform);
  5679. ctx.translate(path.x, path.y);
  5680. path.addToPath(ctx, path.fontSize);
  5681. }
  5682. ctx.restore();
  5683. ctx.clip();
  5684. ctx.beginPath();
  5685. delete this.pendingTextPaths;
  5686. },
  5687. setCharSpacing: function CanvasGraphics_setCharSpacing(spacing) {
  5688. this.current.charSpacing = spacing;
  5689. },
  5690. setWordSpacing: function CanvasGraphics_setWordSpacing(spacing) {
  5691. this.current.wordSpacing = spacing;
  5692. },
  5693. setHScale: function CanvasGraphics_setHScale(scale) {
  5694. this.current.textHScale = scale / 100;
  5695. },
  5696. setLeading: function CanvasGraphics_setLeading(leading) {
  5697. this.current.leading = -leading;
  5698. },
  5699. setFont: function CanvasGraphics_setFont(fontRefName, size) {
  5700. var fontObj = this.commonObjs.get(fontRefName);
  5701. var current = this.current;
  5702. if (!fontObj) {
  5703. error('Can\'t find font for ' + fontRefName);
  5704. }
  5705. current.fontMatrix = (fontObj.fontMatrix ?
  5706. fontObj.fontMatrix : FONT_IDENTITY_MATRIX);
  5707. // A valid matrix needs all main diagonal elements to be non-zero
  5708. // This also ensures we bypass FF bugzilla bug #719844.
  5709. if (current.fontMatrix[0] === 0 ||
  5710. current.fontMatrix[3] === 0) {
  5711. warn('Invalid font matrix for font ' + fontRefName);
  5712. }
  5713. // The spec for Tf (setFont) says that 'size' specifies the font 'scale',
  5714. // and in some docs this can be negative (inverted x-y axes).
  5715. if (size < 0) {
  5716. size = -size;
  5717. current.fontDirection = -1;
  5718. } else {
  5719. current.fontDirection = 1;
  5720. }
  5721. this.current.font = fontObj;
  5722. this.current.fontSize = size;
  5723. if (fontObj.coded) {
  5724. return; // we don't need ctx.font for Type3 fonts
  5725. }
  5726. var name = fontObj.loadedName || 'sans-serif';
  5727. var bold = fontObj.black ? (fontObj.bold ? 'bolder' : 'bold') :
  5728. (fontObj.bold ? 'bold' : 'normal');
  5729. var italic = fontObj.italic ? 'italic' : 'normal';
  5730. var typeface = '"' + name + '", ' + fontObj.fallbackName;
  5731. // Some font backends cannot handle fonts below certain size.
  5732. // Keeping the font at minimal size and using the fontSizeScale to change
  5733. // the current transformation matrix before the fillText/strokeText.
  5734. // See https://bugzilla.mozilla.org/show_bug.cgi?id=726227
  5735. var browserFontSize = size >= MIN_FONT_SIZE ? size : MIN_FONT_SIZE;
  5736. this.current.fontSizeScale = browserFontSize != MIN_FONT_SIZE ? 1.0 :
  5737. size / MIN_FONT_SIZE;
  5738. var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface;
  5739. this.ctx.font = rule;
  5740. },
  5741. setTextRenderingMode: function CanvasGraphics_setTextRenderingMode(mode) {
  5742. this.current.textRenderingMode = mode;
  5743. },
  5744. setTextRise: function CanvasGraphics_setTextRise(rise) {
  5745. this.current.textRise = rise;
  5746. },
  5747. moveText: function CanvasGraphics_moveText(x, y) {
  5748. this.current.x = this.current.lineX += x;
  5749. this.current.y = this.current.lineY += y;
  5750. },
  5751. setLeadingMoveText: function CanvasGraphics_setLeadingMoveText(x, y) {
  5752. this.setLeading(-y);
  5753. this.moveText(x, y);
  5754. },
  5755. setTextMatrix: function CanvasGraphics_setTextMatrix(a, b, c, d, e, f) {
  5756. this.current.textMatrix = [a, b, c, d, e, f];
  5757. this.current.x = this.current.lineX = 0;
  5758. this.current.y = this.current.lineY = 0;
  5759. },
  5760. nextLine: function CanvasGraphics_nextLine() {
  5761. this.moveText(0, this.current.leading);
  5762. },
  5763. applyTextTransforms: function CanvasGraphics_applyTextTransforms() {
  5764. var ctx = this.ctx;
  5765. var current = this.current;
  5766. ctx.transform.apply(ctx, current.textMatrix);
  5767. ctx.translate(current.x, current.y + current.textRise);
  5768. if (current.fontDirection > 0) {
  5769. ctx.scale(current.textHScale, -1);
  5770. } else {
  5771. ctx.scale(-current.textHScale, 1);
  5772. }
  5773. },
  5774. paintChar: function (character, x, y) {
  5775. var ctx = this.ctx;
  5776. var current = this.current;
  5777. var font = current.font;
  5778. var fontSize = current.fontSize / current.fontSizeScale;
  5779. var textRenderingMode = current.textRenderingMode;
  5780. var fillStrokeMode = textRenderingMode &
  5781. TextRenderingMode.FILL_STROKE_MASK;
  5782. var isAddToPathSet = !!(textRenderingMode &
  5783. TextRenderingMode.ADD_TO_PATH_FLAG);
  5784. var addToPath;
  5785. if (font.disableFontFace || isAddToPathSet) {
  5786. addToPath = font.getPathGenerator(this.commonObjs, character);
  5787. }
  5788. if (font.disableFontFace) {
  5789. ctx.save();
  5790. ctx.translate(x, y);
  5791. ctx.beginPath();
  5792. addToPath(ctx, fontSize);
  5793. if (fillStrokeMode === TextRenderingMode.FILL ||
  5794. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  5795. ctx.fill();
  5796. }
  5797. if (fillStrokeMode === TextRenderingMode.STROKE ||
  5798. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  5799. ctx.stroke();
  5800. }
  5801. ctx.restore();
  5802. } else {
  5803. if (fillStrokeMode === TextRenderingMode.FILL ||
  5804. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  5805. ctx.fillText(character, x, y);
  5806. }
  5807. if (fillStrokeMode === TextRenderingMode.STROKE ||
  5808. fillStrokeMode === TextRenderingMode.FILL_STROKE) {
  5809. ctx.strokeText(character, x, y);
  5810. }
  5811. }
  5812. if (isAddToPathSet) {
  5813. var paths = this.pendingTextPaths || (this.pendingTextPaths = []);
  5814. paths.push({
  5815. transform: ctx.mozCurrentTransform,
  5816. x: x,
  5817. y: y,
  5818. fontSize: fontSize,
  5819. addToPath: addToPath
  5820. });
  5821. }
  5822. },
  5823. get isFontSubpixelAAEnabled() {
  5824. // Checks if anti-aliasing is enabled when scaled text is painted.
  5825. // On Windows GDI scaled fonts looks bad.
  5826. var ctx = document.createElement('canvas').getContext('2d');
  5827. ctx.scale(1.5, 1);
  5828. ctx.fillText('I', 0, 10);
  5829. var data = ctx.getImageData(0, 0, 10, 10).data;
  5830. var enabled = false;
  5831. for (var i = 3; i < data.length; i += 4) {
  5832. if (data[i] > 0 && data[i] < 255) {
  5833. enabled = true;
  5834. break;
  5835. }
  5836. }
  5837. return shadow(this, 'isFontSubpixelAAEnabled', enabled);
  5838. },
  5839. showText: function CanvasGraphics_showText(glyphs) {
  5840. var ctx = this.ctx;
  5841. var current = this.current;
  5842. var font = current.font;
  5843. var fontSize = current.fontSize;
  5844. var fontSizeScale = current.fontSizeScale;
  5845. var charSpacing = current.charSpacing;
  5846. var wordSpacing = current.wordSpacing;
  5847. var textHScale = current.textHScale * current.fontDirection;
  5848. var fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX;
  5849. var glyphsLength = glyphs.length;
  5850. var vertical = font.vertical;
  5851. var defaultVMetrics = font.defaultVMetrics;
  5852. var i, glyph, width;
  5853. if (fontSize === 0) {
  5854. return;
  5855. }
  5856. // Type3 fonts - each glyph is a "mini-PDF"
  5857. if (font.coded) {
  5858. ctx.save();
  5859. ctx.transform.apply(ctx, current.textMatrix);
  5860. ctx.translate(current.x, current.y);
  5861. ctx.scale(textHScale, 1);
  5862. for (i = 0; i < glyphsLength; ++i) {
  5863. glyph = glyphs[i];
  5864. if (glyph === null) {
  5865. // word break
  5866. this.ctx.translate(wordSpacing, 0);
  5867. current.x += wordSpacing * textHScale;
  5868. continue;
  5869. }
  5870. this.processingType3 = glyph;
  5871. this.save();
  5872. ctx.scale(fontSize, fontSize);
  5873. ctx.transform.apply(ctx, fontMatrix);
  5874. this.executeOperatorList(glyph.operatorList);
  5875. this.restore();
  5876. var transformed = Util.applyTransform([glyph.width, 0], fontMatrix);
  5877. width = ((transformed[0] * fontSize + charSpacing) *
  5878. current.fontDirection);
  5879. ctx.translate(width, 0);
  5880. current.x += width * textHScale;
  5881. }
  5882. ctx.restore();
  5883. this.processingType3 = null;
  5884. } else {
  5885. ctx.save();
  5886. this.applyTextTransforms();
  5887. var lineWidth = current.lineWidth;
  5888. var a1 = current.textMatrix[0], b1 = current.textMatrix[1];
  5889. var scale = Math.sqrt(a1 * a1 + b1 * b1);
  5890. if (scale === 0 || lineWidth === 0) {
  5891. lineWidth = this.getSinglePixelWidth();
  5892. } else {
  5893. lineWidth /= scale;
  5894. }
  5895. if (fontSizeScale != 1.0) {
  5896. ctx.scale(fontSizeScale, fontSizeScale);
  5897. lineWidth /= fontSizeScale;
  5898. }
  5899. ctx.lineWidth = lineWidth;
  5900. var x = 0;
  5901. for (i = 0; i < glyphsLength; ++i) {
  5902. glyph = glyphs[i];
  5903. if (glyph === null) {
  5904. // word break
  5905. x += current.fontDirection * wordSpacing;
  5906. continue;
  5907. }
  5908. var restoreNeeded = false;
  5909. var character = glyph.fontChar;
  5910. var vmetric = glyph.vmetric || defaultVMetrics;
  5911. if (vertical) {
  5912. var vx = glyph.vmetric ? vmetric[1] : glyph.width * 0.5;
  5913. vx = -vx * fontSize * current.fontMatrix[0];
  5914. var vy = vmetric[2] * fontSize * current.fontMatrix[0];
  5915. }
  5916. width = vmetric ? -vmetric[0] : glyph.width;
  5917. var charWidth = width * fontSize * current.fontMatrix[0] +
  5918. charSpacing * current.fontDirection;
  5919. var accent = glyph.accent;
  5920. var scaledX, scaledY, scaledAccentX, scaledAccentY;
  5921. if (vertical) {
  5922. scaledX = vx / fontSizeScale;
  5923. scaledY = (x + vy) / fontSizeScale;
  5924. } else {
  5925. scaledX = x / fontSizeScale;
  5926. scaledY = 0;
  5927. }
  5928. if (font.remeasure && width > 0 && this.isFontSubpixelAAEnabled) {
  5929. // some standard fonts may not have the exact width, trying to
  5930. // rescale per character
  5931. var measuredWidth = ctx.measureText(character).width * 1000 /
  5932. current.fontSize * current.fontSizeScale;
  5933. var characterScaleX = width / measuredWidth;
  5934. restoreNeeded = true;
  5935. ctx.save();
  5936. ctx.scale(characterScaleX, 1);
  5937. scaledX /= characterScaleX;
  5938. if (accent) {
  5939. scaledAccentX /= characterScaleX;
  5940. }
  5941. }
  5942. this.paintChar(character, scaledX, scaledY);
  5943. if (accent) {
  5944. scaledAccentX = scaledX + accent.offset.x / fontSizeScale;
  5945. scaledAccentY = scaledY - accent.offset.y / fontSizeScale;
  5946. this.paintChar(accent.fontChar, scaledAccentX, scaledAccentY);
  5947. }
  5948. x += charWidth;
  5949. if (restoreNeeded) {
  5950. ctx.restore();
  5951. }
  5952. }
  5953. if (vertical) {
  5954. current.y -= x * textHScale;
  5955. } else {
  5956. current.x += x * textHScale;
  5957. }
  5958. ctx.restore();
  5959. }
  5960. },
  5961. showSpacedText: function CanvasGraphics_showSpacedText(arr) {
  5962. var current = this.current;
  5963. var font = current.font;
  5964. var fontSize = current.fontSize;
  5965. // TJ array's number is independent from fontMatrix
  5966. var textHScale = current.textHScale * 0.001 * current.fontDirection;
  5967. var arrLength = arr.length;
  5968. var vertical = font.vertical;
  5969. for (var i = 0; i < arrLength; ++i) {
  5970. var e = arr[i];
  5971. if (isNum(e)) {
  5972. var spacingLength = -e * fontSize * textHScale;
  5973. if (vertical) {
  5974. current.y += spacingLength;
  5975. } else {
  5976. current.x += spacingLength;
  5977. }
  5978. } else {
  5979. this.showText(e);
  5980. }
  5981. }
  5982. },
  5983. nextLineShowText: function CanvasGraphics_nextLineShowText(text) {
  5984. this.nextLine();
  5985. this.showText(text);
  5986. },
  5987. nextLineSetSpacingShowText:
  5988. function CanvasGraphics_nextLineSetSpacingShowText(wordSpacing,
  5989. charSpacing,
  5990. text) {
  5991. this.setWordSpacing(wordSpacing);
  5992. this.setCharSpacing(charSpacing);
  5993. this.nextLineShowText(text);
  5994. },
  5995. // Type3 fonts
  5996. setCharWidth: function CanvasGraphics_setCharWidth(xWidth, yWidth) {
  5997. // We can safely ignore this since the width should be the same
  5998. // as the width in the Widths array.
  5999. },
  6000. setCharWidthAndBounds: function CanvasGraphics_setCharWidthAndBounds(xWidth,
  6001. yWidth,
  6002. llx,
  6003. lly,
  6004. urx,
  6005. ury) {
  6006. // TODO According to the spec we're also suppose to ignore any operators
  6007. // that set color or include images while processing this type3 font.
  6008. this.rectangle(llx, lly, urx - llx, ury - lly);
  6009. this.clip();
  6010. this.endPath();
  6011. },
  6012. // Color
  6013. setStrokeColorSpace: function CanvasGraphics_setStrokeColorSpace(raw) {
  6014. this.current.strokeColorSpace = ColorSpace.fromIR(raw);
  6015. },
  6016. setFillColorSpace: function CanvasGraphics_setFillColorSpace(raw) {
  6017. this.current.fillColorSpace = ColorSpace.fromIR(raw);
  6018. },
  6019. setStrokeColor: function CanvasGraphics_setStrokeColor(/*...*/) {
  6020. var cs = this.current.strokeColorSpace;
  6021. var rgbColor = cs.getRgb(arguments, 0);
  6022. var color = Util.makeCssRgb(rgbColor);
  6023. this.ctx.strokeStyle = color;
  6024. this.current.strokeColor = color;
  6025. },
  6026. getColorN_Pattern: function CanvasGraphics_getColorN_Pattern(IR, cs) {
  6027. var pattern;
  6028. if (IR[0] == 'TilingPattern') {
  6029. var args = IR[1];
  6030. var base = cs.base;
  6031. var color;
  6032. if (base) {
  6033. color = base.getRgb(args, 0);
  6034. }
  6035. pattern = new TilingPattern(IR, color, this.ctx, this.objs,
  6036. this.commonObjs, this.baseTransform);
  6037. } else {
  6038. pattern = getShadingPatternFromIR(IR);
  6039. }
  6040. return pattern;
  6041. },
  6042. setStrokeColorN: function CanvasGraphics_setStrokeColorN(/*...*/) {
  6043. var cs = this.current.strokeColorSpace;
  6044. if (cs.name == 'Pattern') {
  6045. this.current.strokeColor = this.getColorN_Pattern(arguments, cs);
  6046. } else {
  6047. this.setStrokeColor.apply(this, arguments);
  6048. }
  6049. },
  6050. setFillColor: function CanvasGraphics_setFillColor(/*...*/) {
  6051. var cs = this.current.fillColorSpace;
  6052. var rgbColor = cs.getRgb(arguments, 0);
  6053. var color = Util.makeCssRgb(rgbColor);
  6054. this.ctx.fillStyle = color;
  6055. this.current.fillColor = color;
  6056. },
  6057. setFillColorN: function CanvasGraphics_setFillColorN(/*...*/) {
  6058. var cs = this.current.fillColorSpace;
  6059. if (cs.name == 'Pattern') {
  6060. this.current.fillColor = this.getColorN_Pattern(arguments, cs);
  6061. } else {
  6062. this.setFillColor.apply(this, arguments);
  6063. }
  6064. },
  6065. setStrokeGray: function CanvasGraphics_setStrokeGray(gray) {
  6066. this.current.strokeColorSpace = ColorSpace.singletons.gray;
  6067. var rgbColor = this.current.strokeColorSpace.getRgb(arguments, 0);
  6068. var color = Util.makeCssRgb(rgbColor);
  6069. this.ctx.strokeStyle = color;
  6070. this.current.strokeColor = color;
  6071. },
  6072. setFillGray: function CanvasGraphics_setFillGray(gray) {
  6073. this.current.fillColorSpace = ColorSpace.singletons.gray;
  6074. var rgbColor = this.current.fillColorSpace.getRgb(arguments, 0);
  6075. var color = Util.makeCssRgb(rgbColor);
  6076. this.ctx.fillStyle = color;
  6077. this.current.fillColor = color;
  6078. },
  6079. setStrokeRGBColor: function CanvasGraphics_setStrokeRGBColor(r, g, b) {
  6080. this.current.strokeColorSpace = ColorSpace.singletons.rgb;
  6081. var rgbColor = this.current.strokeColorSpace.getRgb(arguments, 0);
  6082. var color = Util.makeCssRgb(rgbColor);
  6083. this.ctx.strokeStyle = color;
  6084. this.current.strokeColor = color;
  6085. },
  6086. setFillRGBColor: function CanvasGraphics_setFillRGBColor(r, g, b) {
  6087. this.current.fillColorSpace = ColorSpace.singletons.rgb;
  6088. var rgbColor = this.current.fillColorSpace.getRgb(arguments, 0);
  6089. var color = Util.makeCssRgb(rgbColor);
  6090. this.ctx.fillStyle = color;
  6091. this.current.fillColor = color;
  6092. },
  6093. setStrokeCMYKColor: function CanvasGraphics_setStrokeCMYKColor(c, m, y, k) {
  6094. this.current.strokeColorSpace = ColorSpace.singletons.cmyk;
  6095. var color = Util.makeCssCmyk(arguments);
  6096. this.ctx.strokeStyle = color;
  6097. this.current.strokeColor = color;
  6098. },
  6099. setFillCMYKColor: function CanvasGraphics_setFillCMYKColor(c, m, y, k) {
  6100. this.current.fillColorSpace = ColorSpace.singletons.cmyk;
  6101. var color = Util.makeCssCmyk(arguments);
  6102. this.ctx.fillStyle = color;
  6103. this.current.fillColor = color;
  6104. },
  6105. shadingFill: function CanvasGraphics_shadingFill(patternIR) {
  6106. var ctx = this.ctx;
  6107. this.save();
  6108. var pattern = getShadingPatternFromIR(patternIR);
  6109. ctx.fillStyle = pattern.getPattern(ctx, this, true);
  6110. var inv = ctx.mozCurrentTransformInverse;
  6111. if (inv) {
  6112. var canvas = ctx.canvas;
  6113. var width = canvas.width;
  6114. var height = canvas.height;
  6115. var bl = Util.applyTransform([0, 0], inv);
  6116. var br = Util.applyTransform([0, height], inv);
  6117. var ul = Util.applyTransform([width, 0], inv);
  6118. var ur = Util.applyTransform([width, height], inv);
  6119. var x0 = Math.min(bl[0], br[0], ul[0], ur[0]);
  6120. var y0 = Math.min(bl[1], br[1], ul[1], ur[1]);
  6121. var x1 = Math.max(bl[0], br[0], ul[0], ur[0]);
  6122. var y1 = Math.max(bl[1], br[1], ul[1], ur[1]);
  6123. this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0);
  6124. } else {
  6125. // HACK to draw the gradient onto an infinite rectangle.
  6126. // PDF gradients are drawn across the entire image while
  6127. // Canvas only allows gradients to be drawn in a rectangle
  6128. // The following bug should allow us to remove this.
  6129. // https://bugzilla.mozilla.org/show_bug.cgi?id=664884
  6130. this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10);
  6131. }
  6132. this.restore();
  6133. },
  6134. // Images
  6135. beginInlineImage: function CanvasGraphics_beginInlineImage() {
  6136. error('Should not call beginInlineImage');
  6137. },
  6138. beginImageData: function CanvasGraphics_beginImageData() {
  6139. error('Should not call beginImageData');
  6140. },
  6141. paintFormXObjectBegin: function CanvasGraphics_paintFormXObjectBegin(matrix,
  6142. bbox) {
  6143. this.save();
  6144. this.baseTransformStack.push(this.baseTransform);
  6145. if (matrix && isArray(matrix) && 6 == matrix.length) {
  6146. this.transform.apply(this, matrix);
  6147. }
  6148. this.baseTransform = this.ctx.mozCurrentTransform;
  6149. if (bbox && isArray(bbox) && 4 == bbox.length) {
  6150. var width = bbox[2] - bbox[0];
  6151. var height = bbox[3] - bbox[1];
  6152. this.rectangle(bbox[0], bbox[1], width, height);
  6153. this.clip();
  6154. this.endPath();
  6155. }
  6156. },
  6157. paintFormXObjectEnd: function CanvasGraphics_paintFormXObjectEnd() {
  6158. this.restore();
  6159. this.baseTransform = this.baseTransformStack.pop();
  6160. },
  6161. beginGroup: function CanvasGraphics_beginGroup(group) {
  6162. this.save();
  6163. var currentCtx = this.ctx;
  6164. // TODO non-isolated groups - according to Rik at adobe non-isolated
  6165. // group results aren't usually that different and they even have tools
  6166. // that ignore this setting. Notes from Rik on implmenting:
  6167. // - When you encounter an transparency group, create a new canvas with
  6168. // the dimensions of the bbox
  6169. // - copy the content from the previous canvas to the new canvas
  6170. // - draw as usual
  6171. // - remove the backdrop alpha:
  6172. // alphaNew = 1 - (1 - alpha)/(1 - alphaBackdrop) with 'alpha' the alpha
  6173. // value of your transparency group and 'alphaBackdrop' the alpha of the
  6174. // backdrop
  6175. // - remove background color:
  6176. // colorNew = color - alphaNew *colorBackdrop /(1 - alphaNew)
  6177. if (!group.isolated) {
  6178. info('TODO: Support non-isolated groups.');
  6179. }
  6180. // TODO knockout - supposedly possible with the clever use of compositing
  6181. // modes.
  6182. if (group.knockout) {
  6183. warn('Knockout groups not supported.');
  6184. }
  6185. var currentTransform = currentCtx.mozCurrentTransform;
  6186. if (group.matrix) {
  6187. currentCtx.transform.apply(currentCtx, group.matrix);
  6188. }
  6189. assert(group.bbox, 'Bounding box is required.');
  6190. // Based on the current transform figure out how big the bounding box
  6191. // will actually be.
  6192. var bounds = Util.getAxialAlignedBoundingBox(
  6193. group.bbox,
  6194. currentCtx.mozCurrentTransform);
  6195. // Clip the bounding box to the current canvas.
  6196. var canvasBounds = [0,
  6197. 0,
  6198. currentCtx.canvas.width,
  6199. currentCtx.canvas.height];
  6200. bounds = Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0];
  6201. // Use ceil in case we're between sizes so we don't create canvas that is
  6202. // too small and make the canvas at least 1x1 pixels.
  6203. var offsetX = Math.floor(bounds[0]);
  6204. var offsetY = Math.floor(bounds[1]);
  6205. var drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1);
  6206. var drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1);
  6207. var scaleX = 1, scaleY = 1;
  6208. if (drawnWidth > MAX_GROUP_SIZE) {
  6209. scaleX = drawnWidth / MAX_GROUP_SIZE;
  6210. drawnWidth = MAX_GROUP_SIZE;
  6211. }
  6212. if (drawnHeight > MAX_GROUP_SIZE) {
  6213. scaleY = drawnHeight / MAX_GROUP_SIZE;
  6214. drawnHeight = MAX_GROUP_SIZE;
  6215. }
  6216. var cacheId = 'groupAt' + this.groupLevel;
  6217. if (group.smask) {
  6218. // Using two cache entries is case if masks are used one after another.
  6219. cacheId += '_smask_' + ((this.smaskCounter++) % 2);
  6220. }
  6221. var scratchCanvas = CachedCanvases.getCanvas(
  6222. cacheId, drawnWidth, drawnHeight, true);
  6223. var groupCtx = scratchCanvas.context;
  6224. // Since we created a new canvas that is just the size of the bounding box
  6225. // we have to translate the group ctx.
  6226. groupCtx.scale(1 / scaleX, 1 / scaleY);
  6227. groupCtx.translate(-offsetX, -offsetY);
  6228. groupCtx.transform.apply(groupCtx, currentTransform);
  6229. if (group.smask) {
  6230. // Saving state and cached mask to be used in setGState.
  6231. this.smaskStack.push({
  6232. canvas: scratchCanvas.canvas,
  6233. context: groupCtx,
  6234. offsetX: offsetX,
  6235. offsetY: offsetY,
  6236. scaleX: scaleX,
  6237. scaleY: scaleY,
  6238. subtype: group.smask.subtype,
  6239. backdrop: group.smask.backdrop,
  6240. colorSpace: group.colorSpace && ColorSpace.fromIR(group.colorSpace)
  6241. });
  6242. } else {
  6243. // Setup the current ctx so when the group is popped we draw it at the
  6244. // right location.
  6245. currentCtx.setTransform(1, 0, 0, 1, 0, 0);
  6246. currentCtx.translate(offsetX, offsetY);
  6247. currentCtx.scale(scaleX, scaleY);
  6248. }
  6249. // The transparency group inherits all off the current graphics state
  6250. // except the blend mode, soft mask, and alpha constants.
  6251. copyCtxState(currentCtx, groupCtx);
  6252. this.ctx = groupCtx;
  6253. this.setGState([
  6254. ['BM', 'Normal'],
  6255. ['ca', 1],
  6256. ['CA', 1]
  6257. ]);
  6258. this.groupStack.push(currentCtx);
  6259. this.groupLevel++;
  6260. },
  6261. endGroup: function CanvasGraphics_endGroup(group) {
  6262. this.groupLevel--;
  6263. var groupCtx = this.ctx;
  6264. this.ctx = this.groupStack.pop();
  6265. // Turn off image smoothing to avoid sub pixel interpolation which can
  6266. // look kind of blurry for some pdfs.
  6267. if ('imageSmoothingEnabled' in this.ctx) {
  6268. this.ctx.imageSmoothingEnabled = false;
  6269. } else {
  6270. this.ctx.mozImageSmoothingEnabled = false;
  6271. }
  6272. if (group.smask) {
  6273. this.tempSMask = this.smaskStack.pop();
  6274. } else {
  6275. this.ctx.drawImage(groupCtx.canvas, 0, 0);
  6276. }
  6277. this.restore();
  6278. },
  6279. beginAnnotations: function CanvasGraphics_beginAnnotations() {
  6280. this.save();
  6281. this.current = new CanvasExtraState();
  6282. },
  6283. endAnnotations: function CanvasGraphics_endAnnotations() {
  6284. this.restore();
  6285. },
  6286. beginAnnotation: function CanvasGraphics_beginAnnotation(rect, transform,
  6287. matrix) {
  6288. this.save();
  6289. if (rect && isArray(rect) && 4 == rect.length) {
  6290. var width = rect[2] - rect[0];
  6291. var height = rect[3] - rect[1];
  6292. this.rectangle(rect[0], rect[1], width, height);
  6293. this.clip();
  6294. this.endPath();
  6295. }
  6296. this.transform.apply(this, transform);
  6297. this.transform.apply(this, matrix);
  6298. },
  6299. endAnnotation: function CanvasGraphics_endAnnotation() {
  6300. this.restore();
  6301. },
  6302. paintJpegXObject: function CanvasGraphics_paintJpegXObject(objId, w, h) {
  6303. var domImage = this.objs.get(objId);
  6304. if (!domImage) {
  6305. warn('Dependent image isn\'t ready yet');
  6306. return;
  6307. }
  6308. this.save();
  6309. var ctx = this.ctx;
  6310. // scale the image to the unit square
  6311. ctx.scale(1 / w, -1 / h);
  6312. ctx.drawImage(domImage, 0, 0, domImage.width, domImage.height,
  6313. 0, -h, w, h);
  6314. if (this.imageLayer) {
  6315. var currentTransform = ctx.mozCurrentTransformInverse;
  6316. var position = this.getCanvasPosition(0, 0);
  6317. this.imageLayer.appendImage({
  6318. objId: objId,
  6319. left: position[0],
  6320. top: position[1],
  6321. width: w / currentTransform[0],
  6322. height: h / currentTransform[3]
  6323. });
  6324. }
  6325. this.restore();
  6326. },
  6327. paintImageMaskXObject: function CanvasGraphics_paintImageMaskXObject(img) {
  6328. var ctx = this.ctx;
  6329. var width = img.width, height = img.height;
  6330. var glyph = this.processingType3;
  6331. if (COMPILE_TYPE3_GLYPHS && glyph && !('compiled' in glyph)) {
  6332. var MAX_SIZE_TO_COMPILE = 1000;
  6333. if (width <= MAX_SIZE_TO_COMPILE && height <= MAX_SIZE_TO_COMPILE) {
  6334. glyph.compiled =
  6335. compileType3Glyph({data: img.data, width: width, height: height});
  6336. } else {
  6337. glyph.compiled = null;
  6338. }
  6339. }
  6340. if (glyph && glyph.compiled) {
  6341. glyph.compiled(ctx);
  6342. return;
  6343. }
  6344. var maskCanvas = CachedCanvases.getCanvas('maskCanvas', width, height);
  6345. var maskCtx = maskCanvas.context;
  6346. maskCtx.save();
  6347. putBinaryImageMask(maskCtx, img);
  6348. maskCtx.globalCompositeOperation = 'source-in';
  6349. var fillColor = this.current.fillColor;
  6350. maskCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') &&
  6351. fillColor.type === 'Pattern') ?
  6352. fillColor.getPattern(maskCtx, this) : fillColor;
  6353. maskCtx.fillRect(0, 0, width, height);
  6354. maskCtx.restore();
  6355. this.paintInlineImageXObject(maskCanvas.canvas);
  6356. },
  6357. paintImageMaskXObjectRepeat:
  6358. function CanvasGraphics_paintImageMaskXObjectRepeat(imgData, scaleX,
  6359. scaleY, positions) {
  6360. var width = imgData.width;
  6361. var height = imgData.height;
  6362. var ctx = this.ctx;
  6363. var maskCanvas = CachedCanvases.getCanvas('maskCanvas', width, height);
  6364. var maskCtx = maskCanvas.context;
  6365. maskCtx.save();
  6366. putBinaryImageMask(maskCtx, imgData);
  6367. maskCtx.globalCompositeOperation = 'source-in';
  6368. var fillColor = this.current.fillColor;
  6369. maskCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') &&
  6370. fillColor.type === 'Pattern') ?
  6371. fillColor.getPattern(maskCtx, this) : fillColor;
  6372. maskCtx.fillRect(0, 0, width, height);
  6373. maskCtx.restore();
  6374. for (var i = 0, ii = positions.length; i < ii; i += 2) {
  6375. ctx.save();
  6376. ctx.transform(scaleX, 0, 0, scaleY, positions[i], positions[i + 1]);
  6377. ctx.scale(1, -1);
  6378. ctx.drawImage(maskCanvas.canvas, 0, 0, width, height,
  6379. 0, -1, 1, 1);
  6380. ctx.restore();
  6381. }
  6382. },
  6383. paintImageMaskXObjectGroup:
  6384. function CanvasGraphics_paintImageMaskXObjectGroup(images) {
  6385. var ctx = this.ctx;
  6386. for (var i = 0, ii = images.length; i < ii; i++) {
  6387. var image = images[i];
  6388. var width = image.width, height = image.height;
  6389. var maskCanvas = CachedCanvases.getCanvas('maskCanvas', width, height);
  6390. var maskCtx = maskCanvas.context;
  6391. maskCtx.save();
  6392. putBinaryImageMask(maskCtx, image);
  6393. maskCtx.globalCompositeOperation = 'source-in';
  6394. var fillColor = this.current.fillColor;
  6395. maskCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') &&
  6396. fillColor.type === 'Pattern') ?
  6397. fillColor.getPattern(maskCtx, this) : fillColor;
  6398. maskCtx.fillRect(0, 0, width, height);
  6399. maskCtx.restore();
  6400. ctx.save();
  6401. ctx.transform.apply(ctx, image.transform);
  6402. ctx.scale(1, -1);
  6403. ctx.drawImage(maskCanvas.canvas, 0, 0, width, height,
  6404. 0, -1, 1, 1);
  6405. ctx.restore();
  6406. }
  6407. },
  6408. paintImageXObject: function CanvasGraphics_paintImageXObject(objId) {
  6409. var imgData = this.objs.get(objId);
  6410. if (!imgData) {
  6411. warn('Dependent image isn\'t ready yet');
  6412. return;
  6413. }
  6414. this.paintInlineImageXObject(imgData);
  6415. },
  6416. paintImageXObjectRepeat:
  6417. function CanvasGraphics_paintImageXObjectRepeat(objId, scaleX, scaleY,
  6418. positions) {
  6419. var imgData = this.objs.get(objId);
  6420. if (!imgData) {
  6421. warn('Dependent image isn\'t ready yet');
  6422. return;
  6423. }
  6424. var width = imgData.width;
  6425. var height = imgData.height;
  6426. var map = [];
  6427. for (var i = 0, ii = positions.length; i < ii; i += 2) {
  6428. map.push({transform: [scaleX, 0, 0, scaleY, positions[i],
  6429. positions[i + 1]], x: 0, y: 0, w: width, h: height});
  6430. }
  6431. this.paintInlineImageXObjectGroup(imgData, map);
  6432. },
  6433. paintInlineImageXObject:
  6434. function CanvasGraphics_paintInlineImageXObject(imgData) {
  6435. var width = imgData.width;
  6436. var height = imgData.height;
  6437. var ctx = this.ctx;
  6438. this.save();
  6439. // scale the image to the unit square
  6440. ctx.scale(1 / width, -1 / height);
  6441. var currentTransform = ctx.mozCurrentTransformInverse;
  6442. var a = currentTransform[0], b = currentTransform[1];
  6443. var widthScale = Math.max(Math.sqrt(a * a + b * b), 1);
  6444. var c = currentTransform[2], d = currentTransform[3];
  6445. var heightScale = Math.max(Math.sqrt(c * c + d * d), 1);
  6446. var imgToPaint, tmpCanvas;
  6447. // instanceof HTMLElement does not work in jsdom node.js module
  6448. if (imgData instanceof HTMLElement || !imgData.data) {
  6449. imgToPaint = imgData;
  6450. } else {
  6451. tmpCanvas = CachedCanvases.getCanvas('inlineImage', width, height);
  6452. var tmpCtx = tmpCanvas.context;
  6453. putBinaryImageData(tmpCtx, imgData);
  6454. imgToPaint = tmpCanvas.canvas;
  6455. }
  6456. var paintWidth = width, paintHeight = height;
  6457. var tmpCanvasId = 'prescale1';
  6458. // Vertial or horizontal scaling shall not be more than 2 to not loose the
  6459. // pixels during drawImage operation, painting on the temporary canvas(es)
  6460. // that are twice smaller in size
  6461. while ((widthScale > 2 && paintWidth > 1) ||
  6462. (heightScale > 2 && paintHeight > 1)) {
  6463. var newWidth = paintWidth, newHeight = paintHeight;
  6464. if (widthScale > 2 && paintWidth > 1) {
  6465. newWidth = Math.ceil(paintWidth / 2);
  6466. widthScale /= paintWidth / newWidth;
  6467. }
  6468. if (heightScale > 2 && paintHeight > 1) {
  6469. newHeight = Math.ceil(paintHeight / 2);
  6470. heightScale /= paintHeight / newHeight;
  6471. }
  6472. tmpCanvas = CachedCanvases.getCanvas(tmpCanvasId, newWidth, newHeight);
  6473. tmpCtx = tmpCanvas.context;
  6474. tmpCtx.clearRect(0, 0, newWidth, newHeight);
  6475. tmpCtx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight,
  6476. 0, 0, newWidth, newHeight);
  6477. imgToPaint = tmpCanvas.canvas;
  6478. paintWidth = newWidth;
  6479. paintHeight = newHeight;
  6480. tmpCanvasId = tmpCanvasId === 'prescale1' ? 'prescale2' : 'prescale1';
  6481. }
  6482. ctx.drawImage(imgToPaint, 0, 0, paintWidth, paintHeight,
  6483. 0, -height, width, height);
  6484. if (this.imageLayer) {
  6485. var position = this.getCanvasPosition(0, -height);
  6486. this.imageLayer.appendImage({
  6487. imgData: imgData,
  6488. left: position[0],
  6489. top: position[1],
  6490. width: width / currentTransform[0],
  6491. height: height / currentTransform[3]
  6492. });
  6493. }
  6494. this.restore();
  6495. },
  6496. paintInlineImageXObjectGroup:
  6497. function CanvasGraphics_paintInlineImageXObjectGroup(imgData, map) {
  6498. var ctx = this.ctx;
  6499. var w = imgData.width;
  6500. var h = imgData.height;
  6501. var tmpCanvas = CachedCanvases.getCanvas('inlineImage', w, h);
  6502. var tmpCtx = tmpCanvas.context;
  6503. putBinaryImageData(tmpCtx, imgData);
  6504. for (var i = 0, ii = map.length; i < ii; i++) {
  6505. var entry = map[i];
  6506. ctx.save();
  6507. ctx.transform.apply(ctx, entry.transform);
  6508. ctx.scale(1, -1);
  6509. ctx.drawImage(tmpCanvas.canvas, entry.x, entry.y, entry.w, entry.h,
  6510. 0, -1, 1, 1);
  6511. if (this.imageLayer) {
  6512. var position = this.getCanvasPosition(entry.x, entry.y);
  6513. this.imageLayer.appendImage({
  6514. imgData: imgData,
  6515. left: position[0],
  6516. top: position[1],
  6517. width: w,
  6518. height: h
  6519. });
  6520. }
  6521. ctx.restore();
  6522. }
  6523. },
  6524. paintSolidColorImageMask:
  6525. function CanvasGraphics_paintSolidColorImageMask() {
  6526. this.ctx.fillRect(0, 0, 1, 1);
  6527. },
  6528. // Marked content
  6529. markPoint: function CanvasGraphics_markPoint(tag) {
  6530. // TODO Marked content.
  6531. },
  6532. markPointProps: function CanvasGraphics_markPointProps(tag, properties) {
  6533. // TODO Marked content.
  6534. },
  6535. beginMarkedContent: function CanvasGraphics_beginMarkedContent(tag) {
  6536. // TODO Marked content.
  6537. },
  6538. beginMarkedContentProps: function CanvasGraphics_beginMarkedContentProps(
  6539. tag, properties) {
  6540. // TODO Marked content.
  6541. },
  6542. endMarkedContent: function CanvasGraphics_endMarkedContent() {
  6543. // TODO Marked content.
  6544. },
  6545. // Compatibility
  6546. beginCompat: function CanvasGraphics_beginCompat() {
  6547. // TODO ignore undefined operators (should we do that anyway?)
  6548. },
  6549. endCompat: function CanvasGraphics_endCompat() {
  6550. // TODO stop ignoring undefined operators
  6551. },
  6552. // Helper functions
  6553. consumePath: function CanvasGraphics_consumePath() {
  6554. if (this.pendingClip) {
  6555. if (this.pendingClip == EO_CLIP) {
  6556. if ('mozFillRule' in this.ctx) {
  6557. this.ctx.mozFillRule = 'evenodd';
  6558. this.ctx.clip();
  6559. this.ctx.mozFillRule = 'nonzero';
  6560. } else {
  6561. try {
  6562. this.ctx.clip('evenodd');
  6563. } catch (ex) {
  6564. // shouldn't really happen, but browsers might think differently
  6565. this.ctx.clip();
  6566. }
  6567. }
  6568. } else {
  6569. this.ctx.clip();
  6570. }
  6571. this.pendingClip = null;
  6572. }
  6573. this.ctx.beginPath();
  6574. },
  6575. getSinglePixelWidth: function CanvasGraphics_getSinglePixelWidth(scale) {
  6576. var inverse = this.ctx.mozCurrentTransformInverse;
  6577. // max of the current horizontal and vertical scale
  6578. return Math.sqrt(Math.max(
  6579. (inverse[0] * inverse[0] + inverse[1] * inverse[1]),
  6580. (inverse[2] * inverse[2] + inverse[3] * inverse[3])));
  6581. },
  6582. getCanvasPosition: function CanvasGraphics_getCanvasPosition(x, y) {
  6583. var transform = this.ctx.mozCurrentTransform;
  6584. return [
  6585. transform[0] * x + transform[2] * y + transform[4],
  6586. transform[1] * x + transform[3] * y + transform[5]
  6587. ];
  6588. }
  6589. };
  6590. for (var op in OPS) {
  6591. CanvasGraphics.prototype[OPS[op]] = CanvasGraphics.prototype[op];
  6592. }
  6593. return CanvasGraphics;
  6594. })();
  6595. var WebGLUtils = (function WebGLUtilsClosure() {
  6596. function loadShader(gl, code, shaderType) {
  6597. var shader = gl.createShader(shaderType);
  6598. gl.shaderSource(shader, code);
  6599. gl.compileShader(shader);
  6600. var compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);
  6601. if (!compiled) {
  6602. var errorMsg = gl.getShaderInfoLog(shader);
  6603. throw new Error('Error during shader compilation: ' + errorMsg);
  6604. }
  6605. return shader;
  6606. }
  6607. function createVertexShader(gl, code) {
  6608. return loadShader(gl, code, gl.VERTEX_SHADER);
  6609. }
  6610. function createFragmentShader(gl, code) {
  6611. return loadShader(gl, code, gl.FRAGMENT_SHADER);
  6612. }
  6613. function createProgram(gl, shaders) {
  6614. var program = gl.createProgram();
  6615. for (var i = 0, ii = shaders.length; i < ii; ++i) {
  6616. gl.attachShader(program, shaders[i]);
  6617. }
  6618. gl.linkProgram(program);
  6619. var linked = gl.getProgramParameter(program, gl.LINK_STATUS);
  6620. if (!linked) {
  6621. var errorMsg = gl.getProgramInfoLog(program);
  6622. throw new Error('Error during program linking: ' + errorMsg);
  6623. }
  6624. return program;
  6625. }
  6626. function createTexture(gl, image, textureId) {
  6627. gl.activeTexture(textureId);
  6628. var texture = gl.createTexture();
  6629. gl.bindTexture(gl.TEXTURE_2D, texture);
  6630. // Set the parameters so we can render any size image.
  6631. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
  6632. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
  6633. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
  6634. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
  6635. // Upload the image into the texture.
  6636. gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
  6637. return texture;
  6638. }
  6639. var currentGL, currentCanvas;
  6640. function generageGL() {
  6641. if (currentGL) {
  6642. return;
  6643. }
  6644. currentCanvas = document.createElement('canvas');
  6645. currentGL = currentCanvas.getContext('webgl',
  6646. { premultipliedalpha: false });
  6647. }
  6648. var smaskVertexShaderCode = '\
  6649. attribute vec2 a_position; \
  6650. attribute vec2 a_texCoord; \
  6651. \
  6652. uniform vec2 u_resolution; \
  6653. \
  6654. varying vec2 v_texCoord; \
  6655. \
  6656. void main() { \
  6657. vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; \
  6658. gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \
  6659. \
  6660. v_texCoord = a_texCoord; \
  6661. } ';
  6662. var smaskFragmentShaderCode = '\
  6663. precision mediump float; \
  6664. \
  6665. uniform vec4 u_backdrop; \
  6666. uniform int u_subtype; \
  6667. uniform sampler2D u_image; \
  6668. uniform sampler2D u_mask; \
  6669. \
  6670. varying vec2 v_texCoord; \
  6671. \
  6672. void main() { \
  6673. vec4 imageColor = texture2D(u_image, v_texCoord); \
  6674. vec4 maskColor = texture2D(u_mask, v_texCoord); \
  6675. if (u_backdrop.a > 0.0) { \
  6676. maskColor.rgb = maskColor.rgb * maskColor.a + \
  6677. u_backdrop.rgb * (1.0 - maskColor.a); \
  6678. } \
  6679. float lum; \
  6680. if (u_subtype == 0) { \
  6681. lum = maskColor.a; \
  6682. } else { \
  6683. lum = maskColor.r * 0.3 + maskColor.g * 0.59 + \
  6684. maskColor.b * 0.11; \
  6685. } \
  6686. imageColor.a *= lum; \
  6687. imageColor.rgb *= imageColor.a; \
  6688. gl_FragColor = imageColor; \
  6689. } ';
  6690. var smaskCache = null;
  6691. function initSmaskGL() {
  6692. var canvas, gl;
  6693. generageGL();
  6694. canvas = currentCanvas;
  6695. currentCanvas = null;
  6696. gl = currentGL;
  6697. currentGL = null;
  6698. // setup a GLSL program
  6699. var vertexShader = createVertexShader(gl, smaskVertexShaderCode);
  6700. var fragmentShader = createFragmentShader(gl, smaskFragmentShaderCode);
  6701. var program = createProgram(gl, [vertexShader, fragmentShader]);
  6702. gl.useProgram(program);
  6703. var cache = {};
  6704. cache.gl = gl;
  6705. cache.canvas = canvas;
  6706. cache.resolutionLocation = gl.getUniformLocation(program, 'u_resolution');
  6707. cache.positionLocation = gl.getAttribLocation(program, 'a_position');
  6708. cache.backdropLocation = gl.getUniformLocation(program, 'u_backdrop');
  6709. cache.subtypeLocation = gl.getUniformLocation(program, 'u_subtype');
  6710. var texCoordLocation = gl.getAttribLocation(program, 'a_texCoord');
  6711. var texLayerLocation = gl.getUniformLocation(program, 'u_image');
  6712. var texMaskLocation = gl.getUniformLocation(program, 'u_mask');
  6713. // provide texture coordinates for the rectangle.
  6714. var texCoordBuffer = gl.createBuffer();
  6715. gl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer);
  6716. gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
  6717. 0.0, 0.0,
  6718. 1.0, 0.0,
  6719. 0.0, 1.0,
  6720. 0.0, 1.0,
  6721. 1.0, 0.0,
  6722. 1.0, 1.0]), gl.STATIC_DRAW);
  6723. gl.enableVertexAttribArray(texCoordLocation);
  6724. gl.vertexAttribPointer(texCoordLocation, 2, gl.FLOAT, false, 0, 0);
  6725. gl.uniform1i(texLayerLocation, 0);
  6726. gl.uniform1i(texMaskLocation, 1);
  6727. smaskCache = cache;
  6728. }
  6729. function composeSMask(layer, mask, properties) {
  6730. var width = layer.width, height = layer.height;
  6731. if (!smaskCache) {
  6732. initSmaskGL();
  6733. }
  6734. var cache = smaskCache,canvas = cache.canvas, gl = cache.gl;
  6735. canvas.width = width;
  6736. canvas.height = height;
  6737. gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
  6738. gl.uniform2f(cache.resolutionLocation, width, height);
  6739. if (properties.backdrop) {
  6740. gl.uniform4f(cache.resolutionLocation, properties.backdrop[0],
  6741. properties.backdrop[1], properties.backdrop[2], 1);
  6742. } else {
  6743. gl.uniform4f(cache.resolutionLocation, 0, 0, 0, 0);
  6744. }
  6745. gl.uniform1i(cache.subtypeLocation,
  6746. properties.subtype === 'Luminosity' ? 1 : 0);
  6747. // Create a textures
  6748. var texture = createTexture(gl, layer, gl.TEXTURE0);
  6749. var maskTexture = createTexture(gl, mask, gl.TEXTURE1);
  6750. // Create a buffer and put a single clipspace rectangle in
  6751. // it (2 triangles)
  6752. var buffer = gl.createBuffer();
  6753. gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
  6754. gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
  6755. 0, 0,
  6756. width, 0,
  6757. 0, height,
  6758. 0, height,
  6759. width, 0,
  6760. width, height]), gl.STATIC_DRAW);
  6761. gl.enableVertexAttribArray(cache.positionLocation);
  6762. gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0);
  6763. // draw
  6764. gl.clearColor(0, 0, 0, 0);
  6765. gl.enable(gl.BLEND);
  6766. gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
  6767. gl.clear(gl.COLOR_BUFFER_BIT);
  6768. gl.drawArrays(gl.TRIANGLES, 0, 6);
  6769. gl.flush();
  6770. gl.deleteTexture(texture);
  6771. gl.deleteTexture(maskTexture);
  6772. gl.deleteBuffer(buffer);
  6773. return canvas;
  6774. }
  6775. var figuresVertexShaderCode = '\
  6776. attribute vec2 a_position; \
  6777. attribute vec3 a_color; \
  6778. \
  6779. uniform vec2 u_resolution; \
  6780. uniform vec2 u_scale; \
  6781. uniform vec2 u_offset; \
  6782. \
  6783. varying vec4 v_color; \
  6784. \
  6785. void main() { \
  6786. vec2 position = (a_position + u_offset) * u_scale; \
  6787. vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; \
  6788. gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); \
  6789. \
  6790. v_color = vec4(a_color / 255.0, 1.0); \
  6791. } ';
  6792. var figuresFragmentShaderCode = '\
  6793. precision mediump float; \
  6794. \
  6795. varying vec4 v_color; \
  6796. \
  6797. void main() { \
  6798. gl_FragColor = v_color; \
  6799. } ';
  6800. var figuresCache = null;
  6801. function initFiguresGL() {
  6802. var canvas, gl;
  6803. generageGL();
  6804. canvas = currentCanvas;
  6805. currentCanvas = null;
  6806. gl = currentGL;
  6807. currentGL = null;
  6808. // setup a GLSL program
  6809. var vertexShader = createVertexShader(gl, figuresVertexShaderCode);
  6810. var fragmentShader = createFragmentShader(gl, figuresFragmentShaderCode);
  6811. var program = createProgram(gl, [vertexShader, fragmentShader]);
  6812. gl.useProgram(program);
  6813. var cache = {};
  6814. cache.gl = gl;
  6815. cache.canvas = canvas;
  6816. cache.resolutionLocation = gl.getUniformLocation(program, 'u_resolution');
  6817. cache.scaleLocation = gl.getUniformLocation(program, 'u_scale');
  6818. cache.offsetLocation = gl.getUniformLocation(program, 'u_offset');
  6819. cache.positionLocation = gl.getAttribLocation(program, 'a_position');
  6820. cache.colorLocation = gl.getAttribLocation(program, 'a_color');
  6821. figuresCache = cache;
  6822. }
  6823. function drawFigures(width, height, backgroundColor, figures, context) {
  6824. if (!figuresCache) {
  6825. initFiguresGL();
  6826. }
  6827. var cache = figuresCache, canvas = cache.canvas, gl = cache.gl;
  6828. canvas.width = width;
  6829. canvas.height = height;
  6830. gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
  6831. gl.uniform2f(cache.resolutionLocation, width, height);
  6832. // count triangle points
  6833. var count = 0;
  6834. var i, ii, rows;
  6835. for (i = 0, ii = figures.length; i < ii; i++) {
  6836. switch (figures[i].type) {
  6837. case 'lattice':
  6838. rows = (figures[i].coords.length / figures[i].verticesPerRow) | 0;
  6839. count += (rows - 1) * (figures[i].verticesPerRow - 1) * 6;
  6840. break;
  6841. case 'triangles':
  6842. count += figures[i].coords.length;
  6843. break;
  6844. }
  6845. }
  6846. // transfer data
  6847. var coords = new Float32Array(count * 2);
  6848. var colors = new Uint8Array(count * 3);
  6849. var coordsMap = context.coords, colorsMap = context.colors;
  6850. var pIndex = 0, cIndex = 0;
  6851. for (i = 0, ii = figures.length; i < ii; i++) {
  6852. var figure = figures[i], ps = figure.coords, cs = figure.colors;
  6853. switch (figure.type) {
  6854. case 'lattice':
  6855. var cols = figure.verticesPerRow;
  6856. rows = (ps.length / cols) | 0;
  6857. for (var row = 1; row < rows; row++) {
  6858. var offset = row * cols + 1;
  6859. for (var col = 1; col < cols; col++, offset++) {
  6860. coords[pIndex] = coordsMap[ps[offset - cols - 1]];
  6861. coords[pIndex + 1] = coordsMap[ps[offset - cols - 1] + 1];
  6862. coords[pIndex + 2] = coordsMap[ps[offset - cols]];
  6863. coords[pIndex + 3] = coordsMap[ps[offset - cols] + 1];
  6864. coords[pIndex + 4] = coordsMap[ps[offset - 1]];
  6865. coords[pIndex + 5] = coordsMap[ps[offset - 1] + 1];
  6866. colors[cIndex] = colorsMap[cs[offset - cols - 1]];
  6867. colors[cIndex + 1] = colorsMap[cs[offset - cols - 1] + 1];
  6868. colors[cIndex + 2] = colorsMap[cs[offset - cols - 1] + 2];
  6869. colors[cIndex + 3] = colorsMap[cs[offset - cols]];
  6870. colors[cIndex + 4] = colorsMap[cs[offset - cols] + 1];
  6871. colors[cIndex + 5] = colorsMap[cs[offset - cols] + 2];
  6872. colors[cIndex + 6] = colorsMap[cs[offset - 1]];
  6873. colors[cIndex + 7] = colorsMap[cs[offset - 1] + 1];
  6874. colors[cIndex + 8] = colorsMap[cs[offset - 1] + 2];
  6875. coords[pIndex + 6] = coords[pIndex + 2];
  6876. coords[pIndex + 7] = coords[pIndex + 3];
  6877. coords[pIndex + 8] = coords[pIndex + 4];
  6878. coords[pIndex + 9] = coords[pIndex + 5];
  6879. coords[pIndex + 10] = coordsMap[ps[offset]];
  6880. coords[pIndex + 11] = coordsMap[ps[offset] + 1];
  6881. colors[cIndex + 9] = colors[cIndex + 3];
  6882. colors[cIndex + 10] = colors[cIndex + 4];
  6883. colors[cIndex + 11] = colors[cIndex + 5];
  6884. colors[cIndex + 12] = colors[cIndex + 6];
  6885. colors[cIndex + 13] = colors[cIndex + 7];
  6886. colors[cIndex + 14] = colors[cIndex + 8];
  6887. colors[cIndex + 15] = colorsMap[cs[offset]];
  6888. colors[cIndex + 16] = colorsMap[cs[offset] + 1];
  6889. colors[cIndex + 17] = colorsMap[cs[offset] + 2];
  6890. pIndex += 12;
  6891. cIndex += 18;
  6892. }
  6893. }
  6894. break;
  6895. case 'triangles':
  6896. for (var j = 0, jj = ps.length; j < jj; j++) {
  6897. coords[pIndex] = coordsMap[ps[j]];
  6898. coords[pIndex + 1] = coordsMap[ps[j] + 1];
  6899. colors[cIndex] = colorsMap[cs[i]];
  6900. colors[cIndex + 1] = colorsMap[cs[j] + 1];
  6901. colors[cIndex + 2] = colorsMap[cs[j] + 2];
  6902. pIndex += 2;
  6903. cIndex += 3;
  6904. }
  6905. break;
  6906. }
  6907. }
  6908. // draw
  6909. if (backgroundColor) {
  6910. gl.clearColor(backgroundColor[0] / 255, backgroundColor[1] / 255,
  6911. backgroundColor[2] / 255, 1.0);
  6912. } else {
  6913. gl.clearColor(0, 0, 0, 0);
  6914. }
  6915. gl.clear(gl.COLOR_BUFFER_BIT);
  6916. var coordsBuffer = gl.createBuffer();
  6917. gl.bindBuffer(gl.ARRAY_BUFFER, coordsBuffer);
  6918. gl.bufferData(gl.ARRAY_BUFFER, coords, gl.STATIC_DRAW);
  6919. gl.enableVertexAttribArray(cache.positionLocation);
  6920. gl.vertexAttribPointer(cache.positionLocation, 2, gl.FLOAT, false, 0, 0);
  6921. var colorsBuffer = gl.createBuffer();
  6922. gl.bindBuffer(gl.ARRAY_BUFFER, colorsBuffer);
  6923. gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW);
  6924. gl.enableVertexAttribArray(cache.colorLocation);
  6925. gl.vertexAttribPointer(cache.colorLocation, 3, gl.UNSIGNED_BYTE, false,
  6926. 0, 0);
  6927. gl.uniform2f(cache.scaleLocation, context.scaleX, context.scaleY);
  6928. gl.uniform2f(cache.offsetLocation, context.offsetX, context.offsetY);
  6929. gl.drawArrays(gl.TRIANGLES, 0, count);
  6930. gl.flush();
  6931. gl.deleteBuffer(coordsBuffer);
  6932. gl.deleteBuffer(colorsBuffer);
  6933. return canvas;
  6934. }
  6935. function cleanup() {
  6936. smaskCache = null;
  6937. figuresCache = null;
  6938. }
  6939. return {
  6940. get isEnabled() {
  6941. if (PDFJS.disableWebGL) {
  6942. return false;
  6943. }
  6944. var enabled = false;
  6945. try {
  6946. generageGL();
  6947. enabled = !!currentGL;
  6948. } catch (e) { }
  6949. return shadow(this, 'isEnabled', enabled);
  6950. },
  6951. composeSMask: composeSMask,
  6952. drawFigures: drawFigures,
  6953. clear: cleanup
  6954. };
  6955. })();
  6956. var ShadingIRs = {};
  6957. ShadingIRs.RadialAxial = {
  6958. fromIR: function RadialAxial_fromIR(raw) {
  6959. var type = raw[1];
  6960. var colorStops = raw[2];
  6961. var p0 = raw[3];
  6962. var p1 = raw[4];
  6963. var r0 = raw[5];
  6964. var r1 = raw[6];
  6965. return {
  6966. type: 'Pattern',
  6967. getPattern: function RadialAxial_getPattern(ctx) {
  6968. var grad;
  6969. if (type === 'axial') {
  6970. grad = ctx.createLinearGradient(p0[0], p0[1], p1[0], p1[1]);
  6971. } else if (type === 'radial') {
  6972. grad = ctx.createRadialGradient(p0[0], p0[1], r0, p1[0], p1[1], r1);
  6973. }
  6974. for (var i = 0, ii = colorStops.length; i < ii; ++i) {
  6975. var c = colorStops[i];
  6976. grad.addColorStop(c[0], c[1]);
  6977. }
  6978. return grad;
  6979. }
  6980. };
  6981. }
  6982. };
  6983. var createMeshCanvas = (function createMeshCanvasClosure() {
  6984. function drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {
  6985. // Very basic Gouraud-shaded triangle rasterization algorithm.
  6986. var coords = context.coords, colors = context.colors;
  6987. var bytes = data.data, rowSize = data.width * 4;
  6988. var tmp;
  6989. if (coords[p1 + 1] > coords[p2 + 1]) {
  6990. tmp = p1; p1 = p2; p2 = tmp; tmp = c1; c1 = c2; c2 = tmp;
  6991. }
  6992. if (coords[p2 + 1] > coords[p3 + 1]) {
  6993. tmp = p2; p2 = p3; p3 = tmp; tmp = c2; c2 = c3; c3 = tmp;
  6994. }
  6995. if (coords[p1 + 1] > coords[p2 + 1]) {
  6996. tmp = p1; p1 = p2; p2 = tmp; tmp = c1; c1 = c2; c2 = tmp;
  6997. }
  6998. var x1 = (coords[p1] + context.offsetX) * context.scaleX;
  6999. var y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY;
  7000. var x2 = (coords[p2] + context.offsetX) * context.scaleX;
  7001. var y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY;
  7002. var x3 = (coords[p3] + context.offsetX) * context.scaleX;
  7003. var y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY;
  7004. if (y1 >= y3) {
  7005. return;
  7006. }
  7007. var c1r = colors[c1], c1g = colors[c1 + 1], c1b = colors[c1 + 2];
  7008. var c2r = colors[c2], c2g = colors[c2 + 1], c2b = colors[c2 + 2];
  7009. var c3r = colors[c3], c3g = colors[c3 + 1], c3b = colors[c3 + 2];
  7010. var minY = Math.round(y1), maxY = Math.round(y3);
  7011. var xa, car, cag, cab;
  7012. var xb, cbr, cbg, cbb;
  7013. var k;
  7014. for (var y = minY; y <= maxY; y++) {
  7015. if (y < y2) {
  7016. k = y < y1 ? 0 : y1 === y2 ? 1 : (y1 - y) / (y1 - y2);
  7017. xa = x1 - (x1 - x2) * k;
  7018. car = c1r - (c1r - c2r) * k;
  7019. cag = c1g - (c1g - c2g) * k;
  7020. cab = c1b - (c1b - c2b) * k;
  7021. } else {
  7022. k = y > y3 ? 1 : y2 === y3 ? 0 : (y2 - y) / (y2 - y3);
  7023. xa = x2 - (x2 - x3) * k;
  7024. car = c2r - (c2r - c3r) * k;
  7025. cag = c2g - (c2g - c3g) * k;
  7026. cab = c2b - (c2b - c3b) * k;
  7027. }
  7028. k = y < y1 ? 0 : y > y3 ? 1 : (y1 - y) / (y1 - y3);
  7029. xb = x1 - (x1 - x3) * k;
  7030. cbr = c1r - (c1r - c3r) * k;
  7031. cbg = c1g - (c1g - c3g) * k;
  7032. cbb = c1b - (c1b - c3b) * k;
  7033. var x1_ = Math.round(Math.min(xa, xb));
  7034. var x2_ = Math.round(Math.max(xa, xb));
  7035. var j = rowSize * y + x1_ * 4;
  7036. for (var x = x1_; x <= x2_; x++) {
  7037. k = (xa - x) / (xa - xb);
  7038. k = k < 0 ? 0 : k > 1 ? 1 : k;
  7039. bytes[j++] = (car - (car - cbr) * k) | 0;
  7040. bytes[j++] = (cag - (cag - cbg) * k) | 0;
  7041. bytes[j++] = (cab - (cab - cbb) * k) | 0;
  7042. bytes[j++] = 255;
  7043. }
  7044. }
  7045. }
  7046. function drawFigure(data, figure, context) {
  7047. var ps = figure.coords;
  7048. var cs = figure.colors;
  7049. var i, ii;
  7050. switch (figure.type) {
  7051. case 'lattice':
  7052. var verticesPerRow = figure.verticesPerRow;
  7053. var rows = Math.floor(ps.length / verticesPerRow) - 1;
  7054. var cols = verticesPerRow - 1;
  7055. for (i = 0; i < rows; i++) {
  7056. var q = i * verticesPerRow;
  7057. for (var j = 0; j < cols; j++, q++) {
  7058. drawTriangle(data, context,
  7059. ps[q], ps[q + 1], ps[q + verticesPerRow],
  7060. cs[q], cs[q + 1], cs[q + verticesPerRow]);
  7061. drawTriangle(data, context,
  7062. ps[q + verticesPerRow + 1], ps[q + 1], ps[q + verticesPerRow],
  7063. cs[q + verticesPerRow + 1], cs[q + 1], cs[q + verticesPerRow]);
  7064. }
  7065. }
  7066. break;
  7067. case 'triangles':
  7068. for (i = 0, ii = ps.length; i < ii; i += 3) {
  7069. drawTriangle(data, context,
  7070. ps[i], ps[i + 1], ps[i + 2],
  7071. cs[i], cs[i + 1], cs[i + 2]);
  7072. }
  7073. break;
  7074. default:
  7075. error('illigal figure');
  7076. break;
  7077. }
  7078. }
  7079. function createMeshCanvas(bounds, combinesScale, coords, colors, figures,
  7080. backgroundColor) {
  7081. // we will increase scale on some weird factor to let antialiasing take
  7082. // care of "rough" edges
  7083. var EXPECTED_SCALE = 1.1;
  7084. // MAX_PATTERN_SIZE is used to avoid OOM situation.
  7085. var MAX_PATTERN_SIZE = 3000; // 10in @ 300dpi shall be enough
  7086. var offsetX = Math.floor(bounds[0]);
  7087. var offsetY = Math.floor(bounds[1]);
  7088. var boundsWidth = Math.ceil(bounds[2]) - offsetX;
  7089. var boundsHeight = Math.ceil(bounds[3]) - offsetY;
  7090. var width = Math.min(Math.ceil(Math.abs(boundsWidth * combinesScale[0] *
  7091. EXPECTED_SCALE)), MAX_PATTERN_SIZE);
  7092. var height = Math.min(Math.ceil(Math.abs(boundsHeight * combinesScale[1] *
  7093. EXPECTED_SCALE)), MAX_PATTERN_SIZE);
  7094. var scaleX = boundsWidth / width;
  7095. var scaleY = boundsHeight / height;
  7096. var context = {
  7097. coords: coords,
  7098. colors: colors,
  7099. offsetX: -offsetX,
  7100. offsetY: -offsetY,
  7101. scaleX: 1 / scaleX,
  7102. scaleY: 1 / scaleY
  7103. };
  7104. var canvas, tmpCanvas, i, ii;
  7105. if (WebGLUtils.isEnabled) {
  7106. canvas = WebGLUtils.drawFigures(width, height, backgroundColor,
  7107. figures, context);
  7108. // https://bugzilla.mozilla.org/show_bug.cgi?id=972126
  7109. tmpCanvas = CachedCanvases.getCanvas('mesh', width, height, false);
  7110. tmpCanvas.context.drawImage(canvas, 0, 0);
  7111. canvas = tmpCanvas.canvas;
  7112. } else {
  7113. tmpCanvas = CachedCanvases.getCanvas('mesh', width, height, false);
  7114. var tmpCtx = tmpCanvas.context;
  7115. var data = tmpCtx.createImageData(width, height);
  7116. if (backgroundColor) {
  7117. var bytes = data.data;
  7118. for (i = 0, ii = bytes.length; i < ii; i += 4) {
  7119. bytes[i] = backgroundColor[0];
  7120. bytes[i + 1] = backgroundColor[1];
  7121. bytes[i + 2] = backgroundColor[2];
  7122. bytes[i + 3] = 255;
  7123. }
  7124. }
  7125. for (i = 0; i < figures.length; i++) {
  7126. drawFigure(data, figures[i], context);
  7127. }
  7128. tmpCtx.putImageData(data, 0, 0);
  7129. canvas = tmpCanvas.canvas;
  7130. }
  7131. return {canvas: canvas, offsetX: offsetX, offsetY: offsetY,
  7132. scaleX: scaleX, scaleY: scaleY};
  7133. }
  7134. return createMeshCanvas;
  7135. })();
  7136. ShadingIRs.Mesh = {
  7137. fromIR: function Mesh_fromIR(raw) {
  7138. //var type = raw[1];
  7139. var coords = raw[2];
  7140. var colors = raw[3];
  7141. var figures = raw[4];
  7142. var bounds = raw[5];
  7143. var matrix = raw[6];
  7144. //var bbox = raw[7];
  7145. var background = raw[8];
  7146. return {
  7147. type: 'Pattern',
  7148. getPattern: function Mesh_getPattern(ctx, owner, shadingFill) {
  7149. var combinedScale;
  7150. // Obtain scale from matrix and current transformation matrix.
  7151. if (shadingFill) {
  7152. combinedScale = Util.singularValueDecompose2dScale(
  7153. ctx.mozCurrentTransform);
  7154. } else {
  7155. var matrixScale = Util.singularValueDecompose2dScale(matrix);
  7156. var curMatrixScale = Util.singularValueDecompose2dScale(
  7157. owner.baseTransform);
  7158. combinedScale = [matrixScale[0] * curMatrixScale[0],
  7159. matrixScale[1] * curMatrixScale[1]];
  7160. }
  7161. // Rasterizing on the main thread since sending/queue large canvases
  7162. // might cause OOM.
  7163. var temporaryPatternCanvas = createMeshCanvas(bounds, combinedScale,
  7164. coords, colors, figures, shadingFill ? null : background);
  7165. if (!shadingFill) {
  7166. ctx.setTransform.apply(ctx, owner.baseTransform);
  7167. if (matrix) {
  7168. ctx.transform.apply(ctx, matrix);
  7169. }
  7170. }
  7171. ctx.translate(temporaryPatternCanvas.offsetX,
  7172. temporaryPatternCanvas.offsetY);
  7173. ctx.scale(temporaryPatternCanvas.scaleX,
  7174. temporaryPatternCanvas.scaleY);
  7175. return ctx.createPattern(temporaryPatternCanvas.canvas, 'no-repeat');
  7176. }
  7177. };
  7178. }
  7179. };
  7180. ShadingIRs.Dummy = {
  7181. fromIR: function Dummy_fromIR() {
  7182. return {
  7183. type: 'Pattern',
  7184. getPattern: function Dummy_fromIR_getPattern() {
  7185. return 'hotpink';
  7186. }
  7187. };
  7188. }
  7189. };
  7190. function getShadingPatternFromIR(raw) {
  7191. var shadingIR = ShadingIRs[raw[0]];
  7192. if (!shadingIR) {
  7193. error('Unknown IR type: ' + raw[0]);
  7194. }
  7195. return shadingIR.fromIR(raw);
  7196. }
  7197. var TilingPattern = (function TilingPatternClosure() {
  7198. var PaintType = {
  7199. COLORED: 1,
  7200. UNCOLORED: 2
  7201. };
  7202. var MAX_PATTERN_SIZE = 3000; // 10in @ 300dpi shall be enough
  7203. function TilingPattern(IR, color, ctx, objs, commonObjs, baseTransform) {
  7204. this.name = IR[1][0].name;
  7205. this.operatorList = IR[2];
  7206. this.matrix = IR[3] || [1, 0, 0, 1, 0, 0];
  7207. this.bbox = IR[4];
  7208. this.xstep = IR[5];
  7209. this.ystep = IR[6];
  7210. this.paintType = IR[7];
  7211. this.tilingType = IR[8];
  7212. this.color = color;
  7213. this.objs = objs;
  7214. this.commonObjs = commonObjs;
  7215. this.baseTransform = baseTransform;
  7216. this.type = 'Pattern';
  7217. this.ctx = ctx;
  7218. }
  7219. TilingPattern.prototype = {
  7220. createPatternCanvas: function TilinPattern_createPatternCanvas(owner) {
  7221. var operatorList = this.operatorList;
  7222. var bbox = this.bbox;
  7223. var xstep = this.xstep;
  7224. var ystep = this.ystep;
  7225. var paintType = this.paintType;
  7226. var tilingType = this.tilingType;
  7227. var color = this.color;
  7228. var objs = this.objs;
  7229. var commonObjs = this.commonObjs;
  7230. info('TilingType: ' + tilingType);
  7231. var x0 = bbox[0], y0 = bbox[1], x1 = bbox[2], y1 = bbox[3];
  7232. var topLeft = [x0, y0];
  7233. // we want the canvas to be as large as the step size
  7234. var botRight = [x0 + xstep, y0 + ystep];
  7235. var width = botRight[0] - topLeft[0];
  7236. var height = botRight[1] - topLeft[1];
  7237. // Obtain scale from matrix and current transformation matrix.
  7238. var matrixScale = Util.singularValueDecompose2dScale(this.matrix);
  7239. var curMatrixScale = Util.singularValueDecompose2dScale(
  7240. this.baseTransform);
  7241. var combinedScale = [matrixScale[0] * curMatrixScale[0],
  7242. matrixScale[1] * curMatrixScale[1]];
  7243. // MAX_PATTERN_SIZE is used to avoid OOM situation.
  7244. // Use width and height values that are as close as possible to the end
  7245. // result when the pattern is used. Too low value makes the pattern look
  7246. // blurry. Too large value makes it look too crispy.
  7247. width = Math.min(Math.ceil(Math.abs(width * combinedScale[0])),
  7248. MAX_PATTERN_SIZE);
  7249. height = Math.min(Math.ceil(Math.abs(height * combinedScale[1])),
  7250. MAX_PATTERN_SIZE);
  7251. var tmpCanvas = CachedCanvases.getCanvas('pattern', width, height, true);
  7252. var tmpCtx = tmpCanvas.context;
  7253. var graphics = new CanvasGraphics(tmpCtx, commonObjs, objs);
  7254. graphics.groupLevel = owner.groupLevel;
  7255. this.setFillAndStrokeStyleToContext(tmpCtx, paintType, color);
  7256. this.setScale(width, height, xstep, ystep);
  7257. this.transformToScale(graphics);
  7258. // transform coordinates to pattern space
  7259. var tmpTranslate = [1, 0, 0, 1, -topLeft[0], -topLeft[1]];
  7260. graphics.transform.apply(graphics, tmpTranslate);
  7261. this.clipBbox(graphics, bbox, x0, y0, x1, y1);
  7262. graphics.executeOperatorList(operatorList);
  7263. return tmpCanvas.canvas;
  7264. },
  7265. setScale: function TilingPattern_setScale(width, height, xstep, ystep) {
  7266. this.scale = [width / xstep, height / ystep];
  7267. },
  7268. transformToScale: function TilingPattern_transformToScale(graphics) {
  7269. var scale = this.scale;
  7270. var tmpScale = [scale[0], 0, 0, scale[1], 0, 0];
  7271. graphics.transform.apply(graphics, tmpScale);
  7272. },
  7273. scaleToContext: function TilingPattern_scaleToContext() {
  7274. var scale = this.scale;
  7275. this.ctx.scale(1 / scale[0], 1 / scale[1]);
  7276. },
  7277. clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) {
  7278. if (bbox && isArray(bbox) && 4 == bbox.length) {
  7279. var bboxWidth = x1 - x0;
  7280. var bboxHeight = y1 - y0;
  7281. graphics.rectangle(x0, y0, bboxWidth, bboxHeight);
  7282. graphics.clip();
  7283. graphics.endPath();
  7284. }
  7285. },
  7286. setFillAndStrokeStyleToContext:
  7287. function setFillAndStrokeStyleToContext(context, paintType, color) {
  7288. switch (paintType) {
  7289. case PaintType.COLORED:
  7290. var ctx = this.ctx;
  7291. context.fillStyle = ctx.fillStyle;
  7292. context.strokeStyle = ctx.strokeStyle;
  7293. break;
  7294. case PaintType.UNCOLORED:
  7295. var rgbColor = ColorSpace.singletons.rgb.getRgb(color, 0);
  7296. var cssColor = Util.makeCssRgb(rgbColor);
  7297. context.fillStyle = cssColor;
  7298. context.strokeStyle = cssColor;
  7299. break;
  7300. default:
  7301. error('Unsupported paint type: ' + paintType);
  7302. }
  7303. },
  7304. getPattern: function TilingPattern_getPattern(ctx, owner) {
  7305. var temporaryPatternCanvas = this.createPatternCanvas(owner);
  7306. ctx = this.ctx;
  7307. ctx.setTransform.apply(ctx, this.baseTransform);
  7308. ctx.transform.apply(ctx, this.matrix);
  7309. this.scaleToContext();
  7310. return ctx.createPattern(temporaryPatternCanvas, 'repeat');
  7311. }
  7312. };
  7313. return TilingPattern;
  7314. })();
  7315. PDFJS.disableFontFace = false;
  7316. var FontLoader = {
  7317. insertRule: function fontLoaderInsertRule(rule) {
  7318. var styleElement = document.getElementById('PDFJS_FONT_STYLE_TAG');
  7319. if (!styleElement) {
  7320. styleElement = document.createElement('style');
  7321. styleElement.id = 'PDFJS_FONT_STYLE_TAG';
  7322. document.documentElement.getElementsByTagName('head')[0].appendChild(
  7323. styleElement);
  7324. }
  7325. var styleSheet = styleElement.sheet;
  7326. styleSheet.insertRule(rule, styleSheet.cssRules.length);
  7327. },
  7328. clear: function fontLoaderClear() {
  7329. var styleElement = document.getElementById('PDFJS_FONT_STYLE_TAG');
  7330. if (styleElement) {
  7331. styleElement.parentNode.removeChild(styleElement);
  7332. }
  7333. },
  7334. get loadTestFont() {
  7335. // This is a CFF font with 1 glyph for '.' that fills its entire width and
  7336. // height.
  7337. return shadow(this, 'loadTestFont', atob(
  7338. 'T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQ' +
  7339. 'AABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwA' +
  7340. 'AAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbm' +
  7341. 'FtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAA' +
  7342. 'AADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6A' +
  7343. 'ABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAA' +
  7344. 'MQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAA' +
  7345. 'AAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAA' +
  7346. 'AAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQ' +
  7347. 'AAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMA' +
  7348. 'AQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAA' +
  7349. 'EAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAA' +
  7350. 'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAA' +
  7351. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
  7352. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
  7353. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
  7354. 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAA' +
  7355. 'AAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgc' +
  7356. 'A/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWF' +
  7357. 'hYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQA' +
  7358. 'AAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAg' +
  7359. 'ABAAAAAAAAAAAD6AAAAAAAAA=='
  7360. ));
  7361. },
  7362. loadTestFontId: 0,
  7363. loadingContext: {
  7364. requests: [],
  7365. nextRequestId: 0
  7366. },
  7367. isSyncFontLoadingSupported: (function detectSyncFontLoadingSupport() {
  7368. if (isWorker) {
  7369. return false;
  7370. }
  7371. // User agent string sniffing is bad, but there is no reliable way to tell
  7372. // if font is fully loaded and ready to be used with canvas.
  7373. var userAgent = window.navigator.userAgent;
  7374. var m = /Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(userAgent);
  7375. if (m && m[1] >= 14) {
  7376. return true;
  7377. }
  7378. // TODO other browsers
  7379. return false;
  7380. })(),
  7381. bind: function fontLoaderBind(fonts, callback) {
  7382. assert(!isWorker, 'bind() shall be called from main thread');
  7383. var rules = [], fontsToLoad = [];
  7384. for (var i = 0, ii = fonts.length; i < ii; i++) {
  7385. var font = fonts[i];
  7386. // Add the font to the DOM only once or skip if the font
  7387. // is already loaded.
  7388. if (font.attached || font.loading === false) {
  7389. continue;
  7390. }
  7391. font.attached = true;
  7392. var rule = font.bindDOM();
  7393. if (rule) {
  7394. rules.push(rule);
  7395. fontsToLoad.push(font);
  7396. }
  7397. }
  7398. var request = FontLoader.queueLoadingCallback(callback);
  7399. if (rules.length > 0 && !this.isSyncFontLoadingSupported) {
  7400. FontLoader.prepareFontLoadEvent(rules, fontsToLoad, request);
  7401. } else {
  7402. request.complete();
  7403. }
  7404. },
  7405. queueLoadingCallback: function FontLoader_queueLoadingCallback(callback) {
  7406. function LoadLoader_completeRequest() {
  7407. assert(!request.end, 'completeRequest() cannot be called twice');
  7408. request.end = Date.now();
  7409. // sending all completed requests in order how they were queued
  7410. while (context.requests.length > 0 && context.requests[0].end) {
  7411. var otherRequest = context.requests.shift();
  7412. setTimeout(otherRequest.callback, 0);
  7413. }
  7414. }
  7415. var context = FontLoader.loadingContext;
  7416. var requestId = 'pdfjs-font-loading-' + (context.nextRequestId++);
  7417. var request = {
  7418. id: requestId,
  7419. complete: LoadLoader_completeRequest,
  7420. callback: callback,
  7421. started: Date.now()
  7422. };
  7423. context.requests.push(request);
  7424. return request;
  7425. },
  7426. prepareFontLoadEvent: function fontLoaderPrepareFontLoadEvent(rules,
  7427. fonts,
  7428. request) {
  7429. /** Hack begin */
  7430. // There's currently no event when a font has finished downloading so the
  7431. // following code is a dirty hack to 'guess' when a font is
  7432. // ready. It's assumed fonts are loaded in order, so add a known test
  7433. // font after the desired fonts and then test for the loading of that
  7434. // test font.
  7435. function int32(data, offset) {
  7436. return (data.charCodeAt(offset) << 24) |
  7437. (data.charCodeAt(offset + 1) << 16) |
  7438. (data.charCodeAt(offset + 2) << 8) |
  7439. (data.charCodeAt(offset + 3) & 0xff);
  7440. }
  7441. function spliceString(s, offset, remove, insert) {
  7442. var chunk1 = s.substr(0, offset);
  7443. var chunk2 = s.substr(offset + remove);
  7444. return chunk1 + insert + chunk2;
  7445. }
  7446. var i, ii;
  7447. var canvas = document.createElement('canvas');
  7448. canvas.width = 1;
  7449. canvas.height = 1;
  7450. var ctx = canvas.getContext('2d');
  7451. var called = 0;
  7452. function isFontReady(name, callback) {
  7453. called++;
  7454. // With setTimeout clamping this gives the font ~100ms to load.
  7455. if(called > 30) {
  7456. warn('Load test font never loaded.');
  7457. callback();
  7458. return;
  7459. }
  7460. ctx.font = '30px ' + name;
  7461. ctx.fillText('.', 0, 20);
  7462. var imageData = ctx.getImageData(0, 0, 1, 1);
  7463. if (imageData.data[3] > 0) {
  7464. callback();
  7465. return;
  7466. }
  7467. setTimeout(isFontReady.bind(null, name, callback));
  7468. }
  7469. var loadTestFontId = 'lt' + Date.now() + this.loadTestFontId++;
  7470. // Chromium seems to cache fonts based on a hash of the actual font data,
  7471. // so the font must be modified for each load test else it will appear to
  7472. // be loaded already.
  7473. // TODO: This could maybe be made faster by avoiding the btoa of the full
  7474. // font by splitting it in chunks before hand and padding the font id.
  7475. var data = this.loadTestFont;
  7476. var COMMENT_OFFSET = 976; // has to be on 4 byte boundary (for checksum)
  7477. data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length,
  7478. loadTestFontId);
  7479. // CFF checksum is important for IE, adjusting it
  7480. var CFF_CHECKSUM_OFFSET = 16;
  7481. var XXXX_VALUE = 0x58585858; // the "comment" filled with 'X'
  7482. var checksum = int32(data, CFF_CHECKSUM_OFFSET);
  7483. for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) {
  7484. checksum = (checksum - XXXX_VALUE + int32(loadTestFontId, i)) | 0;
  7485. }
  7486. if (i < loadTestFontId.length) { // align to 4 bytes boundary
  7487. checksum = (checksum - XXXX_VALUE +
  7488. int32(loadTestFontId + 'XXX', i)) | 0;
  7489. }
  7490. data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, string32(checksum));
  7491. var url = 'url(data:font/opentype;base64,' + btoa(data) + ');';
  7492. var rule = '@font-face { font-family:"' + loadTestFontId + '";src:' +
  7493. url + '}';
  7494. FontLoader.insertRule(rule);
  7495. var names = [];
  7496. for (i = 0, ii = fonts.length; i < ii; i++) {
  7497. names.push(fonts[i].loadedName);
  7498. }
  7499. names.push(loadTestFontId);
  7500. var div = document.createElement('div');
  7501. div.setAttribute('style',
  7502. 'visibility: hidden;' +
  7503. 'width: 10px; height: 10px;' +
  7504. 'position: absolute; top: 0px; left: 0px;');
  7505. for (i = 0, ii = names.length; i < ii; ++i) {
  7506. var span = document.createElement('span');
  7507. span.textContent = 'Hi';
  7508. span.style.fontFamily = names[i];
  7509. div.appendChild(span);
  7510. }
  7511. document.body.appendChild(div);
  7512. isFontReady(loadTestFontId, function() {
  7513. document.body.removeChild(div);
  7514. request.complete();
  7515. });
  7516. /** Hack end */
  7517. }
  7518. };
  7519. var FontFace = (function FontFaceClosure() {
  7520. function FontFace(name, file, properties) {
  7521. this.compiledGlyphs = {};
  7522. if (arguments.length === 1) {
  7523. // importing translated data
  7524. var data = arguments[0];
  7525. for (var i in data) {
  7526. this[i] = data[i];
  7527. }
  7528. return;
  7529. }
  7530. }
  7531. FontFace.prototype = {
  7532. bindDOM: function FontFace_bindDOM() {
  7533. if (!this.data) {
  7534. return null;
  7535. }
  7536. if (PDFJS.disableFontFace) {
  7537. this.disableFontFace = true;
  7538. return null;
  7539. }
  7540. var data = bytesToString(new Uint8Array(this.data));
  7541. var fontName = this.loadedName;
  7542. // Add the font-face rule to the document
  7543. var url = ('url(data:' + this.mimetype + ';base64,' +
  7544. window.btoa(data) + ');');
  7545. var rule = '@font-face { font-family:"' + fontName + '";src:' + url + '}';
  7546. FontLoader.insertRule(rule);
  7547. if (PDFJS.pdfBug && 'FontInspector' in globalScope &&
  7548. globalScope['FontInspector'].enabled) {
  7549. globalScope['FontInspector'].fontAdded(this, url);
  7550. }
  7551. return rule;
  7552. },
  7553. getPathGenerator: function (objs, character) {
  7554. if (!(character in this.compiledGlyphs)) {
  7555. var js = objs.get(this.loadedName + '_path_' + character);
  7556. /*jshint -W054 */
  7557. this.compiledGlyphs[character] = new Function('c', 'size', js);
  7558. }
  7559. return this.compiledGlyphs[character];
  7560. }
  7561. };
  7562. return FontFace;
  7563. })();
  7564. var NetworkManager = (function NetworkManagerClosure() {
  7565. var OK_RESPONSE = 200;
  7566. var PARTIAL_CONTENT_RESPONSE = 206;
  7567. function NetworkManager(url, args) {
  7568. this.url = url;
  7569. args = args || {};
  7570. this.isHttp = /^https?:/i.test(url);
  7571. this.httpHeaders = (this.isHttp && args.httpHeaders) || {};
  7572. this.withCredentials = args.withCredentials || false;
  7573. this.getXhr = args.getXhr ||
  7574. function NetworkManager_getXhr() {
  7575. return new XMLHttpRequest();
  7576. };
  7577. this.currXhrId = 0;
  7578. this.pendingRequests = {};
  7579. this.loadedRequests = {};
  7580. }
  7581. function getArrayBuffer(xhr) {
  7582. var data = (xhr.mozResponseArrayBuffer || xhr.mozResponse ||
  7583. xhr.responseArrayBuffer || xhr.response);
  7584. if (typeof data !== 'string') {
  7585. return data;
  7586. }
  7587. var length = data.length;
  7588. var buffer = new Uint8Array(length);
  7589. for (var i = 0; i < length; i++) {
  7590. buffer[i] = data.charCodeAt(i) & 0xFF;
  7591. }
  7592. return buffer;
  7593. }
  7594. NetworkManager.prototype = {
  7595. requestRange: function NetworkManager_requestRange(begin, end, listeners) {
  7596. var args = {
  7597. begin: begin,
  7598. end: end
  7599. };
  7600. for (var prop in listeners) {
  7601. args[prop] = listeners[prop];
  7602. }
  7603. return this.request(args);
  7604. },
  7605. requestFull: function NetworkManager_requestRange(listeners) {
  7606. return this.request(listeners);
  7607. },
  7608. request: function NetworkManager_requestRange(args) {
  7609. var xhr = this.getXhr();
  7610. var xhrId = this.currXhrId++;
  7611. var pendingRequest = this.pendingRequests[xhrId] = {
  7612. xhr: xhr
  7613. };
  7614. xhr.open('GET', this.url);
  7615. xhr.withCredentials = this.withCredentials;
  7616. for (var property in this.httpHeaders) {
  7617. var value = this.httpHeaders[property];
  7618. if (typeof value === 'undefined') {
  7619. continue;
  7620. }
  7621. xhr.setRequestHeader(property, value);
  7622. }
  7623. if (this.isHttp && 'begin' in args && 'end' in args) {
  7624. var rangeStr = args.begin + '-' + (args.end - 1);
  7625. xhr.setRequestHeader('Range', 'bytes=' + rangeStr);
  7626. pendingRequest.expectedStatus = 206;
  7627. } else {
  7628. pendingRequest.expectedStatus = 200;
  7629. }
  7630. xhr.mozResponseType = xhr.responseType = 'arraybuffer';
  7631. if (args.onProgress) {
  7632. xhr.onprogress = args.onProgress;
  7633. }
  7634. if (args.onError) {
  7635. xhr.onerror = function(evt) {
  7636. args.onError(xhr.status);
  7637. };
  7638. }
  7639. xhr.onreadystatechange = this.onStateChange.bind(this, xhrId);
  7640. pendingRequest.onHeadersReceived = args.onHeadersReceived;
  7641. pendingRequest.onDone = args.onDone;
  7642. pendingRequest.onError = args.onError;
  7643. xhr.send(null);
  7644. return xhrId;
  7645. },
  7646. onStateChange: function NetworkManager_onStateChange(xhrId, evt) {
  7647. var pendingRequest = this.pendingRequests[xhrId];
  7648. if (!pendingRequest) {
  7649. // Maybe abortRequest was called...
  7650. return;
  7651. }
  7652. var xhr = pendingRequest.xhr;
  7653. if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) {
  7654. pendingRequest.onHeadersReceived();
  7655. delete pendingRequest.onHeadersReceived;
  7656. }
  7657. if (xhr.readyState !== 4) {
  7658. return;
  7659. }
  7660. if (!(xhrId in this.pendingRequests)) {
  7661. // The XHR request might have been aborted in onHeadersReceived()
  7662. // callback, in which case we should abort request
  7663. return;
  7664. }
  7665. delete this.pendingRequests[xhrId];
  7666. // success status == 0 can be on ftp, file and other protocols
  7667. if (xhr.status === 0 && this.isHttp) {
  7668. if (pendingRequest.onError) {
  7669. pendingRequest.onError(xhr.status);
  7670. }
  7671. return;
  7672. }
  7673. var xhrStatus = xhr.status || OK_RESPONSE;
  7674. // From http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.2:
  7675. // "A server MAY ignore the Range header". This means it's possible to
  7676. // get a 200 rather than a 206 response from a range request.
  7677. var ok_response_on_range_request =
  7678. xhrStatus === OK_RESPONSE &&
  7679. pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE;
  7680. if (!ok_response_on_range_request &&
  7681. xhrStatus !== pendingRequest.expectedStatus) {
  7682. if (pendingRequest.onError) {
  7683. pendingRequest.onError(xhr.status);
  7684. }
  7685. return;
  7686. }
  7687. this.loadedRequests[xhrId] = true;
  7688. var chunk = getArrayBuffer(xhr);
  7689. if (xhrStatus === PARTIAL_CONTENT_RESPONSE) {
  7690. var rangeHeader = xhr.getResponseHeader('Content-Range');
  7691. var matches = /bytes (\d+)-(\d+)\/(\d+)/.exec(rangeHeader);
  7692. var begin = parseInt(matches[1], 10);
  7693. pendingRequest.onDone({
  7694. begin: begin,
  7695. chunk: chunk
  7696. });
  7697. } else {
  7698. pendingRequest.onDone({
  7699. begin: 0,
  7700. chunk: chunk
  7701. });
  7702. }
  7703. },
  7704. hasPendingRequests: function NetworkManager_hasPendingRequests() {
  7705. for (var xhrId in this.pendingRequests) {
  7706. return true;
  7707. }
  7708. return false;
  7709. },
  7710. getRequestXhr: function NetworkManager_getXhr(xhrId) {
  7711. return this.pendingRequests[xhrId].xhr;
  7712. },
  7713. isPendingRequest: function NetworkManager_isPendingRequest(xhrId) {
  7714. return xhrId in this.pendingRequests;
  7715. },
  7716. isLoadedRequest: function NetworkManager_isLoadedRequest(xhrId) {
  7717. return xhrId in this.loadedRequests;
  7718. },
  7719. abortAllRequests: function NetworkManager_abortAllRequests() {
  7720. for (var xhrId in this.pendingRequests) {
  7721. this.abortRequest(xhrId | 0);
  7722. }
  7723. },
  7724. abortRequest: function NetworkManager_abortRequest(xhrId) {
  7725. var xhr = this.pendingRequests[xhrId].xhr;
  7726. delete this.pendingRequests[xhrId];
  7727. xhr.abort();
  7728. }
  7729. };
  7730. return NetworkManager;
  7731. })();
  7732. var ChunkedStream = (function ChunkedStreamClosure() {
  7733. function ChunkedStream(length, chunkSize, manager) {
  7734. this.bytes = new Uint8Array(length);
  7735. this.start = 0;
  7736. this.pos = 0;
  7737. this.end = length;
  7738. this.chunkSize = chunkSize;
  7739. this.loadedChunks = [];
  7740. this.numChunksLoaded = 0;
  7741. this.numChunks = Math.ceil(length / chunkSize);
  7742. this.manager = manager;
  7743. this.initialDataLength = 0;
  7744. }
  7745. // required methods for a stream. if a particular stream does not
  7746. // implement these, an error should be thrown
  7747. ChunkedStream.prototype = {
  7748. getMissingChunks: function ChunkedStream_getMissingChunks() {
  7749. var chunks = [];
  7750. for (var chunk = 0, n = this.numChunks; chunk < n; ++chunk) {
  7751. if (!(chunk in this.loadedChunks)) {
  7752. chunks.push(chunk);
  7753. }
  7754. }
  7755. return chunks;
  7756. },
  7757. getBaseStreams: function ChunkedStream_getBaseStreams() {
  7758. return [this];
  7759. },
  7760. allChunksLoaded: function ChunkedStream_allChunksLoaded() {
  7761. return this.numChunksLoaded === this.numChunks;
  7762. },
  7763. onReceiveData: function ChunkedStream_onReceiveData(begin, chunk) {
  7764. var end = begin + chunk.byteLength;
  7765. assert(begin % this.chunkSize === 0, 'Bad begin offset: ' + begin);
  7766. // Using this.length is inaccurate here since this.start can be moved
  7767. // See ChunkedStream.moveStart()
  7768. var length = this.bytes.length;
  7769. assert(end % this.chunkSize === 0 || end === length,
  7770. 'Bad end offset: ' + end);
  7771. this.bytes.set(new Uint8Array(chunk), begin);
  7772. var chunkSize = this.chunkSize;
  7773. var beginChunk = Math.floor(begin / chunkSize);
  7774. var endChunk = Math.floor((end - 1) / chunkSize) + 1;
  7775. var curChunk;
  7776. for (curChunk = beginChunk; curChunk < endChunk; ++curChunk) {
  7777. if (!(curChunk in this.loadedChunks)) {
  7778. this.loadedChunks[curChunk] = true;
  7779. ++this.numChunksLoaded;
  7780. }
  7781. }
  7782. },
  7783. onReceiveInitialData: function ChunkedStream_onReceiveInitialData(data) {
  7784. this.bytes.set(data);
  7785. this.initialDataLength = data.length;
  7786. var endChunk = (this.end === data.length ?
  7787. this.numChunks : Math.floor(data.length / this.chunkSize));
  7788. for (var i = 0; i < endChunk; i++) {
  7789. this.loadedChunks[i] = true;
  7790. ++this.numChunksLoaded;
  7791. }
  7792. },
  7793. ensureRange: function ChunkedStream_ensureRange(begin, end) {
  7794. if (begin >= end) {
  7795. return;
  7796. }
  7797. if (end <= this.initialDataLength) {
  7798. return;
  7799. }
  7800. var chunkSize = this.chunkSize;
  7801. var beginChunk = Math.floor(begin / chunkSize);
  7802. var endChunk = Math.floor((end - 1) / chunkSize) + 1;
  7803. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  7804. if (!(chunk in this.loadedChunks)) {
  7805. throw new MissingDataException(begin, end);
  7806. }
  7807. }
  7808. },
  7809. nextEmptyChunk: function ChunkedStream_nextEmptyChunk(beginChunk) {
  7810. var chunk, n;
  7811. for (chunk = beginChunk, n = this.numChunks; chunk < n; ++chunk) {
  7812. if (!(chunk in this.loadedChunks)) {
  7813. return chunk;
  7814. }
  7815. }
  7816. // Wrap around to beginning
  7817. for (chunk = 0; chunk < beginChunk; ++chunk) {
  7818. if (!(chunk in this.loadedChunks)) {
  7819. return chunk;
  7820. }
  7821. }
  7822. return null;
  7823. },
  7824. hasChunk: function ChunkedStream_hasChunk(chunk) {
  7825. return chunk in this.loadedChunks;
  7826. },
  7827. get length() {
  7828. return this.end - this.start;
  7829. },
  7830. getByte: function ChunkedStream_getByte() {
  7831. var pos = this.pos;
  7832. if (pos >= this.end) {
  7833. return -1;
  7834. }
  7835. this.ensureRange(pos, pos + 1);
  7836. return this.bytes[this.pos++];
  7837. },
  7838. getUint16: function ChunkedStream_getUint16() {
  7839. var b0 = this.getByte();
  7840. var b1 = this.getByte();
  7841. return (b0 << 8) + b1;
  7842. },
  7843. getInt32: function ChunkedStream_getInt32() {
  7844. var b0 = this.getByte();
  7845. var b1 = this.getByte();
  7846. var b2 = this.getByte();
  7847. var b3 = this.getByte();
  7848. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  7849. },
  7850. // returns subarray of original buffer
  7851. // should only be read
  7852. getBytes: function ChunkedStream_getBytes(length) {
  7853. var bytes = this.bytes;
  7854. var pos = this.pos;
  7855. var strEnd = this.end;
  7856. if (!length) {
  7857. this.ensureRange(pos, strEnd);
  7858. return bytes.subarray(pos, strEnd);
  7859. }
  7860. var end = pos + length;
  7861. if (end > strEnd) {
  7862. end = strEnd;
  7863. }
  7864. this.ensureRange(pos, end);
  7865. this.pos = end;
  7866. return bytes.subarray(pos, end);
  7867. },
  7868. peekBytes: function ChunkedStream_peekBytes(length) {
  7869. var bytes = this.getBytes(length);
  7870. this.pos -= bytes.length;
  7871. return bytes;
  7872. },
  7873. getByteRange: function ChunkedStream_getBytes(begin, end) {
  7874. this.ensureRange(begin, end);
  7875. return this.bytes.subarray(begin, end);
  7876. },
  7877. skip: function ChunkedStream_skip(n) {
  7878. if (!n) {
  7879. n = 1;
  7880. }
  7881. this.pos += n;
  7882. },
  7883. reset: function ChunkedStream_reset() {
  7884. this.pos = this.start;
  7885. },
  7886. moveStart: function ChunkedStream_moveStart() {
  7887. this.start = this.pos;
  7888. },
  7889. makeSubStream: function ChunkedStream_makeSubStream(start, length, dict) {
  7890. this.ensureRange(start, start + length);
  7891. function ChunkedStreamSubstream() {}
  7892. ChunkedStreamSubstream.prototype = Object.create(this);
  7893. ChunkedStreamSubstream.prototype.getMissingChunks = function() {
  7894. var chunkSize = this.chunkSize;
  7895. var beginChunk = Math.floor(this.start / chunkSize);
  7896. var endChunk = Math.floor((this.end - 1) / chunkSize) + 1;
  7897. var missingChunks = [];
  7898. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  7899. if (!(chunk in this.loadedChunks)) {
  7900. missingChunks.push(chunk);
  7901. }
  7902. }
  7903. return missingChunks;
  7904. };
  7905. var subStream = new ChunkedStreamSubstream();
  7906. subStream.pos = subStream.start = start;
  7907. subStream.end = start + length || this.end;
  7908. subStream.dict = dict;
  7909. return subStream;
  7910. },
  7911. isStream: true
  7912. };
  7913. return ChunkedStream;
  7914. })();
  7915. var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
  7916. function ChunkedStreamManager(length, chunkSize, url, args) {
  7917. this.stream = new ChunkedStream(length, chunkSize, this);
  7918. this.length = length;
  7919. this.chunkSize = chunkSize;
  7920. this.url = url;
  7921. this.disableAutoFetch = args.disableAutoFetch;
  7922. var msgHandler = this.msgHandler = args.msgHandler;
  7923. if (args.chunkedViewerLoading) {
  7924. msgHandler.on('OnDataRange', this.onReceiveData.bind(this));
  7925. msgHandler.on('OnDataProgress', this.onProgress.bind(this));
  7926. this.sendRequest = function ChunkedStreamManager_sendRequest(begin, end) {
  7927. msgHandler.send('RequestDataRange', { begin: begin, end: end });
  7928. };
  7929. } else {
  7930. var getXhr = function getXhr() {
  7931. return new XMLHttpRequest();
  7932. };
  7933. this.networkManager = new NetworkManager(this.url, {
  7934. getXhr: getXhr,
  7935. httpHeaders: args.httpHeaders,
  7936. withCredentials: args.withCredentials
  7937. });
  7938. this.sendRequest = function ChunkedStreamManager_sendRequest(begin, end) {
  7939. this.networkManager.requestRange(begin, end, {
  7940. onDone: this.onReceiveData.bind(this),
  7941. onProgress: this.onProgress.bind(this)
  7942. });
  7943. };
  7944. }
  7945. this.currRequestId = 0;
  7946. this.chunksNeededByRequest = {};
  7947. this.requestsByChunk = {};
  7948. this.callbacksByRequest = {};
  7949. this.loadedStream = new LegacyPromise();
  7950. if (args.initialData) {
  7951. this.setInitialData(args.initialData);
  7952. }
  7953. }
  7954. ChunkedStreamManager.prototype = {
  7955. setInitialData: function ChunkedStreamManager_setInitialData(data) {
  7956. this.stream.onReceiveInitialData(data);
  7957. if (this.stream.allChunksLoaded()) {
  7958. this.loadedStream.resolve(this.stream);
  7959. } else if (this.msgHandler) {
  7960. this.msgHandler.send('DocProgress', {
  7961. loaded: data.length,
  7962. total: this.length
  7963. });
  7964. }
  7965. },
  7966. onLoadedStream: function ChunkedStreamManager_getLoadedStream() {
  7967. return this.loadedStream;
  7968. },
  7969. // Get all the chunks that are not yet loaded and groups them into
  7970. // contiguous ranges to load in as few requests as possible
  7971. requestAllChunks: function ChunkedStreamManager_requestAllChunks() {
  7972. var missingChunks = this.stream.getMissingChunks();
  7973. this.requestChunks(missingChunks);
  7974. return this.loadedStream;
  7975. },
  7976. requestChunks: function ChunkedStreamManager_requestChunks(chunks,
  7977. callback) {
  7978. var requestId = this.currRequestId++;
  7979. var chunksNeeded;
  7980. var i, ii;
  7981. this.chunksNeededByRequest[requestId] = chunksNeeded = {};
  7982. for (i = 0, ii = chunks.length; i < ii; i++) {
  7983. if (!this.stream.hasChunk(chunks[i])) {
  7984. chunksNeeded[chunks[i]] = true;
  7985. }
  7986. }
  7987. if (isEmptyObj(chunksNeeded)) {
  7988. if (callback) {
  7989. callback();
  7990. }
  7991. return;
  7992. }
  7993. this.callbacksByRequest[requestId] = callback;
  7994. var chunksToRequest = [];
  7995. for (var chunk in chunksNeeded) {
  7996. chunk = chunk | 0;
  7997. if (!(chunk in this.requestsByChunk)) {
  7998. this.requestsByChunk[chunk] = [];
  7999. chunksToRequest.push(chunk);
  8000. }
  8001. this.requestsByChunk[chunk].push(requestId);
  8002. }
  8003. if (!chunksToRequest.length) {
  8004. return;
  8005. }
  8006. var groupedChunksToRequest = this.groupChunks(chunksToRequest);
  8007. for (i = 0; i < groupedChunksToRequest.length; ++i) {
  8008. var groupedChunk = groupedChunksToRequest[i];
  8009. var begin = groupedChunk.beginChunk * this.chunkSize;
  8010. var end = Math.min(groupedChunk.endChunk * this.chunkSize, this.length);
  8011. this.sendRequest(begin, end);
  8012. }
  8013. },
  8014. getStream: function ChunkedStreamManager_getStream() {
  8015. return this.stream;
  8016. },
  8017. // Loads any chunks in the requested range that are not yet loaded
  8018. requestRange: function ChunkedStreamManager_requestRange(
  8019. begin, end, callback) {
  8020. end = Math.min(end, this.length);
  8021. var beginChunk = this.getBeginChunk(begin);
  8022. var endChunk = this.getEndChunk(end);
  8023. var chunks = [];
  8024. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  8025. chunks.push(chunk);
  8026. }
  8027. this.requestChunks(chunks, callback);
  8028. },
  8029. requestRanges: function ChunkedStreamManager_requestRanges(ranges,
  8030. callback) {
  8031. ranges = ranges || [];
  8032. var chunksToRequest = [];
  8033. for (var i = 0; i < ranges.length; i++) {
  8034. var beginChunk = this.getBeginChunk(ranges[i].begin);
  8035. var endChunk = this.getEndChunk(ranges[i].end);
  8036. for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
  8037. if (chunksToRequest.indexOf(chunk) < 0) {
  8038. chunksToRequest.push(chunk);
  8039. }
  8040. }
  8041. }
  8042. chunksToRequest.sort(function(a, b) { return a - b; });
  8043. this.requestChunks(chunksToRequest, callback);
  8044. },
  8045. // Groups a sorted array of chunks into as few continguous larger
  8046. // chunks as possible
  8047. groupChunks: function ChunkedStreamManager_groupChunks(chunks) {
  8048. var groupedChunks = [];
  8049. var beginChunk = -1;
  8050. var prevChunk = -1;
  8051. for (var i = 0; i < chunks.length; ++i) {
  8052. var chunk = chunks[i];
  8053. if (beginChunk < 0) {
  8054. beginChunk = chunk;
  8055. }
  8056. if (prevChunk >= 0 && prevChunk + 1 !== chunk) {
  8057. groupedChunks.push({ beginChunk: beginChunk,
  8058. endChunk: prevChunk + 1 });
  8059. beginChunk = chunk;
  8060. }
  8061. if (i + 1 === chunks.length) {
  8062. groupedChunks.push({ beginChunk: beginChunk,
  8063. endChunk: chunk + 1 });
  8064. }
  8065. prevChunk = chunk;
  8066. }
  8067. return groupedChunks;
  8068. },
  8069. onProgress: function ChunkedStreamManager_onProgress(args) {
  8070. var bytesLoaded = (this.stream.numChunksLoaded * this.chunkSize +
  8071. args.loaded);
  8072. this.msgHandler.send('DocProgress', {
  8073. loaded: bytesLoaded,
  8074. total: this.length
  8075. });
  8076. },
  8077. onReceiveData: function ChunkedStreamManager_onReceiveData(args) {
  8078. var chunk = args.chunk;
  8079. var begin = args.begin;
  8080. var end = begin + chunk.byteLength;
  8081. var beginChunk = this.getBeginChunk(begin);
  8082. var endChunk = this.getEndChunk(end);
  8083. this.stream.onReceiveData(begin, chunk);
  8084. if (this.stream.allChunksLoaded()) {
  8085. this.loadedStream.resolve(this.stream);
  8086. }
  8087. var loadedRequests = [];
  8088. var i, requestId;
  8089. for (chunk = beginChunk; chunk < endChunk; ++chunk) {
  8090. // The server might return more chunks than requested
  8091. var requestIds = this.requestsByChunk[chunk] || [];
  8092. delete this.requestsByChunk[chunk];
  8093. for (i = 0; i < requestIds.length; ++i) {
  8094. requestId = requestIds[i];
  8095. var chunksNeeded = this.chunksNeededByRequest[requestId];
  8096. if (chunk in chunksNeeded) {
  8097. delete chunksNeeded[chunk];
  8098. }
  8099. if (!isEmptyObj(chunksNeeded)) {
  8100. continue;
  8101. }
  8102. loadedRequests.push(requestId);
  8103. }
  8104. }
  8105. // If there are no pending requests, automatically fetch the next
  8106. // unfetched chunk of the PDF
  8107. if (!this.disableAutoFetch && isEmptyObj(this.requestsByChunk)) {
  8108. var nextEmptyChunk;
  8109. if (this.stream.numChunksLoaded === 1) {
  8110. // This is a special optimization so that after fetching the first
  8111. // chunk, rather than fetching the second chunk, we fetch the last
  8112. // chunk.
  8113. var lastChunk = this.stream.numChunks - 1;
  8114. if (!this.stream.hasChunk(lastChunk)) {
  8115. nextEmptyChunk = lastChunk;
  8116. }
  8117. } else {
  8118. nextEmptyChunk = this.stream.nextEmptyChunk(endChunk);
  8119. }
  8120. if (isInt(nextEmptyChunk)) {
  8121. this.requestChunks([nextEmptyChunk]);
  8122. }
  8123. }
  8124. for (i = 0; i < loadedRequests.length; ++i) {
  8125. requestId = loadedRequests[i];
  8126. var callback = this.callbacksByRequest[requestId];
  8127. delete this.callbacksByRequest[requestId];
  8128. if (callback) {
  8129. callback();
  8130. }
  8131. }
  8132. this.msgHandler.send('DocProgress', {
  8133. loaded: this.stream.numChunksLoaded * this.chunkSize,
  8134. total: this.length
  8135. });
  8136. },
  8137. getBeginChunk: function ChunkedStreamManager_getBeginChunk(begin) {
  8138. var chunk = Math.floor(begin / this.chunkSize);
  8139. return chunk;
  8140. },
  8141. getEndChunk: function ChunkedStreamManager_getEndChunk(end) {
  8142. if (end % this.chunkSize === 0) {
  8143. return end / this.chunkSize;
  8144. }
  8145. // 0 -> 0
  8146. // 1 -> 1
  8147. // 99 -> 1
  8148. // 100 -> 1
  8149. // 101 -> 2
  8150. var chunk = Math.floor((end - 1) / this.chunkSize) + 1;
  8151. return chunk;
  8152. }
  8153. };
  8154. return ChunkedStreamManager;
  8155. })();
  8156. // The maximum number of bytes fetched per range request
  8157. var RANGE_CHUNK_SIZE = 65536;
  8158. // TODO(mack): Make use of PDFJS.Util.inherit() when it becomes available
  8159. var BasePdfManager = (function BasePdfManagerClosure() {
  8160. function BasePdfManager() {
  8161. throw new Error('Cannot initialize BaseManagerManager');
  8162. }
  8163. BasePdfManager.prototype = {
  8164. onLoadedStream: function BasePdfManager_onLoadedStream() {
  8165. throw new NotImplementedException();
  8166. },
  8167. ensureDoc: function BasePdfManager_ensureDoc(prop, args) {
  8168. return this.ensure(this.pdfDocument, prop, args);
  8169. },
  8170. ensureXRef: function BasePdfManager_ensureXRef(prop, args) {
  8171. return this.ensure(this.pdfDocument.xref, prop, args);
  8172. },
  8173. ensureCatalog: function BasePdfManager_ensureCatalog(prop, args) {
  8174. return this.ensure(this.pdfDocument.catalog, prop, args);
  8175. },
  8176. getPage: function BasePdfManager_pagePage(pageIndex) {
  8177. return this.pdfDocument.getPage(pageIndex);
  8178. },
  8179. cleanup: function BasePdfManager_cleanup() {
  8180. return this.pdfDocument.cleanup();
  8181. },
  8182. ensure: function BasePdfManager_ensure(obj, prop, args) {
  8183. return new NotImplementedException();
  8184. },
  8185. requestRange: function BasePdfManager_ensure(begin, end) {
  8186. return new NotImplementedException();
  8187. },
  8188. requestLoadedStream: function BasePdfManager_requestLoadedStream() {
  8189. return new NotImplementedException();
  8190. },
  8191. updatePassword: function BasePdfManager_updatePassword(password) {
  8192. this.pdfDocument.xref.password = this.password = password;
  8193. if (this.passwordChangedPromise) {
  8194. this.passwordChangedPromise.resolve();
  8195. }
  8196. },
  8197. terminate: function BasePdfManager_terminate() {
  8198. return new NotImplementedException();
  8199. }
  8200. };
  8201. return BasePdfManager;
  8202. })();
  8203. var LocalPdfManager = (function LocalPdfManagerClosure() {
  8204. function LocalPdfManager(data, password) {
  8205. var stream = new Stream(data);
  8206. this.pdfDocument = new PDFDocument(this, stream, password);
  8207. this.loadedStream = new LegacyPromise();
  8208. this.loadedStream.resolve(stream);
  8209. }
  8210. LocalPdfManager.prototype = Object.create(BasePdfManager.prototype);
  8211. LocalPdfManager.prototype.constructor = LocalPdfManager;
  8212. LocalPdfManager.prototype.ensure =
  8213. function LocalPdfManager_ensure(obj, prop, args) {
  8214. var promise = new LegacyPromise();
  8215. try {
  8216. var value = obj[prop];
  8217. var result;
  8218. if (typeof(value) === 'function') {
  8219. result = value.apply(obj, args);
  8220. } else {
  8221. result = value;
  8222. }
  8223. promise.resolve(result);
  8224. } catch (e) {
  8225. console.log(e.stack);
  8226. promise.reject(e);
  8227. }
  8228. return promise;
  8229. };
  8230. LocalPdfManager.prototype.requestRange =
  8231. function LocalPdfManager_requestRange(begin, end) {
  8232. var promise = new LegacyPromise();
  8233. promise.resolve();
  8234. return promise;
  8235. };
  8236. LocalPdfManager.prototype.requestLoadedStream =
  8237. function LocalPdfManager_requestLoadedStream() {
  8238. };
  8239. LocalPdfManager.prototype.onLoadedStream =
  8240. function LocalPdfManager_getLoadedStream() {
  8241. return this.loadedStream;
  8242. };
  8243. LocalPdfManager.prototype.terminate =
  8244. function LocalPdfManager_terminate() {
  8245. return;
  8246. };
  8247. return LocalPdfManager;
  8248. })();
  8249. var NetworkPdfManager = (function NetworkPdfManagerClosure() {
  8250. function NetworkPdfManager(args, msgHandler) {
  8251. this.msgHandler = msgHandler;
  8252. var params = {
  8253. msgHandler: msgHandler,
  8254. httpHeaders: args.httpHeaders,
  8255. withCredentials: args.withCredentials,
  8256. chunkedViewerLoading: args.chunkedViewerLoading,
  8257. disableAutoFetch: args.disableAutoFetch,
  8258. initialData: args.initialData
  8259. };
  8260. this.streamManager = new ChunkedStreamManager(args.length, RANGE_CHUNK_SIZE,
  8261. args.url, params);
  8262. this.pdfDocument = new PDFDocument(this, this.streamManager.getStream(),
  8263. args.password);
  8264. }
  8265. NetworkPdfManager.prototype = Object.create(BasePdfManager.prototype);
  8266. NetworkPdfManager.prototype.constructor = NetworkPdfManager;
  8267. NetworkPdfManager.prototype.ensure =
  8268. function NetworkPdfManager_ensure(obj, prop, args) {
  8269. var promise = new LegacyPromise();
  8270. this.ensureHelper(promise, obj, prop, args);
  8271. return promise;
  8272. };
  8273. NetworkPdfManager.prototype.ensureHelper =
  8274. function NetworkPdfManager_ensureHelper(promise, obj, prop, args) {
  8275. try {
  8276. var result;
  8277. var value = obj[prop];
  8278. if (typeof(value) === 'function') {
  8279. result = value.apply(obj, args);
  8280. } else {
  8281. result = value;
  8282. }
  8283. promise.resolve(result);
  8284. } catch(e) {
  8285. if (!(e instanceof MissingDataException)) {
  8286. console.log(e.stack);
  8287. promise.reject(e);
  8288. return;
  8289. }
  8290. this.streamManager.requestRange(e.begin, e.end, function() {
  8291. this.ensureHelper(promise, obj, prop, args);
  8292. }.bind(this));
  8293. }
  8294. };
  8295. NetworkPdfManager.prototype.requestRange =
  8296. function NetworkPdfManager_requestRange(begin, end) {
  8297. var promise = new LegacyPromise();
  8298. this.streamManager.requestRange(begin, end, function() {
  8299. promise.resolve();
  8300. });
  8301. return promise;
  8302. };
  8303. NetworkPdfManager.prototype.requestLoadedStream =
  8304. function NetworkPdfManager_requestLoadedStream() {
  8305. this.streamManager.requestAllChunks();
  8306. };
  8307. NetworkPdfManager.prototype.onLoadedStream =
  8308. function NetworkPdfManager_getLoadedStream() {
  8309. return this.streamManager.onLoadedStream();
  8310. };
  8311. NetworkPdfManager.prototype.terminate =
  8312. function NetworkPdfManager_terminate() {
  8313. this.streamManager.networkManager.abortAllRequests();
  8314. };
  8315. return NetworkPdfManager;
  8316. })();
  8317. var Page = (function PageClosure() {
  8318. var LETTER_SIZE_MEDIABOX = [0, 0, 612, 792];
  8319. function Page(pdfManager, xref, pageIndex, pageDict, ref, fontCache) {
  8320. this.pdfManager = pdfManager;
  8321. this.pageIndex = pageIndex;
  8322. this.pageDict = pageDict;
  8323. this.xref = xref;
  8324. this.ref = ref;
  8325. this.fontCache = fontCache;
  8326. this.idCounters = {
  8327. obj: 0
  8328. };
  8329. this.resourcesPromise = null;
  8330. }
  8331. Page.prototype = {
  8332. getPageProp: function Page_getPageProp(key) {
  8333. return this.pageDict.get(key);
  8334. },
  8335. getInheritedPageProp: function Page_inheritPageProp(key) {
  8336. var dict = this.pageDict;
  8337. var value = dict.get(key);
  8338. while (value === undefined) {
  8339. dict = dict.get('Parent');
  8340. if (!dict) {
  8341. break;
  8342. }
  8343. value = dict.get(key);
  8344. }
  8345. return value;
  8346. },
  8347. get content() {
  8348. return this.getPageProp('Contents');
  8349. },
  8350. get resources() {
  8351. var value = this.getInheritedPageProp('Resources');
  8352. // For robustness: The spec states that a \Resources entry has to be
  8353. // present, but can be empty. Some document omit it still. In this case
  8354. // return an empty dictionary:
  8355. if (value === undefined) {
  8356. value = Dict.empty;
  8357. }
  8358. return shadow(this, 'resources', value);
  8359. },
  8360. get mediaBox() {
  8361. var obj = this.getInheritedPageProp('MediaBox');
  8362. // Reset invalid media box to letter size.
  8363. if (!isArray(obj) || obj.length !== 4) {
  8364. obj = LETTER_SIZE_MEDIABOX;
  8365. }
  8366. return shadow(this, 'mediaBox', obj);
  8367. },
  8368. get view() {
  8369. var mediaBox = this.mediaBox;
  8370. var cropBox = this.getInheritedPageProp('CropBox');
  8371. if (!isArray(cropBox) || cropBox.length !== 4) {
  8372. return shadow(this, 'view', mediaBox);
  8373. }
  8374. // From the spec, 6th ed., p.963:
  8375. // "The crop, bleed, trim, and art boxes should not ordinarily
  8376. // extend beyond the boundaries of the media box. If they do, they are
  8377. // effectively reduced to their intersection with the media box."
  8378. cropBox = Util.intersect(cropBox, mediaBox);
  8379. if (!cropBox) {
  8380. return shadow(this, 'view', mediaBox);
  8381. }
  8382. return shadow(this, 'view', cropBox);
  8383. },
  8384. get annotationRefs() {
  8385. return shadow(this, 'annotationRefs',
  8386. this.getInheritedPageProp('Annots'));
  8387. },
  8388. get rotate() {
  8389. var rotate = this.getInheritedPageProp('Rotate') || 0;
  8390. // Normalize rotation so it's a multiple of 90 and between 0 and 270
  8391. if (rotate % 90 !== 0) {
  8392. rotate = 0;
  8393. } else if (rotate >= 360) {
  8394. rotate = rotate % 360;
  8395. } else if (rotate < 0) {
  8396. // The spec doesn't cover negatives, assume its counterclockwise
  8397. // rotation. The following is the other implementation of modulo.
  8398. rotate = ((rotate % 360) + 360) % 360;
  8399. }
  8400. return shadow(this, 'rotate', rotate);
  8401. },
  8402. getContentStream: function Page_getContentStream() {
  8403. var content = this.content;
  8404. var stream;
  8405. if (isArray(content)) {
  8406. // fetching items
  8407. var xref = this.xref;
  8408. var i, n = content.length;
  8409. var streams = [];
  8410. for (i = 0; i < n; ++i) {
  8411. streams.push(xref.fetchIfRef(content[i]));
  8412. }
  8413. stream = new StreamsSequenceStream(streams);
  8414. } else if (isStream(content)) {
  8415. stream = content;
  8416. } else {
  8417. // replacing non-existent page content with empty one
  8418. stream = new NullStream();
  8419. }
  8420. return stream;
  8421. },
  8422. loadResources: function(keys) {
  8423. if (!this.resourcesPromise) {
  8424. // TODO: add async getInheritedPageProp and remove this.
  8425. this.resourcesPromise = this.pdfManager.ensure(this, 'resources');
  8426. }
  8427. var promise = new LegacyPromise();
  8428. this.resourcesPromise.then(function resourceSuccess() {
  8429. var objectLoader = new ObjectLoader(this.resources.map,
  8430. keys,
  8431. this.xref);
  8432. objectLoader.load().then(function objectLoaderSuccess() {
  8433. promise.resolve();
  8434. });
  8435. }.bind(this));
  8436. return promise;
  8437. },
  8438. getOperatorList: function Page_getOperatorList(handler, intent) {
  8439. var self = this;
  8440. var promise = new LegacyPromise();
  8441. function reject(e) {
  8442. promise.reject(e);
  8443. }
  8444. var pageListPromise = new LegacyPromise();
  8445. var pdfManager = this.pdfManager;
  8446. var contentStreamPromise = pdfManager.ensure(this, 'getContentStream',
  8447. []);
  8448. var resourcesPromise = this.loadResources([
  8449. 'ExtGState',
  8450. 'ColorSpace',
  8451. 'Pattern',
  8452. 'Shading',
  8453. 'XObject',
  8454. 'Font'
  8455. // ProcSet
  8456. // Properties
  8457. ]);
  8458. var partialEvaluator = new PartialEvaluator(pdfManager, this.xref,
  8459. handler, this.pageIndex,
  8460. 'p' + this.pageIndex + '_',
  8461. this.idCounters,
  8462. this.fontCache);
  8463. var dataPromises = Promise.all([contentStreamPromise, resourcesPromise],
  8464. reject);
  8465. dataPromises.then(function(data) {
  8466. var contentStream = data[0];
  8467. var opList = new OperatorList(intent, handler, self.pageIndex);
  8468. handler.send('StartRenderPage', {
  8469. transparency: partialEvaluator.hasBlendModes(self.resources),
  8470. pageIndex: self.pageIndex,
  8471. intent: intent
  8472. });
  8473. partialEvaluator.getOperatorList(contentStream, self.resources, opList);
  8474. pageListPromise.resolve(opList);
  8475. });
  8476. var annotationsPromise = pdfManager.ensure(this, 'annotations');
  8477. Promise.all([pageListPromise, annotationsPromise]).then(function(datas) {
  8478. var pageOpList = datas[0];
  8479. var annotations = datas[1];
  8480. if (annotations.length === 0) {
  8481. pageOpList.flush(true);
  8482. promise.resolve(pageOpList);
  8483. return;
  8484. }
  8485. var annotationsReadyPromise = Annotation.appendToOperatorList(
  8486. annotations, pageOpList, pdfManager, partialEvaluator, intent);
  8487. annotationsReadyPromise.then(function () {
  8488. pageOpList.flush(true);
  8489. promise.resolve(pageOpList);
  8490. }, reject);
  8491. }, reject);
  8492. return promise;
  8493. },
  8494. extractTextContent: function Page_extractTextContent() {
  8495. var handler = {
  8496. on: function nullHandlerOn() {},
  8497. send: function nullHandlerSend() {}
  8498. };
  8499. var self = this;
  8500. var pdfManager = this.pdfManager;
  8501. var contentStreamPromise = pdfManager.ensure(this, 'getContentStream',
  8502. []);
  8503. var resourcesPromise = this.loadResources([
  8504. 'ExtGState',
  8505. 'XObject',
  8506. 'Font'
  8507. ]);
  8508. var dataPromises = Promise.all([contentStreamPromise,
  8509. resourcesPromise]);
  8510. return dataPromises.then(function(data) {
  8511. var contentStream = data[0];
  8512. var partialEvaluator = new PartialEvaluator(pdfManager, self.xref,
  8513. handler, self.pageIndex,
  8514. 'p' + self.pageIndex + '_',
  8515. self.idCounters,
  8516. self.fontCache);
  8517. return partialEvaluator.getTextContent(contentStream,
  8518. self.resources);
  8519. });
  8520. },
  8521. getAnnotationsData: function Page_getAnnotationsData() {
  8522. var annotations = this.annotations;
  8523. var annotationsData = [];
  8524. for (var i = 0, n = annotations.length; i < n; ++i) {
  8525. annotationsData.push(annotations[i].getData());
  8526. }
  8527. return annotationsData;
  8528. },
  8529. get annotations() {
  8530. var annotations = [];
  8531. var annotationRefs = (this.annotationRefs || []);
  8532. for (var i = 0, n = annotationRefs.length; i < n; ++i) {
  8533. var annotationRef = annotationRefs[i];
  8534. var annotation = Annotation.fromRef(this.xref, annotationRef);
  8535. if (annotation) {
  8536. annotations.push(annotation);
  8537. }
  8538. }
  8539. return shadow(this, 'annotations', annotations);
  8540. }
  8541. };
  8542. return Page;
  8543. })();
  8544. /**
  8545. * The `PDFDocument` holds all the data of the PDF file. Compared to the
  8546. * `PDFDoc`, this one doesn't have any job management code.
  8547. * Right now there exists one PDFDocument on the main thread + one object
  8548. * for each worker. If there is no worker support enabled, there are two
  8549. * `PDFDocument` objects on the main thread created.
  8550. */
  8551. var PDFDocument = (function PDFDocumentClosure() {
  8552. function PDFDocument(pdfManager, arg, password) {
  8553. if (isStream(arg)) {
  8554. init.call(this, pdfManager, arg, password);
  8555. } else if (isArrayBuffer(arg)) {
  8556. init.call(this, pdfManager, new Stream(arg), password);
  8557. } else {
  8558. error('PDFDocument: Unknown argument type');
  8559. }
  8560. }
  8561. function init(pdfManager, stream, password) {
  8562. assert(stream.length > 0, 'stream must have data');
  8563. this.pdfManager = pdfManager;
  8564. this.stream = stream;
  8565. var xref = new XRef(this.stream, password, pdfManager);
  8566. this.xref = xref;
  8567. }
  8568. function find(stream, needle, limit, backwards) {
  8569. var pos = stream.pos;
  8570. var end = stream.end;
  8571. var strBuf = [];
  8572. if (pos + limit > end) {
  8573. limit = end - pos;
  8574. }
  8575. for (var n = 0; n < limit; ++n) {
  8576. strBuf.push(String.fromCharCode(stream.getByte()));
  8577. }
  8578. var str = strBuf.join('');
  8579. stream.pos = pos;
  8580. var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle);
  8581. if (index == -1) {
  8582. return false; /* not found */
  8583. }
  8584. stream.pos += index;
  8585. return true; /* found */
  8586. }
  8587. var DocumentInfoValidators = {
  8588. get entries() {
  8589. // Lazily build this since all the validation functions below are not
  8590. // defined until after this file loads.
  8591. return shadow(this, 'entries', {
  8592. Title: isString,
  8593. Author: isString,
  8594. Subject: isString,
  8595. Keywords: isString,
  8596. Creator: isString,
  8597. Producer: isString,
  8598. CreationDate: isString,
  8599. ModDate: isString,
  8600. Trapped: isName
  8601. });
  8602. }
  8603. };
  8604. PDFDocument.prototype = {
  8605. parse: function PDFDocument_parse(recoveryMode) {
  8606. this.setup(recoveryMode);
  8607. try {
  8608. // checking if AcroForm is present
  8609. this.acroForm = this.catalog.catDict.get('AcroForm');
  8610. if (this.acroForm) {
  8611. this.xfa = this.acroForm.get('XFA');
  8612. var fields = this.acroForm.get('Fields');
  8613. if ((!fields || !isArray(fields) || fields.length === 0) &&
  8614. !this.xfa) {
  8615. // no fields and no XFA -- not a form (?)
  8616. this.acroForm = null;
  8617. }
  8618. }
  8619. } catch (ex) {
  8620. info('Something wrong with AcroForm entry');
  8621. this.acroForm = null;
  8622. }
  8623. },
  8624. get linearization() {
  8625. var length = this.stream.length;
  8626. var linearization = false;
  8627. if (length) {
  8628. try {
  8629. linearization = new Linearization(this.stream);
  8630. if (linearization.length != length) {
  8631. linearization = false;
  8632. }
  8633. } catch (err) {
  8634. if (err instanceof MissingDataException) {
  8635. throw err;
  8636. }
  8637. info('The linearization data is not available ' +
  8638. 'or unreadable PDF data is found');
  8639. linearization = false;
  8640. }
  8641. }
  8642. // shadow the prototype getter with a data property
  8643. return shadow(this, 'linearization', linearization);
  8644. },
  8645. get startXRef() {
  8646. var stream = this.stream;
  8647. var startXRef = 0;
  8648. var linearization = this.linearization;
  8649. if (linearization) {
  8650. // Find end of first obj.
  8651. stream.reset();
  8652. if (find(stream, 'endobj', 1024)) {
  8653. startXRef = stream.pos + 6;
  8654. }
  8655. } else {
  8656. // Find startxref by jumping backward from the end of the file.
  8657. var step = 1024;
  8658. var found = false, pos = stream.end;
  8659. while (!found && pos > 0) {
  8660. pos -= step - 'startxref'.length;
  8661. if (pos < 0) {
  8662. pos = 0;
  8663. }
  8664. stream.pos = pos;
  8665. found = find(stream, 'startxref', step, true);
  8666. }
  8667. if (found) {
  8668. stream.skip(9);
  8669. var ch;
  8670. do {
  8671. ch = stream.getByte();
  8672. } while (Lexer.isSpace(ch));
  8673. var str = '';
  8674. while (ch >= 0x20 && ch <= 0x39) { // < '9'
  8675. str += String.fromCharCode(ch);
  8676. ch = stream.getByte();
  8677. }
  8678. startXRef = parseInt(str, 10);
  8679. if (isNaN(startXRef)) {
  8680. startXRef = 0;
  8681. }
  8682. }
  8683. }
  8684. // shadow the prototype getter with a data property
  8685. return shadow(this, 'startXRef', startXRef);
  8686. },
  8687. get mainXRefEntriesOffset() {
  8688. var mainXRefEntriesOffset = 0;
  8689. var linearization = this.linearization;
  8690. if (linearization) {
  8691. mainXRefEntriesOffset = linearization.mainXRefEntriesOffset;
  8692. }
  8693. // shadow the prototype getter with a data property
  8694. return shadow(this, 'mainXRefEntriesOffset', mainXRefEntriesOffset);
  8695. },
  8696. // Find the header, remove leading garbage and setup the stream
  8697. // starting from the header.
  8698. checkHeader: function PDFDocument_checkHeader() {
  8699. var stream = this.stream;
  8700. stream.reset();
  8701. if (find(stream, '%PDF-', 1024)) {
  8702. // Found the header, trim off any garbage before it.
  8703. stream.moveStart();
  8704. // Reading file format version
  8705. var MAX_VERSION_LENGTH = 12;
  8706. var version = '', ch;
  8707. while ((ch = stream.getByte()) > 0x20) { // SPACE
  8708. if (version.length >= MAX_VERSION_LENGTH) {
  8709. break;
  8710. }
  8711. version += String.fromCharCode(ch);
  8712. }
  8713. // removing "%PDF-"-prefix
  8714. this.pdfFormatVersion = version.substring(5);
  8715. return;
  8716. }
  8717. // May not be a PDF file, continue anyway.
  8718. },
  8719. parseStartXRef: function PDFDocument_parseStartXRef() {
  8720. var startXRef = this.startXRef;
  8721. this.xref.setStartXRef(startXRef);
  8722. },
  8723. setup: function PDFDocument_setup(recoveryMode) {
  8724. this.xref.parse(recoveryMode);
  8725. this.catalog = new Catalog(this.pdfManager, this.xref);
  8726. },
  8727. get numPages() {
  8728. var linearization = this.linearization;
  8729. var num = linearization ? linearization.numPages : this.catalog.numPages;
  8730. // shadow the prototype getter
  8731. return shadow(this, 'numPages', num);
  8732. },
  8733. get documentInfo() {
  8734. var docInfo = {
  8735. PDFFormatVersion: this.pdfFormatVersion,
  8736. IsAcroFormPresent: !!this.acroForm,
  8737. IsXFAPresent: !!this.xfa
  8738. };
  8739. var infoDict;
  8740. try {
  8741. infoDict = this.xref.trailer.get('Info');
  8742. } catch (err) {
  8743. info('The document information dictionary is invalid.');
  8744. }
  8745. if (infoDict) {
  8746. var validEntries = DocumentInfoValidators.entries;
  8747. // Only fill the document info with valid entries from the spec.
  8748. for (var key in validEntries) {
  8749. if (infoDict.has(key)) {
  8750. var value = infoDict.get(key);
  8751. // Make sure the value conforms to the spec.
  8752. if (validEntries[key](value)) {
  8753. docInfo[key] = (typeof value !== 'string' ?
  8754. value : stringToPDFString(value));
  8755. } else {
  8756. info('Bad value in document info for "' + key + '"');
  8757. }
  8758. }
  8759. }
  8760. }
  8761. return shadow(this, 'documentInfo', docInfo);
  8762. },
  8763. get fingerprint() {
  8764. var xref = this.xref, hash, fileID = '';
  8765. if (xref.trailer.has('ID')) {
  8766. hash = stringToBytes(xref.trailer.get('ID')[0]);
  8767. } else {
  8768. hash = calculateMD5(this.stream.bytes.subarray(0, 100), 0, 100);
  8769. }
  8770. for (var i = 0, n = hash.length; i < n; i++) {
  8771. fileID += hash[i].toString(16);
  8772. }
  8773. return shadow(this, 'fingerprint', fileID);
  8774. },
  8775. getPage: function PDFDocument_getPage(pageIndex) {
  8776. return this.catalog.getPage(pageIndex);
  8777. },
  8778. cleanup: function PDFDocument_cleanup() {
  8779. return this.catalog.cleanup();
  8780. }
  8781. };
  8782. return PDFDocument;
  8783. })();
  8784. var Name = (function NameClosure() {
  8785. function Name(name) {
  8786. this.name = name;
  8787. }
  8788. Name.prototype = {};
  8789. var nameCache = {};
  8790. Name.get = function Name_get(name) {
  8791. var nameValue = nameCache[name];
  8792. return (nameValue ? nameValue : (nameCache[name] = new Name(name)));
  8793. };
  8794. return Name;
  8795. })();
  8796. var Cmd = (function CmdClosure() {
  8797. function Cmd(cmd) {
  8798. this.cmd = cmd;
  8799. }
  8800. Cmd.prototype = {};
  8801. var cmdCache = {};
  8802. Cmd.get = function Cmd_get(cmd) {
  8803. var cmdValue = cmdCache[cmd];
  8804. return (cmdValue ? cmdValue : (cmdCache[cmd] = new Cmd(cmd)));
  8805. };
  8806. return Cmd;
  8807. })();
  8808. var Dict = (function DictClosure() {
  8809. var nonSerializable = function nonSerializableClosure() {
  8810. return nonSerializable; // creating closure on some variable
  8811. };
  8812. var GETALL_DICTIONARY_TYPES_WHITELIST = {
  8813. 'Background': true,
  8814. 'ExtGState': true,
  8815. 'Halftone': true,
  8816. 'Layout': true,
  8817. 'Mask': true,
  8818. 'Pagination': true,
  8819. 'Printing': true
  8820. };
  8821. function isRecursionAllowedFor(dict) {
  8822. if (!isName(dict.Type)) {
  8823. return true;
  8824. }
  8825. var dictType = dict.Type.name;
  8826. return GETALL_DICTIONARY_TYPES_WHITELIST[dictType] === true;
  8827. }
  8828. // xref is optional
  8829. function Dict(xref) {
  8830. // Map should only be used internally, use functions below to access.
  8831. this.map = Object.create(null);
  8832. this.xref = xref;
  8833. this.objId = null;
  8834. this.__nonSerializable__ = nonSerializable; // disable cloning of the Dict
  8835. }
  8836. Dict.prototype = {
  8837. assignXref: function Dict_assignXref(newXref) {
  8838. this.xref = newXref;
  8839. },
  8840. // automatically dereferences Ref objects
  8841. get: function Dict_get(key1, key2, key3) {
  8842. var value;
  8843. var xref = this.xref;
  8844. if (typeof (value = this.map[key1]) != 'undefined' || key1 in this.map ||
  8845. typeof key2 == 'undefined') {
  8846. return xref ? xref.fetchIfRef(value) : value;
  8847. }
  8848. if (typeof (value = this.map[key2]) != 'undefined' || key2 in this.map ||
  8849. typeof key3 == 'undefined') {
  8850. return xref ? xref.fetchIfRef(value) : value;
  8851. }
  8852. value = this.map[key3] || null;
  8853. return xref ? xref.fetchIfRef(value) : value;
  8854. },
  8855. // Same as get(), but returns a promise and uses fetchIfRefAsync().
  8856. getAsync: function Dict_getAsync(key1, key2, key3) {
  8857. var value;
  8858. var promise;
  8859. var xref = this.xref;
  8860. if (typeof (value = this.map[key1]) !== undefined || key1 in this.map ||
  8861. typeof key2 === undefined) {
  8862. if (xref) {
  8863. return xref.fetchIfRefAsync(value);
  8864. }
  8865. promise = new LegacyPromise();
  8866. promise.resolve(value);
  8867. return promise;
  8868. }
  8869. if (typeof (value = this.map[key2]) !== undefined || key2 in this.map ||
  8870. typeof key3 === undefined) {
  8871. if (xref) {
  8872. return xref.fetchIfRefAsync(value);
  8873. }
  8874. promise = new LegacyPromise();
  8875. promise.resolve(value);
  8876. return promise;
  8877. }
  8878. value = this.map[key3] || null;
  8879. if (xref) {
  8880. return xref.fetchIfRefAsync(value);
  8881. }
  8882. promise = new LegacyPromise();
  8883. promise.resolve(value);
  8884. return promise;
  8885. },
  8886. // no dereferencing
  8887. getRaw: function Dict_getRaw(key) {
  8888. return this.map[key];
  8889. },
  8890. // creates new map and dereferences all Refs
  8891. getAll: function Dict_getAll() {
  8892. var all = Object.create(null);
  8893. var queue = null;
  8894. var key, obj;
  8895. for (key in this.map) {
  8896. obj = this.get(key);
  8897. if (obj instanceof Dict) {
  8898. if (isRecursionAllowedFor(obj)) {
  8899. (queue || (queue = [])).push({target: all, key: key, obj: obj});
  8900. } else {
  8901. all[key] = this.getRaw(key);
  8902. }
  8903. } else {
  8904. all[key] = obj;
  8905. }
  8906. }
  8907. if (!queue) {
  8908. return all;
  8909. }
  8910. // trying to take cyclic references into the account
  8911. var processed = Object.create(null);
  8912. while (queue.length > 0) {
  8913. var item = queue.shift();
  8914. var itemObj = item.obj;
  8915. var objId = itemObj.objId;
  8916. if (objId && objId in processed) {
  8917. item.target[item.key] = processed[objId];
  8918. continue;
  8919. }
  8920. var dereferenced = Object.create(null);
  8921. for (key in itemObj.map) {
  8922. obj = itemObj.get(key);
  8923. if (obj instanceof Dict) {
  8924. if (isRecursionAllowedFor(obj)) {
  8925. queue.push({target: dereferenced, key: key, obj: obj});
  8926. } else {
  8927. dereferenced[key] = itemObj.getRaw(key);
  8928. }
  8929. } else {
  8930. dereferenced[key] = obj;
  8931. }
  8932. }
  8933. if (objId) {
  8934. processed[objId] = dereferenced;
  8935. }
  8936. item.target[item.key] = dereferenced;
  8937. }
  8938. return all;
  8939. },
  8940. set: function Dict_set(key, value) {
  8941. this.map[key] = value;
  8942. },
  8943. has: function Dict_has(key) {
  8944. return key in this.map;
  8945. },
  8946. forEach: function Dict_forEach(callback) {
  8947. for (var key in this.map) {
  8948. callback(key, this.get(key));
  8949. }
  8950. }
  8951. };
  8952. Dict.empty = new Dict(null);
  8953. return Dict;
  8954. })();
  8955. var Ref = (function RefClosure() {
  8956. function Ref(num, gen) {
  8957. this.num = num;
  8958. this.gen = gen;
  8959. }
  8960. Ref.prototype = {};
  8961. return Ref;
  8962. })();
  8963. // The reference is identified by number and generation.
  8964. // This structure stores only one instance of the reference.
  8965. var RefSet = (function RefSetClosure() {
  8966. function RefSet() {
  8967. this.dict = {};
  8968. }
  8969. RefSet.prototype = {
  8970. has: function RefSet_has(ref) {
  8971. return ('R' + ref.num + '.' + ref.gen) in this.dict;
  8972. },
  8973. put: function RefSet_put(ref) {
  8974. this.dict['R' + ref.num + '.' + ref.gen] = true;
  8975. },
  8976. remove: function RefSet_remove(ref) {
  8977. delete this.dict['R' + ref.num + '.' + ref.gen];
  8978. }
  8979. };
  8980. return RefSet;
  8981. })();
  8982. var RefSetCache = (function RefSetCacheClosure() {
  8983. function RefSetCache() {
  8984. this.dict = Object.create(null);
  8985. }
  8986. RefSetCache.prototype = {
  8987. get: function RefSetCache_get(ref) {
  8988. return this.dict['R' + ref.num + '.' + ref.gen];
  8989. },
  8990. has: function RefSetCache_has(ref) {
  8991. return ('R' + ref.num + '.' + ref.gen) in this.dict;
  8992. },
  8993. put: function RefSetCache_put(ref, obj) {
  8994. this.dict['R' + ref.num + '.' + ref.gen] = obj;
  8995. },
  8996. putAlias: function RefSetCache_putAlias(ref, aliasRef) {
  8997. this.dict['R' + ref.num + '.' + ref.gen] = this.get(aliasRef);
  8998. },
  8999. forEach: function RefSetCache_forEach(fn, thisArg) {
  9000. for (var i in this.dict) {
  9001. fn.call(thisArg, this.dict[i]);
  9002. }
  9003. },
  9004. clear: function RefSetCache_clear() {
  9005. this.dict = Object.create(null);
  9006. }
  9007. };
  9008. return RefSetCache;
  9009. })();
  9010. var Catalog = (function CatalogClosure() {
  9011. function Catalog(pdfManager, xref) {
  9012. this.pdfManager = pdfManager;
  9013. this.xref = xref;
  9014. this.catDict = xref.getCatalogObj();
  9015. this.fontCache = new RefSetCache();
  9016. assert(isDict(this.catDict),
  9017. 'catalog object is not a dictionary');
  9018. this.pagePromises = [];
  9019. }
  9020. Catalog.prototype = {
  9021. get metadata() {
  9022. var streamRef = this.catDict.getRaw('Metadata');
  9023. if (!isRef(streamRef)) {
  9024. return shadow(this, 'metadata', null);
  9025. }
  9026. var encryptMetadata = (!this.xref.encrypt ? false :
  9027. this.xref.encrypt.encryptMetadata);
  9028. var stream = this.xref.fetch(streamRef, !encryptMetadata);
  9029. var metadata;
  9030. if (stream && isDict(stream.dict)) {
  9031. var type = stream.dict.get('Type');
  9032. var subtype = stream.dict.get('Subtype');
  9033. if (isName(type) && isName(subtype) &&
  9034. type.name === 'Metadata' && subtype.name === 'XML') {
  9035. // XXX: This should examine the charset the XML document defines,
  9036. // however since there are currently no real means to decode
  9037. // arbitrary charsets, let's just hope that the author of the PDF
  9038. // was reasonable enough to stick with the XML default charset,
  9039. // which is UTF-8.
  9040. try {
  9041. metadata = stringToUTF8String(bytesToString(stream.getBytes()));
  9042. } catch (e) {
  9043. info('Skipping invalid metadata.');
  9044. }
  9045. }
  9046. }
  9047. return shadow(this, 'metadata', metadata);
  9048. },
  9049. get toplevelPagesDict() {
  9050. var pagesObj = this.catDict.get('Pages');
  9051. assert(isDict(pagesObj), 'invalid top-level pages dictionary');
  9052. // shadow the prototype getter
  9053. return shadow(this, 'toplevelPagesDict', pagesObj);
  9054. },
  9055. get documentOutline() {
  9056. var obj = null;
  9057. try {
  9058. obj = this.readDocumentOutline();
  9059. } catch (ex) {
  9060. if (ex instanceof MissingDataException) {
  9061. throw ex;
  9062. }
  9063. warn('Unable to read document outline');
  9064. }
  9065. return shadow(this, 'documentOutline', obj);
  9066. },
  9067. readDocumentOutline: function Catalog_readDocumentOutline() {
  9068. var xref = this.xref;
  9069. var obj = this.catDict.get('Outlines');
  9070. var root = { items: [] };
  9071. if (isDict(obj)) {
  9072. obj = obj.getRaw('First');
  9073. var processed = new RefSet();
  9074. if (isRef(obj)) {
  9075. var queue = [{obj: obj, parent: root}];
  9076. // to avoid recursion keeping track of the items
  9077. // in the processed dictionary
  9078. processed.put(obj);
  9079. while (queue.length > 0) {
  9080. var i = queue.shift();
  9081. var outlineDict = xref.fetchIfRef(i.obj);
  9082. if (outlineDict === null) {
  9083. continue;
  9084. }
  9085. if (!outlineDict.has('Title')) {
  9086. error('Invalid outline item');
  9087. }
  9088. var dest = outlineDict.get('A');
  9089. if (dest) {
  9090. dest = dest.get('D');
  9091. } else if (outlineDict.has('Dest')) {
  9092. dest = outlineDict.getRaw('Dest');
  9093. if (isName(dest)) {
  9094. dest = dest.name;
  9095. }
  9096. }
  9097. var title = outlineDict.get('Title');
  9098. var outlineItem = {
  9099. dest: dest,
  9100. title: stringToPDFString(title),
  9101. color: outlineDict.get('C') || [0, 0, 0],
  9102. count: outlineDict.get('Count'),
  9103. bold: !!(outlineDict.get('F') & 2),
  9104. italic: !!(outlineDict.get('F') & 1),
  9105. items: []
  9106. };
  9107. i.parent.items.push(outlineItem);
  9108. obj = outlineDict.getRaw('First');
  9109. if (isRef(obj) && !processed.has(obj)) {
  9110. queue.push({obj: obj, parent: outlineItem});
  9111. processed.put(obj);
  9112. }
  9113. obj = outlineDict.getRaw('Next');
  9114. if (isRef(obj) && !processed.has(obj)) {
  9115. queue.push({obj: obj, parent: i.parent});
  9116. processed.put(obj);
  9117. }
  9118. }
  9119. }
  9120. }
  9121. return (root.items.length > 0 ? root.items : null);
  9122. },
  9123. get numPages() {
  9124. var obj = this.toplevelPagesDict.get('Count');
  9125. assert(
  9126. isInt(obj),
  9127. 'page count in top level pages object is not an integer'
  9128. );
  9129. // shadow the prototype getter
  9130. return shadow(this, 'num', obj);
  9131. },
  9132. get destinations() {
  9133. function fetchDestination(dest) {
  9134. return isDict(dest) ? dest.get('D') : dest;
  9135. }
  9136. var xref = this.xref;
  9137. var dests = {}, nameTreeRef, nameDictionaryRef;
  9138. var obj = this.catDict.get('Names');
  9139. if (obj) {
  9140. nameTreeRef = obj.getRaw('Dests');
  9141. } else if (this.catDict.has('Dests')) {
  9142. nameDictionaryRef = this.catDict.get('Dests');
  9143. }
  9144. if (nameDictionaryRef) {
  9145. // reading simple destination dictionary
  9146. obj = nameDictionaryRef;
  9147. obj.forEach(function catalogForEach(key, value) {
  9148. if (!value) {
  9149. return;
  9150. }
  9151. dests[key] = fetchDestination(value);
  9152. });
  9153. }
  9154. if (nameTreeRef) {
  9155. var nameTree = new NameTree(nameTreeRef, xref);
  9156. var names = nameTree.getAll();
  9157. for (var name in names) {
  9158. if (!names.hasOwnProperty(name)) {
  9159. continue;
  9160. }
  9161. dests[name] = fetchDestination(names[name]);
  9162. }
  9163. }
  9164. return shadow(this, 'destinations', dests);
  9165. },
  9166. get attachments() {
  9167. var xref = this.xref;
  9168. var attachments, nameTreeRef;
  9169. var obj = this.catDict.get('Names');
  9170. if (obj) {
  9171. nameTreeRef = obj.getRaw('EmbeddedFiles');
  9172. }
  9173. if (nameTreeRef) {
  9174. var nameTree = new NameTree(nameTreeRef, xref);
  9175. var names = nameTree.getAll();
  9176. for (var name in names) {
  9177. if (!names.hasOwnProperty(name)) {
  9178. continue;
  9179. }
  9180. var fs = new FileSpec(names[name], xref);
  9181. if (!attachments) {
  9182. attachments = {};
  9183. }
  9184. attachments[stringToPDFString(name)] = fs.serializable;
  9185. }
  9186. }
  9187. return shadow(this, 'attachments', attachments);
  9188. },
  9189. get javaScript() {
  9190. var xref = this.xref;
  9191. var obj = this.catDict.get('Names');
  9192. var javaScript = [];
  9193. if (obj && obj.has('JavaScript')) {
  9194. var nameTree = new NameTree(obj.getRaw('JavaScript'), xref);
  9195. var names = nameTree.getAll();
  9196. for (var name in names) {
  9197. if (!names.hasOwnProperty(name)) {
  9198. continue;
  9199. }
  9200. // We don't really use the JavaScript right now. This code is
  9201. // defensive so we don't cause errors on document load.
  9202. var jsDict = names[name];
  9203. if (!isDict(jsDict)) {
  9204. continue;
  9205. }
  9206. var type = jsDict.get('S');
  9207. if (!isName(type) || type.name !== 'JavaScript') {
  9208. continue;
  9209. }
  9210. var js = jsDict.get('JS');
  9211. if (!isString(js) && !isStream(js)) {
  9212. continue;
  9213. }
  9214. if (isStream(js)) {
  9215. js = bytesToString(js.getBytes());
  9216. }
  9217. javaScript.push(stringToPDFString(js));
  9218. }
  9219. }
  9220. return shadow(this, 'javaScript', javaScript);
  9221. },
  9222. cleanup: function Catalog_cleanup() {
  9223. this.fontCache.forEach(function (font) {
  9224. delete font.sent;
  9225. delete font.translated;
  9226. });
  9227. this.fontCache.clear();
  9228. },
  9229. getPage: function Catalog_getPage(pageIndex) {
  9230. if (!(pageIndex in this.pagePromises)) {
  9231. this.pagePromises[pageIndex] = this.getPageDict(pageIndex).then(
  9232. function (a) {
  9233. var dict = a[0];
  9234. var ref = a[1];
  9235. return new Page(this.pdfManager, this.xref, pageIndex, dict, ref,
  9236. this.fontCache);
  9237. }.bind(this)
  9238. );
  9239. }
  9240. return this.pagePromises[pageIndex];
  9241. },
  9242. getPageDict: function Catalog_getPageDict(pageIndex) {
  9243. var promise = new LegacyPromise();
  9244. var nodesToVisit = [this.catDict.getRaw('Pages')];
  9245. var currentPageIndex = 0;
  9246. var xref = this.xref;
  9247. function next() {
  9248. while (nodesToVisit.length) {
  9249. var currentNode = nodesToVisit.pop();
  9250. if (isRef(currentNode)) {
  9251. xref.fetchAsync(currentNode).then(function (obj) {
  9252. if ((isDict(obj, 'Page') || (isDict(obj) && !obj.has('Kids')))) {
  9253. if (pageIndex === currentPageIndex) {
  9254. promise.resolve([obj, currentNode]);
  9255. } else {
  9256. currentPageIndex++;
  9257. next();
  9258. }
  9259. return;
  9260. }
  9261. nodesToVisit.push(obj);
  9262. next();
  9263. }.bind(this), promise.reject.bind(promise));
  9264. return;
  9265. }
  9266. // must be a child page dictionary
  9267. assert(
  9268. isDict(currentNode),
  9269. 'page dictionary kid reference points to wrong type of object'
  9270. );
  9271. var count = currentNode.get('Count');
  9272. // Skip nodes where the page can't be.
  9273. if (currentPageIndex + count <= pageIndex) {
  9274. currentPageIndex += count;
  9275. continue;
  9276. }
  9277. var kids = currentNode.get('Kids');
  9278. assert(isArray(kids), 'page dictionary kids object is not an array');
  9279. if (count === kids.length) {
  9280. // Nodes that don't have the page have been skipped and this is the
  9281. // bottom of the tree which means the page requested must be a
  9282. // descendant of this pages node. Ideally we would just resolve the
  9283. // promise with the page ref here, but there is the case where more
  9284. // pages nodes could link to single a page (see issue 3666 pdf). To
  9285. // handle this push it back on the queue so if it is a pages node it
  9286. // will be descended into.
  9287. nodesToVisit = [kids[pageIndex - currentPageIndex]];
  9288. currentPageIndex = pageIndex;
  9289. continue;
  9290. } else {
  9291. for (var last = kids.length - 1; last >= 0; last--) {
  9292. nodesToVisit.push(kids[last]);
  9293. }
  9294. }
  9295. }
  9296. promise.reject('Page index ' + pageIndex + ' not found.');
  9297. }
  9298. next();
  9299. return promise;
  9300. },
  9301. getPageIndex: function Catalog_getPageIndex(ref) {
  9302. // The page tree nodes have the count of all the leaves below them. To get
  9303. // how many pages are before we just have to walk up the tree and keep
  9304. // adding the count of siblings to the left of the node.
  9305. var xref = this.xref;
  9306. function pagesBeforeRef(kidRef) {
  9307. var total = 0;
  9308. var parentRef;
  9309. return xref.fetchAsync(kidRef).then(function (node) {
  9310. if (!node) {
  9311. return null;
  9312. }
  9313. parentRef = node.getRaw('Parent');
  9314. return node.getAsync('Parent');
  9315. }).then(function (parent) {
  9316. if (!parent) {
  9317. return null;
  9318. }
  9319. return parent.getAsync('Kids');
  9320. }).then(function (kids) {
  9321. if (!kids) {
  9322. return null;
  9323. }
  9324. var kidPromises = [];
  9325. var found = false;
  9326. for (var i = 0; i < kids.length; i++) {
  9327. var kid = kids[i];
  9328. assert(isRef(kid), 'kids must be a ref');
  9329. if (kid.num == kidRef.num) {
  9330. found = true;
  9331. break;
  9332. }
  9333. kidPromises.push(xref.fetchAsync(kid).then(function (kid) {
  9334. if (kid.has('Count')) {
  9335. var count = kid.get('Count');
  9336. total += count;
  9337. } else { // page leaf node
  9338. total++;
  9339. }
  9340. }));
  9341. }
  9342. if (!found) {
  9343. error('kid ref not found in parents kids');
  9344. }
  9345. return Promise.all(kidPromises).then(function () {
  9346. return [total, parentRef];
  9347. });
  9348. });
  9349. }
  9350. var total = 0;
  9351. function next(ref) {
  9352. return pagesBeforeRef(ref).then(function (args) {
  9353. if (!args) {
  9354. return total;
  9355. }
  9356. var count = args[0];
  9357. var parentRef = args[1];
  9358. total += count;
  9359. return next(parentRef);
  9360. });
  9361. }
  9362. return next(ref);
  9363. }
  9364. };
  9365. return Catalog;
  9366. })();
  9367. var XRef = (function XRefClosure() {
  9368. function XRef(stream, password) {
  9369. this.stream = stream;
  9370. this.entries = [];
  9371. this.xrefstms = {};
  9372. // prepare the XRef cache
  9373. this.cache = [];
  9374. this.password = password;
  9375. }
  9376. XRef.prototype = {
  9377. setStartXRef: function XRef_setStartXRef(startXRef) {
  9378. // Store the starting positions of xref tables as we process them
  9379. // so we can recover from missing data errors
  9380. this.startXRefQueue = [startXRef];
  9381. },
  9382. parse: function XRef_parse(recoveryMode) {
  9383. var trailerDict;
  9384. if (!recoveryMode) {
  9385. trailerDict = this.readXRef();
  9386. } else {
  9387. warn('Indexing all PDF objects');
  9388. trailerDict = this.indexObjects();
  9389. }
  9390. trailerDict.assignXref(this);
  9391. this.trailer = trailerDict;
  9392. var encrypt = trailerDict.get('Encrypt');
  9393. if (encrypt) {
  9394. var ids = trailerDict.get('ID');
  9395. var fileId = (ids && ids.length) ? ids[0] : '';
  9396. this.encrypt = new CipherTransformFactory(encrypt, fileId,
  9397. this.password);
  9398. }
  9399. // get the root dictionary (catalog) object
  9400. if (!(this.root = trailerDict.get('Root'))) {
  9401. error('Invalid root reference');
  9402. }
  9403. },
  9404. processXRefTable: function XRef_processXRefTable(parser) {
  9405. if (!('tableState' in this)) {
  9406. // Stores state of the table as we process it so we can resume
  9407. // from middle of table in case of missing data error
  9408. this.tableState = {
  9409. entryNum: 0,
  9410. streamPos: parser.lexer.stream.pos,
  9411. parserBuf1: parser.buf1,
  9412. parserBuf2: parser.buf2
  9413. };
  9414. }
  9415. var obj = this.readXRefTable(parser);
  9416. // Sanity check
  9417. if (!isCmd(obj, 'trailer')) {
  9418. error('Invalid XRef table: could not find trailer dictionary');
  9419. }
  9420. // Read trailer dictionary, e.g.
  9421. // trailer
  9422. // << /Size 22
  9423. // /Root 20R
  9424. // /Info 10R
  9425. // /ID [ <81b14aafa313db63dbd6f981e49f94f4> ]
  9426. // >>
  9427. // The parser goes through the entire stream << ... >> and provides
  9428. // a getter interface for the key-value table
  9429. var dict = parser.getObj();
  9430. if (!isDict(dict)) {
  9431. error('Invalid XRef table: could not parse trailer dictionary');
  9432. }
  9433. delete this.tableState;
  9434. return dict;
  9435. },
  9436. readXRefTable: function XRef_readXRefTable(parser) {
  9437. // Example of cross-reference table:
  9438. // xref
  9439. // 0 1 <-- subsection header (first obj #, obj count)
  9440. // 0000000000 65535 f <-- actual object (offset, generation #, f/n)
  9441. // 23 2 <-- subsection header ... and so on ...
  9442. // 0000025518 00002 n
  9443. // 0000025635 00000 n
  9444. // trailer
  9445. // ...
  9446. var stream = parser.lexer.stream;
  9447. var tableState = this.tableState;
  9448. stream.pos = tableState.streamPos;
  9449. parser.buf1 = tableState.parserBuf1;
  9450. parser.buf2 = tableState.parserBuf2;
  9451. // Outer loop is over subsection headers
  9452. var obj;
  9453. while (true) {
  9454. if (!('firstEntryNum' in tableState) || !('entryCount' in tableState)) {
  9455. if (isCmd(obj = parser.getObj(), 'trailer')) {
  9456. break;
  9457. }
  9458. tableState.firstEntryNum = obj;
  9459. tableState.entryCount = parser.getObj();
  9460. }
  9461. var first = tableState.firstEntryNum;
  9462. var count = tableState.entryCount;
  9463. if (!isInt(first) || !isInt(count)) {
  9464. error('Invalid XRef table: wrong types in subsection header');
  9465. }
  9466. // Inner loop is over objects themselves
  9467. for (var i = tableState.entryNum; i < count; i++) {
  9468. tableState.streamPos = stream.pos;
  9469. tableState.entryNum = i;
  9470. tableState.parserBuf1 = parser.buf1;
  9471. tableState.parserBuf2 = parser.buf2;
  9472. var entry = {};
  9473. entry.offset = parser.getObj();
  9474. entry.gen = parser.getObj();
  9475. var type = parser.getObj();
  9476. if (isCmd(type, 'f')) {
  9477. entry.free = true;
  9478. } else if (isCmd(type, 'n')) {
  9479. entry.uncompressed = true;
  9480. }
  9481. // Validate entry obj
  9482. if (!isInt(entry.offset) || !isInt(entry.gen) ||
  9483. !(entry.free || entry.uncompressed)) {
  9484. console.log(entry.offset, entry.gen, entry.free,
  9485. entry.uncompressed);
  9486. error('Invalid entry in XRef subsection: ' + first + ', ' + count);
  9487. }
  9488. if (!this.entries[i + first]) {
  9489. this.entries[i + first] = entry;
  9490. }
  9491. }
  9492. tableState.entryNum = 0;
  9493. tableState.streamPos = stream.pos;
  9494. tableState.parserBuf1 = parser.buf1;
  9495. tableState.parserBuf2 = parser.buf2;
  9496. delete tableState.firstEntryNum;
  9497. delete tableState.entryCount;
  9498. }
  9499. // Per issue 3248: hp scanners generate bad XRef
  9500. if (first === 1 && this.entries[1] && this.entries[1].free) {
  9501. // shifting the entries
  9502. this.entries.shift();
  9503. }
  9504. // Sanity check: as per spec, first object must be free
  9505. if (this.entries[0] && !this.entries[0].free) {
  9506. error('Invalid XRef table: unexpected first object');
  9507. }
  9508. return obj;
  9509. },
  9510. processXRefStream: function XRef_processXRefStream(stream) {
  9511. if (!('streamState' in this)) {
  9512. // Stores state of the stream as we process it so we can resume
  9513. // from middle of stream in case of missing data error
  9514. var streamParameters = stream.dict;
  9515. var byteWidths = streamParameters.get('W');
  9516. var range = streamParameters.get('Index');
  9517. if (!range) {
  9518. range = [0, streamParameters.get('Size')];
  9519. }
  9520. this.streamState = {
  9521. entryRanges: range,
  9522. byteWidths: byteWidths,
  9523. entryNum: 0,
  9524. streamPos: stream.pos
  9525. };
  9526. }
  9527. this.readXRefStream(stream);
  9528. delete this.streamState;
  9529. return stream.dict;
  9530. },
  9531. readXRefStream: function XRef_readXRefStream(stream) {
  9532. var i, j;
  9533. var streamState = this.streamState;
  9534. stream.pos = streamState.streamPos;
  9535. var byteWidths = streamState.byteWidths;
  9536. var typeFieldWidth = byteWidths[0];
  9537. var offsetFieldWidth = byteWidths[1];
  9538. var generationFieldWidth = byteWidths[2];
  9539. var entryRanges = streamState.entryRanges;
  9540. while (entryRanges.length > 0) {
  9541. var first = entryRanges[0];
  9542. var n = entryRanges[1];
  9543. if (!isInt(first) || !isInt(n)) {
  9544. error('Invalid XRef range fields: ' + first + ', ' + n);
  9545. }
  9546. if (!isInt(typeFieldWidth) || !isInt(offsetFieldWidth) ||
  9547. !isInt(generationFieldWidth)) {
  9548. error('Invalid XRef entry fields length: ' + first + ', ' + n);
  9549. }
  9550. for (i = streamState.entryNum; i < n; ++i) {
  9551. streamState.entryNum = i;
  9552. streamState.streamPos = stream.pos;
  9553. var type = 0, offset = 0, generation = 0;
  9554. for (j = 0; j < typeFieldWidth; ++j) {
  9555. type = (type << 8) | stream.getByte();
  9556. }
  9557. // if type field is absent, its default value is 1
  9558. if (typeFieldWidth === 0) {
  9559. type = 1;
  9560. }
  9561. for (j = 0; j < offsetFieldWidth; ++j) {
  9562. offset = (offset << 8) | stream.getByte();
  9563. }
  9564. for (j = 0; j < generationFieldWidth; ++j) {
  9565. generation = (generation << 8) | stream.getByte();
  9566. }
  9567. var entry = {};
  9568. entry.offset = offset;
  9569. entry.gen = generation;
  9570. switch (type) {
  9571. case 0:
  9572. entry.free = true;
  9573. break;
  9574. case 1:
  9575. entry.uncompressed = true;
  9576. break;
  9577. case 2:
  9578. break;
  9579. default:
  9580. error('Invalid XRef entry type: ' + type);
  9581. }
  9582. if (!this.entries[first + i]) {
  9583. this.entries[first + i] = entry;
  9584. }
  9585. }
  9586. streamState.entryNum = 0;
  9587. streamState.streamPos = stream.pos;
  9588. entryRanges.splice(0, 2);
  9589. }
  9590. },
  9591. indexObjects: function XRef_indexObjects() {
  9592. // Simple scan through the PDF content to find objects,
  9593. // trailers and XRef streams.
  9594. function readToken(data, offset) {
  9595. var token = '', ch = data[offset];
  9596. while (ch !== 13 && ch !== 10) {
  9597. if (++offset >= data.length) {
  9598. break;
  9599. }
  9600. token += String.fromCharCode(ch);
  9601. ch = data[offset];
  9602. }
  9603. return token;
  9604. }
  9605. function skipUntil(data, offset, what) {
  9606. var length = what.length, dataLength = data.length;
  9607. var skipped = 0;
  9608. // finding byte sequence
  9609. while (offset < dataLength) {
  9610. var i = 0;
  9611. while (i < length && data[offset + i] == what[i]) {
  9612. ++i;
  9613. }
  9614. if (i >= length) {
  9615. break; // sequence found
  9616. }
  9617. offset++;
  9618. skipped++;
  9619. }
  9620. return skipped;
  9621. }
  9622. var trailerBytes = new Uint8Array([116, 114, 97, 105, 108, 101, 114]);
  9623. var startxrefBytes = new Uint8Array([115, 116, 97, 114, 116, 120, 114,
  9624. 101, 102]);
  9625. var endobjBytes = new Uint8Array([101, 110, 100, 111, 98, 106]);
  9626. var xrefBytes = new Uint8Array([47, 88, 82, 101, 102]);
  9627. var stream = this.stream;
  9628. stream.pos = 0;
  9629. var buffer = stream.getBytes();
  9630. var position = stream.start, length = buffer.length;
  9631. var trailers = [], xrefStms = [];
  9632. while (position < length) {
  9633. var ch = buffer[position];
  9634. if (ch === 32 || ch === 9 || ch === 13 || ch === 10) {
  9635. ++position;
  9636. continue;
  9637. }
  9638. if (ch === 37) { // %-comment
  9639. do {
  9640. ++position;
  9641. if (position >= length) {
  9642. break;
  9643. }
  9644. ch = buffer[position];
  9645. } while (ch !== 13 && ch !== 10);
  9646. continue;
  9647. }
  9648. var token = readToken(buffer, position);
  9649. var m;
  9650. if (token === 'xref') {
  9651. position += skipUntil(buffer, position, trailerBytes);
  9652. trailers.push(position);
  9653. position += skipUntil(buffer, position, startxrefBytes);
  9654. } else if ((m = /^(\d+)\s+(\d+)\s+obj\b/.exec(token))) {
  9655. this.entries[m[1]] = {
  9656. offset: position,
  9657. gen: m[2] | 0,
  9658. uncompressed: true
  9659. };
  9660. var contentLength = skipUntil(buffer, position, endobjBytes) + 7;
  9661. var content = buffer.subarray(position, position + contentLength);
  9662. // checking XRef stream suspect
  9663. // (it shall have '/XRef' and next char is not a letter)
  9664. var xrefTagOffset = skipUntil(content, 0, xrefBytes);
  9665. if (xrefTagOffset < contentLength &&
  9666. content[xrefTagOffset + 5] < 64) {
  9667. xrefStms.push(position);
  9668. this.xrefstms[position] = 1; // don't read it recursively
  9669. }
  9670. position += contentLength;
  9671. } else {
  9672. position += token.length + 1;
  9673. }
  9674. }
  9675. // reading XRef streams
  9676. var i, ii;
  9677. for (i = 0, ii = xrefStms.length; i < ii; ++i) {
  9678. this.startXRefQueue.push(xrefStms[i]);
  9679. this.readXRef(/* recoveryMode */ true);
  9680. }
  9681. // finding main trailer
  9682. var dict;
  9683. for (i = 0, ii = trailers.length; i < ii; ++i) {
  9684. stream.pos = trailers[i];
  9685. var parser = new Parser(new Lexer(stream), true, null);
  9686. var obj = parser.getObj();
  9687. if (!isCmd(obj, 'trailer')) {
  9688. continue;
  9689. }
  9690. // read the trailer dictionary
  9691. if (!isDict(dict = parser.getObj())) {
  9692. continue;
  9693. }
  9694. // taking the first one with 'ID'
  9695. if (dict.has('ID')) {
  9696. return dict;
  9697. }
  9698. }
  9699. // no tailer with 'ID', taking last one (if exists)
  9700. if (dict) {
  9701. return dict;
  9702. }
  9703. // nothing helps
  9704. // calling error() would reject worker with an UnknownErrorException.
  9705. throw new InvalidPDFException('Invalid PDF structure');
  9706. },
  9707. readXRef: function XRef_readXRef(recoveryMode) {
  9708. var stream = this.stream;
  9709. try {
  9710. while (this.startXRefQueue.length) {
  9711. var startXRef = this.startXRefQueue[0];
  9712. stream.pos = startXRef + stream.start;
  9713. var parser = new Parser(new Lexer(stream), true, null);
  9714. var obj = parser.getObj();
  9715. var dict;
  9716. // Get dictionary
  9717. if (isCmd(obj, 'xref')) {
  9718. // Parse end-of-file XRef
  9719. dict = this.processXRefTable(parser);
  9720. if (!this.topDict) {
  9721. this.topDict = dict;
  9722. }
  9723. // Recursively get other XRefs 'XRefStm', if any
  9724. obj = dict.get('XRefStm');
  9725. if (isInt(obj)) {
  9726. var pos = obj;
  9727. // ignore previously loaded xref streams
  9728. // (possible infinite recursion)
  9729. if (!(pos in this.xrefstms)) {
  9730. this.xrefstms[pos] = 1;
  9731. this.startXRefQueue.push(pos);
  9732. }
  9733. }
  9734. } else if (isInt(obj)) {
  9735. // Parse in-stream XRef
  9736. if (!isInt(parser.getObj()) ||
  9737. !isCmd(parser.getObj(), 'obj') ||
  9738. !isStream(obj = parser.getObj())) {
  9739. error('Invalid XRef stream');
  9740. }
  9741. dict = this.processXRefStream(obj);
  9742. if (!this.topDict) {
  9743. this.topDict = dict;
  9744. }
  9745. if (!dict) {
  9746. error('Failed to read XRef stream');
  9747. }
  9748. } else {
  9749. error('Invalid XRef stream header');
  9750. }
  9751. // Recursively get previous dictionary, if any
  9752. obj = dict.get('Prev');
  9753. if (isInt(obj)) {
  9754. this.startXRefQueue.push(obj);
  9755. } else if (isRef(obj)) {
  9756. // The spec says Prev must not be a reference, i.e. "/Prev NNN"
  9757. // This is a fallback for non-compliant PDFs, i.e. "/Prev NNN 0 R"
  9758. this.startXRefQueue.push(obj.num);
  9759. }
  9760. this.startXRefQueue.shift();
  9761. }
  9762. return this.topDict;
  9763. } catch (e) {
  9764. if (e instanceof MissingDataException) {
  9765. throw e;
  9766. }
  9767. info('(while reading XRef): ' + e);
  9768. }
  9769. if (recoveryMode) {
  9770. return;
  9771. }
  9772. throw new XRefParseException();
  9773. },
  9774. getEntry: function XRef_getEntry(i) {
  9775. var xrefEntry = this.entries[i];
  9776. if (xrefEntry && !xrefEntry.free && xrefEntry.offset) {
  9777. return xrefEntry;
  9778. }
  9779. return null;
  9780. },
  9781. fetchIfRef: function XRef_fetchIfRef(obj) {
  9782. if (!isRef(obj)) {
  9783. return obj;
  9784. }
  9785. return this.fetch(obj);
  9786. },
  9787. fetch: function XRef_fetch(ref, suppressEncryption) {
  9788. assert(isRef(ref), 'ref object is not a reference');
  9789. var num = ref.num;
  9790. if (num in this.cache) {
  9791. var cacheEntry = this.cache[num];
  9792. return cacheEntry;
  9793. }
  9794. var xrefEntry = this.getEntry(num);
  9795. // the referenced entry can be free
  9796. if (xrefEntry === null) {
  9797. return (this.cache[num] = null);
  9798. }
  9799. if (xrefEntry.uncompressed) {
  9800. xrefEntry = this.fetchUncompressed(ref, xrefEntry, suppressEncryption);
  9801. } else {
  9802. xrefEntry = this.fetchCompressed(xrefEntry, suppressEncryption);
  9803. }
  9804. if (isDict(xrefEntry)) {
  9805. xrefEntry.objId = 'R' + ref.num + '.' + ref.gen;
  9806. }
  9807. return xrefEntry;
  9808. },
  9809. fetchUncompressed: function XRef_fetchUncompressed(ref, xrefEntry,
  9810. suppressEncryption) {
  9811. var gen = ref.gen;
  9812. var num = ref.num;
  9813. if (xrefEntry.gen !== gen) {
  9814. error('inconsistent generation in XRef');
  9815. }
  9816. var stream = this.stream.makeSubStream(xrefEntry.offset +
  9817. this.stream.start);
  9818. var parser = new Parser(new Lexer(stream), true, this);
  9819. var obj1 = parser.getObj();
  9820. var obj2 = parser.getObj();
  9821. var obj3 = parser.getObj();
  9822. if (!isInt(obj1) || parseInt(obj1, 10) !== num ||
  9823. !isInt(obj2) || parseInt(obj2, 10) !== gen ||
  9824. !isCmd(obj3)) {
  9825. error('bad XRef entry');
  9826. }
  9827. if (!isCmd(obj3, 'obj')) {
  9828. // some bad PDFs use "obj1234" and really mean 1234
  9829. if (obj3.cmd.indexOf('obj') === 0) {
  9830. num = parseInt(obj3.cmd.substring(3), 10);
  9831. if (!isNaN(num)) {
  9832. return num;
  9833. }
  9834. }
  9835. error('bad XRef entry');
  9836. }
  9837. if (this.encrypt && !suppressEncryption) {
  9838. try {
  9839. xrefEntry = parser.getObj(this.encrypt.createCipherTransform(num,
  9840. gen));
  9841. } catch (ex) {
  9842. // Almost all streams must be encrypted, but sometimes
  9843. // they are not, probably due to some broken generators.
  9844. // Retrying without encryption...
  9845. return this.fetch(ref, true);
  9846. }
  9847. } else {
  9848. xrefEntry = parser.getObj();
  9849. }
  9850. if (!isStream(xrefEntry)) {
  9851. this.cache[num] = xrefEntry;
  9852. }
  9853. return xrefEntry;
  9854. },
  9855. fetchCompressed: function XRef_fetchCompressed(xrefEntry,
  9856. suppressEncryption) {
  9857. var tableOffset = xrefEntry.offset;
  9858. var stream = this.fetch(new Ref(tableOffset, 0));
  9859. if (!isStream(stream)) {
  9860. error('bad ObjStm stream');
  9861. }
  9862. var first = stream.dict.get('First');
  9863. var n = stream.dict.get('N');
  9864. if (!isInt(first) || !isInt(n)) {
  9865. error('invalid first and n parameters for ObjStm stream');
  9866. }
  9867. var parser = new Parser(new Lexer(stream), false, this);
  9868. parser.allowStreams = true;
  9869. var i, entries = [], num, nums = [];
  9870. // read the object numbers to populate cache
  9871. for (i = 0; i < n; ++i) {
  9872. num = parser.getObj();
  9873. if (!isInt(num)) {
  9874. error('invalid object number in the ObjStm stream: ' + num);
  9875. }
  9876. nums.push(num);
  9877. var offset = parser.getObj();
  9878. if (!isInt(offset)) {
  9879. error('invalid object offset in the ObjStm stream: ' + offset);
  9880. }
  9881. }
  9882. // read stream objects for cache
  9883. for (i = 0; i < n; ++i) {
  9884. entries.push(parser.getObj());
  9885. num = nums[i];
  9886. var entry = this.entries[num];
  9887. if (entry && entry.offset === tableOffset && entry.gen === i) {
  9888. this.cache[num] = entries[i];
  9889. }
  9890. }
  9891. xrefEntry = entries[xrefEntry.gen];
  9892. if (xrefEntry === undefined) {
  9893. error('bad XRef entry for compressed object');
  9894. }
  9895. return xrefEntry;
  9896. },
  9897. fetchIfRefAsync: function XRef_fetchIfRefAsync(obj) {
  9898. if (!isRef(obj)) {
  9899. var promise = new LegacyPromise();
  9900. promise.resolve(obj);
  9901. return promise;
  9902. }
  9903. return this.fetchAsync(obj);
  9904. },
  9905. fetchAsync: function XRef_fetchAsync(ref, suppressEncryption) {
  9906. var promise = new LegacyPromise();
  9907. var tryFetch = function (promise) {
  9908. try {
  9909. promise.resolve(this.fetch(ref, suppressEncryption));
  9910. } catch (e) {
  9911. if (e instanceof MissingDataException) {
  9912. this.stream.manager.requestRange(e.begin, e.end, tryFetch);
  9913. return;
  9914. }
  9915. promise.reject(e);
  9916. }
  9917. }.bind(this, promise);
  9918. tryFetch();
  9919. return promise;
  9920. },
  9921. getCatalogObj: function XRef_getCatalogObj() {
  9922. return this.root;
  9923. }
  9924. };
  9925. return XRef;
  9926. })();
  9927. /**
  9928. * A NameTree is like a Dict but has some advantageous properties, see the
  9929. * spec (7.9.6) for more details.
  9930. * TODO: implement all the Dict functions and make this more efficent.
  9931. */
  9932. var NameTree = (function NameTreeClosure() {
  9933. function NameTree(root, xref) {
  9934. this.root = root;
  9935. this.xref = xref;
  9936. }
  9937. NameTree.prototype = {
  9938. getAll: function NameTree_getAll() {
  9939. var dict = {};
  9940. if (!this.root) {
  9941. return dict;
  9942. }
  9943. var xref = this.xref;
  9944. // reading name tree
  9945. var processed = new RefSet();
  9946. processed.put(this.root);
  9947. var queue = [this.root];
  9948. while (queue.length > 0) {
  9949. var i, n;
  9950. var obj = xref.fetchIfRef(queue.shift());
  9951. if (!isDict(obj)) {
  9952. continue;
  9953. }
  9954. if (obj.has('Kids')) {
  9955. var kids = obj.get('Kids');
  9956. for (i = 0, n = kids.length; i < n; i++) {
  9957. var kid = kids[i];
  9958. if (processed.has(kid)) {
  9959. error('invalid destinations');
  9960. }
  9961. queue.push(kid);
  9962. processed.put(kid);
  9963. }
  9964. continue;
  9965. }
  9966. var names = obj.get('Names');
  9967. if (names) {
  9968. for (i = 0, n = names.length; i < n; i += 2) {
  9969. dict[names[i]] = xref.fetchIfRef(names[i + 1]);
  9970. }
  9971. }
  9972. }
  9973. return dict;
  9974. }
  9975. };
  9976. return NameTree;
  9977. })();
  9978. /**
  9979. * "A PDF file can refer to the contents of another file by using a File
  9980. * Specification (PDF 1.1)", see the spec (7.11) for more details.
  9981. * NOTE: Only embedded files are supported (as part of the attachments support)
  9982. * TODO: support the 'URL' file system (with caching if !/V), portable
  9983. * collections attributes and related files (/RF)
  9984. */
  9985. var FileSpec = (function FileSpecClosure() {
  9986. function FileSpec(root, xref) {
  9987. if (!root || !isDict(root)) {
  9988. return;
  9989. }
  9990. this.xref = xref;
  9991. this.root = root;
  9992. if (root.has('FS')) {
  9993. this.fs = root.get('FS');
  9994. }
  9995. this.description = root.has('Desc') ?
  9996. stringToPDFString(root.get('Desc')) :
  9997. '';
  9998. if (root.has('RF')) {
  9999. warn('Related file specifications are not supported');
  10000. }
  10001. this.contentAvailable = true;
  10002. if (!root.has('EF')) {
  10003. this.contentAvailable = false;
  10004. warn('Non-embedded file specifications are not supported');
  10005. }
  10006. }
  10007. function pickPlatformItem(dict) {
  10008. // Look for the filename in this order:
  10009. // UF, F, Unix, Mac, DOS
  10010. if (dict.has('UF')) {
  10011. return dict.get('UF');
  10012. } else if (dict.has('F')) {
  10013. return dict.get('F');
  10014. } else if (dict.has('Unix')) {
  10015. return dict.get('Unix');
  10016. } else if (dict.has('Mac')) {
  10017. return dict.get('Mac');
  10018. } else if (dict.has('DOS')) {
  10019. return dict.get('DOS');
  10020. } else {
  10021. return null;
  10022. }
  10023. }
  10024. FileSpec.prototype = {
  10025. get filename() {
  10026. if (!this._filename && this.root) {
  10027. var filename = pickPlatformItem(this.root) || 'unnamed';
  10028. this._filename = stringToPDFString(filename).
  10029. replace(/\\\\/g, '\\').
  10030. replace(/\\\//g, '/').
  10031. replace(/\\/g, '/');
  10032. }
  10033. return this._filename;
  10034. },
  10035. get content() {
  10036. if (!this.contentAvailable) {
  10037. return null;
  10038. }
  10039. if (!this.contentRef && this.root) {
  10040. this.contentRef = pickPlatformItem(this.root.get('EF'));
  10041. }
  10042. var content = null;
  10043. if (this.contentRef) {
  10044. var xref = this.xref;
  10045. var fileObj = xref.fetchIfRef(this.contentRef);
  10046. if (fileObj && isStream(fileObj)) {
  10047. content = fileObj.getBytes();
  10048. } else {
  10049. warn('Embedded file specification points to non-existing/invalid ' +
  10050. 'content');
  10051. }
  10052. } else {
  10053. warn('Embedded file specification does not have a content');
  10054. }
  10055. return content;
  10056. },
  10057. get serializable() {
  10058. return {
  10059. filename: this.filename,
  10060. content: this.content
  10061. };
  10062. }
  10063. };
  10064. return FileSpec;
  10065. })();
  10066. /**
  10067. * A helper for loading missing data in object graphs. It traverses the graph
  10068. * depth first and queues up any objects that have missing data. Once it has
  10069. * has traversed as many objects that are available it attempts to bundle the
  10070. * missing data requests and then resume from the nodes that weren't ready.
  10071. *
  10072. * NOTE: It provides protection from circular references by keeping track of
  10073. * of loaded references. However, you must be careful not to load any graphs
  10074. * that have references to the catalog or other pages since that will cause the
  10075. * entire PDF document object graph to be traversed.
  10076. */
  10077. var ObjectLoader = (function() {
  10078. function mayHaveChildren(value) {
  10079. return isRef(value) || isDict(value) || isArray(value) || isStream(value);
  10080. }
  10081. function addChildren(node, nodesToVisit) {
  10082. var value;
  10083. if (isDict(node) || isStream(node)) {
  10084. var map;
  10085. if (isDict(node)) {
  10086. map = node.map;
  10087. } else {
  10088. map = node.dict.map;
  10089. }
  10090. for (var key in map) {
  10091. value = map[key];
  10092. if (mayHaveChildren(value)) {
  10093. nodesToVisit.push(value);
  10094. }
  10095. }
  10096. } else if (isArray(node)) {
  10097. for (var i = 0, ii = node.length; i < ii; i++) {
  10098. value = node[i];
  10099. if (mayHaveChildren(value)) {
  10100. nodesToVisit.push(value);
  10101. }
  10102. }
  10103. }
  10104. }
  10105. function ObjectLoader(obj, keys, xref) {
  10106. this.obj = obj;
  10107. this.keys = keys;
  10108. this.xref = xref;
  10109. this.refSet = null;
  10110. }
  10111. ObjectLoader.prototype = {
  10112. load: function ObjectLoader_load() {
  10113. var keys = this.keys;
  10114. this.promise = new LegacyPromise();
  10115. // Don't walk the graph if all the data is already loaded.
  10116. if (!(this.xref.stream instanceof ChunkedStream) ||
  10117. this.xref.stream.getMissingChunks().length === 0) {
  10118. this.promise.resolve();
  10119. return this.promise;
  10120. }
  10121. this.refSet = new RefSet();
  10122. // Setup the initial nodes to visit.
  10123. var nodesToVisit = [];
  10124. for (var i = 0; i < keys.length; i++) {
  10125. nodesToVisit.push(this.obj[keys[i]]);
  10126. }
  10127. this.walk(nodesToVisit);
  10128. return this.promise;
  10129. },
  10130. walk: function ObjectLoader_walk(nodesToVisit) {
  10131. var nodesToRevisit = [];
  10132. var pendingRequests = [];
  10133. // DFS walk of the object graph.
  10134. while (nodesToVisit.length) {
  10135. var currentNode = nodesToVisit.pop();
  10136. // Only references or chunked streams can cause missing data exceptions.
  10137. if (isRef(currentNode)) {
  10138. // Skip nodes that have already been visited.
  10139. if (this.refSet.has(currentNode)) {
  10140. continue;
  10141. }
  10142. try {
  10143. var ref = currentNode;
  10144. this.refSet.put(ref);
  10145. currentNode = this.xref.fetch(currentNode);
  10146. } catch (e) {
  10147. if (!(e instanceof MissingDataException)) {
  10148. throw e;
  10149. }
  10150. nodesToRevisit.push(currentNode);
  10151. pendingRequests.push({ begin: e.begin, end: e.end });
  10152. }
  10153. }
  10154. if (currentNode && currentNode.getBaseStreams) {
  10155. var baseStreams = currentNode.getBaseStreams();
  10156. var foundMissingData = false;
  10157. for (var i = 0; i < baseStreams.length; i++) {
  10158. var stream = baseStreams[i];
  10159. if (stream.getMissingChunks && stream.getMissingChunks().length) {
  10160. foundMissingData = true;
  10161. pendingRequests.push({
  10162. begin: stream.start,
  10163. end: stream.end
  10164. });
  10165. }
  10166. }
  10167. if (foundMissingData) {
  10168. nodesToRevisit.push(currentNode);
  10169. }
  10170. }
  10171. addChildren(currentNode, nodesToVisit);
  10172. }
  10173. if (pendingRequests.length) {
  10174. this.xref.stream.manager.requestRanges(pendingRequests,
  10175. function pendingRequestCallback() {
  10176. nodesToVisit = nodesToRevisit;
  10177. for (var i = 0; i < nodesToRevisit.length; i++) {
  10178. var node = nodesToRevisit[i];
  10179. // Remove any reference nodes from the currrent refset so they
  10180. // aren't skipped when we revist them.
  10181. if (isRef(node)) {
  10182. this.refSet.remove(node);
  10183. }
  10184. }
  10185. this.walk(nodesToVisit);
  10186. }.bind(this));
  10187. return;
  10188. }
  10189. // Everything is loaded.
  10190. this.refSet = null;
  10191. this.promise.resolve();
  10192. }
  10193. };
  10194. return ObjectLoader;
  10195. })();
  10196. var ISOAdobeCharset = [
  10197. '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',
  10198. 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',
  10199. 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero',
  10200. 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',
  10201. 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question',
  10202. 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
  10203. 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
  10204. 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',
  10205. 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
  10206. 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
  10207. 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',
  10208. 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',
  10209. 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',
  10210. 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',
  10211. 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase',
  10212. 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',
  10213. 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde',
  10214. 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla',
  10215. 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine',
  10216. 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash',
  10217. 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu',
  10218. 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter',
  10219. 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior',
  10220. 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright',
  10221. 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde',
  10222. 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute',
  10223. 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex',
  10224. 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex',
  10225. 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute',
  10226. 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla',
  10227. 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex',
  10228. 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis',
  10229. 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis',
  10230. 'ugrave', 'yacute', 'ydieresis', 'zcaron'
  10231. ];
  10232. var ExpertCharset = [
  10233. '.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle',
  10234. 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',
  10235. 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',
  10236. 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',
  10237. 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',
  10238. 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle',
  10239. 'colon', 'semicolon', 'commasuperior', 'threequartersemdash',
  10240. 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior',
  10241. 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',
  10242. 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',
  10243. 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',
  10244. 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',
  10245. 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',
  10246. 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',
  10247. 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',
  10248. 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',
  10249. 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle',
  10250. 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',
  10251. 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall',
  10252. 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall',
  10253. 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters',
  10254. 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',
  10255. 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',
  10256. 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',
  10257. 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',
  10258. 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',
  10259. 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',
  10260. 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',
  10261. 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall',
  10262. 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall',
  10263. 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',
  10264. 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',
  10265. 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',
  10266. 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',
  10267. 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',
  10268. 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',
  10269. 'Ydieresissmall'
  10270. ];
  10271. var ExpertSubsetCharset = [
  10272. '.notdef', 'space', 'dollaroldstyle', 'dollarsuperior',
  10273. 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
  10274. 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction',
  10275. 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',
  10276. 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle',
  10277. 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior',
  10278. 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior',
  10279. 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',
  10280. 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',
  10281. 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',
  10282. 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted',
  10283. 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter',
  10284. 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',
  10285. 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',
  10286. 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',
  10287. 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',
  10288. 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',
  10289. 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',
  10290. 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',
  10291. 'periodinferior', 'commainferior'
  10292. ];
  10293. var CIDToUnicodeMaps = {
  10294. 'Adobe-Japan1': [[32, 160], {f: 12, c: 33}, [45, 8209], {f: 46, c: 46}, 165,
  10295. {f: 2, c: 93}, [95, 818], [96, 768], {f: 27, c: 97}, 166, 125, [732, 771],
  10296. [700, 8217], 92, [699, 8216], 124, [126, 8764], {f: 3, c: 161}, 8260, 402,
  10297. 0, 164, 8220, 171, {f: 2, c: 8249}, {f: 2, c: 64257}, [8210, 8211], 0, 0,
  10298. [183, 8729], 0, 8226, 8218, 8222, 8221, 187, 0, 0, 191, {f: 2, c: 769},
  10299. [175, 772], {f: 3, c: 774}, 778, [184, 807], 779, 808, 780, [822, 8212],
  10300. 198, 170, 321, 216, 338, 186, 230, 305, 322, 248, 339, 223, 173, 169, 172,
  10301. 174, 0, 0, {f: 2, c: 178}, 181, 185, {f: 3, c: 188}, {f: 6, c: 192},
  10302. {f: 16, c: 199}, 0, {f: 6, c: 217}, {f: 6, c: 224}, {f: 16, c: 231}, 0,
  10303. {f: 7, c: 249}, 352, 376, 381, [773, 8254], 353, 8482, 382, 0, 8194,
  10304. {f: 59, c: 33}, 165, {f: 31, c: 93}, 65512, {f: 2, c: 125}, 0,
  10305. {f: 63, c: 65377}, {s: 243}, [8195, 12288],
  10306. {f: 2, c: 12289}, 65292, 65294, 12539, {f: 2, c: 65306}, 65311, 65281,
  10307. {f: 2, c: 12443}, 180, 65344, 168, 65342, 65507, 65343, {f: 2, c: 12541},
  10308. {f: 2, c: 12445}, 12291, 20189, {f: 3, c: 12293}, 12540, 8213, 8208, 65295,
  10309. 65340, [12316, 65374], 8214, 65372, 8230, 8229, {s: 4}, {f: 2, c: 65288},
  10310. {f: 2, c: 12308}, 65339, 65341, 65371, 65373, {f: 10, c: 12296}, 65291,
  10311. [8722, 65293], 177, 215, 247, 65309, 8800, 65308, 65310, {f: 2, c: 8806},
  10312. 8734, 8756, 9794, 9792, 176, {f: 2, c: 8242}, 8451, 65509, 65284,
  10313. {f: 2, c: 65504}, 65285, 65283, 65286, 65290, 65312, 167, 9734, 9733, 9675,
  10314. 9679, 9678, 9671, 9670, 9633, 9632, 9651, 9650, 9661, 9660, 8251, 12306,
  10315. 8594, {f: 2, c: 8592}, 8595, 12307, 8712, 8715, {f: 2, c: 8838},
  10316. {f: 2, c: 8834}, 8746, 8745, {f: 2, c: 8743}, 65506, 8658, 8660, 8704,
  10317. 8707, 8736, 8869, 8978, 8706, 8711, 8801, 8786, {f: 2, c: 8810}, 8730,
  10318. 8765, 8733, 8757, {f: 2, c: 8747}, 8491, 8240, 9839, 9837, 9834,
  10319. {f: 2, c: 8224}, 182, 9711, {f: 10, c: 65296}, {f: 26, c: 65313},
  10320. {f: 26, c: 65345}, {f: 83, c: 12353}, {f: 86, c: 12449}, {f: 17, c: 913},
  10321. {f: 7, c: 931}, {f: 17, c: 945}, {f: 7, c: 963}, {f: 6, c: 1040}, 1025,
  10322. {f: 32, c: 1046}, 1105, {f: 26, c: 1078}, 20124, 21782, 23043, 38463,
  10323. 21696, 24859, 25384, 23030, 36898, 33909, 33564, 31312, 24746, 25569,
  10324. 28197, 26093, 33894, 33446, 39925, 26771, 22311, 26017, 25201, 23451,
  10325. 22992, 34427, 39156, 32098, 32190, 39822, 25110, 31903, 34999, 23433,
  10326. 24245, 25353, 26263, 26696, 38343, 38797, 26447, 20197, 20234, 20301,
  10327. 20381, 20553, 22258, 22839, 22996, 23041, 23561, 24799, 24847, 24944,
  10328. 26131, 26885, 28858, 30031, 30064, 31227, 32173, 32239, 32963, 33806,
  10329. [12176, 34915], 35586, 36949, 36986, 21307, 20117, 20133, 22495, 32946,
  10330. 37057, 30959, [12032, 19968], 22769, 28322, 36920, 31282, 33576, 33419,
  10331. 39983, 20801, 21360, 21693, 21729, 22240, 23035, 24341, 39154, 28139,
  10332. 32996, 34093, 38498, 38512, 38560, 38907, 21515, 21491, 23431, 28879,
  10333. [12155, 32701], 36802, [12204, 38632], 21359, 40284, 31418, 19985, 30867,
  10334. [12165, 33276], 28198, 22040, 21764, 27421, 34074, 39995, 23013, 21417,
  10335. 28006, [12128, 29916], 38287, 22082, 20113, 36939, 38642, 33615, 39180,
  10336. 21473, 21942, 23344, 24433, 26144, 26355, 26628, 27704, 27891, 27945,
  10337. 29787, 30408, 31310, 38964, 33521, 34907, 35424, 37613, 28082, 30123,
  10338. 30410, 39365, 24742, 35585, 36234, 38322, 27022, 21421, 20870, 22290,
  10339. 22576, 22852, 23476, 24310, 24616, 25513, 25588, 27839, 28436, 28814,
  10340. 28948, 29017, 29141, 29503, 32257, 33398, 33489, 34199, 36960, 37467,
  10341. 40219, 22633, 26044, 27738, 29989, 20985, 22830, 22885, 24448, 24540,
  10342. 25276, 26106, 27178, 27431, 27572, 29579, 32705, 35158, 40236, 40206,
  10343. [12009, 40644], 23713, 27798, 33659, 20740, 23627, 25014, 33222, 26742,
  10344. 29281, [12036, 20057], 20474, 21368, 24681, 28201, 31311, [12211, 38899],
  10345. 19979, 21270, 20206, 20309, 20285, 20385, 20339, 21152, 21487, 22025,
  10346. 22799, 23233, 23478, 23521, 31185, 26247, 26524, 26550, 27468, 27827,
  10347. [12117, 28779], 29634, 31117, [12146, 31166], 31292, 31623, 33457, 33499,
  10348. 33540, 33655, 33775, 33747, 34662, 35506, 22057, 36008, 36838, 36942,
  10349. 38686, 34442, 20420, 23784, 25105, [12123, 29273], 30011, 33253, 33469,
  10350. 34558, 36032, 38597, 39187, 39381, 20171, 20250, 35299, 22238, 22602,
  10351. 22730, 24315, 24555, 24618, 24724, 24674, 25040, 25106, 25296, 25913,
  10352. 39745, 26214, 26800, 28023, 28784, 30028, 30342, 32117, 33445, 34809,
  10353. 38283, 38542, [12185, 35997], 20977, 21182, 22806, 21683, 23475, 23830,
  10354. 24936, 27010, 28079, 30861, 33995, 34903, 35442, 37799, 39608, 28012,
  10355. 39336, 34521, 22435, 26623, 34510, 37390, 21123, 22151, 21508, 24275,
  10356. 25313, 25785, 26684, 26680, 27579, 29554, 30906, 31339, 35226,
  10357. [12179, 35282], 36203, 36611, 37101, 38307, 38548, [12208, 38761], 23398,
  10358. 23731, 27005, {f: 2, c: 38989}, 25499, 31520, 27179, 27263, 26806, 39949,
  10359. 28511, 21106, 21917, 24688, 25324, 27963, 28167, 28369, 33883, 35088,
  10360. 36676, 19988, 39993, 21494, 26907, 27194, 38788, 26666, 20828, 31427,
  10361. 33970, 37340, 37772, 22107, 40232, 26658, 33541, 33841, 31909, 21000,
  10362. 33477, [12129, 29926], 20094, 20355, 20896, 23506, 21002, 21208, 21223,
  10363. 24059, 21914, 22570, 23014, 23436, 23448, 23515, [12082, 24178], 24185,
  10364. 24739, 24863, 24931, 25022, 25563, 25954, 26577, 26707, 26874, 27454,
  10365. 27475, 27735, 28450, 28567, 28485, 29872, [12130, 29976], 30435, 30475,
  10366. 31487, 31649, 31777, 32233, [12152, 32566], 32752, 32925, 33382, 33694,
  10367. 35251, 35532, 36011, 36996, 37969, 38291, 38289, 38306, 38501, 38867,
  10368. 39208, 33304, 20024, 21547, 23736, 24012, 29609, 30284, 30524, 23721,
  10369. 32747, 36107, 38593, 38929, 38996, 39000, 20225, 20238, 21361, 21916,
  10370. 22120, 22522, 22855, 23305, 23492, 23696, 24076, 24190, 24524, 25582,
  10371. 26426, 26071, 26082, 26399, 26827, 26820, 27231, 24112, 27589, 27671,
  10372. 27773, 30079, 31048, 23395, 31232, 32000, 24509, 35215, 35352, 36020,
  10373. 36215, 36556, 36637, 39138, 39438, [12004, 12225, 39740], [12018, 20096],
  10374. 20605, 20736, 22931, 23452, 25135, 25216, 25836, 27450, 29344, 30097,
  10375. 31047, 32681, 34811, 35516, 35696, 25516, 33738, 38816, 21513, 21507,
  10376. 21931, 26708, 27224, 35440, 30759, 26485, [12233, 40653], 21364, 23458,
  10377. 33050, 34384, 36870, 19992, 20037, 20167, 20241, 21450, 21560, 23470,
  10378. [12088, 24339], 24613, 25937, 26429, 27714, 27762, 27875, 28792, 29699,
  10379. 31350, 31406, 31496, 32026, 31998, 32102, 26087, [12124, 29275], 21435,
  10380. 23621, 24040, 25298, 25312, 25369, 28192, 34394, 35377, 36317, 37624,
  10381. 28417, 31142, [12226, 39770], 20136, {f: 2, c: 20139}, 20379, 20384, 20689,
  10382. 20807, 31478, 20849, 20982, 21332, 21281, 21375, 21483, 21932, 22659,
  10383. 23777, 24375, 24394, 24623, 24656, 24685, 25375, 25945, 27211, 27841,
  10384. 29378, 29421, 30703, 33016, 33029, 33288, 34126, 37111, 37857, 38911,
  10385. 39255, 39514, 20208, 20957, 23597, 26241, 26989, 23616, 26354, 26997,
  10386. [12127, 29577], 26704, 31873, 20677, 21220, 22343, [12081, 24062], 37670,
  10387. [12100, 26020], 27427, 27453, 29748, 31105, 31165, 31563, 32202, 33465,
  10388. 33740, 34943, 35167, 35641, 36817, [12198, 37329], 21535, 37504, 20061,
  10389. 20534, 21477, 21306, 29399, 29590, 30697, 33510, 36527, 39366, 39368,
  10390. 39378, 20855, 24858, 34398, 21936, 31354, 20598, 23507, 36935, 38533,
  10391. 20018, 27355, 37351, 23633, 23624, 25496, 31391, 27795, 38772, 36705,
  10392. 31402, 29066, 38536, 31874, 26647, 32368, 26705, 37740, 21234, 21531,
  10393. 34219, 35347, 32676, 36557, 37089, 21350, 34952, 31041, 20418, 20670,
  10394. 21009, 20804, 21843, 22317, 29674, 22411, 22865, 24418, 24452, 24693,
  10395. 24950, 24935, 25001, 25522, 25658, 25964, 26223, 26690, 28179, 30054,
  10396. 31293, 31995, 32076, 32153, 32331, 32619, 33550, 33610, 34509, 35336,
  10397. 35427, 35686, 36605, 38938, 40335, 33464, 36814, 39912, 21127, 25119,
  10398. 25731, 28608, 38553, 26689, 20625, [12107, 27424], 27770, 28500,
  10399. [12147, 31348], 32080, [12174, 34880], 35363, [12105, 26376], 20214, 20537,
  10400. 20518, 20581, 20860, 21048, 21091, 21927, 22287, 22533, 23244, 24314,
  10401. 25010, 25080, 25331, 25458, 26908, 27177, 29309, [12125, 29356], 29486,
  10402. 30740, 30831, 32121, 30476, 32937, [12178, 35211], 35609, 36066, 36562,
  10403. 36963, 37749, 38522, 38997, 39443, 40568, 20803, 21407, 21427, 24187,
  10404. 24358, 28187, 28304, [12126, 29572], 29694, 32067, 33335, [12180, 35328],
  10405. 35578, 38480, 20046, 20491, 21476, 21628, 22266, 22993, 23396,
  10406. [12080, 24049], 24235, 24359, [12094, 25144], 25925, 26543, 28246, 29392,
  10407. 31946, 34996, 32929, 32993, 33776, [11969, 34382], 35463, 36328, 37431,
  10408. 38599, 39015, [12238, 40723], 20116, 20114, 20237, 21320, 21577, 21566,
  10409. 23087, 24460, 24481, 24735, 26791, 27278, 29786, 30849, 35486, 35492,
  10410. 35703, 37264, 20062, 39881, 20132, 20348, 20399, 20505, 20502, 20809,
  10411. 20844, 21151, 21177, 21246, 21402, [12061, 21475], 21521, 21518, 21897,
  10412. 22353, 22434, 22909, 23380, 23389, 23439, [12079, 24037], 24039, 24055,
  10413. 24184, 24195, 24218, 24247, 24344, 24658, 24908, 25239, 25304, 25511,
  10414. 25915, 26114, 26179, 26356, 26477, 26657, 26775, 27083, 27743, 27946,
  10415. 28009, 28207, 28317, 30002, 30343, 30828, 31295, 31968, 32005, 32024,
  10416. 32094, 32177, 32789, 32771, 32943, 32945, 33108, 33167, 33322, 33618,
  10417. [12175, 34892], 34913, 35611, 36002, 36092, 37066, 37237, 37489, 30783,
  10418. 37628, 38308, 38477, 38917, [12217, 39321], [12220, 39640], 40251, 21083,
  10419. 21163, 21495, 21512, 22741, 25335, 28640, 35946, 36703, 40633, 20811,
  10420. 21051, 21578, 22269, 31296, 37239, 40288, [12234, 40658], 29508, 28425,
  10421. 33136, 29969, 24573, 24794, [12219, 39592], 29403, 36796, 27492, 38915,
  10422. 20170, 22256, 22372, 22718, 23130, 24680, 25031, 26127, 26118, 26681,
  10423. 26801, 28151, 30165, 32058, [12169, 33390], 39746, 20123, 20304, 21449,
  10424. 21766, 23919, 24038, 24046, 26619, 27801, 29811, 30722, 35408, 37782,
  10425. 35039, 22352, 24231, 25387, 20661, 20652, 20877, 26368, 21705, 22622,
  10426. 22971, 23472, 24425, 25165, 25505, 26685, 27507, 28168, 28797, 37319,
  10427. 29312, 30741, 30758, 31085, 25998, 32048, 33756, 35009, 36617, 38555,
  10428. 21092, 22312, 26448, 32618, 36001, 20916, 22338, 38442, 22586, 27018,
  10429. 32948, 21682, 23822, 22524, 30869, 40442, 20316, 21066, 21643, 25662,
  10430. 26152, 26388, 26613, 31364, 31574, 32034, 37679, 26716, 39853, 31545,
  10431. 21273, 20874, 21047, 23519, 25334, 25774, 25830, 26413, 27578, 34217,
  10432. 38609, 30352, 39894, 25420, 37638, 39851, [12139, 30399], 26194, 19977,
  10433. 20632, 21442, [12077, 23665], 24808, 25746, 25955, 26719, 29158, 29642,
  10434. 29987, 31639, 32386, 34453, 35715, 36059, 37240, 39184, 26028, 26283,
  10435. 27531, 20181, 20180, 20282, 20351, 21050, 21496, 21490, 21987, 22235,
  10436. [12064, 22763], 22987, 22985, 23039, [12070, 23376], 23629, 24066, 24107,
  10437. 24535, 24605, 25351, [12096, 25903], 23388, 26031, 26045, 26088, 26525,
  10438. [12108, 27490], 27515, [12114, 27663], 29509, 31049, 31169, [12151, 31992],
  10439. 32025, 32043, 32930, 33026, [12164, 33267], 35222, 35422, 35433, 35430,
  10440. 35468, 35566, 36039, 36060, 38604, 39164, [12013, 27503], 20107, 20284,
  10441. 20365, 20816, 23383, 23546, 24904, 25345, 26178, 27425, 28363, 27835,
  10442. 29246, 29885, 30164, 30913, [12144, 31034], [12157, 32780], [12159, 32819],
  10443. [12163, 33258], 33940, 36766, 27728, [12229, 40575], 24335, 35672, 40235,
  10444. 31482, 36600, 23437, 38635, 19971, 21489, 22519, 22833, 23241, 23460,
  10445. 24713, 28287, 28422, 30142, 36074, 23455, 34048, 31712, 20594, 26612,
  10446. 33437, 23649, 34122, 32286, 33294, 20889, 23556, 25448, 36198, 26012,
  10447. 29038, 31038, 32023, 32773, 35613, [12190, 36554], 36974, 34503, 37034,
  10448. 20511, 21242, 23610, 26451, 28796, 29237, 37196, 37320, 37675, 33509,
  10449. 23490, 24369, 24825, 20027, 21462, 23432, [12095, 25163], 26417, 27530,
  10450. 29417, 29664, 31278, 33131, 36259, 37202, [12216, 39318], 20754, 21463,
  10451. 21610, 23551, 25480, 27193, 32172, 38656, 22234, 21454, 21608, 23447,
  10452. 23601, 24030, 20462, 24833, 25342, 27954, 31168, 31179, 32066, 32333,
  10453. 32722, 33261, [12168, 33311], 33936, 34886, 35186, 35728, 36468, 36655,
  10454. 36913, 37195, 37228, 38598, 37276, 20160, 20303, 20805, [12055, 21313],
  10455. 24467, 25102, 26580, 27713, 28171, 29539, 32294, 37325, 37507, 21460,
  10456. 22809, 23487, 28113, 31069, 32302, 31899, 22654, 29087, 20986, 34899,
  10457. 36848, 20426, 23803, 26149, 30636, 31459, 33308, 39423, 20934, 24490,
  10458. 26092, 26991, 27529, 28147, 28310, 28516, 30462, 32020, 24033, 36981,
  10459. 37255, 38918, 20966, 21021, 25152, 26257, 26329, 28186, 24246, 32210,
  10460. 32626, 26360, 34223, 34295, 35576, 21161, 21465, [12069, 22899], 24207,
  10461. 24464, 24661, 37604, 38500, 20663, 20767, 21213, 21280, 21319, 21484,
  10462. 21736, 21830, 21809, 22039, 22888, 22974, 23100, 23477, 23558,
  10463. [12073, 23567], 23569, 23578, 24196, 24202, 24288, 24432, 25215, 25220,
  10464. 25307, 25484, 25463, 26119, 26124, 26157, 26230, 26494, 26786, 27167,
  10465. 27189, 27836, 28040, 28169, 28248, 28988, 28966, 29031, 30151, 30465,
  10466. 30813, 30977, 31077, 31216, 31456, 31505, 31911, 32057, 32918, 33750,
  10467. 33931, 34121, 34909, 35059, 35359, 35388, 35412, 35443, 35937, 36062,
  10468. 37284, 37478, 37758, 37912, 38556, 38808, 19978, 19976, 19998, 20055,
  10469. 20887, 21104, 22478, 22580, 22732, 23330, 24120, 24773, 25854, 26465,
  10470. 26454, 27972, 29366, 30067, 31331, 33976, 35698, 37304, 37664, 22065,
  10471. 22516, 39166, 25325, 26893, 27542, 29165, 32340, 32887, [12170, 33394],
  10472. 35302, [12215, 39135], 34645, 36785, 23611, 20280, 20449, 20405, 21767,
  10473. 23072, 23517, 23529, [12092, 24515], 24910, 25391, 26032, 26187, 26862,
  10474. 27035, 28024, 28145, 30003, 30137, 30495, 31070, 31206, 32051,
  10475. [12162, 33251], 33455, 34218, 35242, 35386, [12189, 36523], [12191, 36763],
  10476. 36914, 37341, 38663, [12040, 20154], 20161, 20995, 22645, 22764, 23563,
  10477. 29978, 23613, 33102, 35338, 36805, 38499, 38765, 31525, 35535, 38920,
  10478. 37218, 22259, 21416, 36887, 21561, 22402, 24101, 25512, [12116, 27700],
  10479. 28810, 30561, 31883, 32736, 34928, 36930, 37204, 37648, 37656, 38543,
  10480. 29790, 39620, 23815, 23913, 25968, 26530, 36264, 38619, 25454, 26441,
  10481. 26905, 33733, 38935, 38592, 35070, 28548, 25722, [12072, 23544], 19990,
  10482. 28716, 30045, 26159, 20932, 21046, 21218, 22995, 24449, 24615, 25104,
  10483. 25919, 25972, 26143, 26228, 26866, 26646, 27491, 28165, 29298,
  10484. [12131, 29983], 30427, 31934, 32854, 22768, 35069, [11972, 35199], 35488,
  10485. 35475, 35531, 36893, 37266, [11992, 38738], 38745, [12011, 25993], 31246,
  10486. 33030, 38587, 24109, 24796, 25114, 26021, 26132, 26512, [12143, 30707],
  10487. 31309, 31821, 32318, 33034, 36012, [12186, 36196], 36321, 36447, 30889,
  10488. 20999, 25305, 25509, 25666, 25240, 35373, 31363, 31680, 35500, 38634,
  10489. 32118, [12166, 33292], 34633, 20185, 20808, 21315, 21344, 23459, 23554,
  10490. 23574, 24029, 25126, 25159, 25776, 26643, 26676, 27849, 27973, 27927,
  10491. 26579, 28508, 29006, 29053, 26059, 31359, 31661, 32218, 32330, 32680,
  10492. 33146, [12167, 33307], 33337, 34214, 35438, 36046, 36341, 36984, 36983,
  10493. 37549, 37521, 38275, 39854, 21069, 21892, 28472, 28982, 20840, 31109,
  10494. 32341, 33203, 31950, 22092, 22609, 23720, 25514, 26366, 26365, 26970,
  10495. 29401, 30095, 30094, 30990, 31062, 31199, 31895, 32032, 32068, 34311,
  10496. 35380, 38459, 36961, [12239, 40736], 20711, 21109, 21452, 21474, 20489,
  10497. 21930, 22766, 22863, 29245, 23435, 23652, 21277, 24803, 24819, 25436,
  10498. 25475, 25407, 25531, 25805, 26089, 26361, 24035, 27085, 27133, 28437,
  10499. 29157, 20105, 30185, 30456, 31379, 31967, 32207, 32156, 32865, 33609,
  10500. 33624, 33900, 33980, 34299, 35013, [12187, 36208], 36865, 36973, 37783,
  10501. 38684, 39442, 20687, 22679, 24974, 33235, 34101, 36104, 36896, 20419,
  10502. 20596, 21063, 21363, 24687, 25417, 26463, 28204, [12188, 36275], 36895,
  10503. 20439, 23646, 36042, 26063, 32154, 21330, 34966, 20854, 25539, 23384,
  10504. 23403, 23562, 25613, 26449, 36956, 20182, 22810, 22826, 27760, 35409,
  10505. 21822, 22549, 22949, 24816, 25171, 26561, 33333, 26965, 38464, 39364,
  10506. 39464, 20307, 22534, 23550, 32784, 23729, 24111, 24453, 24608, 24907,
  10507. 25140, 26367, 27888, 28382, 32974, 33151, 33492, 34955, 36024, 36864,
  10508. 36910, 38538, 40667, 39899, 20195, 21488, [12068, 22823], 31532, 37261,
  10509. 38988, 40441, 28381, 28711, 21331, 21828, 23429, 25176, 25246, 25299,
  10510. 27810, 28655, 29730, 35351, 37944, 28609, 35582, 33592, 20967, 34552,
  10511. 21482, 21481, 20294, 36948, [12192, 36784], 22890, 33073, 24061, 31466,
  10512. 36799, 26842, [12181, 35895], 29432, 40008, 27197, 35504, 20025, 21336,
  10513. 22022, 22374, 25285, 25506, 26086, 27470, 28129, 28251, 28845, 30701,
  10514. 31471, 31658, 32187, 32829, 32966, 34507, 35477, 37723, 22243, 22727,
  10515. 24382, 26029, 26262, 27264, 27573, 30007, 35527, 20516, 30693, 22320,
  10516. 24347, 24677, 26234, 27744, 30196, 31258, 32622, 33268, 34584, 36933,
  10517. 39347, 31689, 30044, [12149, 31481], 31569, 33988, 36880, 31209, 31378,
  10518. 33590, 23265, 30528, 20013, 20210, 23449, 24544, 25277, 26172, 26609,
  10519. 27880, [12173, 34411], 34935, 35387, 37198, 37619, 39376, 27159, 28710,
  10520. 29482, 33511, 33879, 36015, 19969, 20806, 20939, 21899, 23541, 24086,
  10521. 24115, 24193, 24340, 24373, 24427, 24500, 25074, 25361, 26274, 26397,
  10522. 28526, 29266, 30010, 30522, 32884, 33081, 33144, 34678, 35519, 35548,
  10523. 36229, 36339, 37530, [11985, 12199, 38263], 38914, [12227, 40165], 21189,
  10524. 25431, 30452, 26389, 27784, 29645, 36035, 37806, 38515, 27941, 22684,
  10525. 26894, 27084, 36861, 37786, 30171, 36890, 22618, 26626, 25524, 27131,
  10526. 20291, 28460, 26584, 36795, 34086, 32180, 37716, 26943, 28528, 22378,
  10527. 22775, 23340, 32044, [12118, 29226], 21514, 37347, 40372, 20141, 20302,
  10528. 20572, 20597, 21059, 35998, 21576, 22564, 23450, 24093, 24213, 24237,
  10529. 24311, 24351, 24716, 25269, 25402, 25552, 26799, 27712, 30855, 31118,
  10530. 31243, 32224, 33351, 35330, 35558, 36420, 36883, 37048, 37165, 37336,
  10531. [12237, 40718], 27877, 25688, 25826, 25973, 28404, 30340, 31515, 36969,
  10532. 37841, 28346, 21746, 24505, 25764, 36685, 36845, 37444, 20856, 22635,
  10533. 22825, 23637, 24215, 28155, 32399, 29980, 36028, 36578, 39003, 28857,
  10534. 20253, 27583, 28593, [12133, 30000], 38651, 20814, 21520, 22581, 22615,
  10535. 22956, 23648, 24466, [12099, 26007], 26460, 28193, 30331, 33759, 36077,
  10536. 36884, 37117, 37709, 30757, 30778, 21162, 24230, [12063, 22303], 22900,
  10537. 24594, 20498, 20826, 20908, 20941, [12049, 20992], 21776, 22612, 22616,
  10538. 22871, 23445, 23798, 23947, 24764, 25237, 25645, 26481, 26691, 26812,
  10539. 26847, 30423, 28120, 28271, 28059, 28783, 29128, 24403, 30168, 31095,
  10540. 31561, 31572, 31570, 31958, 32113, 21040, 33891, 34153, 34276, 35342,
  10541. 35588, [12182, 35910], 36367, 36867, 36879, 37913, 38518, 38957, 39472,
  10542. 38360, 20685, 21205, 21516, 22530, 23566, 24999, 25758, 27934, 30643,
  10543. 31461, 33012, 33796, 36947, 37509, 23776, 40199, 21311, 24471, 24499,
  10544. 28060, 29305, 30563, 31167, 31716, 27602, 29420, 35501, 26627, 27233,
  10545. 20984, 31361, 26932, 23626, 40182, 33515, 23493, [12195, 37193], 28702,
  10546. 22136, 23663, 24775, 25958, 27788, 35930, 36929, 38931, 21585, 26311,
  10547. 37389, 22856, 37027, 20869, 20045, 20970, 34201, 35598, 28760, 25466,
  10548. 37707, 26978, 39348, 32260, 30071, 21335, 26976, 36575, 38627, 27741,
  10549. [12038, 20108], 23612, 24336, 36841, 21250, 36049, [12161, 32905], 34425,
  10550. 24319, [12103, 26085], 20083, [12042, 20837], 22914, 23615, 38894, 20219,
  10551. 22922, 24525, 35469, 28641, 31152, 31074, 23527, 33905, 29483, 29105,
  10552. 24180, 24565, 25467, 25754, 29123, 31896, 20035, 24316, 20043, 22492,
  10553. 22178, 24745, 28611, 32013, 33021, 33075, 33215, 36786, 35223, 34468,
  10554. 24052, 25226, 25773, 35207, 26487, 27874, 27966, 29750, 30772, 23110,
  10555. 32629, 33453, [12218, 39340], 20467, 24259, 25309, 25490, 25943, 26479,
  10556. 30403, 29260, 32972, 32954, 36649, 37197, 20493, 22521, 23186, 26757,
  10557. 26995, 29028, 29437, 36023, 22770, 36064, 38506, 36889, 34687, 31204,
  10558. 30695, 33833, 20271, 21093, 21338, 25293, 26575, 27850, [12137, 30333],
  10559. 31636, 31893, 33334, 34180, 36843, 26333, 28448, 29190, 32283, 33707,
  10560. 39361, [12008, 40614], 20989, 31665, 30834, 31672, 32903, 31560, 27368,
  10561. 24161, 32908, 30033, 30048, [12043, 20843], 37474, 28300, 30330, 37271,
  10562. 39658, 20240, 32624, 25244, 31567, 38309, 40169, 22138, 22617, 34532,
  10563. 38588, 20276, 21028, 21322, 21453, 21467, 24070, 25644, 26001, 26495,
  10564. 27710, 27726, 29256, 29359, 29677, 30036, 32321, 33324, 34281, 36009,
  10565. 31684, [12196, 37318], 29033, 38930, 39151, 25405, 26217, 30058, 30436,
  10566. 30928, 34115, 34542, 21290, 21329, 21542, 22915, 24199, 24444, 24754,
  10567. 25161, 25209, 25259, 26000, [12112, 27604], 27852, 30130, [12138, 30382],
  10568. 30865, 31192, 32203, 32631, 32933, 34987, 35513, 36027, 36991,
  10569. [12206, 38750], [12214, 39131], 27147, 31800, 20633, 23614, 24494, 26503,
  10570. 27608, 29749, 30473, 32654, [12240, 40763], 26570, 31255, 21305,
  10571. [12134, 30091], 39661, 24422, 33181, 33777, 32920, 24380, 24517, 30050,
  10572. 31558, 36924, 26727, 23019, 23195, 32016, 30334, 35628, 20469, 24426,
  10573. 27161, 27703, 28418, 29922, 31080, 34920, 35413, 35961, 24287, 25551,
  10574. 30149, 31186, 33495, 37672, 37618, 33948, 34541, 39981, 21697, 24428,
  10575. 25996, 27996, 28693, 36007, 36051, 38971, 25935, 29942, 19981, 20184,
  10576. 22496, 22827, 23142, 23500, 20904, 24067, 24220, 24598, 25206, 25975,
  10577. 26023, 26222, 28014, [12119, 29238], 31526, 33104, 33178, 33433, 35676,
  10578. 36000, 36070, 36212, [12201, 38428], 38468, 20398, 25771, 27494, 33310,
  10579. 33889, 34154, 37096, 23553, 26963, [12213, 39080], 33914, 34135, 20239,
  10580. 21103, 24489, 24133, 26381, 31119, 33145, 35079, 35206, 28149, 24343,
  10581. 25173, 27832, 20175, 29289, 39826, 20998, 21563, 22132, 22707, 24996,
  10582. 25198, 28954, 22894, 31881, 31966, 32027, 38640, [12098, 25991], 32862,
  10583. 19993, 20341, 20853, 22592, 24163, 24179, 24330, 26564, 20006, 34109,
  10584. 38281, 38491, [12150, 31859], [12212, 38913], 20731, 22721, 30294, 30887,
  10585. 21029, 30629, 34065, 31622, 20559, 22793, [12122, 29255], 31687, 32232,
  10586. 36794, 36820, 36941, 20415, 21193, 23081, 24321, 38829, 20445, 33303,
  10587. 37610, 22275, 25429, 27497, 29995, 35036, 36628, 31298, 21215, 22675,
  10588. 24917, 25098, 26286, [11935, 27597], 31807, 33769, 20515, 20472, 21253,
  10589. 21574, 22577, 22857, 23453, 23792, 23791, 23849, 24214, 25265, 25447,
  10590. 25918, [12101, 26041], 26379, 27861, 27873, 28921, 30770, 32299, 32990,
  10591. 33459, 33804, 34028, 34562, 35090, 35370, 35914, 37030, 37586, 39165,
  10592. 40179, 40300, 20047, 20129, 20621, 21078, 22346, 22952, 24125,
  10593. {f: 2, c: 24536}, 25151, 26292, 26395, 26576, 26834, 20882, 32033, 32938,
  10594. 33192, 35584, 35980, 36031, 37502, 38450, 21536, 38956, 21271, 20693,
  10595. [12056, 21340], 22696, 25778, 26420, 29287, 30566, 31302, 37350, 21187,
  10596. 27809, 27526, 22528, 24140, 22868, 26412, 32763, 20961, 30406, 25705,
  10597. 30952, 39764, [12231, 40635], 22475, 22969, 26151, 26522, 27598, 21737,
  10598. 27097, 24149, 33180, 26517, 39850, 26622, 40018, 26717, 20134, 20451,
  10599. [12060, 21448], 25273, 26411, 27819, 36804, 20397, 32365, 40639, 19975,
  10600. 24930, 28288, 28459, 34067, 21619, 26410, 39749, [11922, 24051], 31637,
  10601. 23724, 23494, 34588, 28234, 34001, 31252, 33032, 22937, 31885,
  10602. [11936, 27665], 30496, 21209, 22818, 28961, 29279, [12141, 30683], 38695,
  10603. 40289, 26891, 23167, 23064, 20901, 21517, 21629, 26126, 30431, 36855,
  10604. 37528, 40180, 23018, 29277, 28357, 20813, 26825, 32191, 32236,
  10605. [12207, 38754], 40634, 25720, 27169, 33538, 22916, 23391, [12113, 27611],
  10606. 29467, 30450, 32178, 32791, 33945, 20786, [12106, 26408], 40665,
  10607. [12140, 30446], 26466, 21247, 39173, 23588, 25147, 31870, 36016, 21839,
  10608. 24758, 32011, [12200, 38272], 21249, 20063, 20918, 22812, 29242, 32822,
  10609. 37326, 24357, [12142, 30690], 21380, 24441, 32004, 34220, 35379, 36493,
  10610. 38742, 26611, 34222, 37971, 24841, 24840, 27833, 30290, 35565, 36664,
  10611. 21807, 20305, 20778, 21191, 21451, 23461, 24189, 24736, 24962, 25558,
  10612. 26377, 26586, 28263, 28044, {f: 2, c: 29494}, 30001, 31056, 35029, 35480,
  10613. 36938, [12194, 37009], 37109, 38596, 34701, [12067, 22805], 20104, 20313,
  10614. 19982, 35465, 36671, 38928, 20653, 24188, 22934, 23481, 24248, 25562,
  10615. 25594, 25793, 26332, 26954, 27096, 27915, 28342, 29076, [12132, 29992],
  10616. 31407, [12154, 32650], 32768, 33865, 33993, 35201, 35617, 36362, 36965,
  10617. 38525, 39178, 24958, 25233, 27442, 27779, 28020, 32716, 32764, 28096,
  10618. 32645, 34746, 35064, 26469, 33713, 38972, 38647, 27931, 32097, 33853,
  10619. 37226, 20081, 21365, 23888, 27396, 28651, 34253, 34349, 35239, 21033,
  10620. 21519, 23653, 26446, 26792, 29702, 29827, 30178, 35023, 35041,
  10621. [12197, 37324], 38626, 38520, 24459, 29575, [12148, 31435], 33870, 25504,
  10622. 30053, 21129, 27969, 28316, 29705, 30041, 30827, 31890, 38534,
  10623. [12015, 31452], [12243, 40845], 20406, 24942, 26053, 34396, 20102, 20142,
  10624. 20698, 20001, 20940, 23534, 26009, 26753, 28092, 29471, 30274, 30637,
  10625. 31260, 31975, 33391, 35538, 36988, 37327, 38517, 38936, [12050, 21147],
  10626. 32209, 20523, 21400, 26519, 28107, 29136, 29747, 33256, 36650, 38563,
  10627. 40023, 40607, 29792, 22593, 28057, 32047, 39006, 20196, 20278, 20363,
  10628. 20919, 21169, 23994, 24604, 29618, 31036, 33491, 37428, 38583, 38646,
  10629. 38666, 40599, 40802, 26278, 27508, 21015, 21155, 28872, 35010, 24265,
  10630. 24651, 24976, 28451, 29001, 31806, 32244, 32879, 34030, 36899, 37676,
  10631. 21570, 39791, 27347, 28809, 36034, 36335, 38706, 21172, 23105, 24266,
  10632. 24324, 26391, 27004, 27028, 28010, 28431, 29282, 29436, 31725,
  10633. [12156, 32769], 32894, 34635, 37070, 20845, 40595, 31108, 32907, 37682,
  10634. 35542, 20525, 21644, 35441, 27498, 36036, 33031, 24785, 26528, 40434,
  10635. 20121, 20120, 39952, 35435, 34241, 34152, 26880, 28286, 30871, 33109,
  10636. 24332, 19984, 19989, 20010, 20017, [12034, 20022], 20028, [12035, 20031],
  10637. 20034, 20054, 20056, 20098, [12037, 20101], 35947, 20106, 33298, 24333,
  10638. 20110, {f: 2, c: 20126}, [12039, 20128], 20130, 20144, 20147, 20150, 20174,
  10639. 20173, 20164, 20166, 20162, 20183, 20190, 20205, 20191, 20215, 20233,
  10640. 20314, 20272, 20315, 20317, 20311, 20295, 20342, 20360, 20367, 20376,
  10641. 20347, 20329, 20336, 20369, 20335, 20358, 20374, 20760, 20436, 20447,
  10642. 20430, 20440, 20443, 20433, 20442, 20432, {f: 2, c: 20452}, 20506, 20520,
  10643. 20500, 20522, 20517, 20485, 20252, 20470, 20513, 20521, 20524, 20478,
  10644. 20463, 20497, 20486, 20547, 20551, 26371, 20565, 20560, 20552, 20570,
  10645. 20566, 20588, 20600, 20608, 20634, 20613, 20660, 20658, {f: 2, c: 20681},
  10646. 20659, 20674, 20694, 20702, 20709, 20717, 20707, 20718, 20729, 20725,
  10647. 20745, {f: 2, c: 20737}, 20758, 20757, 20756, 20762, 20769, 20794, 20791,
  10648. 20796, 20795, [12041, 20799], [11918, 20800], 20818, 20812, 20820, 20834,
  10649. 31480, {f: 2, c: 20841}, 20846, 20864, [12044, 20866], 22232, 20876, 20873,
  10650. 20879, 20881, 20883, 20885, [12045, 20886], 20900, 20902, 20898,
  10651. {f: 2, c: 20905}, [12046, 20907], 20915, {f: 2, c: 20913}, 20912, 20917,
  10652. 20925, 20933, 20937, 20955, [12047, 20960], 34389, 20969, 20973, 20976,
  10653. [12048, 20981], 20990, 20996, 21003, 21012, 21006, 21031, 21034, 21038,
  10654. 21043, 21049, 21071, 21060, {f: 2, c: 21067}, 21086, 21076, 21098, 21108,
  10655. 21097, 21107, 21119, 21117, 21133, 21140, 21138, 21105, 21128, 21137,
  10656. 36776, 36775, {f: 2, c: 21164}, 21180, 21173, 21185, 21197, 21207, 21214,
  10657. 21219, 21222, 39149, 21216, 21235, 21237, 21240, [12051, 21241], 21254,
  10658. 21256, 30008, 21261, 21264, 21263, [12052, 21269], [12053, 21274], 21283,
  10659. 21295, 21297, 21299, [12054, 21304], 21312, 21318, 21317, 19991, 21321,
  10660. 21325, 20950, 21342, [12057, 21353], 21358, 22808, 21371, 21367,
  10661. [12058, 21378], 21398, 21408, 21414, 21413, 21422, 21424, [12059, 21430],
  10662. 21443, 31762, 38617, 21471, 26364, 29166, 21486, 21480, 21485, 21498,
  10663. 21505, 21565, 21568, {f: 2, c: 21548}, 21564, 21550, 21558, 21545, 21533,
  10664. 21582, 21647, 21621, 21646, 21599, 21617, 21623, 21616, 21650, 21627,
  10665. 21632, 21622, 21636, 21648, 21638, 21703, 21666, 21688, 21669, 21676,
  10666. 21700, 21704, 21672, 21675, 21698, 21668, 21694, 21692, 21720,
  10667. {f: 2, c: 21733}, 21775, 21780, 21757, 21742, 21741, 21754, 21730, 21817,
  10668. 21824, 21859, 21836, 21806, 21852, 21829, {f: 2, c: 21846}, 21816, 21811,
  10669. 21853, 21913, 21888, 21679, 21898, 21919, 21883, 21886, 21912, 21918,
  10670. 21934, 21884, 21891, 21929, 21895, 21928, 21978, 21957, 21983, 21956,
  10671. 21980, 21988, 21972, 22036, 22007, 22038, 22014, 22013, 22043, 22009,
  10672. 22094, 22096, 29151, 22068, 22070, 22066, 22072, 22123, 22116, 22063,
  10673. 22124, 22122, 22150, 22144, 22154, 22176, 22164, 22159, 22181, 22190,
  10674. 22198, 22196, 22210, 22204, 22209, 22211, 22208, 22216, 22222, 22225,
  10675. 22227, [12062, 22231], 22254, 22265, 22272, 22271, 22276, 22281, 22280,
  10676. 22283, 22285, 22291, 22296, 22294, 21959, 22300, 22310, {f: 2, c: 22327},
  10677. 22350, 22331, 22336, 22351, 22377, 22464, 22408, 22369, 22399, 22409,
  10678. 22419, 22432, 22451, 22436, 22442, 22448, 22467, 22470, 22484,
  10679. {f: 2, c: 22482}, 22538, 22486, 22499, 22539, 22553, 22557, 22642, 22561,
  10680. 22626, 22603, 22640, 27584, 22610, 22589, 22649, 22661, 22713, 22687,
  10681. 22699, 22714, 22750, 22715, 22712, 22702, 22725, 22739, 22737, 22743,
  10682. 22745, 22744, 22757, 22748, 22756, 22751, 22767, 22778, 22777,
  10683. {f: 3, c: 22779}, [12065, 22786], [12066, 22794], 22800, 22811, 26790,
  10684. 22821, {f: 2, c: 22828}, 22834, 22840, 22846, 31442, 22869, 22864, 22862,
  10685. 22874, 22872, 22882, 22880, 22887, 22892, 22889, 22904, 22913, 22941,
  10686. 20318, 20395, 22947, 22962, 22982, 23016, 23004, 22925, {f: 2, c: 23001},
  10687. 23077, 23071, 23057, 23068, 23049, 23066, 23104, 23148, 23113,
  10688. {f: 2, c: 23093}, 23138, 23146, 23194, 23228, 23230, 23243, 23234, 23229,
  10689. 23267, 23255, 23270, 23273, 23254, {f: 2, c: 23290}, 23308, 23307, 23318,
  10690. 23346, 23248, 23338, 23350, 23358, 23363, 23365, 23360, 23377, 23381,
  10691. {f: 2, c: 23386}, 23397, 23401, 23408, 23411, 23413, 23416, 25992, 23418,
  10692. [12071, 23424], 23427, 23462, 23480, 23491, 23495, 23497, 23508, 23504,
  10693. 23524, 23526, 23522, 23518, 23525, 23531, 23536, 23542, 23539, 23557,
  10694. {f: 2, c: 23559}, 23565, 23571, 23584, [11920, 12074, 23586], 23592,
  10695. [12075, 23608], 23609, 23617, 23622, 23630, 23635, 23632, 23631, 23409,
  10696. 23660, [12076, 23662], 20066, 23670, 23673, 23692, 23697, 23700, 22939,
  10697. 23723, 23739, 23734, 23740, 23735, 23749, 23742, 23751, 23769, 23785,
  10698. 23805, 23802, 23789, 23948, 23786, 23819, 23829, 23831, 23900, 23839,
  10699. 23835, 23825, 23828, 23842, 23834, 23833, 23832, 23884, 23890, 23886,
  10700. 23883, 23916, 23923, 23926, 23943, 23940, 23938, 23970, 23965, 23980,
  10701. 23982, 23997, 23952, 23991, 23996, 24009, 24013, 24019, 24018, 24022,
  10702. [12078, 24027], 24043, 24050, 24053, 24075, 24090, 24089, 24081, 24091,
  10703. {f: 2, c: 24118}, 24132, 24131, 24128, 24142, 24151, 24148, 24159, 24162,
  10704. 24164, 24135, {f: 2, c: 24181}, [11923, 12083, 24186], 40636,
  10705. [12084, 24191], 24224, {f: 2, c: 24257}, 24264, 24272, 24271, 24278, 24291,
  10706. 24285, {f: 2, c: 24282}, 24290, 24289, {f: 2, c: 24296}, 24300, 24305,
  10707. 24307, 24304, [12085, 24308], 24312, [12086, 24318], 24323, 24329, 24413,
  10708. 24412, [12087, 24331], 24337, 24342, 24361, 24365, 24376, 24385, 24392,
  10709. 24396, 24398, 24367, [11924, 24401], {f: 2, c: 24406}, 24409,
  10710. [12090, 24417], 24429, [12091, 24435], 24439, 24451, 24450, 24447, 24458,
  10711. 24456, 24465, 24455, 24478, 24473, 24472, 24480, 24488, 24493, 24508,
  10712. 24534, 24571, 24548, 24568, 24561, 24541, 24755, 24575, 24609, 24672,
  10713. 24601, 24592, 24617, 24590, 24625, 24603, 24597, 24619, 24614, 24591,
  10714. 24634, 24666, 24641, 24682, 24695, 24671, 24650, 24646, 24653, 24675,
  10715. 24643, 24676, 24642, 24684, 24683, 24665, 24705, 24717, 24807, 24707,
  10716. 24730, 24708, 24731, {f: 2, c: 24726}, 24722, 24743, 24715, 24801, 24760,
  10717. 24800, 24787, 24756, 24560, 24765, 24774, 24757, 24792, 24909, 24853,
  10718. 24838, {f: 2, c: 24822}, 24832, 24820, 24826, 24835, 24865, 24827, 24817,
  10719. {f: 2, c: 24845}, 24903, 24894, 24872, 24871, 24906, 24895, 24892, 24876,
  10720. 24884, 24893, 24898, 24900, 24947, 24951, {f: 3, c: 24920}, 24939, 24948,
  10721. 24943, 24933, 24945, 24927, 24925, 24915, 24949, 24985, 24982, 24967,
  10722. 25004, 24980, 24986, 24970, 24977, 25003, 25006, 25036, 25034, 25033,
  10723. 25079, 25032, 25027, 25030, 25018, 25035, 32633, 25037, 25062, 25059,
  10724. 25078, 25082, 25076, 25087, 25085, 25084, 25086, 25088, [12093, 25096],
  10725. 25097, 25101, 25100, 25108, 25115, 25118, 25121, 25130, 25134, 25136,
  10726. {f: 2, c: 25138}, 25153, 25166, 25182, 25187, 25179, 25184, 25192, 25212,
  10727. 25218, 25225, 25214, {f: 2, c: 25234}, 25238, 25300, 25219, 25236, 25303,
  10728. 25297, 25275, 25295, 25343, 25286, 25812, 25288, 25308, 25292, 25290,
  10729. 25282, 25287, 25243, 25289, 25356, 25326, 25329, 25383, 25346, 25352,
  10730. 25327, 25333, 25424, 25406, 25421, 25628, 25423, 25494, 25486, 25472,
  10731. 25515, 25462, 25507, 25487, 25481, 25503, 25525, 25451, 25449, 25534,
  10732. 25577, 25536, 25542, 25571, 25545, 25554, 25590, 25540, 25622, 25652,
  10733. 25606, 25619, 25638, 25654, 25885, 25623, 25640, 25615, 25703, 25711,
  10734. 25718, 25678, 25898, 25749, 25747, 25765, 25769, 25736, 25788, 25818,
  10735. 25810, 25797, 25799, 25787, 25816, 25794, 25841, 25831, 33289,
  10736. {f: 2, c: 25824}, 25260, 25827, 25839, 25900, 25846, 25844, 25842, 25850,
  10737. 25856, 25853, 25880, 25884, 25861, 25892, 25891, 25899, [12097, 25908],
  10738. [11929, 25909], 25911, 25910, 25912, 30027, 25928, 25942, 25941, 25933,
  10739. 25944, 25950, 25949, 25970, 25976, {f: 2, c: 25986}, 35722, 26011, 26015,
  10740. 26027, 26039, 26051, 26054, 26049, 26052, 26060, 26066, 26075, 26073,
  10741. [12102, 26080], [11931, 26081], 26097, 26482, 26122, 26115, 26107, 26483,
  10742. {f: 2, c: 26165}, 26164, 26140, 26191, 26180, 26185, 26177, 26206, 26205,
  10743. 26212, {f: 2, c: 26215}, 26207, 26210, 26224, 26243, 26248, 26254, 26249,
  10744. 26244, 26264, 26269, 26305, 26297, 26313, 26302, 26300, 26308, 26296,
  10745. 26326, 26330, 26336, 26175, 26342, 26345, [12104, 26352], 26357, 26359,
  10746. 26383, 26390, 26398, {f: 2, c: 26406}, 38712, 26414, 26431, 26422, 26433,
  10747. 26424, 26423, 26438, 26462, 26464, 26457, {f: 2, c: 26467}, 26505, 26480,
  10748. 26537, 26492, 26474, 26508, 26507, 26534, 26529, 26501, 26551, 26607,
  10749. 26548, 26604, 26547, 26601, 26552, 26596, 26590, 26589, 26594, 26606,
  10750. 26553, 26574, 26566, 26599, 27292, 26654, 26694, 26665, 26688, 26701,
  10751. 26674, 26702, 26803, 26667, 26713, 26723, 26743, 26751, 26783, 26767,
  10752. 26797, 26772, 26781, 26779, 26755, 27310, 26809, 26740, 26805, 26784,
  10753. 26810, 26895, 26765, 26750, 26881, 26826, 26888, 26840, 26914, 26918,
  10754. 26849, 26892, 26829, 26836, 26855, 26837, 26934, 26898, 26884, 26839,
  10755. 26851, 26917, 26873, 26848, 26863, 26920, 26922, 26906, 26915, 26913,
  10756. 26822, 27001, 26999, 26972, 27000, 26987, 26964, 27006, 26990, 26937,
  10757. 26996, 26941, 26969, 26928, 26977, 26974, 26973, 27009, 26986, 27058,
  10758. 27054, 27088, 27071, 27073, 27091, 27070, 27086, 23528, 27082, 27101,
  10759. 27067, 27075, 27047, 27182, 27025, 27040, 27036, 27029, 27060, 27102,
  10760. 27112, 27138, 27163, 27135, 27402, 27129, 27122, 27111, 27141, 27057,
  10761. 27166, 27117, 27156, 27115, 27146, 27154, 27329, 27171, 27155, 27204,
  10762. 27148, 27250, 27190, 27256, 27207, 27234, 27225, 27238, 27208, 27192,
  10763. 27170, 27280, 27277, 27296, 27268, {f: 2, c: 27298}, 27287, 34327, 27323,
  10764. 27331, 27330, 27320, 27315, 27308, 27358, 27345, 27359, 27306, 27354,
  10765. 27370, 27387, 27397, 34326, 27386, 27410, 27414, 39729, 27423, 27448,
  10766. 27447, 30428, 27449, 39150, 27463, 27459, 27465, 27472, 27481, 27476,
  10767. 27483, 27487, 27489, 27512, [12109, 27513], {f: 2, c: 27519}, 27524, 27523,
  10768. 27533, 27544, 27541, 27550, 27556, {f: 2, c: 27562}, 27567, 27570, 27569,
  10769. [12110, 27571], 27575, 27580, 27590, [12111, 27595], 27603, 27615, 27628,
  10770. 27627, 27635, 27631, 40638, 27656, 27667, [12115, 27668], 27675, 27684,
  10771. 27683, 27742, 27733, 27746, 27754, 27778, 27789, 27802, 27777, 27803,
  10772. 27774, 27752, 27763, 27794, 27792, 27844, 27889, 27859, 27837, 27863,
  10773. 27845, 27869, 27822, 27825, 27838, 27834, 27867, 27887, 27865, 27882,
  10774. 27935, 34893, 27958, 27947, 27965, 27960, 27929, 27957, 27955, 27922,
  10775. 27916, 28003, 28051, 28004, 27994, 28025, 27993, 28046, 28053, 28644,
  10776. 28037, 28153, 28181, 28170, 28085, 28103, 28134, 28088, 28102, 28140,
  10777. 28126, 28108, 28136, 28114, 28101, 28154, 28121, 28132, 28117, 28138,
  10778. 28142, 28205, 28270, 28206, 28185, 28274, 28255, 28222, 28195, 28267,
  10779. 28203, 28278, 28237, 28191, 28227, 28218, 28238, 28196, 28415, 28189,
  10780. 28216, 28290, 28330, 28312, 28361, 28343, 28371, 28349, 28335, 28356,
  10781. 28338, {f: 2, c: 28372}, 28303, 28325, 28354, 28319, 28481, 28433, 28748,
  10782. 28396, 28408, 28414, 28479, 28402, 28465, 28399, 28466, 28364, 28478,
  10783. 28435, 28407, 28550, 28538, 28536, 28545, 28544, 28527, 28507, 28659,
  10784. 28525, 28546, 28540, 28504, 28558, 28561, 28610, 28518, 28595, 28579,
  10785. 28577, 28580, 28601, 28614, 28586, 28639, 28629, 28652, 28628, 28632,
  10786. 28657, 28654, 28635, 28681, 28683, 28666, 28689, 28673, 28687, 28670,
  10787. 28699, 28698, 28532, 28701, 28696, 28703, 28720, 28734, 28722, 28753,
  10788. 28771, 28825, 28818, 28847, 28913, 28844, 28856, 28851, 28846, 28895,
  10789. 28875, 28893, 28889, 28937, 28925, 28956, 28953, 29029, 29013, 29064,
  10790. 29030, 29026, 29004, 29014, 29036, 29071, 29179, 29060, 29077, 29096,
  10791. 29100, 29143, 29113, 29118, 29138, 29129, 29140, 29134, 29152, 29164,
  10792. 29159, 29173, 29180, 29177, 29183, 29197, 29200, 29211, 29224, 29229,
  10793. 29228, 29232, 29234, [12120, 29243], 29244, [12121, 29247], 29248, 29254,
  10794. 29259, 29272, 29300, 29310, 29314, 29313, 29319, 29330, 29334, 29346,
  10795. 29351, 29369, 29362, 29379, 29382, 29380, 29390, 29394, 29410,
  10796. {f: 2, c: 29408}, 29433, 29431, 20495, 29463, 29450, 29468, 29462, 29469,
  10797. 29492, 29487, 29481, 29477, 29502, {f: 2, c: 29518}, 40664, 29527, 29546,
  10798. 29544, 29552, 29560, 29557, 29563, 29562, 29640, 29619, 29646, 29627,
  10799. 29632, 29669, 29678, 29662, 29858, 29701, 29807, 29733, 29688, 29746,
  10800. 29754, 29781, 29759, 29791, 29785, 29761, 29788, 29801, 29808, 29795,
  10801. 29802, 29814, 29822, 29835, 29854, 29863, 29898, 29903, 29908, 29681,
  10802. 29920, 29923, 29927, 29929, 29934, 29938, {f: 2, c: 29936}, 29944, 29943,
  10803. 29956, 29955, 29957, 29964, 29966, 29965, 29973, 29971, 29982, 29990,
  10804. 29996, 30012, 30020, 30029, 30026, 30025, 30043, 30022, 30042, 30057,
  10805. 30052, 30055, 30059, 30061, 30072, 30070, {f: 2, c: 30086}, 30068, 30090,
  10806. 30089, 30082, 30100, 30106, 30109, 30117, 30115, 30146, 30131, 30147,
  10807. 30133, 30141, 30136, 30140, 30129, 30157, 30154, 30162, 30169, 30179,
  10808. 30174, {f: 2, c: 30206}, 30204, 30209, 30192, 30202, {f: 2, c: 30194},
  10809. 30219, 30221, 30217, 30239, 30247, {f: 3, c: 30240}, 30244, 30260, 30256,
  10810. 30267, {f: 2, c: 30279}, 30278, 30300, 30296, {f: 2, c: 30305},
  10811. {f: 3, c: 30312}, 30311, 30316, 30320, 30322, [12136, 30326], 30328, 30332,
  10812. 30336, 30339, 30344, 30347, 30350, 30358, 30355, {f: 2, c: 30361}, 30384,
  10813. 30388, {f: 3, c: 30392}, 30402, 30413, 30422, 30418, 30430, 30433, 30437,
  10814. 30439, 30442, 34351, 30459, 30472, 30471, 30468, 30505, 30500, 30494,
  10815. {f: 2, c: 30501}, 30491, {f: 2, c: 30519}, 30535, 30554, 30568, 30571,
  10816. 30555, 30565, 30591, 30590, 30585, 30606, 30603, 30609, 30624, 30622,
  10817. 30640, 30646, 30649, 30655, {f: 2, c: 30652}, 30651, 30663, 30669, 30679,
  10818. 30682, 30684, 30691, 30702, 30716, 30732, 30738, 31014, 30752, 31018,
  10819. 30789, 30862, 30836, 30854, 30844, 30874, 30860, 30883, 30901, 30890,
  10820. 30895, 30929, 30918, 30923, 30932, 30910, 30908, 30917, 30922, 30956,
  10821. 30951, 30938, 30973, 30964, 30983, 30994, 30993, 31001, 31020, 31019,
  10822. 31040, 31072, 31063, 31071, 31066, 31061, 31059, 31098, 31103, 31114,
  10823. 31133, 31143, 40779, 31146, 31150, 31155, {f: 2, c: 31161}, 31177, 31189,
  10824. 31207, 31212, 31201, 31203, 31240, 31245, {f: 2, c: 31256}, 31264, 31263,
  10825. 31104, 31281, 31291, 31294, 31287, 31299, 31319, 31305, {f: 2, c: 31329},
  10826. 31337, 40861, 31344, 31353, 31357, 31368, 31383, 31381, 31384, 31382,
  10827. 31401, 31432, 31408, 31414, 31429, 31428, 31423, 36995, 31431, 31434,
  10828. 31437, 31439, 31445, 31443, {f: 2, c: 31449}, 31453, {f: 2, c: 31457},
  10829. 31462, 31469, 31472, 31490, 31503, 31498, 31494, 31539, {f: 2, c: 31512},
  10830. 31518, 31541, 31528, 31542, 31568, 31610, 31492, 31565, 31499, 31564,
  10831. 31557, 31605, 31589, 31604, 31591, {f: 2, c: 31600}, 31596, 31598, 31645,
  10832. 31640, 31647, 31629, 31644, 31642, 31627, 31634, 31631, 31581, 31641,
  10833. 31691, 31681, 31692, 31695, 31668, 31686, 31709, 31721, 31761, 31764,
  10834. 31718, 31717, 31840, 31744, 31751, 31763, 31731, 31735, 31767, 31757,
  10835. 31734, 31779, 31783, 31786, 31775, 31799, 31787, 31805, 31820, 31811,
  10836. 31828, 31823, 31808, 31824, 31832, 31839, 31844, 31830, 31845, 31852,
  10837. 31861, 31875, 31888, 31908, 31917, 31906, 31915, 31905, 31912, 31923,
  10838. 31922, 31921, 31918, 31929, 31933, 31936, 31941, 31938, 31960, 31954,
  10839. 31964, 31970, 39739, 31983, 31986, 31988, 31990, 31994, 32006, 32002,
  10840. 32028, 32021, 32010, 32069, 32075, 32046, 32050, 32063, 32053, 32070,
  10841. 32115, 32086, 32078, 32114, 32104, 32110, 32079, 32099, 32147, 32137,
  10842. 32091, 32143, 32125, 32155, 32186, 32174, 32163, 32181, 32199, 32189,
  10843. 32171, 32317, 32162, 32175, 32220, 32184, 32159, 32176, 32216, 32221,
  10844. 32228, 32222, 32251, 32242, 32225, 32261, 32266, 32291, 32289, 32274,
  10845. 32305, 32287, 32265, 32267, 32290, 32326, 32358, 32315, 32309, 32313,
  10846. 32323, 32311, 32306, 32314, 32359, 32349, 32342, 32350, {f: 2, c: 32345},
  10847. 32377, 32362, 32361, 32380, 32379, 32387, 32213, 32381, 36782, 32383,
  10848. {f: 2, c: 32392}, 32396, 32402, 32400, {f: 2, c: 32403}, 32406, 32398,
  10849. {f: 2, c: 32411}, 32568, 32570, 32581, {f: 3, c: 32588}, 32592,
  10850. [12153, 32593], 32597, 32596, 32600, {f: 2, c: 32607}, {f: 2, c: 32616},
  10851. 32615, 32632, 32642, 32646, 32643, 32648, 32647, 32652, 32660, 32670,
  10852. 32669, 32666, 32675, 32687, 32690, 32697, 32686, 32694, 32696, 35697,
  10853. {f: 2, c: 32709}, 32714, 32725, 32724, 32737, 32742, 32745, 32755, 32761,
  10854. 39132, 32774, 32772, 32779, [12158, 32786], {f: 2, c: 32792}, 32796, 32801,
  10855. 32808, 32831, 32827, 32842, 32838, 32850, 32856, 32858, 32863, 32866,
  10856. 32872, 32883, 32882, 32880, 32886, 32889, 32893, [12160, 32895], 32900,
  10857. 32902, 32901, 32923, 32915, 32922, 32941, 20880, 32940, 32987, 32997,
  10858. 32985, 32989, 32964, 32986, 32982, 33033, 33007, 33009, 33051, 33065,
  10859. 33059, 33071, 33099, 38539, 33094, 33086, 33107, 33105, 33020, 33137,
  10860. 33134, {f: 2, c: 33125}, 33140, 33155, 33160, 33162, 33152, 33154, 33184,
  10861. 33173, 33188, 33187, 33119, 33171, 33193, 33200, 33205, 33214, 33208,
  10862. 33213, 33216, 33218, 33210, 33225, 33229, 33233, 33241, 33240, 33224,
  10863. 33242, {f: 2, c: 33247}, 33255, {f: 2, c: 33274}, 33278, {f: 2, c: 33281},
  10864. 33285, 33287, 33290, 33293, 33296, 33302, 33321, 33323, 33336, 33331,
  10865. 33344, 33369, 33368, 33373, 33370, 33375, 33380, 33378, 33384,
  10866. {f: 2, c: 33386}, 33326, 33393, 33399, [12171, 33400], 33406, 33421, 33426,
  10867. 33451, 33439, 33467, 33452, 33505, 33507, 33503, 33490, 33524, 33523,
  10868. 33530, 33683, 33539, 33531, 33529, 33502, 33542, 33500, 33545, 33497,
  10869. 33589, 33588, 33558, 33586, 33585, 33600, 33593, 33616, 33605, 33583,
  10870. 33579, {f: 2, c: 33559}, 33669, 33690, 33706, 33695, 33698, 33686, 33571,
  10871. 33678, 33671, 33674, 33660, 33717, 33651, 33653, 33696, 33673, 33704,
  10872. 33780, 33811, 33771, 33742, 33789, 33795, 33752, 33803, 33729, 33783,
  10873. 33799, 33760, 33778, 33805, 33826, 33824, 33725, 33848, 34054, 33787,
  10874. 33901, 33834, 33852, 34138, 33924, 33911, 33899, 33965, 33902, 33922,
  10875. 33897, 33862, 33836, 33903, 33913, 33845, 33994, 33890, 33977, 33983,
  10876. 33951, 34009, 33997, 33979, 34010, 34000, 33985, 33990, 34006, 33953,
  10877. 34081, 34047, 34036, {f: 2, c: 34071}, 34092, 34079, 34069, 34068, 34044,
  10878. 34112, 34147, 34136, 34120, 34113, 34306, 34123, 34133, 34176, 34212,
  10879. 34184, 34193, 34186, 34216, 34157, 34196, 34203, 34282, 34183, 34204,
  10880. 34167, 34174, 34192, 34249, 34234, 34255, 34233, 34256, 34261, 34269,
  10881. 34277, 34268, 34297, 34314, 34323, 34315, 34302, 34298, 34310, 34338,
  10882. 34330, 34352, 34367, [12172, 34381], 20053, 34388, 34399, 34407, 34417,
  10883. 34451, 34467, {f: 2, c: 34473}, {f: 2, c: 34443}, 34486, 34479, 34500,
  10884. 34502, 34480, 34505, 34851, 34475, 34516, 34526, 34537, 34540, 34527,
  10885. 34523, 34543, 34578, 34566, 34568, 34560, 34563, 34555, 34577, 34569,
  10886. 34573, 34553, 34570, 34612, 34623, 34615, 34619, 34597, 34601, 34586,
  10887. 34656, 34655, 34680, 34636, 34638, 34676, 34647, 34664, 34670, 34649,
  10888. 34643, 34659, 34666, 34821, 34722, 34719, 34690, 34735, 34763, 34749,
  10889. 34752, 34768, 38614, 34731, 34756, 34739, 34759, 34758, 34747, 34799,
  10890. 34802, 34784, 34831, 34829, 34814, {f: 2, c: 34806}, 34830, 34770, 34833,
  10891. 34838, 34837, 34850, 34849, 34865, 34870, 34873, 34855, 34875, 34884,
  10892. 34882, 34898, 34905, 34910, 34914, 34923, 34945, 34942, 34974, 34933,
  10893. 34941, 34997, 34930, 34946, 34967, 34962, 34990, 34969, 34978, 34957,
  10894. 34980, 34992, 35007, 34993, {f: 2, c: 35011}, 35028, {f: 2, c: 35032},
  10895. 35037, 35065, 35074, 35068, 35060, 35048, 35058, 35076, 35084, 35082,
  10896. 35091, 35139, 35102, 35109, {f: 2, c: 35114}, 35137, 35140, 35131, 35126,
  10897. 35128, 35148, 35101, 35168, 35166, 35174, 35172, 35181, 35178, 35183,
  10898. 35188, 35191, [12177, 35198], 35203, 35208, 35210, 35219, 35224, 35233,
  10899. 35241, 35238, 35244, 35247, 35250, 35258, 35261, {f: 2, c: 35263}, 35290,
  10900. {f: 2, c: 35292}, 35303, 35316, 35320, 35331, 35350, 35344, 35340, 35355,
  10901. 35357, 35365, 35382, 35393, 35419, 35410, 35398, 35400, 35452, 35437,
  10902. 35436, 35426, 35461, 35458, 35460, 35496, 35489, 35473, {f: 2, c: 35493},
  10903. 35482, 35491, 35524, 35533, 35522, 35546, 35563, 35571, 35559, 35556,
  10904. 35569, 35604, 35552, 35554, 35575, 35550, 35547, 35596, 35591, 35610,
  10905. 35553, 35606, 35600, 35607, 35616, 35635, 38827, 35622, 35627, 35646,
  10906. 35624, 35649, 35660, 35663, 35662, 35657, 35670, 35675, 35674, 35691,
  10907. 35679, 35692, 35695, 35700, 35709, 35712, 35724, 35726, {f: 2, c: 35730},
  10908. 35734, {f: 2, c: 35737}, 35898, 35905, 35903, 35912, 35916, 35918, 35920,
  10909. [12183, 35925], 35938, 35948, [12184, 35960], 35962, 35970, 35977, 35973,
  10910. 35978, {f: 2, c: 35981}, 35988, 35964, 35992, 25117, 36013, 36010, 36029,
  10911. {f: 2, c: 36018}, 36014, 36022, 36040, 36033, 36068, 36067, 36058, 36093,
  10912. {f: 2, c: 36090}, {f: 2, c: 36100}, 36106, 36103, 36111, 36109, 36112,
  10913. 40782, 36115, 36045, 36116, 36118, 36199, 36205, 36209, 36211, 36225,
  10914. 36249, 36290, 36286, 36282, 36303, 36314, 36310, 36300, 36315, 36299,
  10915. {f: 2, c: 36330}, 36319, 36323, 36348, {f: 2, c: 36360}, 36351,
  10916. {f: 2, c: 36381}, 36368, 36383, 36418, 36405, 36400, 36404, 36426, 36423,
  10917. 36425, 36428, 36432, 36424, 36441, 36452, 36448, 36394, 36451, 36437,
  10918. 36470, 36466, 36476, 36481, 36487, 36485, 36484, 36491, 36490, 36499,
  10919. 36497, 36500, 36505, 36522, 36513, 36524, 36528, 36550, 36529, 36542,
  10920. 36549, 36552, 36555, 36571, 36579, 36604, 36603, 36587, 36606, 36618,
  10921. 36613, 36629, 36626, 36633, 36627, 36636, 36639, 36635, 36620, 36646,
  10922. 36659, 36667, 36665, 36677, 36674, 36670, 36684, 36681, 36678, 36686,
  10923. 36695, 36700, {f: 3, c: 36706}, 36764, 36767, 36771, 36781, 36783, 36791,
  10924. 36826, 36837, 36834, 36842, 36847, 36999, 36852, 36869, {f: 2, c: 36857},
  10925. 36881, 36885, 36897, 36877, 36894, 36886, 36875, 36903, 36918, 36917,
  10926. 36921, 36856, {f: 4, c: 36943}, 36878, 36937, 36926, 36950, 36952, 36958,
  10927. 36968, 36975, 36982, 38568, 36978, 36994, 36989, 36993, 36992, 37002,
  10928. 37001, 37007, 37032, 37039, 37041, 37045, 37090, 37092, 25160, 37083,
  10929. 37122, 37138, 37145, 37170, 37168, 37194, 37206, 37208, 37219, 37221,
  10930. 37225, 37235, 37234, 37259, 37257, 37250, 37282, 37291, 37295, 37290,
  10931. 37301, 37300, 37306, {f: 2, c: 37312}, 37321, 37323, 37328, 37334, 37343,
  10932. 37345, 37339, 37372, {f: 2, c: 37365}, 37406, 37375, 37396, 37420, 37397,
  10933. 37393, 37470, 37463, 37445, 37449, 37476, 37448, 37525, 37439, 37451,
  10934. 37456, 37532, 37526, 37523, 37531, 37466, 37583, 37561, 37559, 37609,
  10935. 37647, 37626, 37700, 37678, 37657, 37666, 37658, 37667, 37690, 37685,
  10936. 37691, 37724, 37728, 37756, 37742, 37718, 37808, {f: 2, c: 37804}, 37780,
  10937. 37817, {f: 2, c: 37846}, 37864, 37861, 37848, 37827, 37853, 37840, 37832,
  10938. 37860, 37914, 37908, 37907, 37891, 37895, 37904, 37942, 37931, 37941,
  10939. 37921, 37946, 37953, 37970, 37956, 37979, 37984, 37986, 37982, 37994,
  10940. 37417, 38000, 38005, 38007, 38013, 37978, 38012, 38014, 38017, 38015,
  10941. 38274, 38279, 38282, 38292, 38294, {f: 2, c: 38296}, 38304, 38312, 38311,
  10942. 38317, 38332, 38331, 38329, 38334, 38346, 28662, 38339, 38349, 38348,
  10943. 38357, 38356, 38358, 38364, 38369, 38373, 38370, 38433, 38440,
  10944. {f: 2, c: 38446}, 38466, 38476, 38479, 38475, 38519, 38492, 38494, 38493,
  10945. 38495, 38502, 38514, 38508, 38541, 38552, 38549, 38551, 38570, 38567,
  10946. {f: 2, c: 38577}, 38576, 38580, [12202, 38582], 38584, [12203, 38585],
  10947. 38606, 38603, 38601, 38605, 35149, 38620, 38669, 38613, 38649, 38660,
  10948. 38662, 38664, 38675, 38670, 38673, 38671, 38678, 38681, 38692, 38698,
  10949. 38704, 38713, {f: 2, c: 38717}, 38724, 38726, 38728, 38722, 38729, 38748,
  10950. 38752, 38756, 38758, 38760, 21202, 38763, 38769, 38777, 38789, 38780,
  10951. 38785, 38778, 38790, 38795, {f: 2, c: 38799}, 38812, 38824, 38822, 38819,
  10952. {f: 2, c: 38835}, 38851, 38854, 38856, [12209, 38859], 38876,
  10953. [12210, 38893], 40783, 38898, 31455, 38902, 38901, 38927, 38924, 38968,
  10954. 38948, 38945, 38967, 38973, 38982, 38991, 38987, 39019, {f: 3, c: 39023},
  10955. 39028, 39027, 39082, 39087, 39089, 39094, 39108, 39107, 39110, 39145,
  10956. 39147, 39171, 39177, 39186, 39188, 39192, 39201, {f: 2, c: 39197}, 39204,
  10957. 39200, 39212, 39214, {f: 2, c: 39229}, 39234, 39241, 39237, 39248, 39243,
  10958. {f: 2, c: 39249}, 39244, 39253, {f: 2, c: 39319}, 39333, {f: 2, c: 39341},
  10959. 39356, 39391, 39387, 39389, 39384, 39377, {f: 2, c: 39405},
  10960. {f: 2, c: 39409}, 39419, 39416, 39425, 39439, 39429, 39394, 39449, 39467,
  10961. 39479, 39493, 39490, 39488, 39491, 39486, 39509, 39501, 39515, 39511,
  10962. 39519, 39522, 39525, 39524, 39529, 39531, 39530, 39597, 39600, 39612,
  10963. 39616, 39631, 39633, {f: 2, c: 39635}, 39646, [12221, 39647],
  10964. {f: 2, c: 39650}, 39654, 39663, 39659, 39662, 39668, 39665, 39671, 39675,
  10965. 39686, 39704, 39706, 39711, {f: 2, c: 39714}, [12222, 39717],
  10966. {f: 4, c: 39719}, 39726, [12223, 39727], [12224, 39730], 39748, 39747,
  10967. 39759, {f: 2, c: 39757}, 39761, 39768, 39796, 39827, 39811, 39825,
  10968. {f: 2, c: 39830}, {f: 2, c: 39839}, 39848, 39860, 39872, 39882, 39865,
  10969. 39878, 39887, {f: 2, c: 39889}, 39907, 39906, 39908, 39892, 39905, 39994,
  10970. 39922, 39921, 39920, 39957, 39956, 39945, 39955, 39948, 39942, 39944,
  10971. 39954, 39946, 39940, 39982, 39963, 39973, 39972, 39969, 39984, 40007,
  10972. 39986, 40006, 39998, 40026, 40032, 40039, 40054, 40056, 40167, 40172,
  10973. 40176, 40201, 40200, 40171, 40195, 40198, 40234, 40230, 40367, 40227,
  10974. 40223, 40260, 40213, 40210, 40257, 40255, 40254, 40262, 40264,
  10975. {f: 2, c: 40285}, 40292, 40273, 40272, 40281, 40306, 40329, 40327, 40363,
  10976. 40303, 40314, 40346, 40356, 40361, 40370, 40388, 40385, 40379, 40376,
  10977. 40378, 40390, 40399, 40386, 40409, 40403, 40440, 40422, 40429, 40431,
  10978. 40445, {f: 2, c: 40474}, 40478, [12228, 40565], 40569, 40573, 40577, 40584,
  10979. {f: 2, c: 40587}, 40594, 40597, 40593, 40605, [12230, 40613], 40617, 40632,
  10980. 40618, 40621, 38753, 40652, {f: 3, c: 40654}, 40660, 40668, 40670, 40669,
  10981. 40672, 40677, 40680, 40687, 40692, {f: 2, c: 40694}, [12235, 40697],
  10982. {f: 2, c: 40699}, [12236, 40701], {f: 2, c: 40711}, 30391, 40725, 40737,
  10983. 40748, 40766, [12241, 40778], [12242, 40786], 40788, 40803,
  10984. {f: 3, c: 40799}, {f: 2, c: 40806}, 40812, 40810, 40823, 40818, 40822,
  10985. 40853, [12244, 40860], [12245, 40864], 22575, 27079, 36953, 29796, 0,
  10986. {f: 76, c: 9472}, {f: 20, c: 9312}, {f: 10, c: 8544}, 13129, 13076, 0,
  10987. 13133, 0, 13095, 0, 13110, 13137, 0, 13069, 13094, 0, 13099, 13130, 0,
  10988. {f: 3, c: 13212}, {f: 2, c: 13198}, 13252, 13217, 12317, 12319, 8470,
  10989. 13261, 0, {f: 5, c: 12964}, {f: 2, c: 12849}, 12857, 13182, 13181, 13180,
  10990. 8750, 8721, {s: 3}, 8735, 8895, 0, 0, 21854, {s: 7}, 167133, 0, 0, 28976,
  10991. 0, 40407, {s: 4}, 64054, 0, 0, 22169, 15694, {s: 4}, 20448, 0, 0, 36544, 0,
  10992. 194797, {s: 4}, 153716, 32363, 33606, 167670, {s: 3}, 40572, 0, 0, 26171,
  10993. 0, 40628, {s: 4}, 26629, {s: 5}, 23650, 0, 194780, 0, 32353, 0, 0, 64070,
  10994. {s: 5}, 34083, 37292, {s: 7}, 34796, {s: 8}, 25620, 0, 0, 39506, {s: 4},
  10995. 64074, 0, 194692, {s: 4}, 31774, {s: 6}, 64016, 25681, 0, 0, 63980, 22625,
  10996. 39002, 0, 194679, {s: 3}, 31153, 0, 28678, {s: 9}, 22218, {s: 3}, 21085, 0,
  10997. 28497, 37297, {s: 10}, 64106, {s: 6}, 38960, 0, 40629, {s: 9}, 33802,
  10998. 63939, {f: 2, c: 63890}, 63897, 0, 34847, 194575, 0, 194771, 194584,
  10999. {s: 7}, 137754, 23643, {s: 4}, 25890, 0, 0, 26618, 0, 26766, 0, 148432,
  11000. 194848, {s: 21}, 34110, {s: 15}, 30562, {s: 12}, 65075, 0,
  11001. {f: 2, c: 65073}, {s: 4}, 65072, {f: 2, c: 65077}, {f: 2, c: 65081}, 0, 0,
  11002. {f: 2, c: 65079}, {f: 2, c: 65087}, {f: 2, c: 65085}, {f: 4, c: 65089},
  11003. {f: 2, c: 65083}, {s: 41}, {f: 3, c: 12436}, 0, 0, 22099, {s: 41}, 65508,
  11004. 65287, 65282, 0, 9665, 9655, 8681, 8679, 8678, 8680, 9634, 9831, 9825,
  11005. 9828, 9826, 13216, 13218, {f: 2, c: 13220}, 13207, 8467, 13208, 13235,
  11006. 13234, 13233, 13232, {f: 3, c: 13189}, 13259, 13200, 13268, 13206, 13090,
  11007. 13078, 13080, 13077, 13059, 13091, 13143, 13122, 13113, 13115, 13056,
  11008. 13105, 13127, 13086, 13098, 0, 13183, 8481, 9742, 12342, 12320, {s: 3},
  11009. {f: 9, c: 9352}, {f: 20, c: 9332}, 12881, {f: 10, c: 8560},
  11010. {f: 10, c: 12882}, {f: 26, c: 9372}, 12867, 12861, 12863, 12852, 12856,
  11011. 12851, 12860, 12866, 12862, 12854, 12853, 12859, 12864, 12858, 12976,
  11012. 12973, 12969, 12975, 12948, 12970, 12952, 12971, 12946, 12945, 12947,
  11013. 12972, 12974, 12950, {s: 8}, {f: 3, c: 9131}, 0, {f: 3, c: 9127}, 0, 13260,
  11014. 13061, 0, 0, 13215, 13219, 13222, 0, 0, 12958, {f: 2, c: 13192}, 13256,
  11015. 8749, 0, 12848, {f: 6, c: 12842}, 12855, 12865, 10145, {s: 3}, 9673, 9824,
  11016. 9829, 9827, 9830, {f: 4, c: 9728}, 9758, {f: 2, c: 9756}, 9759, 12953,
  11017. 9450, {f: 2, c: 8554}, {s: 3}, {f: 8, c: 9601}, 9615, 9614, 9613, 9612,
  11018. 9611, 9610, 9609, {f: 2, c: 9620}, {f: 2, c: 9581}, 9584, 9583, 9552, 9566,
  11019. 9578, 9569, {f: 2, c: 9698}, 9701, 9700, 0, 0, {f: 3, c: 9585}, {s: 20},
  11020. 20956, 29081, {f: 9, c: 10102}, {s: 3}, {f: 2, c: 8570}, {s: 3}, 8575,
  11021. 8458, 8457, 0, 0, 12292, 8646, {f: 2, c: 8644}, 0, {f: 4, c: 12535}, 0, 0,
  11022. 12957, {s: 3}, 13179, {s: 3}, 13107, 13134, {s: 30}, 32394, 35100, 37704,
  11023. 37512, 34012, 20425, 28859, 26161, 26824, 37625, 26363, 24389,
  11024. [12033, 20008], 20193, 20220, 20224, 20227, 20281, 20310, 20370, 20362,
  11025. 20378, 20372, 20429, 20544, 20514, 20479, 20510, 20550, 20592, 20546,
  11026. 20628, 20724, 20696, 20810, 20836, 20893, 20926, 20972, 21013, 21148,
  11027. 21158, 21184, 21211, 21248, 0, 21284, 21362, 21395, 21426, 21469, 64014,
  11028. 21660, 21642, 21673, 21759, 21894, 22361, 22373, 22444, 22472, 22471,
  11029. 64015, 0, 22686, 22706, 22795, 22867, 22875, 22877, 22883, 22948, 22970,
  11030. 23382, 23488, 29999, 23512, 0, 23582, 23718, 23738, 23797, 23847, 23891, 0,
  11031. 23874, 23917, {f: 2, c: 23992}, 24016, 24353, 24372, 24423, 24503, 24542,
  11032. 24669, 24709, 24714, 24798, 24789, 24864, 24818, 24849, 24887, 24880,
  11033. 24984, 25107, 25254, 25589, 25696, 25757, 25806, 25934, 26112, 26133,
  11034. 26121, 26158, 0, 26148, 26213, 26199, 26201, 64018, 26227, 26265, 26272,
  11035. 26290, 26303, 26362, 26382, 0, 26470, 26555, 26706, 26560, 0, 26692, 26831,
  11036. 64019, 26984, 64020, 27032, 27106, 27184, 27243, 27206, 27251, 27262,
  11037. 27362, 27364, 27606, 27711, 27740, 27782, 27759, 27866, 27908, 28039,
  11038. 28015, 28054, 28076, 28111, 28152, 28146, 28156, 28217, 28252, 28199,
  11039. 28220, 28351, 28552, 28597, 28661, 28677, 28679, 28712, 28805, 28843,
  11040. 28943, 28932, 29020, {f: 2, c: 28998}, 0, 29121, 29182, 29361, 29374,
  11041. 29476, 64022, 29559, 29629, 29641, 29654, 29667, 29650, 29703, 29685,
  11042. 29734, 29738, 29737, 29742, 0, 29833, 29855, 29953, 30063, 30338, 30364,
  11043. 30366, 30363, 30374, 64023, 30534, 21167, 30753, 30798, 30820, 30842,
  11044. 31024, {f: 3, c: 64024}, 31124, 64027, 31131, 31441, 31463, 64028, 31467,
  11045. 31646, 64029, 32072, 0, 32183, 32160, 32214, 32338, 32583, 32673, 64030,
  11046. 33537, 33634, 33663, 33735, 33782, 33864, 33972, 34131, 34137, 34155,
  11047. 64031, 34224, {f: 2, c: 64032}, 34823, 35061, 35346, 35383, 35449, 35495,
  11048. 35518, 35551, 64034, 35574, 35667, 35711, 36080, 36084, 36114, 36214,
  11049. 64035, 36559, 0, 64037, 36967, 37086, 64038, 37141, 37159, 37338, 37335,
  11050. 37342, {f: 2, c: 37357}, {f: 2, c: 37348}, 37382, 37392, 37386, 37434,
  11051. 37440, 37436, 37454, 37465, 37457, 37433, 37479, 37543, {f: 2, c: 37495},
  11052. 37607, 37591, 37593, 37584, 64039, 37589, 37600, 37587, 37669, 37665,
  11053. 37627, 64040, 37662, 37631, 37661, 37634, 37744, 37719, 37796, 37830,
  11054. 37854, 37880, 37937, 37957, 37960, 38290, 0, 64041, 38557, 38575, 38707,
  11055. 38715, 38723, 38733, 38735, [12205, 38737], 0, 38999, 39013,
  11056. {f: 2, c: 64042}, 39207, 64044, 39326, 39502, 39641, 39644, 39797, 39794,
  11057. 39823, 39857, 39867, 39936, 40304, 40299, 64045, 40473, 40657, 0, 92,
  11058. {s: 634}, 8364, 8486, 0, 0, 64256, {f: 2, c: 64259}, 257, 299, 363, 275,
  11059. 333, 256, 298, 362, 274, 332, {f: 4, c: 8539}, {f: 2, c: 8531}, 8304,
  11060. {f: 6, c: 8308}, {f: 10, c: 8320}, 461, 282, 0, 7868, 463, 0, 296, 465, 0,
  11061. 467, 366, 360, 462, 283, 0, 7869, 464, 0, 297, 466, 0, 468, 367, 361, 593,
  11062. 8049, 8048, 509, 0, 596, 0, 0, 601, 0, 0, 602, 0, 0, 603, 8051, 8050, 0,
  11063. 331, 629, 652, 0, 0, 658, 643, 720, {s: 682}, {f: 10, c: 12832}, {s: 108},
  11064. {f: 4, c: 12892}, {f: 15, c: 12977}, {s: 50}, {f: 26, c: 9424},
  11065. {f: 26, c: 9398}, {s: 48}, {f: 47, c: 13008}, 0, {f: 10, c: 12928}, 12944,
  11066. {f: 6, c: 12938}, 0, 12959, {s: 6}, {f: 2, c: 12960}, 12955, 12954, 12963,
  11067. 12962, 12951, 0, 12956, 12949, {s: 6}, 9676, {s: 11}, 10111,
  11068. {f: 10, c: 9451}, {s: 510}, 8414, {s: 815}, 13274, {s: 3}, 8448, 13250, 0,
  11069. 0, 8453, 0, 13169, 0, 0, 13197, 13211, {s: 3}, {f: 2, c: 13271}, {s: 3},
  11070. {f: 2, c: 13057}, 13060, 13062, 0, 13064, 0, 13063, 13066, 0, 13065, 0,
  11071. 13067, 0, 13068, {f: 6, c: 13070}, 0, 13079, 0, 13081, 0, {f: 4, c: 13082},
  11072. {f: 3, c: 13087}, 13092, 0, 13093, 0, 0, {f: 2, c: 13096}, 0, 13101, 0, 0,
  11073. {f: 3, c: 13102}, 13106, 0, 0, {f: 2, c: 13108}, 13116, {s: 3}, 13111, 0,
  11074. 13112, 13114, 13117, 13121, {f: 3, c: 13118}, {f: 4, c: 13123}, 13128,
  11075. {f: 2, c: 13131}, {f: 2, c: 13135}, 0, 0, 13138, 13140, 0, 0, 13139,
  11076. {f: 2, c: 13141}, {s: 132}, 8501, 976, 8714, 8463, 0, 981, 987, 977, 0,
  11077. {f: 2, c: 9832}, 9836, {s: 5}, 12347, 0, {f: 3, c: 12339}, 8252, 8265,
  11078. {s: 5}, 8723, 0, 8771, {f: 2, c: 8818}, {s: 6}, {f: 2, c: 12312},
  11079. {f: 2, c: 65375}, {s: 10}, 9115, {f: 2, c: 9117}, 9120, {s: 4}, 9121,
  11080. {f: 2, c: 9123}, 9126, {s: 12}, [9116, 9119, 9122, 9125, 9130], {s: 8},
  11081. 9986, 0, 0, 12349, 0, 12447, 0, 0, 8709, 8864, 8854, 8856, 8853, 8855,
  11082. {s: 4}, 9664, 9654, {s: 4}, 8656, 8596, {f: 2, c: 8600}, {f: 2, c: 8598},
  11083. 8652, 8651, {s: 10}, 12336, 8967, {s: 8}, 10048, 10047, {s: 7}, 9643, 0,
  11084. 9642, 0, 10010, {s: 12}, 9702, {s: 4}, 10070, {s: 379}, {f: 2, c: 65093},
  11085. {s: 679}, 64103, 64098, 32227, [12232, 40643], 28331, 64082, 64061, 64069,
  11086. 64062, 27114, 28212, 64096, 64071, 64056, 64066, 64078, 34395, 64105,
  11087. 64052, 64099, 25581, 25802, 30799, 64084, 63856, 64077, 64097, 64072,
  11088. 64076, {f: 2, c: 64091}, 64081, 64067, 64090, 28041, 29376, 0, 194885,
  11089. 64086, 64080, 64049, 64059, 24034, 64063, 64101, 21373, 64055, 64095,
  11090. 24501, 64064, 0, 64083, 0, 64085, 64104, 64068, 64089, 26202, 64053, 64075,
  11091. 64100, 64065, 64048, 0, 64057, 64051, 27493, 64058, 27599, 64050, 25150,
  11092. 64079, 63773, 63964, 63798, 28122, 63952, 26310, 27511, 64087, 37706, 0,
  11093. 37636, {s: 120}, 133390, {s: 120}, 35999, 11991, [11965, 158033], {s: 5},
  11094. 37555, 38321, 0, 0, 194812, {s: 13}, 194965, {s: 8}, 194794, 0, 26478,
  11095. 11974, 0, 194594, {s: 13}, 13314, 0, 0, 26083, {s: 4}, 134071, {s: 10},
  11096. 171339, 0, 194611, 24378, {s: 8}, 11945, 0, 20465, {s: 7}, 63753, {s: 7},
  11097. 11964, 0, 0, 194732, 26435, {s: 3}, 133732, 35329, 25142, 0, 0, 21555,
  11098. 23067, {s: 3}, 25221, 0, 0, 194819, {s: 6}, 21567, {s: 9}, 27506, {s: 4},
  11099. 29986, 19256, 0, 0, 24063, {s: 6}, 194827, 29626, 134047, {s: 3}, 194600,
  11100. 0, 194849, {s: 5}, 194623, {s: 16}, 194675, {f: 2, c: 11916}, 23577,
  11101. {s: 3}, 131083, 23426, 194642, {s: 5}, 11997, [11999, 39136],
  11102. [11998, 169599], 14221, 0, [11927, 14586], 0, 194887, 0, [11909, 20155],
  11103. 131490, {s: 7}, 13599, 0, 194738, 0, 0, [11971, 35200], {s: 4}, 31237,
  11104. {s: 4}, 35498, 0, 32085, 0, 28568, {s: 7}, 25591, 30246, {s: 4},
  11105. [11978, 163767], {s: 5}, 146686, {s: 5}, 13351, 0, 0, 33067, 0, 0, 194842,
  11106. {s: 5}, 11950, {s: 5}, 194714, {s: 3}, 194831, {s: 19}, 22305, 135741,
  11107. 194586, 0, 64003, {s: 7}, 21534, 15240, 20839, {s: 4}, 63839, {s: 9},
  11108. 20023, {s: 13}, [11946, 150804], 24421, 23020, 194658, 0, 24217, {s: 46},
  11109. 13416, {s: 8}, 21200, {s: 9}, 26625, 0, 195024, 195039, {s: 5}, 153215, 0,
  11110. 0, 11959, {s: 4}, 36534, 63775, {s: 3}, 63875, {s: 5}, 31867, 63906, 0,
  11111. 63898, 0, [11961, 32770], 157360, {s: 4}, [11911, 132648], 0, 0, 131210,
  11112. 194604, [11915, 13630], {s: 4}, 21589, 0, 22841, 0, 0, 23414, 194669,
  11113. 23572, 14306, 23782, 0, 20040, 0, 0, 194742, {s: 4}, 158105, 25371, 0, 0,
  11114. 26211, 0, 194779, 0, 0, 27126, 27014, {s: 3}, 27596, 0, 28183, 0, 0, 27818,
  11115. {s: 3}, [11942, 20012], 0, 0, 29935, 30069, 30188, 30286, 16305, 30570,
  11116. 30633, {s: 6}, 31571, 0, 0, 16996, {s: 3}, 194924, 0, 0, 32328, {s: 5},
  11117. 11955, {s: 4}, 33089, 17491, 0, [11966, 33401], [11967, 64094],
  11118. [11968, 64093], 0, 20857, 33626, {s: 3}, 17701, 0, 34292, 131248, {s: 4},
  11119. 34429, 0, 13358, 35014, {s: 6}, 18406, {s: 8}, 36808, {s: 19}, 166279, 0,
  11120. 0, 167447, 0, 0, 38969, {s: 6}, 39432, {s: 4}, 39903, {s: 10}, 148206,
  11121. {s: 5}, 21385, 0, 64017, 194785, 0, 146622, 132625, 0, {f: 2, c: 19972},
  11122. 19999, 20011, {f: 2, c: 20015}, {f: 2, c: 20032}, 20036, [11907, 20058],
  11123. 20095, 20109, 20118, 20153, 20176, 20192, 20221, 20223, 20235, 20245,
  11124. 20320, 20283, 20297, 20308, 20346, {f: 2, c: 20349}, 20375, 20414, 20431,
  11125. 20477, {f: 2, c: 20480}, 20496, 20507, 20519, 20526, 20567, 20582, 20586,
  11126. 20539, 20623, 20630, 20636, 20684, 20710, 20713, 20719, 20744, 20747,
  11127. 20752, 20763, 20766, 20831, 20897, 20924, 0, 20974, 20980, 20993,
  11128. [11913, 20994], 21011, 21065, 21089, 21094, 21139, 21192, 21232,
  11129. {f: 2, c: 21258}, 21310, 21324, 21323, 21345, 21356, 21419, 21466, 21478,
  11130. 21493, 21543, 21581, 21606, 21611, 21620, 21645, 21654, 21665, 21677,
  11131. 21689, 21695, 21702, 21709, 21774, 21803, 21813, 21834, 21856, 0, 21896,
  11132. 21902, 22024, {f: 2, c: 22030}, 22071, 22079, 22089, 22091, 22095, 22118,
  11133. 22121, 22127, {f: 2, c: 22129}, 22165, 22170, {f: 2, c: 22188}, 22193,
  11134. 22217, 22237, 22244, 22282, 22293, 22307, 22319, {f: 2, c: 22323}, 22348,
  11135. 22384, 22412, 22428, 22456, 22502, 22509, {f: 2, c: 22517}, 22527, 22537,
  11136. 22560, 22578, 22652, 22656, 22697, 22734, 22736, 22740, 22746, 22761,
  11137. 22796, 22820, 22831, 22881, 22893, 22986, 22994, 23005, {f: 2, c: 23011},
  11138. 23044, 23052, 23075, 23111, 23125, 23139, 23149, 23166, 23198, 23207,
  11139. 23212, 23219, 23264, 23296, 23321, 23333, 23341, 23361, 23420,
  11140. {f: 2, c: 23422}, 23434, [11919, 23587], 23595, 23600, 23651, 23657, 23676,
  11141. 23755, 23762, 23796, 23844, 23846, 23875, 23878, 23882, 23954, 23956,
  11142. 23961, 23968, 24024, 24032, 24056, 24064, 24082, {f: 2, c: 24084}, 24088,
  11143. 24110, 24152, {f: 2, c: 24171}, 24232, 24234, {f: 2, c: 24254}, 0, 24274,
  11144. 24327, 24334, {f: 2, c: 24348}, 24354, 24360, 24374, 24379, 24384,
  11145. [12089, 24400], 24408, 24420, 24457, 24476, 24487, 24484, 24495, 24504,
  11146. [11926, 24516], 24521, 24545, 24553, 24557, 24572, 24599, 24602, 24627,
  11147. 24673, 24703, 24734, 24740, 24752, 24779, 24795, 24824, {f: 3, c: 24850},
  11148. 24860, 24956, 24973, 24991, 25000, 25026, 25055, 25109, 25129, 25155,
  11149. 25158, [11928, 25164], 25169, 25174, 25284, 25340, 25354, 25357, 25368,
  11150. 25401, {f: 2, c: 25410}, 25445, 25460, 25469, 25476, 25479, 25488, 25502,
  11151. 25553, 25564, 25609, 25616, 25634, 25684, 25691, 25709, 25723,
  11152. {f: 2, c: 25790}, 25829, 25847, 25851, 25860, 25878, 25881, 25927, 25959,
  11153. 25985, 25989, 26050, 26096, 26098, 26156, 26188, {f: 2, c: 26203}, 26209,
  11154. 26219, 0, 26276, 26312, 26348, 26373, 26387, 26419, 26440, 26444, 26486,
  11155. 26491, 26544, 26546, 26617, 26583, 26585, 26608, 26668, {f: 2, c: 26672},
  11156. 26715, 26738, 26741, 26746, 26756, 26789, 26802, 26832, 26838, 26856,
  11157. 26861, {f: 2, c: 26864}, 26876, 26897, 26899, 26933, 26939, 26967, 26979,
  11158. 26994, {f: 2, c: 27007}, 27046, 27053, 27063, {f: 2, c: 27094}, 27137,
  11159. 27151, 27157, 27176, 27188, 27198, 27205, {f: 2, c: 27216}, 27222, 27227,
  11160. 27267, 27273, 27281, {f: 3, c: 27293}, 27356, 27367, 27372, 27422, 27428,
  11161. 27445, 27462, 27478, 27488, 27522, 27582, 27617, 27633, 27664, 27699,
  11162. [11937, 27701], 11938, 27737, 27766, 27771, 27781, 27797, 27804, 27856,
  11163. 27860, 27862, 27872, {f: 2, c: 27883}, 27886, 27914, 27918, 27921, 27950,
  11164. 27991, 27998, 28005, 28034, 28095, 28100, 28106, 28118, 28137, 28194,
  11165. 28241, 28359, 28362, 28366, 28413, 28442, 28458, 28463, 28467, 28506,
  11166. 28510, 28514, 28541, 28555, 28557, 28562, 28564, 28570, {f: 2, c: 28583},
  11167. 28598, 28634, 28638, 0, 28729, 28732, 0, 28756, {f: 2, c: 28765}, 28772,
  11168. [11939, 28780], 28798, 28801, 28821, 28855, {f: 2, c: 28883}, 28888, 28892,
  11169. 28935, 28960, 28977, 29002, 29010, 29024, 29049, 29074, 0, 29131, 29139,
  11170. 29142, 29184, 29213, 29227, 29240, 29249, 29267, {f: 2, c: 29269}, 29276,
  11171. 29325, [11944, 29357], 29364, 29383, 29435, {f: 2, c: 29444}, 29480, 29489,
  11172. 29507, 29548, 29564, 29571, {f: 2, c: 29573}, 29589, {f: 3, c: 29598},
  11173. 29606, 29611, 29621, 29623, 29628, 29647, 29657, 29673, 29684, 29693,
  11174. 29700, 29706, {f: 2, c: 29722}, 29732, 29736, 29740, {f: 3, c: 29743},
  11175. 29753, 29764, 29767, 29771, 29773, 29777, 29783, 29798, 29803, 29809,
  11176. 29824, {f: 3, c: 29829}, 29840, 29848, 29852, 29856, 29859, 29864, 29867,
  11177. 29877, 29887, 29896, 29914, 29918, 30030, 30073, 30081, 30096,
  11178. [12135, 30098], 30099, 30132, 30180, 30201, 30208, 30218, {f: 2, c: 30229},
  11179. 30233, 30238, 30253, 30261, 30275, 30283, 30309, 30317, 30319, 30321,
  11180. 30324, {f: 2, c: 30372}, 30405, 30412, 30444, 30460, 30516, 30518, 30556,
  11181. {f: 2, c: 30559}, 30578, 30589, 30613, 30634, 30694, 30704, 30708, 30726,
  11182. 30754, {f: 2, c: 30765}, 30768, 30773, 30824, 30878, 30920, 30924, 30926,
  11183. 30948, {f: 2, c: 30944}, 30962, 30967, 30971, 31025, 0, [11949, 31035],
  11184. 31037, 31045, {f: 2, c: 31067}, 31115, 31126, 31128, [12145, 31160], 31163,
  11185. 31178, 31194, 31235, 31241, 31249, 31262, 31277, 31289, 31301, 31308,
  11186. 31325, 0, 31341, 31352, 31392, 31395, 31411, {f: 2, c: 31419}, 31430,
  11187. 31495, 31508, 31527, 31537, 31559, 31566, 31584, 31593, 31597, 31602,
  11188. 31633, 31663, 31703, 31705, 31755, 31759, 31776, 31782, 31793, 31798,
  11189. 31825, 31833, 31847, 31854, 31856, 31932, 31935, {f: 2, c: 31944}, 31959,
  11190. 31961, 31965, 31979, {f: 3, c: 32007}, 32019, 32029, 32035, 32065, 32083,
  11191. 32089, 32093, 32122, 32134, {f: 2, c: 32139}, 32204, 32235, 32241, 32249,
  11192. 32264, 32273, 32277, 32288, 32327, 32354, 32366, 32371, 32397, 32401,
  11193. 32408, 32580, 32591, [11947, 11954, 32594], [11953, 32595], 32609, 32657,
  11194. 32703, 32718, 32735, 32741, 32748, {f: 2, c: 32750}, 32762, 32782, 32785,
  11195. 32788, 32804, 32806, 32826, 32828, 32864, 32881, 32885, 32926, 32934,
  11196. 32939, {f: 2, c: 32983}, 33046, 33048, 33082, 33098, 33100, 33153, 33156,
  11197. 33204, 33231, 33273, 33283, 33313, 33330, 33332, 33350, 33355, 33359,
  11198. 33422, 33454, 33463, 33470, 33478, 33534, 33603, 33617, 33621, 33670,
  11199. 33677, 33682, 33688, 33705, {f: 2, c: 33727}, 33770, 33807, 33809, 33866,
  11200. 33910, 33960, 33967, 33984, 33986, 34032, 34045, 34060, 34100, 34142,
  11201. 34191, 34231, 34254, 34221, 34322, 34345, 34386, 34403, 34412, 34415,
  11202. 34426, 34445, 34449, 34456, {f: 2, c: 34471}, 34554, 34557, 34571, 34579,
  11203. 34585, 34590, 34600, 34622, 34673, 34696, 34713, {f: 2, c: 34732}, 34741,
  11204. 34774, 34795, 34797, 34817, 0, 34822, 34827, 34836, 34844, 34902, 34911,
  11205. [11970, 34916], 34968, 34986, {f: 2, c: 35005}, 35018, 35026, 35035,
  11206. {f: 2, c: 35056}, 35078, {f: 3, c: 35096}, 35111, 35120, 35134, 35195,
  11207. 35284, 35286, 35301, 35313, 35335, 35343, 35349, 35362, 35406, 35455,
  11208. 35572, 35615, 35639, {f: 2, c: 35651}, 35668, 35740, 35742, 35911, 35924,
  11209. 35955, 36004, 36057, 36065, 36088, 36094, 36123, 36201, 36204, 36228,
  11210. 36237, 36245, 36262, 36294, 36302, 36324, 36332, 36384, 36427, 36460,
  11211. 36464, 36474, 36498, 36526, 36531, 36561, 36564, 36601, 36631, 36662,
  11212. 36774, [12193, 36789], [11981, 36790], 0, 36832, 36836, 36854, 36866,
  11213. 36908, 36932, 37000, 37013, 37017, 37019, 37026, 37044, 37079, 37085,
  11214. 37108, 37143, 37148, 37169, 37178, 37181, 37192, 37211, 37217, 37220,
  11215. 37262, 37278, 37288, {f: 2, c: 37293}, 37298, 37308, 37360, 37367, 37371,
  11216. 37383, 37416, 37427, 37432, 37443, 37447, 37455, 37472, 37570,
  11217. {f: 2, c: 37579}, 37599, 37645, 37653, 37663, 37671, 37703, 37714, 0,
  11218. 37738, 37741, 37787, 37818, 37801, 37825, 37834, 37858, 37882, 37885,
  11219. 37903, 37940, 37951, 37973, 37995, 38002, [11986, 38264], 38310, 38313, 0,
  11220. 38324, 38333, 38362, [11983, 11990, 38429], 38465, 38488, 38532, 38564,
  11221. 38569, 38610, 195060, 38622, 38633, 38641, 38658, 38665, 38746, 38755,
  11222. 38766, 38771, 38810, 38818, {f: 2, c: 38837}, 38873, 38878, 38900, 38922,
  11223. 38926, 38942, 38947, 38955, 38974, {f: 2, c: 38994}, 39001, 39020, 39096,
  11224. 39098, 39103, 39112, 39141, {f: 2, c: 39218}, 39232, 39245, 39260, 39263,
  11225. 39345, {f: 2, c: 39353}, 39369, 39426, 39446, 39460, 39463,
  11226. {f: 2, c: 39469}, 39478, 39480, 39498, 39510, {f: 2, c: 39605}, 39673,
  11227. 39683, 39712, {f: 2, c: 39731}, 39795, 39801, 39847, 39873, 39879, 39895,
  11228. 39911, 39915, 39927, 39930, 39933, 39947, 39975, 39978, 39990, 40001,
  11229. 40019, 40035, 40048, 40055, 40194, 40258, 40263, 40291, 40297, 40316,
  11230. 40318, 40333, 40369, 40387, 40391, 40406, 40415, 40427, 40436, 40469,
  11231. 40477, 40612, 40616, 40620, 40679, 40686, 40720, 40722, 40727, 40729,
  11232. 40751, 40759, 40761, 40769, 40773, 40791, 40808, 40817, 40821, 40848,
  11233. 40852, 40866, 0, 13317, 194564, 22048, 24267, 11925, 0, 144954, 0, 28665,
  11234. 28390, 29107, [11940, 64073], {s: 4}, [11980, 64102], 0, 23986, 0, 20435,
  11235. 20697, 20720, 20931, 22134, 27220, 27905, 28112, 28226, 28377, 29668,
  11236. 29729, 30060, 30801, 34805, 144382, 29608, 15091, 13531, 17420, 16010, 0,
  11237. 0, 19432, 0, 16090, 15138, 0, 17786, 16531, 0, 18021, 16643, 17043, 18094,
  11238. 13448, 140809, {f: 3, c: 63584}, 63610, 63615, {s: 23}, {f: 2, c: 8836},
  11239. {f: 2, c: 8842}, 8713, 0, {f: 2, c: 8965}, {s: 9}, {f: 2, c: 8741},
  11240. {s: 14}, 8802, 0, 8773, 8776, {f: 2, c: 8822}, {s: 4}, 8487, {s: 209},
  11241. {f: 2, c: 8922}, 8533, 8984, {f: 2, c: 7742}, {f: 2, c: 504}, 470, 472,
  11242. 474, 476, 260, 728, 317, 346, 350, 356, 377, 379, 261, 731, 318, 347, 711,
  11243. 351, 357, 378, 733, 380, 340, 258, 313, 262, 268, 280, 270, 323, 327, 336,
  11244. 344, 368, 354, 341, 259, 314, 263, 269, 281, 271, 273, 324, 328, 337, 345,
  11245. 369, 355, 729, 264, 284, 292, 308, 348, 364, 265, 285, 293, 309, 349, 365,
  11246. 625, 651, 638, 620, 622, 633, 648, 598, 627, 637, 642, 656, 635, 621, 607,
  11247. 626, 669, 654, 609, 624, 641, 295, 661, 660, 614, 664, 450, 595, 599, 644,
  11248. 608, 403, 616, 649, 600, 604, 606, 592, 623, 650, 612, 594, 653, 613, 674,
  11249. 673, 597, 657, 634, 615, 865, 712, 716, 721, 8255, 783, {f: 5, c: 741}, 0,
  11250. 0, 805, 812, 825, 796, {f: 2, c: 799}, 829, 809, 815, 734, 804, 816, 828,
  11251. 820, {f: 2, c: 797}, {f: 2, c: 792}, 810, {f: 2, c: 826}, 794, {s: 3},
  11252. {f: 2, c: 610}, 618, 628, 630, 632, 640, 655, 665, 668, 671, 688, 690, 695,
  11253. 704, {f: 2, c: 736}, {s: 6}, 8862, {s: 287}, 12348, 12543, 0,
  11254. {f: 2, c: 12310}, 9838, 9835, {f: 2, c: 10548}, 10687, 0, 12448, 0,
  11255. {f: 2, c: 10746}, {s: 13}, 962, {f: 10, c: 9461}, {f: 2, c: 9750}, 9649,
  11256. {f: 10, c: 12784}, 0, {f: 6, c: 12794}, {f: 15, c: 9150}, 0, 0, 10003, 0,
  11257. 9251, 9166, {f: 4, c: 9680}, {f: 2, c: 8263}, 0, 8273, 8258,
  11258. {f: 16, c: 12688}, {s: 13}, {f: 2, c: 9136}, {f: 12, c: 9842},
  11259. {f: 2, c: 12441}, 8413, {s: 450}, 20296, 20319, 20330, 20332, 20494, 20504,
  11260. 20545, 20722, 20688, 20742, 20739, 20789, 20821, 20823, 13493, 20938,
  11261. 20962, 21079, 21196, 21206, 21243, 21276, 21347, 21405, 21522, 21631,
  11262. 21640, 21840, 21889, 21933, 21966, 22075, 22174, 22185, 22195, 22391,
  11263. 22396, 135963, 22479, 22500, 22628, 22665, 136302, 22738, 22752, 34369,
  11264. 22923, 22930, 22979, 23059, 23143, 23159, 23172, 23236, 137405, 23421,
  11265. 23443, 23570, 64060, 136884, 23674, 23695, 23711, 23715, 23722, 23760,
  11266. 138804, 23821, 23879, 23937, 23972, 23975, 24011, 24158, 24313, 24320,
  11267. 24322, 24355, 24381, 24404, 24445, 24589, 24596, 24600, 24629, 24647,
  11268. 24733, 24788, 24797, 24875, 25020, 25017, 25122, 25178, 25199, 25302,
  11269. 25468, 25573, 25721, 25796, 25808, 25897, 26013, 26170, 26146, 26155,
  11270. 26160, 26163, 26184, 143812, {f: 2, c: 26231}, 26253, 26299, 26331, 26344,
  11271. 26439, 26497, 26515, 26520, 26523, 26620, 26653, 26787, 26890, 26953,
  11272. 144836, 26946, 26980, 27045, 27087, 15286, 15299, 27113, 27125, 145215,
  11273. 27195, 145251, 27284, 27301, 15375, 27419, 27436, 27495, 27561, 27565,
  11274. 27607, 27647, 27653, 27764, 27800, 27899, 27846, 27953, 27961, 27967,
  11275. 27992, 28052, 28074, 28123, 28125, 28228, 28254, 28337, 28353, 28432,
  11276. 28505, 28513, 28542, 28556, 28576, 28604, 28615, 28618, 28656, 28750,
  11277. 28789, 28836, 28900, 28971, 28958, 28974, 29009, 29032, 29061, 29063,
  11278. 29114, 29124, 29205, 15935, 29339, 149489, 29479, 29520, 29542, 29602,
  11279. 29739, 29766, 29794, 29805, 29862, 29865, 29897, 29951, 29975, 16242,
  11280. 30158, 30210, 30216, 30308, 30337, 30365, 30378, 30390, 30414, 30420,
  11281. 30438, 30449, 30474, 30489, {f: 2, c: 30541}, 30586, 30592, 30612, 30688,
  11282. 152718, 30787, 30830, 30896, 152846, 30893, 30976, 31004, 31022, 31028,
  11283. 31046, 31097, 31176, 153457, 31188, 31198, 31211, 31213, 31365, 154052,
  11284. 31438, 31485, 31506, 31533, 31547, 31599, 31745, 31795, 155041, 31853,
  11285. 31865, 31887, 31892, 31904, 31957, 32049, 32092, 32131, 32166, 32194,
  11286. 32296, 32663, 32731, 32821, 32823, 32970, 32992, 33011, 33120,
  11287. {f: 2, c: 33127}, 33133, 33211, 33226, 33239, 17499, 33376, 33396, 158463,
  11288. 33441, {f: 2, c: 33443}, 33449, 33471, 33493, 33533, 33536, 33570, 33581,
  11289. 33594, 33607, 33661, 33703, 33743, 33745, 33761, 33793, 33798, 33887,
  11290. 33904, 33907, 33925, 33950, 33978, 159296, 34098, 34078, 34095, 34148,
  11291. 34170, 34188, 34210, 34251, 34285, 34303, {f: 2, c: 34308}, 34320, 159988,
  11292. 34328, 34360, 34391, 34402, 17821, 34421, 34488, 34556, 34695, 17898,
  11293. 34826, 34832, 35022, 161412, 35122, 35129, 35136, 35220, 35318, 35399,
  11294. 35421, 35425, 35445, 35536, 35654, 35673, 35689, 35741, 35913, 35944,
  11295. 36271, 36305, 36311, 36387, 36413, 36475, 164471, 18500, 36602, 36638,
  11296. 36653, 36692, 164813, 36840, 36846, 36872, 36909, 37015, 37043, 37054,
  11297. {f: 2, c: 37060}, 37063, 37103, 37140, 37142, {f: 2, c: 37154}, 37167,
  11298. 37172, 37251, 37361, 37705, {f: 2, c: 37732}, 37795, 37855, 37892, 37939,
  11299. 37962, 37987, 38001, 38286, 38303, 38316, 38326, 38347, 38352, 38355,
  11300. 18864, 38366, 38565, 38639, 38734, 38805, 38830, 38842, 38849, 38857,
  11301. 38875, 38998, 39143, 39256, 39427, 39617, 39619, 39630, 39638, 39682,
  11302. 39688, 19479, 39725, 39774, 39782, 39812, 39818, 39838, 39886, 39909,
  11303. 39928, 39971, {f: 2, c: 40015}, 40037, {f: 2, c: 40221}, 40259, 40274,
  11304. 40330, 40342, 40384, 40364, 40380, 172432, 40423, 40455, 40606, 40623,
  11305. 40855, 131209, 19970, 19983, 19986, 20009, 20014, 20039, 131234, 20049,
  11306. 13318, 131236, 20073, 20125, 13356, 20156, 20163, 20168, 20203, 20186,
  11307. 20209, 20213, 20246, 20324, 20279, 20286, 20312, 131603, {f: 2, c: 20343},
  11308. 20354, 20357, 20454, 20402, 20421, 20427, 20434, 13418, 20466, 20499,
  11309. 20508, 20558, 20563, 20579, 20643, 20616, {f: 2, c: 20626}, 20629, 20650,
  11310. 131883, 20657, {f: 2, c: 20666}, 20676, 20679, 20723, 131969, 20686,
  11311. 131953, 20692, 20705, 13458, 132089, 20759, 132170, 20832, 132361, 20851,
  11312. 20867, 20875, 13500, 20888, 20899, 20909, 13511, 132566, 20979, 21010,
  11313. 21014, 132943, 21077, 21084, 21100, 21111, 21124, 21122, 133127, 21144,
  11314. 133178, 21156, {f: 2, c: 21178}, 21194, 21201, 133305, 21239, 21301, 21314,
  11315. 133500, 133533, 21351, 21370, 21412, 21428, 133843, 21431, 21440, 133917,
  11316. {f: 2, c: 13661}, 21461, 13667, 21492, 21540, 21544, 13678, 21571, 21602,
  11317. 21612, 21653, 21664, 21670, 21678, 21687, 21690, 21699, 134469, 21740,
  11318. 21743, 21745, 21747, {f: 2, c: 21760}, 21769, 21820, 21825, 13734, 21831,
  11319. 13736, 21860, 134625, 21885, 21890, 21905, 13765, 21970, 134805, 134765,
  11320. 21951, 21961, 21964, 21969, 21981, 13786, 21986, 134756, 21993, 22056,
  11321. 135007, 22023, 22032, 22064, 13812, 22077, 22080, 22087, 22110, 22112,
  11322. 22125, 13829, 22152, 22156, 22173, 22184, 22194, 22213, 22221, 22239,
  11323. 22248, {f: 2, c: 22262}, 135681, 135765, 22313, 135803, {f: 2, c: 22341},
  11324. 22349, 135796, 22376, 22383, {f: 3, c: 22387}, 22395, 135908, 135895,
  11325. 22426, {f: 2, c: 22429}, 22440, 22487, 135933, 22476, 135990, 136004,
  11326. 22494, 22512, 13898, 22520, 22523, 22525, 22532, 22558, 22567, 22585,
  11327. 136132, 22601, 22604, 22631, {f: 2, c: 22666}, 22669, {f: 2, c: 22671},
  11328. 22676, 22685, 22698, 22705, 136301, 22723, 22733, 22754, {f: 2, c: 22771},
  11329. {f: 2, c: 22789}, 22797, 22804, 136663, 13969, 22845, 13977, 22854, 13974,
  11330. 158761, 22879, 136775, {f: 2, c: 22901}, 22908, 22943, 22958, 22972, 22984,
  11331. 22989, 23006, 23015, 23022, 136966, 137026, 14031, 23053, 23063, 23079,
  11332. 23085, 23141, 23162, 23179, 23196, {f: 2, c: 23199}, 23202, 23217, 23221,
  11333. 23226, 23231, 23258, 23260, 23269, 23280, 23278, 23285, 23304, 23319,
  11334. 23348, 23372, 23378, 23400, 23407, 23425, 23428, 137667, 23446, 23468,
  11335. {f: 2, c: 14177}, 23502, 23510, 14188, 14187, 23537, 23549, 14197, 23555,
  11336. 23593, 138326, 23647, {f: 2, c: 23655}, 23664, 138541, 138565, 138616,
  11337. 138594, 23688, 23690, 14273, 138657, 138652, 23712, 23714, 23719, 138642,
  11338. 23725, 23733, 138679, 23753, 138720, 138803, 23814, 23824, 23851, 23837,
  11339. 23840, 23857, 23865, 14312, 23905, 23914, 14324, 23920, 139038, 14333,
  11340. 23944, 14336, 23959, 23984, 23988, 139126, 24017, 24023, 139258, 24036,
  11341. 24041, 14383, 14390, 14400, 24095, 24126, 24137, 14428, 24150, 14433,
  11342. {f: 2, c: 24173}, 139643, 24229, 24236, 24249, 24262, 24281, 140062, 24317,
  11343. 24328, 140205, 24350, 24391, 24419, 24434, 24446, 24463, 24482, 24519,
  11344. 24523, {f: 3, c: 24530}, 24546, {f: 2, c: 24558}, 24563, 14615, 24610,
  11345. 24612, 14618, 24652, 24725, 24744, 141043, 24753, 24766, 24776, 24793,
  11346. 24814, 24821, 24848, 24857, 24862, 24890, 14703, 24897, 24902, 24928,
  11347. 141403, {f: 2, c: 24978}, 24983, 24997, 25005, 141483, 25045, 25053, 25077,
  11348. 141711, 25123, 25170, 25185, 25188, 25211, 25197, 25203, 25241, 25301,
  11349. 142008, 25341, 25347, 25360, {f: 2, c: 142159}, 25394, 25397,
  11350. {f: 2, c: 25403}, 25409, 25412, 25422, 142150, 25433, 142365, 142246,
  11351. 25452, 25497, 142372, 25492, 25533, {f: 2, c: 25556}, 25568,
  11352. {f: 2, c: 25579}, 25586, 25630, 25637, 25641, 25647, 25690, 25693, 25715,
  11353. 25725, 25735, 25745, 25759, {f: 2, c: 25803}, 25813, 25815, 142817, 25828,
  11354. 25855, 14958, 25871, 25876, 14963, 25886, 25906, 25924, 25940, 25963,
  11355. 25978, 25988, 25994, 26034, 26037, 26040, 26047, 26057, 26068, 15062,
  11356. 26105, 26108, 26116, 26120, 26145, 26154, 26181, 26193, 26190, 15082,
  11357. 143811, 143861, 143798, 26218, {f: 2, c: 26220}, 26235, 26240, 26256,
  11358. 26258, 15118, 26285, 26289, 26293, 15130, 15132, 15063, 26369, 26386,
  11359. 144242, 26393, 144339, 144338, 26445, 26452, 26461, 144336, 144356, 144341,
  11360. 26484, 144346, 26514, 144351, 33635, 26640, 26563, 26568, 26578, 26587,
  11361. 26615, 144458, 144465, 144459, 26648, 26655, 26669, 144485, 26675, 26683,
  11362. 26686, 26693, 26697, 26700, 26709, 26711, 15223, 26731, 26734, 26748,
  11363. 26754, 26768, 26774, 15213, {f: 3, c: 26776}, 26780, {f: 2, c: 26794},
  11364. 26804, 26811, 26875, 144612, 144730, 26819, 26821, 26828, 26841,
  11365. {f: 2, c: 26852}, 26860, 26871, 26883, 26887, 15239, 144788, 15245, 26950,
  11366. 26985, 26988, 27002, 27026, 15268, 27030, 27056, 27066, 27068, 27072,
  11367. 27089, 144953, 144967, 144952, 27107, {f: 2, c: 27118}, 27123, 15309,
  11368. 27124, 27134, 27153, 27162, 27165, 145180, {f: 2, c: 27186}, 27199, 27209,
  11369. 27258, 27214, 27218, 27236, 145164, 27275, 15344, 27297, 145252, 27307,
  11370. 27325, 27334, 27348, 27344, 27357, 145407, 145383, {f: 3, c: 27377}, 27389,
  11371. 145444, 27403, {f: 3, c: 27407}, 145469, 27415, 15398, 27439, 27466, 27480,
  11372. 27500, 27509, [11934, 27514], 27521, 27547, 27566, 146072, 27581,
  11373. {f: 3, c: 27591}, 27610, {f: 2, c: 27622}, 27630, 27650, 27658, 27662,
  11374. 27702, 146559, 27725, 27739, 27757, 27780, 27785, 15555, 27796, 27799,
  11375. 27821, 27842, 15570, 27868, 27881, 27885, 146688, 27904, 27940,
  11376. {f: 2, c: 27942}, 27751, 27951, 27964, 27995, 28000, 28016,
  11377. {f: 2, c: 28032}, 28042, 28045, 28049, 28056, 146752, 146938, 146937,
  11378. 146899, 28075, 28078, 28084, 28098, 27956, 28104, 28110, 28127, 28150,
  11379. 28214, 28190, 15633, 28210, {f: 2, c: 28232}, {f: 2, c: 28235}, 28239,
  11380. {f: 2, c: 28243}, 28247, 28259, 15646, 28307, 28327, 28340, 28355, 28469,
  11381. 28395, 28409, 28411, 28426, 28428, 28440, 28453, 28470, 28476, 147326,
  11382. 28498, 28503, 28512, 28520, 28560, 28566, 28606, 28575, 28581, 28591,
  11383. 15716, {f: 2, c: 28616}, 28649, 147606, 28668, 28672, 28682, 28707, 147715,
  11384. 28730, 28739, 28743, 28747, 15770, 28773, 28777, 28782, 28790, 28806,
  11385. 28823, 147910, 28831, 28849, 147966, 28908, 28874, 28881, 28931, 28934,
  11386. 28936, 28940, 15808, 28975, 29008, 29011, 29022, 15828, 29078, 29056,
  11387. 29083, 29088, 29090, {f: 2, c: 29102}, 148412, 29145, 29148, 29191, 15877,
  11388. 29236, 29241, 29250, 29271, 29283, 149033, {f: 2, c: 29294}, 29304, 29311,
  11389. 29326, 149157, 29358, 29360, 29377, 15968, 29388, 15974, 15976, 29427,
  11390. 29434, 29447, 29458, {f: 2, c: 29464}, 16003, 29497, 29484, 29491, 29501,
  11391. 29522, 16020, 29547, 149654, {f: 2, c: 29550}, 29553, 29569, 29578, 29588,
  11392. 29592, 29596, 29605, 29625, 29631, 29637, 29643, 29665, 29671, 29689,
  11393. 29715, 29690, 29697, 29779, 29760, 29763, 29778, 29789, 29825, 29832,
  11394. 150093, 29842, 29847, 29849, 29857, 29861, 29866, 29881, 29883, 29882,
  11395. 29910, 29912, 29931, 150358, 29946, 150383, 29984, 29988, 29994, 16215,
  11396. 150550, {f: 2, c: 30013}, 30016, 30024, 30032, 30034, 30066, 30065, 30074,
  11397. {f: 2, c: 30077}, 30092, 16245, 30114, 16247, 30128, 30135,
  11398. {f: 2, c: 30143}, 30150, 30159, 30163, 30173, {f: 2, c: 30175}, 30183,
  11399. 30190, 30193, 30211, 30232, 30215, 30223, 16302, 151054, 30227,
  11400. {f: 2, c: 30235}, 151095, 30245, 30248, 30268, 30259, 151146, 16329, 30273,
  11401. 151179, 30281, 30293, 16343, 30318, 30357, 30369, 30368, {f: 2, c: 30375},
  11402. 30383, 151626, 30409, 151637, 30440, 151842, 30487, 30490, 30509, 30517,
  11403. 151977, 16441, 152037, 152013, 30552, 152094, 30588, 152140, 16472, 30618,
  11404. 30623, 30626, 30628, {f: 2, c: 30686}, 30692, 30698, 30700, 30715, 152622,
  11405. 30725, 30729, 30733, 30745, 30764, 30791, 30826, 152793, 30858, 30868,
  11406. 30884, 30877, 30879, 30907, 30933, 30950, {f: 2, c: 30969}, 30974, 152999,
  11407. 30992, 31003, 31013, 31050, 31064, 16645, 31079, 31090, 31125, 31137,
  11408. 31145, 31156, 31170, 31175, {f: 2, c: 31180}, 31190, 16712, 153513, 153524,
  11409. 16719, 31242, 31253, 31259, 16739, 31288, 31303, 31318, 31321, 31324,
  11410. 31327, 31335, 31338, 31349, 31362, 31370, 31376, 31404, 154068, 16820,
  11411. 31417, 31422, 16831, 31436, 31464, 31476, 154340, 154339, 154353, 31549,
  11412. 31530, {f: 2, c: 31534}, 16870, 16883, 31615, 31553, 16878, 31573, 31609,
  11413. 31588, 31590, 31603, 154546, 16903, 31632, 31643, 16910, 31669, 31676,
  11414. 31685, 31690, 154699, 154724, 31700, 31702, 31706, 31722, 31728, 31747,
  11415. 31758, 31813, 31818, 31831, 31838, 31841, 31849, 31855, 155182, 155222,
  11416. 155237, 31910, 155234, {f: 2, c: 31926}, 155352, 31940, 155330, 31949,
  11417. 155368, 155427, 31974, 155484, 31989, 32003, 17094, 32018, 32030, 155616,
  11418. 155604, {f: 2, c: 32061}, 32064, 32071, 155660, 155643, 17110, 32090,
  11419. 32106, 32112, 17117, 32127, 155671, 32136, 32151, 155744, 32157, 32167,
  11420. 32170, 32182, 32192, 32215, 32217, 32230, 17154, 155885, 64088, 32272,
  11421. 32279, 32285, 32295, 32300, 32325, 32373, 32382, {f: 2, c: 32390}, 17195,
  11422. 32410, 17219, 32572, 32571, 32574, 32579, 13505, 156272, 156294,
  11423. {f: 2, c: 32611}, 32621, {f: 2, c: 32637}, 32656, 20859, 146702, 32662,
  11424. 32668, 32685, 156674, 32707, 32719, 32739, 32754, 32778, 32776, 32790,
  11425. 32812, 32816, 32835, 32870, 32891, 32921, 32924, 32932, 32935, 32952,
  11426. 157310, 32965, 32981, 32998, 33037, 33013, 33019, 17390, 33077, 33054,
  11427. 17392, 33060, 33063, 33068, 157469, 33085, 17416, 33129, 17431, 17436,
  11428. 33157, 17442, 33176, 33202, 33217, 33219, 33238, 33243, 157917, 33252,
  11429. 157930, 33260, 33277, 33279, 158063, 33284, 158173, 33305, 33314, 158238,
  11430. 33340, 33353, 33349, 158296, 17526, 17530, 33367, 158348, 33372, 33379,
  11431. 158391, 17553, 33405, 33407, 33411, 33418, 33427, {f: 2, c: 33447}, 33458,
  11432. 33460, 33466, 33468, 33506, 33512, 33527, {f: 2, c: 33543}, 33548, 33620,
  11433. 33563, 33565, 33584, 33596, 33604, 33623, 17598, 17620, 17587,
  11434. {f: 2, c: 33684}, 33691, 33693, 33737, 33744, 33748, 33757, 33765, 33785,
  11435. 33813, 158835, 33815, 33849, 33871, {f: 2, c: 33873}, {f: 2, c: 33881},
  11436. 33884, 158941, 33893, 33912, 33916, 33921, 17677, 33943, 33958, 33982,
  11437. 17672, {f: 2, c: 33998}, 34003, 159333, 34023, 34026, 34031, 34033, 34042,
  11438. 34075, {f: 2, c: 34084}, 34091, 34127, 34159, 17731, 34129,
  11439. {f: 2, c: 34145}, 159636, 34171, 34173, 34175, 34177, 34182, 34195, 34205,
  11440. 34207, 159736, {f: 2, c: 159734}, 34236, 34247, 34250, {f: 2, c: 34264},
  11441. 34271, 34273, 34278, 34294, 34304, 34321, 34334, 34337, 34340, 34343,
  11442. 160013, 34361, 34364, 160057, 34368, 34387, 34390, 34423, 34439, 34441,
  11443. {f: 2, c: 34460}, 34481, 34483, 34497, 34499, 34513, 34517, 34519, 34531,
  11444. 34534, 17848, 34565, 34567, 34574, 34576, 34591, 34593, 34595, 34609,
  11445. 34618, 34624, 34627, 34641, 34648, {f: 2, c: 34660}, 34674, 34684, 160731,
  11446. 160730, 34727, 34697, 34699, 34707, 34720, 160766, 17893, 34750, 160784,
  11447. 34753, 34766, 34783, 160841, 34787, {f: 2, c: 34789}, 34794, 34835, 34856,
  11448. 34862, 34866, 34876, 17935, 34890, 34904, 161301, 161300, 34921, 161329,
  11449. 34927, 34976, 35004, 35008, 161427, 35025, 35027, 17985, 35073, 161550,
  11450. 35127, 161571, 35138, 35141, 35145, 161618, 35170, 35209, 35216, 35231,
  11451. 35248, 35255, 35288, 35307, 18081, 35315, 35325, 35327, 18095, 35345,
  11452. 35348, 162181, 35361, 35381, 35390, 35397, 35405, 35416, 35502, 35472,
  11453. 35511, 35543, 35580, 162436, 35594, 35589, 35597, 35612, 35629, 18188,
  11454. 35665, 35678, 35702, 35713, 35723, {f: 2, c: 35732}, 35897, 162739, 35901,
  11455. 162750, 162759, 35909, 35919, 35927, 35945, 35949, 163000, 35987, 35986,
  11456. 35993, 18276, 35995, 36054, 36053, 163232, 36081, 163344, 36105, 36110,
  11457. 36296, 36313, 36364, 18429, 36349, 36358, 163978, 36372, 36374,
  11458. {f: 2, c: 36385}, 36391, 164027, 18454, 36406, 36409, 36436, 36450, 36461,
  11459. 36463, 36504, 36510, 36533, 36539, 164482, 18510, 164595, 36608, 36616,
  11460. 36651, 36672, 36682, 36696, 164876, 36772, 36788, 164949, 36801, 36806,
  11461. 64036, 36810, 36813, 36819, 36821, 36849, 36853, 36859, 36876, 36919,
  11462. 165227, 36931, 36957, {f: 2, c: 165320}, 36997, 37004, 37008, 37025, 18613,
  11463. 37040, 37046, 37059, 37064, 165591, 37084, 37087, 165626, 37110, 37106,
  11464. 37120, 37099, {f: 2, c: 37118}, 37124, 37126, 37144, 37150, 37175, 37177,
  11465. {f: 2, c: 37190}, 37207, 37209, 37236, 37241, 37253, 37299, 37302,
  11466. {f: 2, c: 37315}, 166217, 166214, 37356, 37377, {f: 2, c: 37398}, 166251,
  11467. 37442, 37450, 37462, 37473, 37477, 37480, 166280, {f: 2, c: 37500}, 37503,
  11468. 37513, 37517, 37527, 37529, 37535, 37547, {f: 2, c: 166330}, 37554,
  11469. {f: 2, c: 37567}, 37574, 37582, 37605, 37649, 166430, 166441, 37623, 37673,
  11470. 166513, 166467, 37713, 37722, 37739, 37745, 37747, 37793, 166553, 166605,
  11471. 37768, 37771, 37775, 37790, 37877, 166628, 166621, 37873, 37831, 37852,
  11472. 37863, 37897, {f: 2, c: 37910}, 37883, 37938, 37947, 166849, 166895, 37997,
  11473. 37999, 38265, 38278, {f: 2, c: 38284}, 167184, 167281, 38344, 167419,
  11474. 167455, 38444, {f: 2, c: 38451}, 167478, 38460, 38497, 167561, 38530,
  11475. 167659, 38554, 167730, 18919, 38579, 38586, 38589, 18938, 167928, 38616,
  11476. 38618, 38621, 18948, 38676, 38691, 18985, 38710, 38721, 38727, 38743,
  11477. 38747, 38762, 168608, 168625, 38806, 38814, {f: 2, c: 38833}, 38846, 38860,
  11478. 38865, 38868, 38872, 38881, 38897, 38916, 38925, 38932, 38934, 19132,
  11479. 169104, {f: 2, c: 38962}, 38949, 38983, 39014, 39083, 39085, 39088, 169423,
  11480. 39095, {f: 2, c: 39099}, 39106, 39111, 39115, 39137, 39139, 39146,
  11481. {f: 2, c: 39152}, 39155, 39176, 19259, 169712, {f: 2, c: 39190}, 169753,
  11482. {f: 3, c: 39194}, 169808, 39217, {f: 3, c: 39226}, 39233, 39238, 39246,
  11483. 39264, 39331, 39334, 39357, 39359, 39363, 39380, 39385, 39390, 170182,
  11484. 39408, 39417, 39420, 39434, 39441, 39450, 39456, 39473, 39492, 39500,
  11485. 39512, 19394, 39599, 19402, 39607, 19410, 39609, 170610, 39622, 39632,
  11486. 39634, 39637, 39648, 39653, 39657, 39692, 39696, 39698, 39702, 39708,
  11487. 39723, 39741, 19488, 39755, 39779, 39781, {f: 2, c: 39787},
  11488. {f: 2, c: 39798}, 39846, 39852, 171483, 39858, 39864, 39870, 39923, 39896,
  11489. 39901, 39914, 39919, 39918, 171541, 171658, 171593, 39958,
  11490. {f: 3, c: 39960}, 39965, 39970, 39977, 171716, 39985, 39991, 40005, 40028,
  11491. 171753, {f: 2, c: 40009}, 171739, 40020, 40024, 40027, 40029, 40031,
  11492. {f: 3, c: 40041}, {f: 2, c: 40045}, 40050, 40053, 40058, 40166, 40178,
  11493. 40203, [171982, 171991], 40209, {f: 2, c: 40215}, 172079, 19652, 172058,
  11494. 40242, 19665, 40266, 40287, 40290, 172281, 172162, 40307, {f: 2, c: 40310},
  11495. 40324, 40345, 40353, 40383, 40373, 40377, 40381, 40393, 40410, 40416,
  11496. 40419, 19719, 40458, 40450, 40461, 40476, 40571, 139800, 40576, 40581,
  11497. 40603, 172940, 40637, 173111, 40671, 40703, 40706, 19831, 40707, 40762,
  11498. 40765, 40774, 40787, 40789, 40792, 173553, 40797, 173570, 40809, 40813,
  11499. 40816, 173746, 11948, 13844, 14509, 15820, 16348, 17854, 17936, 19326,
  11500. 19512, 19681, 19980, {f: 2, c: 20003}, 20089, 20211, 20236, 20249, 20267,
  11501. 20270, 20273, 20356, 20382, 20407, 20484, 20492, 20556, 20575, 20578,
  11502. 20599, 20622, 20638, 20642, 20675, 20712, 20721, 20734, 20743,
  11503. {f: 3, c: 20748}, 20787, 20792, 20852, 20868, 20920, 20922, 20936, 20943,
  11504. 20945, {f: 2, c: 20947}, 20952, 20959, 20997, 21030, 21032, 21035,
  11505. {f: 2, c: 21041}, 21045, 21052, 21082, 21088, 21102, {f: 2, c: 21112},
  11506. 21130, 21132, 21217, 21225, 21233, 21251, 21265, 21279, 21293, 21298,
  11507. 21309, 21349, 21357, 21369, 21374, 21396, 21401, 21418, 21423, 21434,
  11508. 21441, {f: 2, c: 21444}, 21472, 21523, 21546, 21553, {f: 2, c: 21556},
  11509. 21580, 21671, 21674, 21681, 21691, 21710, 21738, 21756, 21765, 21768,
  11510. 21781, 21799, 21802, 21814, 21841, 21862, 21903, 21906, 21908, 21924,
  11511. 21938, 21955, 21958, 21971, 21979, 21996, 21998, 22001, 22006, 22008,
  11512. 22021, 22029, {f: 2, c: 22033}, 22060, 22069, 22073, 22093, 22100, 22149,
  11513. 22175, 22182, 22199, 22220, 22223, 22233, 22241, 22251, 22253, 22257,
  11514. 22279, 22284, {f: 2, c: 22298}, 22301, 22316, 22318, {f: 2, c: 22333},
  11515. 22367, 22379, 22381, 22394, 22403, 22423, 22446, 22485, 22503, 22541,
  11516. 22566, 22605, 22607, 22623, 22637, 22655, 22657, 22680, 22716, 22815,
  11517. 22819, 22873, 22905, 22935, 22959, 22963, 23007, 23025, 23032, 23218,
  11518. 23224, 23274, 23286, 23323, 23325, 23329, 23352, 23479, 23511, 23520,
  11519. 23583, 23594, 23596, 23606, 23641, 23644, 23661, 23773, 23809, 23860,
  11520. 23869, 23897, 23934, 23939, 24007, 24057, 24104, 24114, 24117, 24155,
  11521. 24168, 24170, 24183, 24192, 24203, 24243, 24253, 24273, {f: 2, c: 24276},
  11522. 24397, 24492, 24554, 24583, 24649, 24660, 24679, 24763, 24772, 24829,
  11523. 24842, 24854, 24874, 24886, 24926, 24932, 24955, 24957, 24959, 24989,
  11524. 25016, 25052, 25058, 25061, 25064, 25092, 25095, 25137, 25145, 25149,
  11525. 25210, 25232, 25256, 25306, 25332, 25366, 25386, 25398, 25414, 25419,
  11526. 25427, 25457, 25461, 25471, 25474, 25482, {f: 2, c: 25518}, 25578,
  11527. {f: 2, c: 25592}, 25618, 25624, 25632, 25636, 25642, 25653, 25661, 25663,
  11528. 25682, 25695, 25716, 25744, {f: 2, c: 25752}, 25772, 25779, 25837, 25840,
  11529. 25883, 25887, 25902, 25929, 25952, 26002, 26005, 26036, 26046, 26056,
  11530. 26062, 26064, 26079, 26238, {f: 2, c: 26251}, 26291, 26304, 26319, 26405,
  11531. 26421, 26453, 26496, 26511, 26513, 26532, 26545, 26549, 26558, 26664,
  11532. 26758, 26859, 26869, 26903, 26931, 26936, 26971, 26981, 27048, 27051,
  11533. 27055, 27109, 27121, 27210, 27221, 27239, 27249, 27311, {f: 2, c: 27336},
  11534. 27395, 27451, 27455, {f: 2, c: 27517}, 27568, 27639, 27641, 27652, 27657,
  11535. 27661, 27692, 27722, 27730, 27732, 27769, 27820, 27828, 27858, 28001,
  11536. 28028, 28089, 28144, 28229, 28275, 28283, 28285, 28297, 28348,
  11537. {f: 2, c: 28378}, 28454, 28457, 28464, 28551, 28573, 28590, 28599, 28685,
  11538. 28704, 28745, 28824, 28848, {f: 2, c: 28885}, 28997, 29106, 29172, 29207,
  11539. 29215, 29251, {f: 2, c: 29263}, 29274, 29280, 29288, 29303, 29316, 29385,
  11540. 29413, 29428, 29442, 29451, 29470, 29474, {f: 2, c: 29498}, 29517, 29528,
  11541. 29543, 29810, 29871, 29919, 29924, 29940, 29947, 29974, 29985, 30015,
  11542. 30046, 30105, 30116, 30145, 30148, 30156, 30167, 30172, 30177, 30191,
  11543. 30212, 30220, 30237, 30258, 30264, 30277, 30282, 30303, 30381, 30397,
  11544. 30425, 30443, 30448, 30457, 30464, 30478, 30498, 30504, 30511, 30521,
  11545. 30526, 30533, 30538, 30543, 30558, 30564, 30567, 30572, 30596,
  11546. {f: 2, c: 30604}, 30614, 30631, 30639, 30647, 30654, 30665, 30673, 30681,
  11547. 30705, 30775, 30812, 30846, 30872, 30881, 30897, 30899, 30921, 30931,
  11548. 30988, 31007, {f: 2, c: 31015}, 31039, 31042, 31060, 31083, 31100, 31147,
  11549. 31172, 31210, 31234, 31244, 31280, 31290, 31300, 31360, 31366, 31380,
  11550. 31413, 31421, 31486, 31531, 31607, 31648, 31660, 31664, 31720, 31730,
  11551. 31736, 31740, 31742, 31753, 31784, 31791, 31810, {f: 2, c: 31826},
  11552. {f: 3, c: 31835}, 31858, 31869, 31879, 31902, 31930, 31943, 31955, 31962,
  11553. 32060, 32077, 32130, 32133, 32141, 32145, 32158, 32179, 32185, 32208,
  11554. 32229, {f: 2, c: 32245}, 32303, 32310, 32324, 32367, 32376, 32385, 32573,
  11555. 32603, 32605, 32613, 32625, {f: 2, c: 32639}, 32651, 32674,
  11556. {f: 3, c: 32765}, 32775, 32781, 32798, 32825, 32904, 32910, 32975, 32980,
  11557. 33005, 33008, 33015, 33018, 33022, 33027, 33047, 33072, 33111, 33135,
  11558. 33139, 33163, 33168, 33179, 33182, 33227, 33237, {f: 2, c: 33245}, 33249,
  11559. 33263, 33270, 33280, 33291, {f: 2, c: 33299}, 33306, 33338, 33348, 33389,
  11560. 33412, 33417, 33425, 33450, 33456, 33488, 33514, 33519, 33526, 33622,
  11561. 33656, 33784, 33788, 33880, 33939, 33969, 33981, 34043, 34118, 34134,
  11562. 34141, 34181, 34200, 34370, 34374, 34496, 34580, 34594, 34606, 34617,
  11563. 34653, 34683, 34700, 34702, {f: 2, c: 34711}, 34718, 34723, 34734, 34751,
  11564. 34761, 34778, 34840, 34843, 34861, 34874, 34885, 34891, 34894, 34901,
  11565. 34906, 34926, {f: 3, c: 34970}, 35021, 35040, 35055, {f: 2, c: 35086},
  11566. 35110, 35125, 35162, 35164, 35179, 35184, 35196, 35237, 35253, 35260,
  11567. 35285, 35401, 35415, 35431, 35454, 35462, 35478, 35510, 35529, 35537,
  11568. 35549, 35564, 35573, 35590, 35599, 35601, 35653, 35666, 35693, 35704,
  11569. 35708, 35710, 35717, 35743, 35915, 35923, 35963, 36026, 36037, 36041,
  11570. 36050, 36076, 36085, 36087, 36097, 36099, 36119, 36124, 36206, 36241,
  11571. 36255, 36267, 36274, 36309, 36327, {f: 2, c: 36337}, 36340, 36353, 36363,
  11572. 36390, 36401, {f: 2, c: 36416}, 36429, 36431, 36444, 36449, 36457, 36465,
  11573. 36469, 36471, 36489, 36496, 36501, 36506, 36519, 36521, 36525, 36584,
  11574. 36592, 36615, 36632, 36645, 36647, 36652, 36661, 36666, 36675, 36679,
  11575. 36689, 36693, {f: 3, c: 36768}, 36773, 36868, 36891, 36911, 36940, 36955,
  11576. 36976, 36980, 36985, 37003, 37016, 37024, 37042, 37053, 37065, 37104,
  11577. 37125, 37157, 37210, 37223, 37242, 37258, 37265, 37269, 37296, 37307,
  11578. 37309, 37314, 37317, 37376, 37385, 37411, 37494, 37518, 37551,
  11579. {f: 2, c: 37563}, 37569, 37571, 37573, 37576, 37652, 37683, 37686, 37720,
  11580. 37759, 37762, 37770, 37819, 37836, 37862, 37881, 37890, {f: 2, c: 37901},
  11581. 37934, 37964, 38280, 38305, 38335, 38342, 38345, {f: 2, c: 38353}, 38368,
  11582. 38372, 38374, 38436, 38449, 38456, 38461, 38484, 38516, 38523, 38527,
  11583. 38529, 38531, 38537, 38550, 38574, 38659, 38683, {f: 2, c: 38689}, 38696,
  11584. 38705, 38759, 38774, 38781, 38783, 38809, 38815, 38828, 38841, 38861,
  11585. 38880, 38895, 38919, 38950, 38958, {f: 2, c: 39010}, 39092, 39109, 39170,
  11586. 39185, 39189, 39221, 39240, 39252, 39262, 39393, 39436, 39440, 39459,
  11587. 39489, 39505, {f: 2, c: 39613}, 39681, 39689, 39691, {f: 2, c: 39693},
  11588. 39705, 39733, 39752, 39765, 39784, 39808, 39814, 39824, 39837, 39856,
  11589. 39871, 39880, 39935, 39938, 39964, 39989, 40004, 40022, 40033, 40040,
  11590. 40240, 40253, 40298, 40315, 40421, 40425, 40435, 40570, {f: 3, c: 40578},
  11591. 40624, 40676, 40688, 40690, 40713, 40719, 40724, 40731, 40738, 40742,
  11592. {f: 2, c: 40746}, 40756, 40794, 40815, 40862, 40869, 131317, 151044,
  11593. 151538, 163187, 194581, 194630, 194713, 194726, 194789, 195038, 13790,
  11594. {s: 4}, 172722, 0, 0, 131416, {s: 4}, 132529, 0, 0, 132844, {s: 6}, 134488,
  11595. {s: 21}, 154060, {s: 9}, 14756, 14776, 142914, 0, 0, 14940, 0, 0, 143339,
  11596. 0, 0, 162228, 0, 15044, 15051, {s: 5}, 14981, {s: 8}, 15347, 27384, {s: 5},
  11597. 15665, {s: 9}, 147531, 0, 15936, 14497, {s: 34}, 158878, {s: 12}, 18207,
  11598. 162876, {s: 4}, 18462, {s: 71}, 39709, 39724, 20482, 20958, 21255, 23532,
  11599. 63784, 26142, 63785, 28746, 64021, 21857, 27706, 31328, 156492, 34819,
  11600. 38315, 38741, 171581, 173594],
  11601. 'Adobe-Korea1': [{f: 95, c: 32}, 8361, 8208, 169, 0, 0, [12288, 12644],
  11602. {f: 2, c: 12289}, 12539, 8229, [8230, 8943], 168, 12291, {f: 2, c: 8211},
  11603. 8214, 65340, 65374, {f: 2, c: 8216}, {f: 2, c: 8220}, {f: 2, c: 12308},
  11604. {f: 10, c: 12296}, 177, 215, 247, 8800, {f: 2, c: 8804}, 8734, 8756, 176,
  11605. {f: 2, c: 8242}, 8451, 8491, {f: 2, c: 65504}, 65509, 9794, 9792, 8736,
  11606. 8869, 8978, 8706, 8711, 8801, 8786, 167, 8251, 9734, 9733, 9675, 9679,
  11607. 9678, 9671, 9670, 9633, 9632, 9651, 9650, 9661, 9660, 8594,
  11608. {f: 2, c: 8592}, {f: 2, c: 8595}, 12307, 171, 187, 8730, 8765, 8733, 8757,
  11609. {f: 2, c: 8747}, 8712, 8715, {f: 2, c: 8838}, {f: 2, c: 8834}, 8746, 8745,
  11610. {f: 2, c: 8743}, 65506, 8658, 8660, 8704, 8707, 180, 732, 711, 728, 733,
  11611. 730, 729, 184, 731, 161, 191, 8758, 8750, 8721, 8719, 164, 8457, 8240,
  11612. 9665, 9664, 9655, 9654, 9828, {f: 2, c: 9824}, 9829, 9831, 9827, 9673,
  11613. 9672, 9635, {f: 2, c: 9680}, 9618, {f: 2, c: 9636}, 9640, 9639, 9638, 9641,
  11614. 9832, 9743, 9742, 9756, 9758, 182, {f: 2, c: 8224}, 8597, 8599, 8601, 8598,
  11615. 8600, 9837, {f: 2, c: 9833}, 9836, 12927, 12828, 8470, 13255, 8482, 13250,
  11616. 13272, 8481, {f: 59, c: 65281}, 65510, {f: 33, c: 65341}, 65507,
  11617. {f: 51, c: 12593}, {f: 42, c: 12645}, {f: 10, c: 8560}, {f: 10, c: 8544},
  11618. {f: 17, c: 913}, {f: 7, c: 931}, {f: 17, c: 945}, {f: 7, c: 963}, 9472,
  11619. 9474, 9484, 9488, 9496, 9492, 9500, 9516, 9508, 9524, 9532, 9473, 9475,
  11620. 9487, 9491, 9499, 9495, 9507, 9523, 9515, 9531, 9547, 9504, 9519, 9512,
  11621. 9527, 9535, 9501, 9520, 9509, 9528, 9538, 9490, 9489, 9498, 9497, 9494,
  11622. 9493, 9486, 9485, {f: 2, c: 9502}, {f: 2, c: 9505}, {f: 2, c: 9510},
  11623. {f: 2, c: 9513}, {f: 2, c: 9517}, {f: 2, c: 9521}, {f: 2, c: 9525},
  11624. {f: 2, c: 9529}, {f: 2, c: 9533}, {f: 2, c: 9536}, {f: 8, c: 9539},
  11625. {f: 3, c: 13205}, 8467, 13208, 13252, {f: 4, c: 13219}, {f: 10, c: 13209},
  11626. 13258, {f: 3, c: 13197}, 13263, {f: 2, c: 13192}, 13256, {f: 2, c: 13223},
  11627. {f: 10, c: 13232}, {f: 5, c: 13184}, {f: 6, c: 13242}, {f: 5, c: 13200},
  11628. 8486, {f: 2, c: 13248}, {f: 3, c: 13194}, 13270, 13253, {f: 3, c: 13229},
  11629. 13275, {f: 4, c: 13225}, 13277, 13264, 13267, 13251, 13257, 13276, 13254,
  11630. 198, 208, 170, 294, 306, 319, 321, 216, 338, 186, 222, 358, 330,
  11631. {f: 28, c: 12896}, {f: 26, c: 9424}, {f: 15, c: 9312}, 189,
  11632. {f: 2, c: 8531}, 188, 190, {f: 4, c: 8539}, 230, 273, 240, 295, 305, 307,
  11633. 312, 320, 322, 248, 339, 223, 254, 359, 331, 329, {f: 28, c: 12800},
  11634. {f: 26, c: 9372}, {f: 15, c: 9332}, 185, {f: 2, c: 178}, 8308, 8319,
  11635. {f: 4, c: 8321}, {f: 83, c: 12353}, {f: 86, c: 12449}, {f: 6, c: 1040},
  11636. 1025, {f: 32, c: 1046}, 1105, {f: 26, c: 1078}, {f: 2, c: 44032}, 44036,
  11637. {f: 4, c: 44039}, {f: 8, c: 44048}, {f: 5, c: 44057}, 44064, 44068,
  11638. {f: 2, c: 44076}, {f: 3, c: 44079}, {f: 2, c: 44088}, 44092, 44096, 44107,
  11639. 44109, 44116, 44120, 44124, {f: 2, c: 44144}, 44148, {f: 2, c: 44151},
  11640. 44154, {f: 2, c: 44160}, {f: 4, c: 44163}, {f: 4, c: 44169}, 44176, 44180,
  11641. {f: 2, c: 44188}, {f: 3, c: 44191}, {f: 3, c: 44200}, 44204,
  11642. {f: 2, c: 44207}, {f: 2, c: 44216}, {f: 3, c: 44219}, 44225, 44228, 44232,
  11643. 44236, 44245, 44247, {f: 2, c: 44256}, 44260, {f: 2, c: 44263}, 44266,
  11644. 44268, {f: 3, c: 44271}, 44275, {f: 2, c: 44277}, {f: 2, c: 44284}, 44288,
  11645. 44292, 44294, {f: 2, c: 44300}, 44303, 44305, 44312, 44316, 44320, 44329,
  11646. {f: 2, c: 44332}, {f: 2, c: 44340}, 44344, 44348, {f: 2, c: 44356}, 44359,
  11647. 44361, 44368, 44372, 44376, 44385, 44387, {f: 2, c: 44396}, 44400,
  11648. {f: 4, c: 44403}, {f: 3, c: 44411}, 44415, {f: 2, c: 44417},
  11649. {f: 2, c: 44424}, 44428, 44432, {f: 2, c: 44444}, 44452, 44471,
  11650. {f: 2, c: 44480}, 44484, 44488, {f: 2, c: 44496}, 44499, 44508, 44512,
  11651. 44516, {f: 2, c: 44536}, 44540, {f: 3, c: 44543}, {f: 2, c: 44552}, 44555,
  11652. 44557, 44564, {f: 2, c: 44592}, 44596, {f: 2, c: 44599}, 44602,
  11653. {f: 2, c: 44608}, 44611, {f: 2, c: 44613}, 44618, {f: 3, c: 44620}, 44624,
  11654. 44628, 44630, {f: 2, c: 44636}, {f: 3, c: 44639}, 44645, {f: 2, c: 44648},
  11655. 44652, 44656, {f: 2, c: 44664}, {f: 3, c: 44667}, {f: 2, c: 44676}, 44684,
  11656. {f: 3, c: 44732}, 44736, 44740, {f: 2, c: 44748}, {f: 3, c: 44751},
  11657. {f: 2, c: 44760}, 44764, 44776, 44779, 44781, 44788, 44792, 44796,
  11658. {f: 2, c: 44807}, 44813, 44816, {f: 2, c: 44844}, 44848, 44850, 44852,
  11659. {f: 2, c: 44860}, 44863, {f: 3, c: 44865}, {f: 2, c: 44872}, 44880,
  11660. {f: 2, c: 44892}, {f: 2, c: 44900}, 44921, 44928, 44932, 44936,
  11661. {f: 2, c: 44944}, 44949, 44956, {f: 2, c: 44984}, 44988, 44992,
  11662. {f: 3, c: 44999}, 45003, {f: 2, c: 45005}, 45012, 45020, {f: 2, c: 45032},
  11663. {f: 2, c: 45040}, 45044, 45048, {f: 2, c: 45056}, 45060, 45068, 45072,
  11664. 45076, {f: 2, c: 45084}, 45096, {f: 2, c: 45124}, 45128, 45130, 45132,
  11665. 45134, {f: 3, c: 45139}, 45143, 45145, 45149, {f: 2, c: 45180}, 45184,
  11666. 45188, {f: 2, c: 45196}, 45199, 45201, {f: 3, c: 45208}, 45212,
  11667. {f: 4, c: 45215}, {f: 2, c: 45224}, {f: 5, c: 45227}, 45233,
  11668. {f: 3, c: 45235}, 45240, 45244, {f: 2, c: 45252}, {f: 3, c: 45255},
  11669. {f: 2, c: 45264}, 45268, 45272, 45280, 45285, {f: 2, c: 45320},
  11670. {f: 2, c: 45323}, 45328, {f: 2, c: 45330}, {f: 2, c: 45336},
  11671. {f: 3, c: 45339}, {f: 3, c: 45347}, 45352, 45356, {f: 2, c: 45364},
  11672. {f: 3, c: 45367}, {f: 2, c: 45376}, 45380, 45384, {f: 2, c: 45392},
  11673. {f: 2, c: 45396}, 45400, 45404, 45408, {f: 2, c: 45432}, 45436, 45440,
  11674. 45442, {f: 2, c: 45448}, 45451, 45453, {f: 3, c: 45458}, 45464, 45468,
  11675. 45480, 45516, 45520, 45524, {f: 2, c: 45532}, 45535, {f: 2, c: 45544},
  11676. 45548, 45552, 45561, 45563, 45565, {f: 2, c: 45572}, 45576,
  11677. {f: 2, c: 45579}, {f: 2, c: 45588}, 45591, 45593, 45600, 45620, 45628,
  11678. 45656, 45660, 45664, {f: 2, c: 45672}, {f: 2, c: 45684}, 45692,
  11679. {f: 2, c: 45700}, 45705, {f: 2, c: 45712}, 45716, {f: 3, c: 45720},
  11680. {f: 2, c: 45728}, 45731, {f: 2, c: 45733}, 45738, 45740, 45744, 45748,
  11681. {f: 2, c: 45768}, 45772, 45776, 45778, {f: 2, c: 45784}, 45787, 45789,
  11682. 45794, {f: 3, c: 45796}, 45800, {f: 5, c: 45803}, {f: 3, c: 45811},
  11683. {f: 5, c: 45815}, {f: 3, c: 45823}, 45828, 45832, {f: 2, c: 45840},
  11684. {f: 3, c: 45843}, 45852, {f: 3, c: 45908}, 45912, {f: 2, c: 45915},
  11685. {f: 2, c: 45918}, {f: 2, c: 45924}, 45927, 45929, 45931, 45934,
  11686. {f: 2, c: 45936}, 45940, 45944, {f: 2, c: 45952}, {f: 3, c: 45955}, 45964,
  11687. 45968, 45972, {f: 2, c: 45984}, 45992, 45996, {f: 2, c: 46020}, 46024,
  11688. {f: 2, c: 46027}, 46030, 46032, {f: 2, c: 46036}, 46039, 46041, 46043,
  11689. 46045, 46048, 46052, 46056, 46076, 46096, 46104, 46108, 46112,
  11690. {f: 2, c: 46120}, 46123, 46132, {f: 2, c: 46160}, 46164, 46168,
  11691. {f: 2, c: 46176}, 46179, 46181, 46188, 46208, 46216, 46237, 46244, 46248,
  11692. 46252, 46261, 46263, 46265, 46272, 46276, 46280, 46288, 46293,
  11693. {f: 2, c: 46300}, 46304, {f: 2, c: 46307}, 46310, {f: 2, c: 46316}, 46319,
  11694. 46321, 46328, {f: 2, c: 46356}, 46360, {f: 2, c: 46363}, {f: 2, c: 46372},
  11695. {f: 4, c: 46375}, {f: 2, c: 46384}, 46388, 46392, {f: 2, c: 46400},
  11696. {f: 3, c: 46403}, {f: 3, c: 46411}, 46416, 46420, {f: 2, c: 46428},
  11697. {f: 3, c: 46431}, {f: 2, c: 46496}, 46500, 46504, {f: 2, c: 46506},
  11698. {f: 2, c: 46512}, {f: 3, c: 46515}, {f: 3, c: 46523}, 46528, 46532,
  11699. {f: 2, c: 46540}, {f: 3, c: 46543}, 46552, 46572, {f: 2, c: 46608}, 46612,
  11700. 46616, 46629, 46636, 46644, 46664, 46692, 46696, {f: 2, c: 46748}, 46752,
  11701. 46756, {f: 2, c: 46763}, 46769, 46804, 46832, 46836, 46840,
  11702. {f: 2, c: 46848}, 46853, {f: 2, c: 46888}, 46892, {f: 2, c: 46895},
  11703. {f: 2, c: 46904}, 46907, 46916, 46920, 46924, {f: 2, c: 46932}, 46944,
  11704. 46948, 46952, {f: 2, c: 46960}, 46963, 46965, {f: 2, c: 46972}, 46976,
  11705. 46980, {f: 2, c: 46988}, {f: 4, c: 46991}, {f: 4, c: 46998}, 47004, 47008,
  11706. {f: 2, c: 47016}, {f: 3, c: 47019}, {f: 2, c: 47028}, 47032, 47047, 47049,
  11707. {f: 2, c: 47084}, 47088, 47092, {f: 2, c: 47100}, {f: 3, c: 47103},
  11708. {f: 3, c: 47111}, 47116, 47120, {f: 2, c: 47128}, 47131, 47133,
  11709. {f: 2, c: 47140}, 47144, 47148, {f: 2, c: 47156}, {f: 3, c: 47159}, 47168,
  11710. 47172, 47185, 47187, {f: 2, c: 47196}, 47200, 47204, {f: 2, c: 47212},
  11711. 47215, 47217, 47224, 47228, 47245, 47272, 47280, 47284, 47288,
  11712. {f: 2, c: 47296}, 47299, 47301, 47308, 47312, 47316, 47325, 47327, 47329,
  11713. {f: 2, c: 47336}, 47340, 47344, {f: 2, c: 47352}, 47355, 47357, 47364,
  11714. 47384, 47392, {f: 2, c: 47420}, 47424, 47428, 47436, 47439, 47441,
  11715. {f: 2, c: 47448}, 47452, 47456, {f: 2, c: 47464}, 47467, 47469,
  11716. {f: 2, c: 47476}, 47480, 47484, {f: 2, c: 47492}, 47495, {f: 2, c: 47497},
  11717. {f: 2, c: 47501}, {f: 2, c: 47532}, 47536, 47540, {f: 2, c: 47548}, 47551,
  11718. 47553, {f: 2, c: 47560}, 47564, {f: 5, c: 47566}, {f: 2, c: 47576}, 47579,
  11719. {f: 2, c: 47581}, 47585, {f: 3, c: 47587}, 47592, 47596, {f: 2, c: 47604},
  11720. {f: 4, c: 47607}, {f: 2, c: 47616}, 47624, 47637, {f: 2, c: 47672}, 47676,
  11721. 47680, 47682, {f: 2, c: 47688}, 47691, {f: 2, c: 47693}, {f: 3, c: 47699},
  11722. 47704, 47708, {f: 2, c: 47716}, {f: 3, c: 47719}, {f: 2, c: 47728}, 47732,
  11723. 47736, {f: 3, c: 47747}, 47751, 47756, {f: 2, c: 47784}, {f: 2, c: 47787},
  11724. 47792, 47794, {f: 2, c: 47800}, 47803, 47805, 47812, 47816,
  11725. {f: 2, c: 47832}, 47868, 47872, 47876, 47885, 47887, 47889, 47896, 47900,
  11726. 47904, 47913, 47915, {f: 3, c: 47924}, 47928, {f: 4, c: 47931},
  11727. {f: 2, c: 47940}, 47943, 47945, 47949, {f: 2, c: 47951}, 47956, 47960,
  11728. 47969, 47971, 47980, 48008, 48012, 48016, 48036, 48040, 48044, 48052,
  11729. 48055, 48064, 48068, 48072, 48080, 48083, {f: 2, c: 48120}, 48124,
  11730. {f: 2, c: 48127}, 48130, {f: 2, c: 48136}, {f: 3, c: 48139}, 48143, 48145,
  11731. {f: 5, c: 48148}, {f: 5, c: 48155}, {f: 2, c: 48164}, 48167, 48169, 48173,
  11732. {f: 2, c: 48176}, 48180, 48184, {f: 2, c: 48192}, {f: 3, c: 48195}, 48201,
  11733. {f: 2, c: 48204}, 48208, 48221, {f: 2, c: 48260}, 48264, {f: 2, c: 48267},
  11734. 48270, {f: 2, c: 48276}, 48279, {f: 2, c: 48281}, {f: 2, c: 48288}, 48292,
  11735. {f: 2, c: 48295}, {f: 2, c: 48304}, {f: 3, c: 48307}, {f: 2, c: 48316},
  11736. 48320, 48324, 48333, {f: 3, c: 48335}, 48341, 48344, 48348,
  11737. {f: 3, c: 48372}, 48376, 48380, {f: 2, c: 48388}, 48391, 48393, 48400,
  11738. 48404, 48420, 48428, 48448, {f: 2, c: 48456}, 48460, 48464,
  11739. {f: 2, c: 48472}, 48484, 48488, {f: 2, c: 48512}, 48516, {f: 4, c: 48519},
  11740. {f: 2, c: 48528}, 48531, 48533, {f: 2, c: 48537}, 48540, 48548, 48560,
  11741. 48568, {f: 2, c: 48596}, 48600, 48604, 48617, 48624, 48628, 48632, 48640,
  11742. 48643, 48645, {f: 2, c: 48652}, 48656, 48660, {f: 2, c: 48668}, 48671,
  11743. {f: 2, c: 48708}, 48712, 48716, 48718, {f: 2, c: 48724}, 48727,
  11744. {f: 3, c: 48729}, {f: 2, c: 48736}, 48740, 48744, 48746, {f: 2, c: 48752},
  11745. {f: 3, c: 48755}, {f: 3, c: 48763}, 48768, 48772, {f: 2, c: 48780},
  11746. {f: 3, c: 48783}, {f: 2, c: 48792}, 48808, {f: 2, c: 48848}, 48852,
  11747. {f: 2, c: 48855}, 48864, {f: 3, c: 48867}, 48876, 48897, {f: 2, c: 48904},
  11748. {f: 2, c: 48920}, {f: 3, c: 48923}, {f: 2, c: 48960}, 48964, 48968,
  11749. {f: 2, c: 48976}, 48981, 49044, 49072, 49093, {f: 2, c: 49100}, 49104,
  11750. 49108, 49116, 49119, 49121, 49212, 49233, 49240, 49244, 49248,
  11751. {f: 2, c: 49256}, {f: 2, c: 49296}, 49300, 49304, {f: 2, c: 49312}, 49315,
  11752. 49317, {f: 2, c: 49324}, {f: 2, c: 49327}, {f: 4, c: 49331},
  11753. {f: 2, c: 49340}, {f: 3, c: 49343}, 49349, {f: 2, c: 49352}, 49356, 49360,
  11754. {f: 2, c: 49368}, {f: 3, c: 49371}, {f: 2, c: 49380}, 49384, 49388,
  11755. {f: 2, c: 49396}, 49399, 49401, 49408, 49412, 49416, 49424, 49429,
  11756. {f: 5, c: 49436}, {f: 2, c: 49443}, {f: 2, c: 49446}, {f: 2, c: 49452},
  11757. {f: 3, c: 49455}, 49462, {f: 2, c: 49464}, 49468, 49472, {f: 2, c: 49480},
  11758. {f: 3, c: 49483}, {f: 2, c: 49492}, 49496, 49500, {f: 2, c: 49508},
  11759. {f: 3, c: 49511}, 49520, 49524, 49528, 49541, {f: 3, c: 49548}, 49552,
  11760. 49556, 49558, {f: 2, c: 49564}, 49567, 49569, 49573, {f: 2, c: 49576},
  11761. 49580, 49584, 49597, 49604, 49608, 49612, 49620, {f: 2, c: 49623}, 49632,
  11762. 49636, 49640, {f: 2, c: 49648}, 49651, {f: 2, c: 49660}, 49664, 49668,
  11763. {f: 2, c: 49676}, 49679, 49681, {f: 2, c: 49688}, 49692, {f: 2, c: 49695},
  11764. {f: 2, c: 49704}, 49707, 49709, 49711, {f: 2, c: 49713}, 49716, 49736,
  11765. {f: 2, c: 49744}, 49748, 49752, 49760, 49765, {f: 2, c: 49772}, 49776,
  11766. 49780, {f: 2, c: 49788}, 49791, 49793, {f: 2, c: 49800}, 49808, 49816,
  11767. 49819, 49821, {f: 2, c: 49828}, 49832, {f: 2, c: 49836}, {f: 2, c: 49844},
  11768. 49847, 49849, {f: 2, c: 49884}, 49888, {f: 2, c: 49891}, {f: 3, c: 49899},
  11769. 49903, 49905, 49910, {f: 2, c: 49912}, {f: 2, c: 49915}, 49920,
  11770. {f: 2, c: 49928}, {f: 2, c: 49932}, {f: 3, c: 49939}, 49944, 49948,
  11771. {f: 2, c: 49956}, {f: 2, c: 49960}, 49989, {f: 2, c: 50024}, 50028, 50032,
  11772. 50034, {f: 2, c: 50040}, {f: 2, c: 50044}, 50052, 50056, 50060, 50112,
  11773. {f: 2, c: 50136}, 50140, {f: 2, c: 50143}, 50146, {f: 2, c: 50152}, 50157,
  11774. {f: 2, c: 50164}, 50168, 50184, 50192, 50212, 50220, 50224, 50228,
  11775. {f: 2, c: 50236}, 50248, {f: 2, c: 50276}, 50280, 50284, {f: 2, c: 50292},
  11776. 50297, 50304, 50324, 50332, 50360, 50364, 50409, {f: 2, c: 50416}, 50420,
  11777. 50424, 50426, {f: 3, c: 50431}, 50444, 50448, 50452, 50460,
  11778. {f: 2, c: 50472}, 50476, 50480, {f: 2, c: 50488}, 50491, 50493,
  11779. {f: 2, c: 50500}, {f: 3, c: 50504}, {f: 3, c: 50508}, {f: 3, c: 50515},
  11780. {f: 3, c: 50519}, {f: 2, c: 50525}, {f: 2, c: 50528}, 50532, 50536,
  11781. {f: 2, c: 50544}, {f: 3, c: 50547}, {f: 2, c: 50556}, 50560, 50564, 50567,
  11782. {f: 2, c: 50572}, 50575, 50577, 50581, {f: 2, c: 50583}, 50588, 50592,
  11783. 50601, {f: 2, c: 50612}, {f: 2, c: 50616}, {f: 4, c: 50619},
  11784. {f: 7, c: 50628}, 50636, 50638, {f: 2, c: 50640}, 50644, 50648,
  11785. {f: 2, c: 50656}, 50659, 50661, {f: 3, c: 50668}, 50672, 50676,
  11786. {f: 2, c: 50678}, {f: 6, c: 50684}, {f: 4, c: 50693}, 50700, 50704,
  11787. {f: 2, c: 50712}, {f: 2, c: 50715}, {f: 2, c: 50724}, 50728,
  11788. {f: 3, c: 50732}, 50736, {f: 3, c: 50739}, 50743, 50745, 50747,
  11789. {f: 2, c: 50752}, 50756, 50760, {f: 2, c: 50768}, {f: 3, c: 50771},
  11790. {f: 2, c: 50780}, 50784, 50796, 50799, 50801, {f: 2, c: 50808}, 50812,
  11791. 50816, {f: 2, c: 50824}, 50827, 50829, {f: 2, c: 50836}, 50840, 50844,
  11792. {f: 2, c: 50852}, 50855, 50857, {f: 2, c: 50864}, 50868, {f: 3, c: 50872},
  11793. {f: 2, c: 50880}, 50883, 50885, {f: 2, c: 50892}, 50896, 50900,
  11794. {f: 2, c: 50908}, {f: 2, c: 50912}, {f: 2, c: 50920}, 50924, 50928,
  11795. {f: 2, c: 50936}, 50941, {f: 2, c: 50948}, 50952, 50956, {f: 2, c: 50964},
  11796. 50967, 50969, {f: 2, c: 50976}, 50980, 50984, {f: 2, c: 50992}, 50995,
  11797. 50997, 50999, {f: 2, c: 51004}, 51008, 51012, 51018, {f: 2, c: 51020},
  11798. 51023, {f: 8, c: 51025}, 51036, 51040, 51048, 51051, {f: 2, c: 51060},
  11799. 51064, {f: 3, c: 51068}, {f: 3, c: 51075}, {f: 4, c: 51079}, 51086,
  11800. {f: 2, c: 51088}, 51092, {f: 3, c: 51094}, 51098, {f: 2, c: 51104},
  11801. {f: 4, c: 51107}, {f: 2, c: 51116}, 51120, 51124, {f: 2, c: 51132},
  11802. {f: 3, c: 51135}, {f: 2, c: 51144}, 51148, 51150, 51152, 51160, 51165,
  11803. 51172, 51176, 51180, {f: 2, c: 51200}, 51204, 51208, 51210,
  11804. {f: 2, c: 51216}, 51219, {f: 2, c: 51221}, {f: 2, c: 51228}, 51232, 51236,
  11805. {f: 2, c: 51244}, 51247, 51249, 51256, 51260, 51264, {f: 2, c: 51272},
  11806. {f: 2, c: 51276}, 51284, {f: 2, c: 51312}, 51316, 51320, 51322,
  11807. {f: 2, c: 51328}, 51331, {f: 3, c: 51333}, {f: 3, c: 51339}, 51348, 51357,
  11808. 51359, 51361, 51368, {f: 2, c: 51388}, 51396, 51400, 51404,
  11809. {f: 2, c: 51412}, 51415, 51417, {f: 2, c: 51424}, 51428, 51445,
  11810. {f: 2, c: 51452}, 51456, {f: 3, c: 51460}, {f: 2, c: 51468}, 51471, 51473,
  11811. 51480, 51500, 51508, {f: 2, c: 51536}, 51540, 51544, {f: 2, c: 51552},
  11812. 51555, 51564, 51568, 51572, 51580, {f: 2, c: 51592}, 51596, 51600,
  11813. {f: 2, c: 51608}, 51611, 51613, {f: 2, c: 51648}, 51652, {f: 2, c: 51655},
  11814. 51658, {f: 2, c: 51664}, 51667, {f: 2, c: 51669}, {f: 2, c: 51673},
  11815. {f: 2, c: 51676}, 51680, 51682, 51684, 51687, {f: 2, c: 51692},
  11816. {f: 3, c: 51695}, {f: 2, c: 51704}, 51708, 51712, {f: 2, c: 51720},
  11817. {f: 3, c: 51723}, 51732, 51736, 51753, {f: 2, c: 51788}, 51792, 51796,
  11818. {f: 2, c: 51804}, {f: 3, c: 51807}, 51816, 51837, 51844, 51864,
  11819. {f: 2, c: 51900}, 51904, 51908, {f: 2, c: 51916}, 51919, 51921, 51923,
  11820. {f: 2, c: 51928}, 51936, 51948, 51956, 51976, 51984, 51988, 51992,
  11821. {f: 2, c: 52000}, 52033, {f: 2, c: 52040}, 52044, 52048, {f: 2, c: 52056},
  11822. 52061, 52068, {f: 2, c: 52088}, 52124, 52152, 52180, 52196, 52199, 52201,
  11823. {f: 2, c: 52236}, 52240, 52244, {f: 2, c: 52252}, {f: 2, c: 52257},
  11824. {f: 3, c: 52263}, 52268, 52270, 52272, {f: 2, c: 52280}, {f: 4, c: 52283},
  11825. {f: 2, c: 52292}, 52296, 52300, {f: 2, c: 52308}, {f: 3, c: 52311}, 52320,
  11826. 52324, 52326, 52328, 52336, 52341, {f: 2, c: 52376}, 52380, 52384,
  11827. {f: 2, c: 52392}, {f: 3, c: 52395}, {f: 2, c: 52404}, 52408, 52412,
  11828. {f: 2, c: 52420}, 52423, 52425, 52432, 52436, 52452, 52460, 52464, 52481,
  11829. {f: 2, c: 52488}, 52492, 52496, {f: 2, c: 52504}, 52507, 52509, 52516,
  11830. 52520, 52524, 52537, 52572, 52576, 52580, {f: 2, c: 52588}, 52591, 52593,
  11831. 52600, 52616, {f: 2, c: 52628}, 52632, 52636, {f: 2, c: 52644}, 52647,
  11832. 52649, 52656, 52676, 52684, 52688, 52712, 52716, 52720, {f: 2, c: 52728},
  11833. 52731, 52733, 52740, 52744, 52748, 52756, 52761, {f: 2, c: 52768}, 52772,
  11834. 52776, {f: 2, c: 52784}, 52787, 52789, {f: 2, c: 52824}, 52828,
  11835. {f: 3, c: 52831}, {f: 2, c: 52840}, 52843, 52845, {f: 2, c: 52852}, 52856,
  11836. 52860, {f: 2, c: 52868}, 52871, 52873, {f: 2, c: 52880}, 52884, 52888,
  11837. {f: 2, c: 52896}, {f: 3, c: 52899}, {f: 2, c: 52908}, 52929,
  11838. {f: 2, c: 52964}, 52968, {f: 2, c: 52971}, {f: 2, c: 52980},
  11839. {f: 3, c: 52983}, {f: 2, c: 52992}, 52996, 53000, {f: 2, c: 53008}, 53011,
  11840. 53013, 53020, 53024, 53028, {f: 2, c: 53036}, {f: 3, c: 53039}, 53048,
  11841. {f: 2, c: 53076}, 53080, 53084, {f: 2, c: 53092}, 53095, 53097,
  11842. {f: 2, c: 53104}, 53108, 53112, 53120, 53125, 53132, 53153, 53160, 53168,
  11843. 53188, {f: 2, c: 53216}, 53220, 53224, {f: 2, c: 53232}, 53235, 53237,
  11844. 53244, 53248, 53252, 53265, 53272, 53293, {f: 2, c: 53300}, 53304, 53308,
  11845. {f: 2, c: 53316}, 53319, 53321, 53328, 53332, 53336, 53344,
  11846. {f: 2, c: 53356}, 53360, 53364, {f: 2, c: 53372}, 53377, {f: 2, c: 53412},
  11847. 53416, 53420, {f: 2, c: 53428}, 53431, 53433, {f: 2, c: 53440}, 53444,
  11848. {f: 2, c: 53448}, {f: 2, c: 53456}, {f: 3, c: 53459}, {f: 2, c: 53468},
  11849. 53472, 53476, {f: 2, c: 53484}, {f: 3, c: 53487}, 53496, 53517,
  11850. {f: 2, c: 53552}, 53556, 53560, 53562, {f: 2, c: 53568}, {f: 3, c: 53571},
  11851. {f: 2, c: 53580}, 53584, 53588, {f: 2, c: 53596}, 53599, 53601, 53608,
  11852. 53612, 53628, 53636, 53640, {f: 2, c: 53664}, 53668, 53672,
  11853. {f: 2, c: 53680}, 53683, 53685, 53690, 53692, 53696, 53720, 53748, 53752,
  11854. 53767, 53769, 53776, {f: 2, c: 53804}, 53808, 53812, {f: 2, c: 53820},
  11855. 53823, 53825, 53832, 53852, 53860, {f: 2, c: 53888}, 53892, 53896,
  11856. {f: 2, c: 53904}, 53909, 53916, 53920, 53924, 53932, 53937,
  11857. {f: 2, c: 53944}, 53948, {f: 2, c: 53951}, 53954, {f: 2, c: 53960}, 53963,
  11858. 53972, 53976, 53980, {f: 2, c: 53988}, {f: 2, c: 54000}, 54004, 54008,
  11859. {f: 2, c: 54016}, 54019, 54021, {f: 3, c: 54028}, 54032, 54036, 54038,
  11860. {f: 2, c: 54044}, {f: 3, c: 54047}, 54053, {f: 2, c: 54056}, 54060, 54064,
  11861. {f: 2, c: 54072}, {f: 3, c: 54075}, {f: 2, c: 54084}, {f: 2, c: 54140},
  11862. 54144, 54148, {f: 2, c: 54156}, {f: 3, c: 54159}, {f: 2, c: 54168}, 54172,
  11863. 54176, {f: 2, c: 54184}, 54187, 54189, 54196, 54200, 54204,
  11864. {f: 2, c: 54212}, {f: 2, c: 54216}, 54224, 54232, 54241, 54243,
  11865. {f: 2, c: 54252}, 54256, 54260, {f: 2, c: 54268}, 54271, 54273, 54280,
  11866. 54301, 54336, 54340, 54364, 54368, 54372, 54381, 54383, {f: 2, c: 54392},
  11867. 54396, {f: 2, c: 54399}, 54402, {f: 2, c: 54408}, 54411, 54413, 54420,
  11868. 54441, 54476, 54480, 54484, 54492, 54495, 54504, 54508, 54512, 54520,
  11869. 54523, 54525, 54532, 54536, 54540, {f: 2, c: 54548}, 54551,
  11870. {f: 2, c: 54588}, 54592, 54596, {f: 2, c: 54604}, 54607, 54609,
  11871. {f: 2, c: 54616}, 54620, 54624, 54629, {f: 2, c: 54632}, 54635, 54637,
  11872. {f: 2, c: 54644}, 54648, 54652, {f: 2, c: 54660}, {f: 3, c: 54663}, 54672,
  11873. 54693, {f: 2, c: 54728}, 54732, 54736, 54738, {f: 2, c: 54744}, 54747,
  11874. 54749, {f: 2, c: 54756}, 54760, 54764, {f: 2, c: 54772}, 54775, 54777,
  11875. {f: 2, c: 54784}, 54788, 54792, {f: 2, c: 54800}, {f: 3, c: 54803}, 54812,
  11876. 54816, 54820, 54829, {f: 2, c: 54840}, 54844, 54848, 54853,
  11877. {f: 2, c: 54856}, 54859, 54861, 54865, {f: 2, c: 54868}, 54872, 54876,
  11878. 54887, 54889, {f: 2, c: 54896}, 54900, 54915, 54917, {f: 2, c: 54924},
  11879. 54928, 54932, 54941, 54943, 54945, 54952, 54956, 54960, 54969, 54971,
  11880. {f: 2, c: 54980}, 54984, 54988, 54993, 54996, 54999, 55001, 55008, 55012,
  11881. 55016, 55024, 55029, {f: 2, c: 55036}, 55040, 55044, 55057,
  11882. {f: 2, c: 55064}, 55068, 55072, {f: 2, c: 55080}, 55083, 55085,
  11883. {f: 2, c: 55092}, 55096, 55100, 55108, 55111, 55113, {f: 2, c: 55120},
  11884. 55124, {f: 4, c: 55126}, {f: 2, c: 55136}, 55139, 55141, 55145, 55148,
  11885. 55152, 55156, {f: 2, c: 55164}, 55169, {f: 2, c: 55176}, 55180, 55184,
  11886. {f: 2, c: 55192}, 55195, 55197, 20285, 20339, 20551, 20729, 21152, 21487,
  11887. 21621, 21733, 22025, 23233, 23478, 26247, {f: 2, c: 26550}, 26607, 27468,
  11888. 29634, 30146, 31292, 33499, 33540, 34903, 34952, 35382, [36040, 63747],
  11889. 36303, 36603, 36838, 39381, 21051, 21364, 21508, 24682, 24932, 27580,
  11890. 29647, 33050, 35258, [12179, 35282], 38307, 20355, 21002, 22718, 22904,
  11891. 23014, [12082, 24178], 24185, 25031, 25536, 26438, 26604, 26751, 28567,
  11892. 30286, 30475, 30965, 31240, 31487, 31777, 32925, [12169, 33390], 33393,
  11893. 35563, 38291, 20075, 21917, 26359, 28212, 30883, 31469, 33883, 35088,
  11894. 34638, 38824, 21208, 22350, 22570, 23884, 24863, 25022, 25121, 25954,
  11895. 26577, 27204, 28187, [12130, 29976], 30131, 30435, 30640, 32058, 37039,
  11896. {f: 2, c: 37969}, 40853, 21283, 23724, 30002, 32987, 37440, 38296, 21083,
  11897. 22536, 23004, 23713, 23831, 24247, 24378, 24394, 24951, 27743, 30074,
  11898. 30086, 31968, 32115, 32177, 32652, 33108, 33313, 34193, 35137, 35611,
  11899. 37628, [38477, 64009], 40007, 20171, 20215, 20491, 20977, 22607, 24887,
  11900. 24894, 24936, 25913, 27114, 28433, 30117, 30342, 30422, 31623, 33445,
  11901. 33995, 37799, 38283, 21888, 23458, 22353, 31923, 32697, 37301, 20520,
  11902. 21435, 23621, 24040, 25298, 25454, 25818, 25831, 28192, 28844, 31067,
  11903. 36317, 36382, 36989, 37445, 37624, 20094, 20214, 20581, [12081, 24062],
  11904. 24314, 24838, 26967, 33137, 34388, 36423, 37749, 39467, 20062, 20625,
  11905. 26480, 26688, 20745, 21133, 21138, 27298, 30652, 37392, 40660, 21163,
  11906. 24623, 36850, 20552, 25001, 25581, 25802, 26684, 27268, 28608, 33160,
  11907. 35233, 38548, 22533, 29309, [12125, 29356], 29956, 32121, 32365, 32937,
  11908. [12178, 35211, 64010], 35700, 36963, 40273, 25225, 27770, 28500, 32080,
  11909. 32570, 35363, 20860, 24906, 31645, 35609, 37463, 37772, 20140, 20435,
  11910. 20510, 20670, 20742, 21185, 21197, 21375, 22384, 22659, 24218, 24465,
  11911. 24950, 25004, 25806, 25964, 26223, 26299, [26356, 63745], 26775, 28039,
  11912. 28805, 28913, 29855, 29861, 29898, 30169, 30828, 30956, 31455, 31478,
  11913. 32069, 32147, 32789, 32831, 33051, 33686, 35686, 36629, 36885, 37857,
  11914. 38915, 38968, 39514, 39912, 20418, 21843, 22586, [22865, 63753], 23395,
  11915. 23622, 24760, 25106, 26690, 26800, 26856, 28330, 30028, 30328, 30926,
  11916. 31293, 31995, 32363, 32380, 35336, 35489, 35903, 38542, 40388, 21476,
  11917. 21481, 21578, 21617, 22266, 22993, 23396, 23611, 24235, 25335, 25911,
  11918. 25925, 25970, 26272, 26543, 27073, 27837, 30204, 30352, 30590, 31295,
  11919. 32660, 32771, 32929, 33167, 33510, 33533, 33776, 34241, 34865, 34996,
  11920. 35493, 36764, 37678, 38599, 39015, [12220, 39640], [12238, 40723], 21741,
  11921. 26011, 26354, 26767, 31296, [12181, 35895], 40288, 22256, 22372, 23825,
  11922. 26118, 26801, 26829, 28414, 29736, 34974, 39908, 27752, [12219, 39592],
  11923. 20379, 20844, 20849, 21151, 23380, [12079, 24037], 24656, 24685, 25329,
  11924. 25511, 25915, 29657, 31354, 34467, 36002, 38799, [20018, 63749], 23521,
  11925. [12093, 25096], 26524, [12128, 29916], 31185, 33747, 35463, 35506, 36328,
  11926. 36942, 37707, 38982, [24275, 64011], 27112, 34303, 37101, 20896, 23448,
  11927. 23532, 24931, 26874, 27454, 28748, 29743, 29912, 31649, 32592, 33733,
  11928. 35264, 36011, 38364, 39208, 21038, 24669, 25324, 36866, 20362, 20809,
  11929. 21281, 22745, 24291, 26336, 27960, 28826, 29378, 29654, 31568, 33009,
  11930. 37979, 21350, 25499, 32619, 20054, 20608, 22602, 22750, 24618, 24871,
  11931. 25296, 27088, 39745, 23439, 32024, 32945, 36703, 20132, 20689, 21676,
  11932. 21932, 23308, 23968, 24039, 25898, 25934, 26657, 27211, 29409, 30350,
  11933. 30703, 32094, 32761, 33184, 34126, 34527, 36611, 36686, 37066, 39171,
  11934. 39509, 39851, 19992, 20037, 20061, 20167, 20465, 20855, 21246, 21312,
  11935. [12061, 21475], [21477, 63750], 21646, 22036, 22389, 22434, 23495, 23943,
  11936. 24272, 25084, 25304, 25937, 26552, 26601, 27083, 27472, 27590, 27628,
  11937. 27714, 28317, 28792, 29399, 29590, 29699, 30655, 30697, 31350, 32127,
  11938. 32777, [12165, 33276], 33285, 33290, 33503, 34914, 35635, 36092, 36544,
  11939. 36881, 37041, 37476, 37558, 39378, 39493, 40169, 40407,
  11940. [12244, 40860, 63751, 63752], 22283, 23616, 33738, 38816, 38827, 40628,
  11941. 21531, 31384, 32676, 35033, 36557, 37089, 22528, 23624, 25496, 31391,
  11942. 23470, [12088, 24339], 31353, 31406, 33422, 36524, 20518, 21048, 21240,
  11943. 21367, 22280, 25331, 25458, 27402, 28099, 30519, 21413, 29527, 34152,
  11944. 36470, 38357, 26426, 27331, 28528, 35437, 36556, 39243, 26231, 27512,
  11945. 36020, [12225, 39740], 21483, 22317, 22862, 25542, 27131, 29674, 30789,
  11946. 31418, 31429, 31998, 33909, 35215, 36211, 36917, 38312, 21243, 22343,
  11947. 30023, 31584, 33740, 37406, 27224, 20811, 21067, 21127, 25119, 26840,
  11948. 26997, 38553, 20677, 21156, 21220, 25027, [12100, 26020], 26681, 27135,
  11949. 29822, 31563, 33465, 33771, 35250, 35641, 36817, 39241, 20170, 22935,
  11950. 25810, 26129, 27278, 29748, 31105, 31165, 33449, {f: 2, c: 34942}, 35167,
  11951. 37670, 20235, 21450, 24613, 25201, 27762, 32026, 32102, 20120, 20834,
  11952. 30684, 32943, 20225, 20238, 20854, 20864, 21980, 22120, 22331, 22522,
  11953. 22524, 22804, 22855, 22931, 23492, 23696, 23822, [12080, 24049], 24190,
  11954. 24524, 25216, 26071, 26083, {f: 2, c: 26398}, 26462, 26827, 26820, 27231,
  11955. 27450, 27683, 27773, 27778, 28103, 29592, 29734, 29738, 29826, 29859,
  11956. 30072, 30079, 30849, 30959, 31041, {f: 2, c: 31047}, 31098, 31637, 32000,
  11957. 32186, 32648, 32774, 32813, 32908, 35352, 35663, [35912, 63744], 36215,
  11958. 37665, 37668, 39138, 39249, {f: 2, c: 39438}, 39525, 40594, 32202, 20342,
  11959. 21513, 25326, 26708, [12198, 37329, 63754], 21931, 20794, 23068, 25062,
  11960. [25295, 63835], 25343, 37027, [35582, 63837], 26262, 29014, 38627, 25423,
  11961. 25466, 21335, 26511, 26976, 28275, 30007, 32013, 34930, 22218, 23064,
  11962. 20035, 20839, [22856, 63756], 26608, 32784, [12069, 22899, 63873],
  11963. [24180, 63886], [25754, 63889], [31178, 63893], [24565, 63907], 24684,
  11964. 25288, [25467, 63908], [23527, 63839, 63914], 23511, 21162, 22900, 24361,
  11965. [24594, 63840], 29785, 39377, 28611, 33215, 36786, 24817, 33126,
  11966. [23615, 63933], 23273, 35365, [26491, 63944], [32016, 63951], 33021, 23612,
  11967. [27877, 63971], [21311, 63979], [28346, 63980], 22810, [33590, 63998],
  11968. [20025, 63838], 20150, 20294, 21934, 22296, 22727, 24406, 26039, 26086,
  11969. 27264, 27573, 28237, 30701, 31471, 31774, 32222, 34507, 34962, 37170,
  11970. 37723, 25787, 28606, 29562, 30136, 36948, 21846, 22349, 25018, 25812,
  11971. 26311, 28129, 28251, 28525, 28601, 30192, 32835, 33213, 34113, 35203,
  11972. 35527, 35674, 37663, 27795, 30035, 31572, 36367, 36957, 21776, 22530,
  11973. 22616, 24162, 25095, 25758, 26848, 30070, [31958, 64003], 34739, 40680,
  11974. 20195, 22408, 22382, [12068, 22823], 23565, 23729, 24118, 24453, 25140,
  11975. 25825, 29619, 33274, 34955, 36024, 38538, 40667, [23429, 64004], 24503,
  11976. 24755, 20498, [12049, 20992], 21040, 22294, 22581, 22615, 23566, 23648,
  11977. 23798, 23947, [24230, 64001], 24466, 24764, 25361, 25481, 25623, 26691,
  11978. 26873, 27330, 28120, 28193, 28372, 28644, 29182, 30428, 30585, 31153,
  11979. 31291, 33796, 35241, 36077, 36339, 36424, 36867, 36884, 36947, 37117,
  11980. 37709, 38518, 38876, 27602, 28678, 29272, 29346, 29544, 30563, 31167,
  11981. 31716, 32411, [35712, 63834], 22697, 24775, 25958, 26109, 26302, 27788,
  11982. 28958, 29129, 35930, 38931, 20077, 31361, 20189, 20908, 20941, 21205,
  11983. 21516, 24999, 26481, 26704, 26847, [27934, 64005], 28540, 30140, 30643,
  11984. 31461, 33012, 33891, 37509, 20828, [12099, 26007], 26460, 26515, 30168,
  11985. 31431, 33651, [12182, 35910], 36887, 38957, 23663, 33216, 33434, 36929,
  11986. 36975, 37389, 24471, 23965, 27225, 29128, 30331, 31561, 34276, 35588,
  11987. 37159, 39472, [21895, 63755], [25078, 63757], [30313, 63758],
  11988. [32645, 63759], [34367, 63760], [34746, 63761], [35064, 63762],
  11989. [37007, 63763], [27931, 63765], [28889, 63766], [29662, 63767], 32097,
  11990. [33853, 63768], [37226, 63769], [39409, 63770], [20098, 63771],
  11991. [21365, 63772], [27396, 63773], 27410, 28734, [29211, 63774],
  11992. [34349, 63775], [40478, 63776], 21068, 36771, [23888, 63777], 25829, 25900,
  11993. 27414, [28651, 63778], 31811, 32412, [34253, 63779], [35172, 63780], 35261,
  11994. [25289, 63781], [33240, 63782], [34847, 63783], [24266, 63784],
  11995. [26391, 63785], [28010, 63786], [29436, 63787], 29701, 29807, 34690,
  11996. [37086, 63788], [20358, 63789], 23821, 24480, 33802, [20919, 63790],
  11997. [25504, 63861], [30053, 63862], [20142, 63863], 20486, [20841, 63864],
  11998. [20937, 63865], [26753, 63866], 27153, 31918, 31921, [31975, 63867],
  11999. [33391, 63868], [35538, 63869], 36635, [37327, 63870], 20406, 20791,
  12000. [21237, 63871], [21570, 63872], [24300, 63874], 24942, 25150,
  12001. [26053, 63875], 27354, [28670, 63876], [31018, 63877], 34268, 34851,
  12002. [38317, 63878], 39522, [39530, 63879], [40599, 63880], [40654, 63881],
  12003. [12050, 21147, 63882], [26310, 63883], [27511, 63884], 28701, 31019,
  12004. [36706, 63885], 38722, [24976, 63887], [25088, 63888], 25891,
  12005. [28451, 63890], [29001, 63891], [29833, 63892], [32244, 63894],
  12006. [32879, 63895], [34030, 63897], [36646, 63896], [36899, 63898],
  12007. [37706, 63899], 20925, [21015, 63900], [21155, 63901], 27916,
  12008. [28872, 63903], [35010, 63904], [24265, 63906], 25986, [27566, 63909],
  12009. 28610, [31806, 63910], [29557, 63911], [20196, 63912], 20278,
  12010. [22265, 63913], 23738, [23994, 63915], [24604, 63916], [29618, 63917],
  12011. 31533, [32666, 63919], 32718, [32838, 63920], 36894, [37428, 63921],
  12012. [38646, 63922], [38728, 63923], [38936, 63924], 40801, [20363, 63925],
  12013. 28583, [31150, 63926], [37300, 63927], [38583, 63928], [21214, 63791],
  12014. 25736, [25796, 63792], [27347, 63793], 28510, 28696, [29200, 63794],
  12015. [30439, 63795], [12156, 32769, 63796], [34310, 63797], [34396, 63798],
  12016. [36335, 63799], 36613, [38706, 63800], [39791, 63801], [40442, 63802],
  12017. [12228, 40565], [30860, 63803], [31103, 63804], [32160, 63805],
  12018. [33737, 63806], [37636, 63807], [12229, 40575, 63808], 40595,
  12019. [35542, 63809], [22751, 63810], [24324, 63811], 26407, 28711, 29903,
  12020. [31840, 63812], [32894, 63813], 20769, 28712, [29282, 63814],
  12021. [30922, 63815], [36034, 63816], 36058, 36084, [38647, 63817],
  12022. [20102, 63930], [20698, 63931], [23534, 63932], 24278, [26009, 63934],
  12023. [29134, 63936], [30274, 63937], 30637, 32842, [34044, 63938],
  12024. [36988, 63939], 39719, [12243, 40845, 63940], [22744, 63818], 23105,
  12025. [23650, 63819], [27155, 63820], [28122, 63821], [28431, 63822], 30267,
  12026. [32047, 63823], [32311, 63824], 34078, 35128, 37860, [38475, 63825],
  12027. [21129, 63943], 26066, [26611, 63945], 27060, [27969, 63946],
  12028. [28316, 63947], 28687, [29705, 63948], 29792, [30041, 63949], 30244,
  12029. [30827, 63950], 35628, [39006, 63952], [20845, 63953], [25134, 63954],
  12030. [38520, 63955], 20374, [20523, 63956], [23833, 63957], [28138, 63958],
  12031. 32184, [36650, 63959], [24459, 63960], [24900, 63961], [26647, 63962],
  12032. [38534, 63964], [21202, 63826], [32907, 63827], [20956, 63828],
  12033. [20940, 63829], 26974, [31260, 63830], [32190, 63831], [33777, 63832],
  12034. [38517, 63833], 20442, [21033, 63965], 21400, [21519, 63966], 21774,
  12035. [23653, 63967], 24743, [26446, 63969], [26792, 63970], 28012, 29313, 29432,
  12036. [29702, 63972], 29827, [30178, 63973], 31852, [32633, 63974], 32696, 33673,
  12037. [35023, 63975], [35041, 63976], [12197, 37324, 63977], 37328,
  12038. [38626, 63978], 39881, [21533, 63981], 28542, [29136, 63982],
  12039. [29848, 63983], [34298, 63984], 36522, [38563, 63985], [40023, 63986],
  12040. [40607, 63987], [26519, 63988], [28107, 63989], 29747, [33256, 63990],
  12041. 38678, 30764, [12148, 31435, 63991], [31520, 63992], [31890, 63993], 25705,
  12042. 29802, 30194, 30908, 30952, [12218, 39340], 39764, [12231, 40635], 23518,
  12043. 24149, 28448, 33180, 33707, 37000, 19975, 21325, 23081, 24018, 24398,
  12044. 24930, 25405, 26217, 26364, 28415, 28459, 28771, 30622, 33836, 34067,
  12045. 34875, 36627, 39237, 39995, 21788, 25273, 26411, 27819, 33545, 35178,
  12046. 38778, 20129, 22916, {f: 2, c: 24536}, 26395, 32178, 32596, 33426, 33579,
  12047. 33725, 36638, 37017, 22475, 22969, 23186, 23504, 26151, 26522, 26757,
  12048. 27599, 29028, 32629, 36023, 36067, 36993, 39749, 33032, 35978, 38476,
  12049. 39488, [12230, 40613], 23391, 27667, 29467, 30450, 30431, 33804, 20906,
  12050. 35219, 20813, 20885, 21193, 26825, 27796, 30468, 30496, 32191, 32236,
  12051. [12207, 38754], 40629, 28357, 34065, 20901, 21517, 21629, 26126, 26269,
  12052. 26919, 28319, [12139, 30399], 30609, 33559, 33986, 34719, 37225, 37528,
  12053. 40180, 34946, 20398, 20882, 21215, 22982, 24125, 24917, {f: 2, c: 25720},
  12054. 26286, 26576, 27169, 27597, [12113, 27611], 29279, 29281, 29761, 30520,
  12055. [12141, 30683], 32791, 33468, 33541, 35584, 35624, 35980, [12106, 26408],
  12056. 27792, 29287, [12140, 30446], 30566, 31302, 40361, 27519, 27794, 22818,
  12057. 26406, 33945, 21359, 22675, 22937, 24287, 25551, 26164, 26483, 28218,
  12058. 29483, 31447, 33495, 37672, 21209, 24043, 25006, 25035, 25098, 25287,
  12059. 25771, [12102, 26080], 26969, 27494, [12111, 27595], 28961, 29687, 30045,
  12060. 32326, 33310, 33538, 34154, 35491, 36031, 38695, 40289, 22696, 40664,
  12061. 20497, 21006, 21563, 21839, [12098, 25991], 27766, {f: 2, c: 32010}, 32862,
  12062. 34442, [12200, 38272], 38639, 21247, 27797, 29289, 21619, 23194, 23614,
  12063. 23883, 24396, 24494, 26410, 26806, 26979, 28220, 28228, 30473,
  12064. [12150, 31859], 32654, 34183, 35598, 36855, 38753, 40692, 23735, 24758,
  12065. 24845, 25003, 25935, {f: 2, c: 26107}, 27665, 27887, 29599, 29641, 32225,
  12066. 38292, 23494, 34588, 35600, 21085, 21338, 25293, 25615, 25778, 26420,
  12067. 27192, 27850, 29632, 29854, 31636, 31893, 32283, 33162, 33334, 34180,
  12068. 36843, 38649, 39361, 20276, 21322, 21453, 21467, 25292, 25644, 25856,
  12069. 26001, 27075, 27886, 28504, 29677, 30036, 30242, 30436, 30460, 30928,
  12070. [30971, 63844], 31020, 32070, 33324, 34784, 36820, 38930, 39151, 21187,
  12071. 25300, 25765, 28196, 28497, 30332, 36299, 37297, 37474, 39662, 39747,
  12072. 20515, 20621, 22346, 22952, 23592, 24135, 24439, 25151, 25918,
  12073. [12101, 26041], 26049, 26121, 26507, 27036, 28354, 30917, 32033, 32938,
  12074. 33152, 33323, 33459, 33953, 34444, 35370, 35607, 37030, 38450, 40848,
  12075. 20493, 20467, 22521, 24472, 25308, 25490, 26479, 28227, 28953, 30403,
  12076. 32972, 32986, {f: 2, c: 35060}, 35097, 36064, 36649, 37197, 38506, 20271,
  12077. 20336, 24091, 26575, 26658, [12137, 30333], 30334, 39748, 24161, 27146,
  12078. 29033, 29140, 30058, 32321, 34115, 34281, 39132, 20240, 31567, 32624,
  12079. 38309, 20961, 24070, 26805, 27710, 27726, 27867, 29359, 31684, 33539,
  12080. 27861, 29754, 20731, 21128, 22721, 25816, 27287, 29863, 30294, 30887,
  12081. 34327, 38370, 38713, 21342, 24321, 35722, 36776, 36783, 37002, 21029,
  12082. 30629, 40009, 40712, 19993, 20482, 20853, 23643, 24183, 26142, 26170,
  12083. 26564, 26821, 28851, 29953, 30149, 31177, 31453, 36647, 39200, 39432,
  12084. 20445, 22561, 22577, 23542, 26222, 27493, 27921, 28282, 28541, 29668,
  12085. 29995, 33769, 35036, 35091, 35676, 36628, 20239, 20693, 21264,
  12086. [12056, 21340], 23443, [24489, 63846], 26381, 31119, 33145, 33583, 34068,
  12087. 35079, 35206, 36665, [36667, 64007], 39333, 39954, 26412, 20086, 20472,
  12088. 22857, 23553, {f: 2, c: 23791}, 25447, 26834, 28925, 29090, 29739, 32299,
  12089. 34028, 34562, 36898, 37586, 40179, [19981, 63847], 20184, 20463, 20613,
  12090. 21078, 21103, 21542, 21648, 22496, 22827, 23142, 23386, 23413, 23500,
  12091. 24220, 25206, 25975, 26023, 28014, 28325, [12119, 29238], 31526, 31807,
  12092. [12152, 32566], {f: 2, c: 33104}, 33178, 33344, 33433, 33705, 35331, 36000,
  12093. 36070, 36091, 36212, 36282, 37096, 37340, [12201, 38428], 38468, 39385,
  12094. 40167, [21271, 63843], 20998, 21545, 22132, 22707, 22868, 22894, 24575,
  12095. 24996, 25198, 26128, 27774, 28954, 30406, 31881, 31966, 32027, 33452,
  12096. 36033, 38640, 20315, 24343, 24447, 25282, 23849, 26379, 26842, 30844,
  12097. 32323, 40300, 19989, 20633, [12052, 21269], 21290, 21329, 22915, 23138,
  12098. 24199, 24754, 24970, 25161, 25209, 26000, 26503, 27047, [12112, 27604],
  12099. {f: 3, c: 27606}, 27832, 29749, 30202, 30738, 30865, 31189, 31192, 31875,
  12100. 32203, 32737, 32933, 33086, 33218, 33778, 34586, 35048, 35513, 35692,
  12101. 36027, 37145, [12206, 38750], [12214, 39131], [12240, 40763], 22188, 23338,
  12102. 24428, 25996, 27315, 27567, 27996, 28657, 28693, 29277, 29613, 36007,
  12103. 36051, 38971, 24977, 27703, 32856, 39425, 20045, 20107, 20123, 20181,
  12104. 20282, 20284, 20351, 20447, 20735, 21490, 21496, 21766, 21987, 22235,
  12105. [12064, 22763], 22882, 23057, 23531, 23546, 23556, 24051, 24107, 24473,
  12106. 24605, 25448, 26012, 26031, 26614, 26619, 26797, 27515, 27801, 27863,
  12107. 28195, 28681, 29509, 30722, 31038, 31040, 31072, 31169, 31721, 32023,
  12108. 32114, 32902, 33293, 33678, 34001, 34503, 35039, 35408, 35422, 35613,
  12109. 36060, 36198, 36781, 37034, 39164, 39391, 40605, 21066, 26388, 20632,
  12110. 21034, [12077, 23665], 25955, 27733, 29642, 29987, 30109, 31639, 33948,
  12111. 37240, 38704, 20087, 25746, [27578, 63856], 29022, 34217, 19977, 26441,
  12112. 26862, 28183, 33439, 34072, 34923, 25591, 28545, 37394, 39087, 19978,
  12113. 20663, 20687, 20767, 21830, 21930, 22039, 23360, 23577, 23776, 24120,
  12114. 24202, 24224, 24258, 24819, 26705, 27233, 28248, 29245, 29248,
  12115. [29376, 63994], 30456, 31077, 31665, 32724, 35059, 35316, 35443, 35937,
  12116. 36062, 38684, [22622, 63852], 29885, 36093, 21959, 31329, [32034, 63850],
  12117. [12170, 33394], 29298, [12131, 29983], 29989, 31513, 22661, 22779, 23996,
  12118. 24207, 24246, 24464, 24661, 25234, 25471, 25933, 26257, 26329, 26360,
  12119. 26646, 26866, 29312, 29790, 31598, 32110, 32214, 32626, 32997, 33298,
  12120. 34223, 35199, 35475, 36893, 37604, [12233, 40653], [12239, 40736],
  12121. [12067, 22805], 22893, 24109, 24796, 26132, 26227, 26512, 27728, 28101,
  12122. 28511, [12143, 30707], 30889, 33990, 37323, 37675, 20185, 20682, 20808,
  12123. 21892, 23307, 23459, 25159, 25982, 26059, 28210, 29053, 29697, 29764,
  12124. 29831, 29887, 30316, 31146, 32218, 32341, 32680, 33146, 33203, 33337,
  12125. 34330, 34796, 35445, 36323, 36984, 37521, 37925, 39245, 39854, 21352,
  12126. 23633, 26964, 27844, 27945, 28203, [12166, 33292], 34203, 35131, 35373,
  12127. [35498, 63855, 63905], 38634, 40807, 21089, 26297, 27570, 32406, 34814,
  12128. 36109, 38275, 38493, 25885, 28041, 29166, 22478, 22995, 23468, 24615,
  12129. 24826, 25104, 26143, 26207, 29481, 29689, 30427, [30465, 63853], 31596,
  12130. 32854, 32882, 33125, 35488, 37266, 19990, 21218, 27506, 27927, 31237,
  12131. 31545, 32048, 36016, 21484, 22063, 22609, 23477, [12073, 23567], 23569,
  12132. 24034, 25152, 25475, 25620, 26157, 26803, 27836, 28040, 28335, 28703,
  12133. 28836, 29138, 29990, 30095, 30094, 30233, 31505, 31712, 31787, 32032,
  12134. 32057, 34092, 34157, 34311, 35380, 36877, 36961, 37045, 37559, 38902,
  12135. 39479, 20439, 23660, 26463, 28049, 31903, 32396, 35606, 36118, 36895,
  12136. 23403, 24061, 25613, 33984, 36956, 39137, [29575, 63841, 63963], 23435,
  12137. 24730, 26494, 28126, 35359, 35494, 36865, 38924, 21047, 28753, 30862,
  12138. 37782, 34928, 37335, 20462, 21463, 22013, 22234, 22402, 22781, 23234,
  12139. 23432, 23723, 23744, 24101, 24833, 25101, [12095, 25163], 25480, 25628,
  12140. 25910, [25976, 63849], 27193, 27530, [12116, 27700], 27929, 28465, 29159,
  12141. 29417, 29560, 29703, 29874, 30246, 30561, 31168, 31319, 31466, 31929,
  12142. 32143, 32172, 32353, 32670, 33065, 33585, 33936, 34010, 34282, 34966,
  12143. 35504, 35728, 36664, 36930, 36995, 37228, 37526, 37561, 38539,
  12144. {f: 2, c: 38567}, 38614, 38656, 38920, [12216, 39318], 39635, 39706, 21460,
  12145. 22654, 22809, 23408, 23487, 28113, 28506, 29087, 29729, 29881, 32901,
  12146. 33789, 24033, 24455, 24490, 24642, 26092, 26642, 26991, 27219, 27529,
  12147. 27957, 28147, 29667, 30462, 30636, 31565, 32020, 33059, 33308, 33600,
  12148. 34036, 34147, 35426, 35524, 37255, 37662, 38918, 39348, 25100, 34899,
  12149. 36848, 37477, 23815, 23847, 23913, 29791, 33181, 34664, 28629,
  12150. [25342, 63859], 32722, 35126, 35186, 19998, 20056, 20711, 21213, 21319,
  12151. 25215, 26119, 32361, 34821, 38494, 20365, 21273, 22070, 22987, 23204,
  12152. [12075, 23608], 23630, 23629, 24066, 24337, 24643, 26045, 26159, 26178,
  12153. 26558, 26612, 29468, [12142, 30690], [12144, 31034], 32709, 33940, 33997,
  12154. 35222, 35430, 35433, 35553, [12183, 35925], 35962, 22516, 23508, 24335,
  12155. 24687, 25325, 26893, 27542, 28252, 29060, 31698, 34645, [35672, 63996],
  12156. 36606, [12215, 39135], 39166, 20280, 20353, 20449, 21627, 23072, 23480,
  12157. 24892, 26032, 26216, 29180, 30003, 31070, 32051, 33102, [12162, 33251],
  12158. 33688, 34218, 34254, 34563, 35338, [12189, 36523], [12191, 36763], 36805,
  12159. 22833, 23460, 23526, 24713, 23529, 23563, [12092, 24515], 27777, 28145,
  12160. 28683, 29978, 33455, 35574, [20160, 63997], [12055, 21313], 38617,
  12161. [12114, 27663], 20126, 20420, 20818, 21854, 23077, 23784, 25105,
  12162. [12123, 29273], 33469, 33706, 34558, 34905, 35357, 38463, 38597, 39187,
  12163. 40201, 40285, 22538, 23731, 23997, 24132, [24801, 63929], 24853, 25569,
  12164. [27138, 63764, 63836, 63935], 28197, 37122, 37716, 38990, 39952, 40823,
  12165. 23433, 23736, 25353, 26191, 26696, 30524, 38593, 38797, 38996, 39839,
  12166. 26017, 35585, 36555, 38332, 21813, 23721, 24022, 24245, 26263, 30284,
  12167. 33780, 38343, 22739, 25276, 29390, 40232, 20208, 22830, 24591, 26171,
  12168. 27523, 31207, 40230, 21395, 21696, 22467, 23830, 24859, 26326, 28079,
  12169. 30861, 33406, 38552, 38724, 21380, 25212, 25494, 28082, 32266, 33099,
  12170. 38989, 27387, 32588, 40367, 40474, 20063, 20539, 20918, 22812, 24825,
  12171. 25590, 26928, 29242, 32822, 37326, 24369, 32004, [33509, 63860], 33903,
  12172. 33979, 34277, 36493, 20335, 22756, 23363, 24665, 25562, 25880, 25965,
  12173. 26264, 26954, 27171, 27915, 28673, 29036, 30162, 30221, 31155, 31344,
  12174. [12154, 32650], 35140, 35731, 37312, 38525, 39178, 22276, 24481, 26044,
  12175. 28417, 30208, 31142, 35486, 39341, [12226, 39770], 40812, 20740, 25014,
  12176. 25233, 27277, 33222, 20547, 22576, 24422, 28937, [12180, 35328], 35578,
  12177. 23420, 34326, 20474, 20796, 22196, 22852, 25513, 28153, 23978, 26989,
  12178. 20870, 20104, 20313, 22914, 27487, 27741, 29877, 30998, 33287, 33349,
  12179. 33593, 36671, 36701, 39192, 20134, 22495, 24441, [26131, 63968], 30123,
  12180. 32377, 35695, 36870, 39515, 22181, 22567, 23032, 23071, 23476, 24310,
  12181. 25424, 25403, 26941, 27783, 27839, 28046, 28051, 28149, 28436, 28895,
  12182. 28982, 29017, 29123, 29141, 30799, 30831, 31605, 32227, 32303, 34893,
  12183. 36575, 37467, 40182, 24709, 28037, 29105, 38321, 21421, 26579, 28814,
  12184. 28976, 29744, 33398, 33490, 38331, 39653, 40573, 26308, 29121,
  12185. [33865, 63854], 22603, 23992, 24433, 26144, 26254, 27001, 27054, 27704,
  12186. 27891, 28214, 28481, 28634, 28699, 28719, 29008, 29151, 29552, 29787,
  12187. 29908, 30408, 31310, 32403, 33521, 35424, 36814, 37704, 38681, 20034,
  12188. 20522, 21000, 21473, 26355, 27757, 28618, 29450, 30591, 31330, 33454,
  12189. 34269, 34306, 35028, 35427, 35709, 35947, 37555, 38675, 38928, 20116,
  12190. 20237, 20425, 20658, 21320, 21566, 21555, 21978, 22626, 22714, 22887,
  12191. 23067, 23524, 24735, 25034, 25942, 26111, 26212, 26791, 27738, 28595,
  12192. 28879, 29100, 29522, 31613, 34568, 35492, 39986, 40711, 23627, 27779,
  12193. 29508, [12127, 29577], 37434, 28331, 29797, 30239, 31337, 32277, 34314,
  12194. 20800, 22725, 25793, 29934, 29973, 30320, 32705, 37013, 38605, 39252,
  12195. 28198, [12129, 29926], {f: 2, c: 31401}, 33253, 34521, 34680, 35355, 23113,
  12196. 23436, 23451, 26785, 26880, 28003, 29609, 29715, 29740, 30871, 32233,
  12197. 32747, 33048, 33109, 33694, 35916, [38446, 63942], 38929, [12104, 26352],
  12198. 24448, 26106, 26505, 27754, 29579, 20525, 23043, 27498, 30702, 22806,
  12199. 23916, 24013, 29477, 30031, 20709, 20985, 22575, 22829, 22934, 23002,
  12200. 23525, 23970, 25303, 25622, 25747, 25854, 26332, 27208, 29183, 29796,
  12201. 31368, 31407, 32327, 32350, 32768, 33136, 34799, 35201, 35616, 36953,
  12202. 36992, 39250, 24958, 27442, 28020, 32287, 35109, 36785, 20433, 20653,
  12203. 20887, 21191, 22471, 22665, 23481, 24248, 24898, 27029, 28044, 28263,
  12204. 28342, 29076, 29794, [12132, 29992], 29996, 32883, 33592, 33993, 36362,
  12205. 37780, 37854, 20110, 20305, 20598, 20778, [12060, 21448], 21451, 21491,
  12206. 23431, 23507, 23588, 24858, 24962, 26100, [12124, 29275], 29591, 29760,
  12207. 30402, 31056, 31121, 31161, 32006, [12155, 32701], 33419, 34261, 34398,
  12208. 36802, 36935, 37109, 37354, 38533, [12204, 38632], 38633, 21206, 24423,
  12209. 26093, 26161, 26671, 29020, 31286, 37057, 38922, 20113, 27218, 27550,
  12210. 28560, 29065, 32792, 33464, 34131, 36939, 38549, 38642, 38907, 34074,
  12211. 39729, 20112, 29066, 38596, 20803, 21407, 21729, 22291, 22290, 22435,
  12212. 23195, 23236, 23491, 24616, 24895, 25588, 27781, 27961, 28274, 28304,
  12213. 29232, 29503, 29783, 33489, 34945, 36677, 36960, 38498, 39000, 40219,
  12214. [12105, 26376], 36234, 37470, 20301, 20553, 20702, 21361, 22285, 22996,
  12215. 23041, 23561, 24944, 26256, 28205, 29234, 29771, 32239, 32963, 33806,
  12216. 33894, 34111, 34655, 34907, 35096, 35586, 36949, [12209, 38859], 39759,
  12217. 20083, 20369, 20754, 20842, 21807, 21929, 23418, 23461, {f: 2, c: 24188},
  12218. 24254, 24736, 24799, {f: 2, c: 24840}, 25540, 25912, 26377, 26580, 26586,
  12219. {f: 2, c: 26977}, 27833, 27943, 28216, 28641, {f: 2, c: 29494}, 29788,
  12220. 30001, 30290, 32173, 33278, 33848, 35029, 35480, 35547, 35565, 36400,
  12221. 36418, 36938, 36926, 36986, [12195, 37193], 37321, 37742, 22537, 27603,
  12222. [12161, 32905], 32946, 20801, 22891, 23609, 28516, 29607, 32996, 36103,
  12223. 37399, 38287, [12160, 32895], 25102, 28700, 32104, 34701, 22432, 24681,
  12224. 24903, 27575, 35518, 37504, 38577, [12036, 20057], 21535, 28139, 34093,
  12225. 38512, [12211, 38899], 39150, 25558, 27875, [12194, 37009], 20957, 25033,
  12226. 33210, 40441, 20381, 20506, 20736, 23452, 24847, 25087, 25836, 26885,
  12227. 27589, 30097, 30691, 32681, 33380, 34191, 34811, [12176, 34915], 35516,
  12228. 35696, 37291, [12038, 20108], 20197, 20234, 22839, 23016, 24050, 24347,
  12229. 24411, 24609, 29246, 29669, [30064, 63842], 30157, 31227, [12157, 32780],
  12230. [12159, 32819], 32900, 33505, 33617, 36029, 36019, 36999, 39156, 39180,
  12231. 28727, 30410, 32714, 32716, 32764, 35610, [12040, 20154], 20161, 20995,
  12232. 21360, [21693, 63902], 22240, 23035, 23493, 24341, 24525, 28270, 32106,
  12233. 33589, 34451, 35469, 38765, 38775, [12032, 19968], 20314, 20350, 22777,
  12234. [12103, 26085], 28322, 36920, 37808, 39353, 20219, 22764, 22922, 23001,
  12235. 24641, 31252, 33615, 36035, [12042, 20837], 21316, 20173, 21097, 23381,
  12236. 33471, 20180, [21050, 63999], 21672, 22985, 23039, [12070, 23376], 23383,
  12237. 23388, 24675, 24904, 28363, [28825, 63995], 29038, 29574, 29943, 30133,
  12238. 30913, 32043, 32773, [12163, 33258], 33576, 34071, 34249, 35566, 36039,
  12239. 38604, 20316, 21242, 22204, 26027, 26152, 28796, 28856, 29237, 32189,
  12240. 33421, 37196, 38592, 40306, 23409, 26855, 27544, 28538, 30430, 23697,
  12241. 26283, 28507, 31668, 31786, 34870, 38620, 19976, 20183, 21280, 22580,
  12242. 22715, 22767, 22892, 23559, 24115, 24196, 24373, 25484, 26290, 26454,
  12243. 27167, 27299, 27404, 28479, 29254, 29520, 29835, 31456, 31911, 33144,
  12244. 33247, 33255, 33674, 33900, 34083, 34196, 34255, 35037, 36115, 37292,
  12245. [12199, 38263], 38556, 20877, 21705, 22312, 23472, 25165, 26448, 26685,
  12246. 26771, 28221, 28371, 28797, 32289, 35009, 36001, 36617, 40779, 40782,
  12247. 29229, 31631, 35533, 37658, 20295, 20302, 20786, 21632, 22992, 24213,
  12248. 25269, 26485, 26990, 27159, 27822, 28186, 29401, 29482, 30141, 31672,
  12249. 32053, 33511, 33785, 33879, 34295, 35419, 36015, 36487, 36889, 37048,
  12250. 38606, 40799, 21219, 21514, 23265, 23490, 25688, 25973, 28404, 29380,
  12251. 30340, 31309, 31515, 31821, 32318, 32735, 33659, 35627, 36042,
  12252. [12186, 36196], 36321, 36447, 36842, 36857, 36969, 37841, 20291, 20346,
  12253. 20659, 20840, 20856, 21069, 21098, 22625, 22652, 22880, 23560, 23637,
  12254. 24283, 24731, 25136, 26643, 27583, 27656, 28593, 29006, 29728,
  12255. [12133, 30000], 30008, 30033, 30322, 31564, 31627, 31661, 31686, 32399,
  12256. 35438, 36670, 36681, 37439, 37523, 37666, 37931, 38651, 39002, 39019,
  12257. 39198, [20999, 64000], 25130, 25240, 27993, 30308, 31434, 31680, 32118,
  12258. 21344, 23742, 24215, 28472, 28857, 31896, 38673, 39822, 40670, 25509,
  12259. 25722, 34678, 19969, 20117, 20141, 20572, 20597, 21576, 22979, 23450,
  12260. 24128, 24237, 24311, 24449, 24773, 25402, 25919, 25972, 26060, 26230,
  12261. 26232, 26622, 26984, 27273, 27491, 27712, 28096, 28136, 28191, 28254,
  12262. 28702, 28833, 29582, 29693, 30010, 30555, 30855, 31118, 31243, 31357,
  12263. 31934, 32142, 33351, 35330, 35562, 35998, 37165, 37194, 37336, 37478,
  12264. 37580, 37664, 38662, 38742, 38748, 38914, [12237, 40718], 21046, 21137,
  12265. 21884, 22564, 24093, 24351, 24716, 25552, 26799, 28639, 31085, 31532,
  12266. 33229, 34234, 35069, 35576, 36420, 37261, 38500, 38555, 38717, 38988,
  12267. [12241, 40778], 20430, 20806, 20939, 21161, 22066, 24340, 24427, 25514,
  12268. 25805, 26089, 26177, 26362, 26361, 26397, 26781, 26839, 27133, 28437,
  12269. 28526, 29031, 29157, [12118, 29226], 29866, 30522, 31062, 31066, 31199,
  12270. 31264, 31381, 31895, 31967, 32068, 32368, 32903, 34299, 34468, 35412,
  12271. 35519, 36249, 36481, 36896, 36973, 37347, 38459, 38613, [12227, 40165],
  12272. 26063, 31751, [12188, 36275], 37827, 23384, 23562, 21330, 25305, 29469,
  12273. 20519, 23447, 24478, 24752, 24939, 26837, 28121, 29742, 31278, 32066,
  12274. 32156, 32305, 33131, 36394, 36405, 37758, 37912, 20304, 22352, 24038,
  12275. 24231, 25387, 32618, 20027, 20303, 20367, 20570, 23005, 32964, 21610,
  12276. 21608, 22014, 22863, 23449, 24030, 24282, 26205, 26417, 26609, 26666,
  12277. 27880, 27954, 28234, 28557, 28855, 29664, 30087, 31820, 32002, 32044,
  12278. 32162, [12168, 33311], 34523, 35387, 35461, [12187, 36208], 36490, 36659,
  12279. 36913, 37198, 37202, 37956, 39376, [12149, 31481], 31909, 20426, 20737,
  12280. 20934, 22472, 23535, 23803, 26201, 27197, 27994, 28310, 28652, 28940,
  12281. 30063, 31459, 34850, 36897, 36981, 38603, 39423, 33537, 20013, 20210,
  12282. 34886, 37325, 21373, 27355, 26987, 27713, 33914, 22686, 24974, 26366,
  12283. 25327, 28893, 29969, 30151, 32338, 33976, 35657, 36104, 20043, 21482,
  12284. 21675, 22320, 22336, 24535, 25345, 25351, 25711, [12096, 25903], 26088,
  12285. 26234, 26525, 26547, [12108, 27490], 27744, 27802, 28460, 30693, 30757,
  12286. 31049, 31063, 32025, 32930, 33026, [12164, 33267], 33437, 33463, 34584,
  12287. 35468, 36100, 36286, 36978, 30452, 31257, 31287, 32340, 32887, 21767,
  12288. 21972, 22645, 25391, 25634, 26185, 26187, 26733, 27035, 27524, 27941,
  12289. 28337, 29645, 29800, 29857, 30043, 30137, 30433, 30494, 30603, 31206,
  12290. 32265, 32285, 33275, 34095, 34967, 35386, 36049, 36587,
  12291. [12192, 36784, 63857], 36914, 37805, 38499, 38515, 38663, 20356, 21489,
  12292. 23018, 23241, 24089, 26702, 29894, 30142, 31209, 31378, 33187, 34541,
  12293. 36074, 36300, 36845, 26015, 26389, 22519, 28503, 32221, 36655, 37878,
  12294. 38598, 24501, 25074, 28548, 19988, 20376, 20511, 21449, 21983, 23919,
  12295. 24046, 27425, 27492, 30923, 31642, 36425, [12190, 36554, 63746], 36974,
  12296. 25417, 25662, 30528, 31364, 37679, 38015, 40810, 25776, 28591, 29158,
  12297. 29864, 29914, 31428, 31762, 32386, 31922, 32408, 35738, 36106, 38013,
  12298. 39184, 39244, 21049, 23519, 25830, 26413, 32046, 20717, [21443, 63851],
  12299. 22649, {f: 2, c: 24920}, 25082, 26028, 31449, 35730, 35734, 20489, 20513,
  12300. 21109, 21809, 23100, 24288, 24432, 24884, 25950, 26124, 26166, 26274,
  12301. 27085, 28356, 28466, 29462, 30241, 31379, 33081, 33369, 33750, 33980,
  12302. 20661, 22512, 23488, 23528, 24425, 25505, 30758, 32181, 33756, 34081,
  12303. 37319, 37365, 20874, 26613, 31574, 36012, 20932, 22971, 24765, 34389,
  12304. 20508, 21076, 23610, 24957, 25114, [25299, 64002], 25842, 26021, 28364,
  12305. 30240, 33034, 36448, 38495, 38587, 20191, 21315, 21912, 22825, 24029,
  12306. 25797, 27849, 28154, 29588, 31359, [12167, 33307], 34214, 36068, 36368,
  12307. 36983, 37351, 38369, 38433, 38854, 20984, 21746, 21894, 24505, 25764,
  12308. 28552, 32180, 36639, 36685, 37941, 20681, 23574, 27838, 28155, 29979,
  12309. 30651, 31805, 31844, 35449, 35522, 22558, 22974, 24086, 25463, 29266,
  12310. 30090, 30571, 35548, 36028, 36626, 24307, 26228, 28152, 32893, 33729,
  12311. 35531, [12205, 38737], 39894, 21059, 26367, 28053, 28399, 32224, 35558,
  12312. 36910, 36958, 39636, 21021, 21119, 21736, 24980, 25220, 25307, 26786,
  12313. 26898, 26970, 27189, 28818, 28966, 30813, 30977, 30990, 31186, 31245,
  12314. 32918, [12171, 33400], 33493, 33609, 34121, 35970, 36229, 37218, 37259,
  12315. 37294, 20419, 22225, 29165, 30679, 34560, 35320, [12072, 23544], 24534,
  12316. 26449, 37032, 21474, 22618, 23541, 24740, 24961, 25696, 32317, 32880,
  12317. 34085, 37507, 25774, 20652, 23828, 26368, 22684, 25277, 25512, 26894,
  12318. 27000, 27166, 28267, 30394, 31179, 33467, 33833, 35535, 36264, 36861,
  12319. 37138, 37195, 37276, 37648, 37656, 37786, 38619, 39478, 39949, 19985,
  12320. 30044, 31069, 31482, 31569, 31689, 32302, 33988, 36441, 36468, 36600,
  12321. 36880, 26149, 26943, 29763, 20986, 26414, 40668, 20805, 24544, 27798,
  12322. 34802, 34909, 34935, 24756, 33205, 33795, 36101, 21462, 21561, 22068,
  12323. 23094, 23601, 28810, 32736, 32858, 33030, 33261, 36259, 37257, 39519,
  12324. 40434, 20596, 20164, 21408, 24827, 28204, 23652, 20360, 20516, 21988,
  12325. 23769, 24159, 24677, 26772, 27835, 28100, 29118, 30164, 30196, 30305,
  12326. 31258, 31305, 32199, 32251, 32622, 33268, 34473, 36636, 38601, 39347,
  12327. [12242, 40786], 21063, 21189, 39149, 35242, 19971, 26578, 28422, 20405,
  12328. 23522, 26517, [27784, 63858], 28024, 29723, 30759, 37341, 37756, 34756,
  12329. 31204, 31281, 24555, 20182, 21668, 21822, 22702, 22949, 24816, 25171,
  12330. 25302, 26422, 26965, 33333, 38464, 39345, 39389, 20524, 21331, 21828,
  12331. 22396, 25176, 25826, 26219, 26589, 28609, 28655, 29730, 29752, 35351,
  12332. 37944, 21585, 22022, 22374, 24392, 24986, 27470, 28760, 28845, 32187,
  12333. 35477, 22890, 33067, 25506, 30472, 32829, 36010, 22612, 25645, 27067,
  12334. 23445, 24081, 28271, 34153, 20812, 21488, 22826, 24608, 24907, 27526,
  12335. 27760, 27888, 31518, 32974, 33492, 36294, 37040, 39089, 25799, 28580,
  12336. 25745, 25860, 20814, 21520, [12063, 22303], 35342, 24927, 26742, 30171,
  12337. 31570, 32113, 36890, 22534, 27084, 33151, 35114, 36864, 38969, 20600,
  12338. 22871, 22956, 25237, 36879, 39722, 24925, 29305, 38358, 22369, 23110,
  12339. 24052, 25226, 25773, 25850, 26487, 27874, 27966, 29228, 29750, 30772,
  12340. 32631, 33453, 36315, 38935, 21028, 22338, 26495, 29256, 29923, 36009,
  12341. 36774, 37393, 38442, [12043, 20843], 21485, 25420, 20329, 21764, 24726,
  12342. 25943, 27803, 28031, 29260, 29437, 31255, 35207, [12185, 35997], 24429,
  12343. 28558, 28921, 33192, 24846, [20415, 63845], 20559, 25153, [12122, 29255],
  12344. 31687, 32232, 32745, 36941, 38829, 39449, 36022, 22378, 24179, 26544,
  12345. 33805, 35413, 21536, 23318, 24163, 24290, 24330, 25987, 32954, 34109,
  12346. 38281, 38491, 20296, 21253, 21261, 21263, 21638, 21754, 22275, 24067,
  12347. 24598, 25243, 25265, 25429, 27873, 28006, 30129, 30770, 32990, 33071,
  12348. 33502, 33889, 33970, 34957, 35090, 36875, 37610, 39165, 39825, 24133,
  12349. [26292, 64006], 26333, 28689, 29190, 20469, 21117, 24426, 24915, 26451,
  12350. 27161, 28418, 29922, 31080, 34920, 35961, 39111, 39108, 39491, 21697,
  12351. 31263, 26963, 35575, 35914, [12213, 39080], 39342, 24444, 25259, 30130,
  12352. [12138, 30382], 34987, 36991, 38466, 21305, 24380, 24517, [27852, 63848],
  12353. 29644, 30050, [12134, 30091], 31558, 33534, 39325, 20047, 36924, 19979,
  12354. 20309, 21414, 22799, 24264, 26160, 27827, 29781, 33655, 34662, 36032,
  12355. 36944, 38686, 39957, 22737, 23416, 34384, 35604, 40372, 23506, 24680,
  12356. 24717, 26097, 27735, 28450, 28579, 28698, 32597, 32752, {f: 2, c: 38289},
  12357. 38480, 38867, 21106, 36676, 20989, 21547, 21688, 21859, 21898, 27323,
  12358. 28085, 32216, 33382, 37532, 38519, 40569, 21512, 21704, 30418, 34532,
  12359. 38308, 38356, 38492, 20130, 20233, 23022, 23270, 24055, 24658, 25239,
  12360. 26477, 26689, 27782, 28207, 32568, 32923, 33322, 38917, 20133, 20565,
  12361. 21683, 22419, 22874, 23401, 23475, 25032, 26999, 28023, 28707, 34809,
  12362. 35299, 35442, 35559, 36994, 39405, 39608, 21182, 26680, 20502, 24184,
  12363. 26447, 33607, [12175, 34892, 64008], 20139, 21521, 22190, 29670, 37141,
  12364. 38911, 39177, 39255, [12217, 39321], 22099, 22687, 34395, 35377, 25010,
  12365. 27382, 29563, 36562, 27463, 38570, 39511, 22869, 29184, 36203,
  12366. [12208, 38761], 20436, 23796, 24358, 25080, 26203, 27883, 28843,
  12367. [12126, 29572], 29625, 29694, 30505, 30541, 32067, 32098, 32291, 33335,
  12368. 34898, 36066, 37449, 39023, 23377, [12147, 31348], [12174, 34880],
  12369. [12212, 38913], 23244, 20448, 21332, 22846, 23805, 25406, 28025, 29433,
  12370. 33029, 33031, 33698, 37583, 38960, 20136, 20804, 21009, 22411, 24418,
  12371. 27842, 28366, 28677, 28752, 28847, 29074, 29673, [29801, 63918], 33610,
  12372. 34722, 34913, 36872, 37026, 37795, 39336, 20846, 24407, 24800, 24935,
  12373. 26291, 34137, 36426, 37295, 38795, 20046, 20114, 21628, 22741, 22778,
  12374. 22909, 23733, 24359, [12094, 25142], 25160, 26122, 26215, 27627, 28009,
  12375. 28111, 28246, 28408, 28564, 28640, 28649, 28765, 29392, 29733, 29786,
  12376. 29920, 30355, 31068, 31946, 32286, 32993, 33446, 33899, 33983, 34382,
  12377. 34399, 34676, 35703, 35946, 37804, 38912, 39013, 24785, 25110, 37239,
  12378. 23130, 26127, 28151, 28222, 29759, 39746, 24573, 24794, 31503, 21700,
  12379. 24344, 27742, 27859, 27946, 28888, 32005, 34425, 35340, 40251, 21270,
  12380. 21644, 23301, 27194, [12117, 28779], 30069, 31117, [12146, 31166], 33457,
  12381. 33775, 35441, 35649, 36008, 38772, 25844, 25899, {f: 2, c: 30906}, 31339,
  12382. 20024, 21914, 22864, 23462, 24187, 24739, 25563, 27489, 26213, 26707,
  12383. 28185, 29029, 29872, 32008, 36996, 39529, 39973, 27963, [28369, 63748],
  12384. 29502, 35905, 38346, 20976, 24140, 24488, 24653, 24822, 24880, 24908,
  12385. {f: 2, c: 26179}, 27045, 27841, 28255, 28361, 28514, 29004, 29852, 30343,
  12386. 31681, 31783, 33618, 34647, 36945, 38541, [12232, 40643], 21295, 22238,
  12387. 24315, 24458, 24674, 24724, 25079, 26214, 26371, 27292, 28142, 28590,
  12388. 28784, 29546, 32362, 33214, 33588, 34516, 35496, 36036, 21123, 29554,
  12389. 23446, 27243, 37892, 21742, 22150, 23389, 25928, 25989, 26313, 26783,
  12390. 28045, 28102, [12120, 29243], 32948, 37237, 39501, 20399, 20505, 21402,
  12391. 21518, 21564, 21897, 21957, 24127, 24460, 26429, 29030, 29661, 36869,
  12392. 21211, 21235, 22628, 22734, 28932, 29071, 29179, 34224, 35347,
  12393. [26248, 63941], 34216, 21927, 26244, 29002, 33841, 21321, 21913, 27585,
  12394. 24409, 24509, 25582, 26249, 28999, 35569, 36637, 40638, 20241, 25658,
  12395. 28875, 30054, 34407, 24676, 35662, 40440, 20807, 20982, 21256, 27958,
  12396. 33016, [12234, 40657], 26133, 27427, 28824, 30165, 21507, 23673, 32007,
  12397. 35350, [12107, 27424], 27453, 27462, 21560, 24688, 27965, 32725, 33288,
  12398. 20694, 20958, 21916, 22123, 22221, 23020, 23305, 24076, 24985, 24984,
  12399. 25137, 26206, 26342, 29081, {f: 2, c: 29113}, 29351, 31143, 31232, 32690,
  12400. 35440, {s: 163}, {f: 4, c: 12310}, {s: 14}, 8223, 8219, {f: 2, c: 8314},
  12401. {s: 7}, 8316, 0, {f: 2, c: 8317}, {s: 23}, 700, {s: 44}, 8942, 8759,
  12402. {s: 20}, {f: 10, c: 10122}, {s: 36}, {f: 26, c: 9398}, {s: 61},
  12403. {f: 2, c: 8826}, {f: 2, c: 8910}, {f: 2, c: 8832}, {f: 4, c: 8816}, 0,
  12404. 8842, 0, 8843, {f: 2, c: 8822}, 8825, {f: 2, c: 8922}, {s: 5}, 8773, 8771,
  12405. 8776, 0, 8868, {s: 78}, 8244, {s: 11}, 9839, {s: 4}, 8258, {s: 4}, 10045,
  12406. 0, 0, 8226, {s: 4}, {f: 2, c: 8249}, {s: 16}, 10010, 10006, 0, 9711,
  12407. {s: 3}, 10070, 0, 9676, {s: 24}, 9775, {s: 6}, 12320, 0, {f: 10, c: 10102},
  12408. {s: 17}, 12306, 12342, {s: 13}, 8710, 0, 8735, 0, {f: 2, c: 8741}, 0, 8787,
  12409. 8785, {f: 2, c: 8806}, 8723, {f: 3, c: 8853}, 0, 8980, 0, 0, 8802, 0, 9649,
  12410. 0, 8738, 8784, 0, 0, 8867, 0, 0, {f: 2, c: 8814}, 8837, 8836, 8713, 8716,
  12411. {f: 2, c: 8891}, 8794, 8966, {s: 6}, 12958, 0, 8252, {s: 11}, 9702, {s: 3},
  12412. 9663, 9653, 9657, 9667, {s: 4}, 9674, 12849, 12857, 13259, {f: 5, c: 9327},
  12413. {s: 18}, 8656, 8655, 8653, {s: 37}, 8657, 8659, {s: 8}, 8626, 8625, 0,
  12414. 8628, 8624, 8627, {s: 14}, 8636, 8640, {s: 10}, {f: 2, c: 8644}, {s: 144},
  12415. {f: 5, c: 9347}, {s: 33}, 12948, {s: 15}, 12965, {s: 93}, 8672, 8674, 8673,
  12416. 8675, {s: 4}, 8678, 8680, 8679, 8681, {s: 20}, 9757, 9759, {s: 76}, 12944,
  12417. {f: 6, c: 12938}, {s: 15}, {f: 2, c: 12318}, 8246, 0, 8245, {s: 3}, 12540,
  12418. 0, 0, {f: 2, c: 44034}, {f: 2, c: 44037}, {f: 5, c: 44043}, 44056,
  12419. {f: 2, c: 44062}, {f: 3, c: 44065}, {f: 7, c: 44069}, 44078,
  12420. {f: 6, c: 44082}, {f: 2, c: 44090}, {f: 3, c: 44093}, {f: 10, c: 44097},
  12421. 44108, {f: 6, c: 44110}, {f: 3, c: 44117}, {f: 3, c: 44121},
  12422. {f: 19, c: 44125}, {f: 2, c: 44146}, {f: 2, c: 44149}, 44153,
  12423. {f: 5, c: 44155}, 44162, {f: 2, c: 44167}, {f: 3, c: 44173},
  12424. {f: 3, c: 44177}, {f: 7, c: 44181}, 44190, {f: 6, c: 44194}, 44203,
  12425. {f: 2, c: 44205}, {f: 7, c: 44209}, 44218, {f: 3, c: 44222},
  12426. {f: 2, c: 44226}, {f: 3, c: 44229}, {f: 3, c: 44233}, {f: 8, c: 44237},
  12427. 44246, {f: 8, c: 44248}, {f: 2, c: 44258}, {f: 2, c: 44261}, 44265, 44267,
  12428. {f: 2, c: 44269}, 44274, 44276, {f: 5, c: 44279}, {f: 2, c: 44286},
  12429. {f: 3, c: 44289}, 44293, {f: 5, c: 44295}, 44302, 44304, {f: 6, c: 44306},
  12430. {f: 3, c: 44313}, {f: 3, c: 44317}, {f: 8, c: 44321}, {f: 2, c: 44330},
  12431. {f: 6, c: 44334}, {f: 2, c: 44342}, {f: 3, c: 44345}, {f: 7, c: 44349},
  12432. 44358, 44360, {f: 6, c: 44362}, {f: 3, c: 44369}, {f: 3, c: 44373},
  12433. {f: 8, c: 44377}, 44386, {f: 8, c: 44388}, {f: 2, c: 44398},
  12434. {f: 2, c: 44401}, {f: 4, c: 44407}, 44414, 44416, {f: 5, c: 44419},
  12435. {f: 2, c: 44426}, {f: 3, c: 44429}, {f: 11, c: 44433}, {f: 6, c: 44446},
  12436. {f: 18, c: 44453}, {f: 8, c: 44472}, {f: 2, c: 44482}, {f: 3, c: 44485},
  12437. {f: 7, c: 44489}, 44498, {f: 8, c: 44500}, {f: 3, c: 44509},
  12438. {f: 3, c: 44513}, {f: 19, c: 44517}, {f: 2, c: 44538}, {f: 2, c: 44541},
  12439. {f: 6, c: 44546}, 44554, 44556, {f: 6, c: 44558}, {f: 27, c: 44565},
  12440. {f: 2, c: 44594}, {f: 2, c: 44597}, 44601, {f: 5, c: 44603}, 44610, 44612,
  12441. {f: 3, c: 44615}, 44619, 44623, {f: 3, c: 44625}, 44629, {f: 5, c: 44631},
  12442. 44638, {f: 3, c: 44642}, {f: 2, c: 44646}, {f: 2, c: 44650},
  12443. {f: 3, c: 44653}, {f: 7, c: 44657}, 44666, {f: 6, c: 44670},
  12444. {f: 6, c: 44678}, {f: 47, c: 44685}, 44735, {f: 3, c: 44737},
  12445. {f: 7, c: 44741}, 44750, {f: 6, c: 44754}, {f: 2, c: 44762},
  12446. {f: 11, c: 44765}, {f: 2, c: 44777}, 44780, {f: 6, c: 44782},
  12447. {f: 3, c: 44789}, {f: 3, c: 44793}, {f: 10, c: 44797}, {f: 4, c: 44809},
  12448. {f: 2, c: 44814}, {f: 27, c: 44817}, {f: 2, c: 44846}, 44849, 44851,
  12449. {f: 7, c: 44853}, 44862, 44864, {f: 4, c: 44868}, {f: 6, c: 44874},
  12450. {f: 11, c: 44881}, {f: 6, c: 44894}, {f: 19, c: 44902}, {f: 6, c: 44922},
  12451. {f: 3, c: 44929}, {f: 3, c: 44933}, {f: 7, c: 44937}, {f: 3, c: 44946},
  12452. {f: 6, c: 44950}, {f: 27, c: 44957}, {f: 2, c: 44986}, {f: 3, c: 44989},
  12453. {f: 6, c: 44993}, 45002, 45004, {f: 5, c: 45007}, {f: 7, c: 45013},
  12454. {f: 11, c: 45021}, {f: 6, c: 45034}, {f: 2, c: 45042}, {f: 3, c: 45045},
  12455. {f: 7, c: 45049}, {f: 2, c: 45058}, {f: 7, c: 45061}, {f: 3, c: 45069},
  12456. {f: 3, c: 45073}, {f: 7, c: 45077}, {f: 10, c: 45086}, {f: 27, c: 45097},
  12457. {f: 2, c: 45126}, 45129, 45131, 45133, {f: 4, c: 45135}, 45142, 45144,
  12458. {f: 3, c: 45146}, {f: 30, c: 45150}, {f: 2, c: 45182}, {f: 3, c: 45185},
  12459. {f: 7, c: 45189}, 45198, 45200, {f: 6, c: 45202}, 45211, {f: 2, c: 45213},
  12460. {f: 5, c: 45219}, 45226, 45232, 45234, {f: 2, c: 45238}, {f: 3, c: 45241},
  12461. {f: 7, c: 45245}, 45254, {f: 6, c: 45258}, {f: 2, c: 45266},
  12462. {f: 3, c: 45269}, {f: 7, c: 45273}, {f: 4, c: 45281}, {f: 34, c: 45286},
  12463. 45322, {f: 3, c: 45325}, 45329, {f: 4, c: 45332}, 45338, {f: 5, c: 45342},
  12464. {f: 2, c: 45350}, {f: 3, c: 45353}, {f: 7, c: 45357}, 45366,
  12465. {f: 6, c: 45370}, {f: 2, c: 45378}, {f: 3, c: 45381}, {f: 7, c: 45385},
  12466. {f: 2, c: 45394}, {f: 2, c: 45398}, {f: 3, c: 45401}, {f: 3, c: 45405},
  12467. {f: 23, c: 45409}, {f: 2, c: 45434}, {f: 3, c: 45437}, 45441,
  12468. {f: 5, c: 45443}, 45450, 45452, {f: 4, c: 45454}, {f: 3, c: 45461},
  12469. {f: 3, c: 45465}, {f: 11, c: 45469}, {f: 35, c: 45481}, {f: 3, c: 45517},
  12470. {f: 3, c: 45521}, {f: 7, c: 45525}, 45534, {f: 8, c: 45536},
  12471. {f: 2, c: 45546}, {f: 3, c: 45549}, {f: 8, c: 45553}, 45562, 45564,
  12472. {f: 6, c: 45566}, {f: 2, c: 45574}, {f: 2, c: 45577}, {f: 7, c: 45581},
  12473. 45590, 45592, {f: 6, c: 45594}, {f: 19, c: 45601}, {f: 7, c: 45621},
  12474. {f: 27, c: 45629}, {f: 3, c: 45657}, {f: 3, c: 45661}, {f: 7, c: 45665},
  12475. {f: 10, c: 45674}, {f: 6, c: 45686}, {f: 7, c: 45693}, {f: 3, c: 45702},
  12476. {f: 6, c: 45706}, {f: 2, c: 45714}, {f: 3, c: 45717}, {f: 5, c: 45723},
  12477. 45730, 45732, {f: 3, c: 45735}, 45739, {f: 3, c: 45741}, {f: 3, c: 45745},
  12478. {f: 19, c: 45749}, {f: 2, c: 45770}, {f: 3, c: 45773}, 45777,
  12479. {f: 5, c: 45779}, 45786, 45788, {f: 4, c: 45790}, 45795, 45799,
  12480. {f: 2, c: 45801}, {f: 3, c: 45808}, 45814, {f: 3, c: 45820},
  12481. {f: 2, c: 45826}, {f: 3, c: 45829}, {f: 7, c: 45833}, 45842,
  12482. {f: 6, c: 45846}, {f: 55, c: 45853}, 45911, {f: 2, c: 45913}, 45917,
  12483. {f: 4, c: 45920}, 45926, 45928, 45930, {f: 2, c: 45932}, 45935,
  12484. {f: 2, c: 45938}, {f: 3, c: 45941}, {f: 7, c: 45945}, 45954,
  12485. {f: 6, c: 45958}, {f: 3, c: 45965}, {f: 3, c: 45969}, {f: 11, c: 45973},
  12486. {f: 6, c: 45986}, {f: 3, c: 45993}, {f: 23, c: 45997}, {f: 2, c: 46022},
  12487. {f: 2, c: 46025}, 46029, 46031, {f: 3, c: 46033}, 46038, 46040, 46042,
  12488. 46044, {f: 2, c: 46046}, {f: 3, c: 46049}, {f: 3, c: 46053},
  12489. {f: 19, c: 46057}, {f: 19, c: 46077}, {f: 7, c: 46097}, {f: 3, c: 46105},
  12490. {f: 3, c: 46109}, {f: 7, c: 46113}, 46122, {f: 8, c: 46124},
  12491. {f: 27, c: 46133}, {f: 2, c: 46162}, {f: 3, c: 46165}, {f: 7, c: 46169},
  12492. 46178, 46180, {f: 6, c: 46182}, {f: 19, c: 46189}, {f: 7, c: 46209},
  12493. {f: 20, c: 46217}, {f: 6, c: 46238}, {f: 3, c: 46245}, {f: 3, c: 46249},
  12494. {f: 8, c: 46253}, 46262, 46264, {f: 6, c: 46266}, {f: 3, c: 46273},
  12495. {f: 3, c: 46277}, {f: 7, c: 46281}, {f: 4, c: 46289}, {f: 6, c: 46294},
  12496. {f: 2, c: 46302}, {f: 2, c: 46305}, 46309, {f: 5, c: 46311}, 46318, 46320,
  12497. {f: 6, c: 46322}, {f: 27, c: 46329}, {f: 2, c: 46358}, {f: 2, c: 46361},
  12498. {f: 7, c: 46365}, 46374, {f: 5, c: 46379}, {f: 2, c: 46386},
  12499. {f: 3, c: 46389}, {f: 7, c: 46393}, 46402, {f: 5, c: 46406},
  12500. {f: 2, c: 46414}, {f: 3, c: 46417}, {f: 7, c: 46421}, 46430,
  12501. {f: 62, c: 46434}, {f: 2, c: 46498}, {f: 3, c: 46501}, 46505,
  12502. {f: 4, c: 46508}, 46514, {f: 5, c: 46518}, {f: 2, c: 46526},
  12503. {f: 3, c: 46529}, {f: 7, c: 46533}, 46542, {f: 6, c: 46546},
  12504. {f: 19, c: 46553}, {f: 35, c: 46573}, {f: 2, c: 46610}, {f: 3, c: 46613},
  12505. {f: 12, c: 46617}, {f: 6, c: 46630}, {f: 7, c: 46637}, {f: 19, c: 46645},
  12506. {f: 27, c: 46665}, {f: 3, c: 46693}, {f: 51, c: 46697}, {f: 2, c: 46750},
  12507. {f: 3, c: 46753}, {f: 6, c: 46757}, {f: 4, c: 46765}, {f: 34, c: 46770},
  12508. {f: 27, c: 46805}, {f: 3, c: 46833}, {f: 3, c: 46837}, {f: 7, c: 46841},
  12509. {f: 3, c: 46850}, {f: 34, c: 46854}, {f: 2, c: 46890}, {f: 2, c: 46893},
  12510. {f: 7, c: 46897}, 46906, {f: 8, c: 46908}, {f: 3, c: 46917},
  12511. {f: 3, c: 46921}, {f: 7, c: 46925}, {f: 10, c: 46934}, {f: 3, c: 46945},
  12512. {f: 3, c: 46949}, {f: 7, c: 46953}, 46962, 46964, {f: 6, c: 46966},
  12513. {f: 2, c: 46974}, {f: 3, c: 46977}, {f: 7, c: 46981}, 46990,
  12514. {f: 3, c: 46995}, {f: 2, c: 47002}, {f: 3, c: 47005}, {f: 7, c: 47009},
  12515. 47018, {f: 6, c: 47022}, {f: 2, c: 47030}, {f: 14, c: 47033}, 47048,
  12516. {f: 34, c: 47050}, {f: 2, c: 47086}, {f: 3, c: 47089}, {f: 7, c: 47093},
  12517. 47102, {f: 5, c: 47106}, {f: 2, c: 47114}, {f: 3, c: 47117},
  12518. {f: 7, c: 47121}, 47130, 47132, {f: 6, c: 47134}, {f: 2, c: 47142},
  12519. {f: 3, c: 47145}, {f: 7, c: 47149}, 47158, {f: 6, c: 47162},
  12520. {f: 3, c: 47169}, {f: 12, c: 47173}, 47186, {f: 8, c: 47188},
  12521. {f: 2, c: 47198}, {f: 3, c: 47201}, {f: 7, c: 47205}, 47214, 47216,
  12522. {f: 6, c: 47218}, {f: 3, c: 47225}, {f: 16, c: 47229}, {f: 26, c: 47246},
  12523. {f: 7, c: 47273}, {f: 3, c: 47281}, {f: 3, c: 47285}, {f: 7, c: 47289},
  12524. 47298, 47300, {f: 6, c: 47302}, {f: 3, c: 47309}, {f: 3, c: 47313},
  12525. {f: 8, c: 47317}, 47326, 47328, {f: 6, c: 47330}, {f: 2, c: 47338},
  12526. {f: 3, c: 47341}, {f: 7, c: 47345}, 47354, 47356, {f: 6, c: 47358},
  12527. {f: 19, c: 47365}, {f: 7, c: 47385}, {f: 27, c: 47393}, {f: 2, c: 47422},
  12528. {f: 3, c: 47425}, {f: 7, c: 47429}, {f: 2, c: 47437}, 47440,
  12529. {f: 6, c: 47442}, {f: 2, c: 47450}, {f: 3, c: 47453}, {f: 7, c: 47457},
  12530. 47466, 47468, {f: 6, c: 47470}, {f: 2, c: 47478}, {f: 3, c: 47481},
  12531. {f: 7, c: 47485}, 47494, 47496, {f: 2, c: 47499}, {f: 29, c: 47503},
  12532. {f: 2, c: 47534}, {f: 3, c: 47537}, {f: 7, c: 47541}, 47550, 47552,
  12533. {f: 6, c: 47554}, {f: 2, c: 47562}, 47565, {f: 5, c: 47571}, 47578, 47580,
  12534. {f: 2, c: 47583}, 47586, {f: 2, c: 47590}, {f: 3, c: 47593},
  12535. {f: 7, c: 47597}, 47606, {f: 5, c: 47611}, {f: 6, c: 47618},
  12536. {f: 12, c: 47625}, {f: 34, c: 47638}, {f: 2, c: 47674}, {f: 3, c: 47677},
  12537. 47681, {f: 5, c: 47683}, 47690, 47692, {f: 4, c: 47695}, {f: 2, c: 47702},
  12538. {f: 3, c: 47705}, {f: 7, c: 47709}, 47718, {f: 6, c: 47722},
  12539. {f: 2, c: 47730}, {f: 3, c: 47733}, {f: 10, c: 47737}, 47750,
  12540. {f: 4, c: 47752}, {f: 27, c: 47757}, 47786, {f: 3, c: 47789}, 47793,
  12541. {f: 5, c: 47795}, 47802, 47804, {f: 6, c: 47806}, {f: 3, c: 47813},
  12542. {f: 15, c: 47817}, {f: 34, c: 47834}, {f: 3, c: 47869}, {f: 3, c: 47873},
  12543. {f: 8, c: 47877}, 47886, 47888, {f: 6, c: 47890}, {f: 3, c: 47897},
  12544. {f: 3, c: 47901}, {f: 8, c: 47905}, 47914, {f: 8, c: 47916}, 47927,
  12545. {f: 2, c: 47929}, {f: 5, c: 47935}, 47942, 47944, {f: 3, c: 47946}, 47950,
  12546. {f: 3, c: 47953}, {f: 3, c: 47957}, {f: 8, c: 47961}, 47970,
  12547. {f: 8, c: 47972}, {f: 27, c: 47981}, {f: 3, c: 48009}, {f: 3, c: 48013},
  12548. {f: 19, c: 48017}, {f: 3, c: 48037}, {f: 3, c: 48041}, {f: 7, c: 48045},
  12549. {f: 2, c: 48053}, {f: 8, c: 48056}, {f: 3, c: 48065}, {f: 3, c: 48069},
  12550. {f: 7, c: 48073}, {f: 2, c: 48081}, {f: 36, c: 48084}, {f: 2, c: 48122},
  12551. {f: 2, c: 48125}, 48129, {f: 5, c: 48131}, 48138, 48142, 48144,
  12552. {f: 2, c: 48146}, {f: 2, c: 48153}, {f: 4, c: 48160}, 48166, 48168,
  12553. {f: 3, c: 48170}, {f: 2, c: 48174}, {f: 2, c: 48178}, {f: 3, c: 48181},
  12554. {f: 7, c: 48185}, 48194, {f: 3, c: 48198}, {f: 2, c: 48202},
  12555. {f: 2, c: 48206}, {f: 12, c: 48209}, {f: 38, c: 48222}, {f: 2, c: 48262},
  12556. {f: 2, c: 48265}, 48269, {f: 5, c: 48271}, 48278, 48280, {f: 5, c: 48283},
  12557. {f: 2, c: 48290}, {f: 2, c: 48293}, {f: 7, c: 48297}, 48306,
  12558. {f: 6, c: 48310}, {f: 2, c: 48318}, {f: 3, c: 48321}, {f: 8, c: 48325},
  12559. 48334, {f: 3, c: 48338}, {f: 2, c: 48342}, {f: 3, c: 48345},
  12560. {f: 23, c: 48349}, 48375, {f: 3, c: 48377}, {f: 7, c: 48381}, 48390, 48392,
  12561. {f: 6, c: 48394}, {f: 3, c: 48401}, {f: 15, c: 48405}, {f: 7, c: 48421},
  12562. {f: 19, c: 48429}, {f: 7, c: 48449}, {f: 2, c: 48458}, {f: 3, c: 48461},
  12563. {f: 7, c: 48465}, {f: 10, c: 48474}, {f: 3, c: 48485}, {f: 23, c: 48489},
  12564. {f: 2, c: 48514}, {f: 2, c: 48517}, {f: 5, c: 48523}, 48530, 48532,
  12565. {f: 3, c: 48534}, 48539, {f: 7, c: 48541}, {f: 11, c: 48549},
  12566. {f: 7, c: 48561}, {f: 27, c: 48569}, {f: 2, c: 48598}, {f: 3, c: 48601},
  12567. {f: 12, c: 48605}, {f: 6, c: 48618}, {f: 3, c: 48625}, {f: 3, c: 48629},
  12568. {f: 7, c: 48633}, {f: 2, c: 48641}, 48644, {f: 6, c: 48646},
  12569. {f: 2, c: 48654}, {f: 3, c: 48657}, {f: 7, c: 48661}, 48670,
  12570. {f: 36, c: 48672}, {f: 2, c: 48710}, {f: 3, c: 48713}, 48717,
  12571. {f: 5, c: 48719}, 48726, 48728, {f: 4, c: 48732}, {f: 2, c: 48738},
  12572. {f: 3, c: 48741}, 48745, {f: 5, c: 48747}, 48754, {f: 5, c: 48758},
  12573. {f: 2, c: 48766}, {f: 3, c: 48769}, {f: 7, c: 48773}, 48782,
  12574. {f: 6, c: 48786}, {f: 14, c: 48794}, {f: 39, c: 48809}, {f: 2, c: 48850},
  12575. {f: 2, c: 48853}, {f: 7, c: 48857}, {f: 2, c: 48865}, {f: 6, c: 48870},
  12576. {f: 20, c: 48877}, {f: 6, c: 48898}, {f: 14, c: 48906}, 48922,
  12577. {f: 34, c: 48926}, {f: 2, c: 48962}, {f: 3, c: 48965}, {f: 7, c: 48969},
  12578. {f: 3, c: 48978}, {f: 62, c: 48982}, {f: 27, c: 49045}, {f: 20, c: 49073},
  12579. {f: 6, c: 49094}, {f: 2, c: 49102}, {f: 3, c: 49105}, {f: 7, c: 49109},
  12580. {f: 2, c: 49117}, 49120, {f: 90, c: 49122}, {f: 20, c: 49213},
  12581. {f: 6, c: 49234}, {f: 3, c: 49241}, {f: 3, c: 49245}, {f: 7, c: 49249},
  12582. {f: 38, c: 49258}, {f: 2, c: 49298}, {f: 3, c: 49301}, {f: 7, c: 49305},
  12583. 49314, 49316, {f: 6, c: 49318}, 49326, {f: 2, c: 49329}, {f: 5, c: 49335},
  12584. 49342, {f: 3, c: 49346}, {f: 2, c: 49350}, {f: 2, c: 49354},
  12585. {f: 3, c: 49357}, {f: 7, c: 49361}, 49370, {f: 6, c: 49374},
  12586. {f: 2, c: 49382}, {f: 3, c: 49385}, {f: 7, c: 49389}, 49398, 49400,
  12587. {f: 6, c: 49402}, {f: 3, c: 49409}, {f: 3, c: 49413}, {f: 7, c: 49417},
  12588. {f: 4, c: 49425}, {f: 6, c: 49430}, {f: 2, c: 49441}, 49445,
  12589. {f: 4, c: 49448}, 49454, {f: 4, c: 49458}, 49463, {f: 2, c: 49466},
  12590. {f: 3, c: 49469}, {f: 7, c: 49473}, 49482, {f: 6, c: 49486},
  12591. {f: 2, c: 49494}, {f: 3, c: 49497}, {f: 7, c: 49501}, 49510,
  12592. {f: 6, c: 49514}, {f: 3, c: 49521}, {f: 3, c: 49525}, {f: 12, c: 49529},
  12593. {f: 6, c: 49542}, 49551, {f: 3, c: 49553}, 49557, {f: 5, c: 49559}, 49566,
  12594. 49568, {f: 3, c: 49570}, {f: 2, c: 49574}, {f: 2, c: 49578},
  12595. {f: 3, c: 49581}, {f: 12, c: 49585}, {f: 6, c: 49598}, {f: 3, c: 49605},
  12596. {f: 3, c: 49609}, {f: 7, c: 49613}, {f: 2, c: 49621}, {f: 7, c: 49625},
  12597. {f: 3, c: 49633}, {f: 3, c: 49637}, {f: 7, c: 49641}, 49650,
  12598. {f: 8, c: 49652}, {f: 2, c: 49662}, {f: 3, c: 49665}, {f: 7, c: 49669},
  12599. 49678, 49680, {f: 6, c: 49682}, {f: 2, c: 49690}, {f: 2, c: 49693},
  12600. {f: 7, c: 49697}, 49706, 49708, 49710, 49712, 49715, {f: 19, c: 49717},
  12601. {f: 7, c: 49737}, {f: 2, c: 49746}, {f: 3, c: 49749}, {f: 7, c: 49753},
  12602. {f: 4, c: 49761}, {f: 6, c: 49766}, {f: 2, c: 49774}, {f: 3, c: 49777},
  12603. {f: 7, c: 49781}, 49790, 49792, {f: 6, c: 49794}, {f: 6, c: 49802},
  12604. {f: 7, c: 49809}, {f: 2, c: 49817}, 49820, {f: 6, c: 49822},
  12605. {f: 2, c: 49830}, {f: 3, c: 49833}, {f: 6, c: 49838}, 49846, 49848,
  12606. {f: 34, c: 49850}, {f: 2, c: 49886}, {f: 2, c: 49889}, {f: 6, c: 49893},
  12607. 49902, 49904, {f: 4, c: 49906}, 49911, 49914, {f: 3, c: 49917},
  12608. {f: 7, c: 49921}, {f: 2, c: 49930}, {f: 5, c: 49934}, {f: 2, c: 49942},
  12609. {f: 3, c: 49945}, {f: 7, c: 49949}, {f: 2, c: 49958}, {f: 27, c: 49962},
  12610. {f: 34, c: 49990}, {f: 2, c: 50026}, {f: 3, c: 50029}, 50033,
  12611. {f: 5, c: 50035}, {f: 2, c: 50042}, {f: 6, c: 50046}, {f: 3, c: 50053},
  12612. {f: 3, c: 50057}, {f: 51, c: 50061}, {f: 23, c: 50113}, {f: 2, c: 50138},
  12613. {f: 2, c: 50141}, 50145, {f: 5, c: 50147}, {f: 3, c: 50154},
  12614. {f: 6, c: 50158}, {f: 2, c: 50166}, {f: 15, c: 50169}, {f: 7, c: 50185},
  12615. {f: 19, c: 50193}, {f: 7, c: 50213}, {f: 3, c: 50221}, {f: 3, c: 50225},
  12616. {f: 7, c: 50229}, {f: 10, c: 50238}, {f: 27, c: 50249}, {f: 2, c: 50278},
  12617. {f: 3, c: 50281}, {f: 7, c: 50285}, {f: 3, c: 50294}, {f: 6, c: 50298},
  12618. {f: 19, c: 50305}, {f: 7, c: 50325}, {f: 27, c: 50333}, {f: 3, c: 50361},
  12619. {f: 44, c: 50365}, {f: 6, c: 50410}, {f: 2, c: 50418}, {f: 3, c: 50421},
  12620. 50425, {f: 4, c: 50427}, {f: 10, c: 50434}, {f: 3, c: 50445},
  12621. {f: 3, c: 50449}, {f: 7, c: 50453}, {f: 11, c: 50461}, {f: 2, c: 50474},
  12622. {f: 3, c: 50477}, {f: 7, c: 50481}, 50490, 50492, {f: 6, c: 50494},
  12623. {f: 2, c: 50502}, 50507, {f: 4, c: 50511}, 50518, {f: 3, c: 50522}, 50527,
  12624. {f: 2, c: 50530}, {f: 3, c: 50533}, {f: 7, c: 50537}, 50546,
  12625. {f: 6, c: 50550}, {f: 2, c: 50558}, {f: 3, c: 50561}, {f: 2, c: 50565},
  12626. {f: 4, c: 50568}, 50574, 50576, {f: 3, c: 50578}, 50582, {f: 3, c: 50585},
  12627. {f: 3, c: 50589}, {f: 8, c: 50593}, {f: 10, c: 50602}, {f: 2, c: 50614},
  12628. 50618, {f: 5, c: 50623}, 50635, 50637, 50639, {f: 2, c: 50642},
  12629. {f: 3, c: 50645}, {f: 7, c: 50649}, 50658, 50660, {f: 6, c: 50662}, 50671,
  12630. {f: 3, c: 50673}, 50677, {f: 4, c: 50680}, {f: 3, c: 50690},
  12631. {f: 3, c: 50697}, {f: 3, c: 50701}, {f: 7, c: 50705}, 50714,
  12632. {f: 7, c: 50717}, {f: 2, c: 50726}, {f: 3, c: 50729}, 50735,
  12633. {f: 2, c: 50737}, 50742, 50744, 50746, {f: 4, c: 50748}, {f: 2, c: 50754},
  12634. {f: 3, c: 50757}, {f: 7, c: 50761}, 50770, {f: 6, c: 50774},
  12635. {f: 2, c: 50782}, {f: 11, c: 50785}, {f: 2, c: 50797}, 50800,
  12636. {f: 6, c: 50802}, {f: 2, c: 50810}, {f: 3, c: 50813}, {f: 7, c: 50817},
  12637. 50826, 50828, {f: 6, c: 50830}, {f: 2, c: 50838}, {f: 3, c: 50841},
  12638. {f: 7, c: 50845}, 50854, 50856, {f: 6, c: 50858}, {f: 2, c: 50866},
  12639. {f: 3, c: 50869}, {f: 5, c: 50875}, 50882, 50884, {f: 6, c: 50886},
  12640. {f: 2, c: 50894}, {f: 3, c: 50897}, {f: 7, c: 50901}, {f: 2, c: 50910},
  12641. {f: 6, c: 50914}, {f: 2, c: 50922}, {f: 3, c: 50925}, {f: 7, c: 50929},
  12642. {f: 3, c: 50938}, {f: 6, c: 50942}, {f: 2, c: 50950}, {f: 3, c: 50953},
  12643. {f: 7, c: 50957}, 50966, 50968, {f: 6, c: 50970}, {f: 2, c: 50978},
  12644. {f: 3, c: 50981}, {f: 7, c: 50985}, 50994, 50996, 50998, {f: 4, c: 51000},
  12645. {f: 2, c: 51006}, {f: 3, c: 51009}, {f: 5, c: 51013}, 51019, 51022, 51024,
  12646. {f: 3, c: 51033}, {f: 3, c: 51037}, {f: 7, c: 51041}, {f: 2, c: 51049},
  12647. {f: 8, c: 51052}, {f: 2, c: 51062}, {f: 3, c: 51065}, {f: 4, c: 51071},
  12648. 51078, {f: 3, c: 51083}, 51087, {f: 2, c: 51090}, 51093, 51097,
  12649. {f: 5, c: 51099}, 51106, {f: 5, c: 51111}, {f: 2, c: 51118},
  12650. {f: 3, c: 51121}, {f: 7, c: 51125}, 51134, {f: 6, c: 51138},
  12651. {f: 2, c: 51146}, 51149, 51151, {f: 7, c: 51153}, {f: 4, c: 51161},
  12652. {f: 6, c: 51166}, {f: 3, c: 51173}, {f: 3, c: 51177}, {f: 19, c: 51181},
  12653. {f: 2, c: 51202}, {f: 3, c: 51205}, 51209, {f: 5, c: 51211}, 51218, 51220,
  12654. {f: 5, c: 51223}, {f: 2, c: 51230}, {f: 3, c: 51233}, {f: 7, c: 51237},
  12655. 51246, 51248, {f: 6, c: 51250}, {f: 3, c: 51257}, {f: 3, c: 51261},
  12656. {f: 7, c: 51265}, {f: 2, c: 51274}, {f: 6, c: 51278}, {f: 27, c: 51285},
  12657. {f: 2, c: 51314}, {f: 3, c: 51317}, 51321, {f: 5, c: 51323}, 51330, 51332,
  12658. {f: 3, c: 51336}, {f: 6, c: 51342}, {f: 8, c: 51349}, 51358, 51360,
  12659. {f: 6, c: 51362}, {f: 19, c: 51369}, {f: 6, c: 51390}, {f: 3, c: 51397},
  12660. {f: 3, c: 51401}, {f: 7, c: 51405}, 51414, 51416, {f: 6, c: 51418},
  12661. {f: 2, c: 51426}, {f: 16, c: 51429}, {f: 6, c: 51446}, {f: 2, c: 51454},
  12662. {f: 3, c: 51457}, {f: 5, c: 51463}, 51470, 51472, {f: 6, c: 51474},
  12663. {f: 19, c: 51481}, {f: 7, c: 51501}, {f: 27, c: 51509}, {f: 2, c: 51538},
  12664. {f: 3, c: 51541}, {f: 7, c: 51545}, 51554, {f: 8, c: 51556},
  12665. {f: 3, c: 51565}, {f: 3, c: 51569}, {f: 7, c: 51573}, {f: 11, c: 51581},
  12666. {f: 2, c: 51594}, {f: 3, c: 51597}, {f: 7, c: 51601}, 51610, 51612,
  12667. {f: 34, c: 51614}, {f: 2, c: 51650}, {f: 2, c: 51653}, 51657,
  12668. {f: 5, c: 51659}, 51666, 51668, {f: 2, c: 51671}, 51675, {f: 2, c: 51678},
  12669. 51681, 51683, {f: 2, c: 51685}, {f: 4, c: 51688}, 51694, {f: 6, c: 51698},
  12670. {f: 2, c: 51706}, {f: 3, c: 51709}, {f: 7, c: 51713}, 51722,
  12671. {f: 6, c: 51726}, {f: 3, c: 51733}, {f: 16, c: 51737}, {f: 34, c: 51754},
  12672. {f: 2, c: 51790}, {f: 3, c: 51793}, {f: 7, c: 51797}, 51806,
  12673. {f: 6, c: 51810}, {f: 20, c: 51817}, {f: 6, c: 51838}, {f: 19, c: 51845},
  12674. {f: 35, c: 51865}, {f: 2, c: 51902}, {f: 3, c: 51905}, {f: 7, c: 51909},
  12675. 51918, 51920, 51922, {f: 4, c: 51924}, {f: 6, c: 51930}, {f: 11, c: 51937},
  12676. {f: 7, c: 51949}, {f: 19, c: 51957}, {f: 7, c: 51977}, {f: 3, c: 51985},
  12677. {f: 3, c: 51989}, {f: 7, c: 51993}, {f: 31, c: 52002}, {f: 6, c: 52034},
  12678. {f: 2, c: 52042}, {f: 3, c: 52045}, {f: 7, c: 52049}, {f: 3, c: 52058},
  12679. {f: 6, c: 52062}, {f: 19, c: 52069}, {f: 34, c: 52090}, {f: 27, c: 52125},
  12680. {f: 27, c: 52153}, {f: 15, c: 52181}, {f: 2, c: 52197}, 52200,
  12681. {f: 34, c: 52202}, {f: 2, c: 52238}, {f: 3, c: 52241}, {f: 7, c: 52245},
  12682. {f: 3, c: 52254}, {f: 4, c: 52259}, {f: 2, c: 52266}, 52269, 52271,
  12683. {f: 7, c: 52273}, 52282, {f: 5, c: 52287}, {f: 2, c: 52294},
  12684. {f: 3, c: 52297}, {f: 7, c: 52301}, 52310, {f: 6, c: 52314},
  12685. {f: 3, c: 52321}, 52325, 52327, {f: 7, c: 52329}, {f: 4, c: 52337},
  12686. {f: 34, c: 52342}, {f: 2, c: 52378}, {f: 3, c: 52381}, {f: 7, c: 52385},
  12687. 52394, {f: 6, c: 52398}, {f: 2, c: 52406}, {f: 3, c: 52409},
  12688. {f: 7, c: 52413}, 52422, 52424, {f: 6, c: 52426}, {f: 3, c: 52433},
  12689. {f: 15, c: 52437}, {f: 7, c: 52453}, {f: 3, c: 52461}, {f: 16, c: 52465},
  12690. {f: 6, c: 52482}, {f: 2, c: 52490}, {f: 3, c: 52493}, {f: 7, c: 52497},
  12691. 52506, 52508, {f: 6, c: 52510}, {f: 3, c: 52517}, {f: 3, c: 52521},
  12692. {f: 12, c: 52525}, {f: 34, c: 52538}, {f: 3, c: 52573}, {f: 3, c: 52577},
  12693. {f: 7, c: 52581}, 52590, 52592, {f: 6, c: 52594}, {f: 15, c: 52601},
  12694. {f: 11, c: 52617}, {f: 2, c: 52630}, {f: 3, c: 52633}, {f: 7, c: 52637},
  12695. 52646, 52648, {f: 6, c: 52650}, {f: 19, c: 52657}, {f: 7, c: 52677},
  12696. {f: 3, c: 52685}, {f: 23, c: 52689}, {f: 3, c: 52713}, {f: 3, c: 52717},
  12697. {f: 7, c: 52721}, 52730, 52732, {f: 6, c: 52734}, {f: 3, c: 52741},
  12698. {f: 3, c: 52745}, {f: 7, c: 52749}, {f: 4, c: 52757}, {f: 6, c: 52762},
  12699. {f: 2, c: 52770}, {f: 3, c: 52773}, {f: 7, c: 52777}, 52786, 52788,
  12700. {f: 34, c: 52790}, {f: 2, c: 52826}, {f: 2, c: 52829}, {f: 6, c: 52834},
  12701. 52842, 52844, {f: 6, c: 52846}, {f: 2, c: 52854}, {f: 3, c: 52857},
  12702. {f: 7, c: 52861}, 52870, 52872, {f: 6, c: 52874}, {f: 2, c: 52882},
  12703. {f: 3, c: 52885}, {f: 7, c: 52889}, 52898, {f: 6, c: 52902},
  12704. {f: 19, c: 52910}, {f: 34, c: 52930}, {f: 2, c: 52966}, {f: 2, c: 52969},
  12705. {f: 7, c: 52973}, 52982, {f: 6, c: 52986}, {f: 2, c: 52994},
  12706. {f: 3, c: 52997}, {f: 7, c: 53001}, 53010, 53012, {f: 6, c: 53014},
  12707. {f: 3, c: 53021}, {f: 3, c: 53025}, {f: 7, c: 53029}, 53038,
  12708. {f: 6, c: 53042}, {f: 27, c: 53049}, {f: 2, c: 53078}, {f: 3, c: 53081},
  12709. {f: 7, c: 53085}, 53094, 53096, {f: 6, c: 53098}, {f: 2, c: 53106},
  12710. {f: 3, c: 53109}, {f: 7, c: 53113}, {f: 4, c: 53121}, {f: 6, c: 53126},
  12711. {f: 20, c: 53133}, {f: 6, c: 53154}, {f: 7, c: 53161}, {f: 19, c: 53169},
  12712. {f: 27, c: 53189}, {f: 2, c: 53218}, {f: 3, c: 53221}, {f: 7, c: 53225},
  12713. 53234, 53236, {f: 6, c: 53238}, {f: 3, c: 53245}, {f: 3, c: 53249},
  12714. {f: 12, c: 53253}, {f: 6, c: 53266}, {f: 20, c: 53273}, {f: 6, c: 53294},
  12715. {f: 2, c: 53302}, {f: 3, c: 53305}, {f: 7, c: 53309}, 53318, 53320,
  12716. {f: 6, c: 53322}, {f: 3, c: 53329}, {f: 3, c: 53333}, {f: 7, c: 53337},
  12717. {f: 11, c: 53345}, {f: 2, c: 53358}, {f: 3, c: 53361}, {f: 7, c: 53365},
  12718. {f: 3, c: 53374}, {f: 34, c: 53378}, {f: 2, c: 53414}, {f: 3, c: 53417},
  12719. {f: 7, c: 53421}, 53430, 53432, {f: 6, c: 53434}, {f: 2, c: 53442},
  12720. {f: 3, c: 53445}, {f: 6, c: 53450}, 53458, {f: 6, c: 53462},
  12721. {f: 2, c: 53470}, {f: 3, c: 53473}, {f: 7, c: 53477}, 53486,
  12722. {f: 6, c: 53490}, {f: 20, c: 53497}, {f: 34, c: 53518}, {f: 2, c: 53554},
  12723. {f: 3, c: 53557}, 53561, {f: 5, c: 53563}, 53570, {f: 6, c: 53574},
  12724. {f: 2, c: 53582}, {f: 3, c: 53585}, {f: 7, c: 53589}, 53598, 53600,
  12725. {f: 6, c: 53602}, {f: 3, c: 53609}, {f: 15, c: 53613}, {f: 7, c: 53629},
  12726. {f: 3, c: 53637}, {f: 23, c: 53641}, {f: 2, c: 53666}, {f: 3, c: 53669},
  12727. {f: 7, c: 53673}, 53682, 53684, {f: 4, c: 53686}, 53691, {f: 3, c: 53693},
  12728. {f: 23, c: 53697}, {f: 27, c: 53721}, {f: 3, c: 53749}, {f: 14, c: 53753},
  12729. 53768, {f: 6, c: 53770}, {f: 27, c: 53777}, {f: 2, c: 53806},
  12730. {f: 3, c: 53809}, {f: 7, c: 53813}, 53822, 53824, {f: 6, c: 53826},
  12731. {f: 19, c: 53833}, {f: 7, c: 53853}, {f: 27, c: 53861}, {f: 2, c: 53890},
  12732. {f: 3, c: 53893}, {f: 7, c: 53897}, {f: 3, c: 53906}, {f: 6, c: 53910},
  12733. {f: 3, c: 53917}, {f: 3, c: 53921}, {f: 7, c: 53925}, {f: 4, c: 53933},
  12734. {f: 6, c: 53938}, {f: 2, c: 53946}, {f: 2, c: 53949}, 53953,
  12735. {f: 5, c: 53955}, 53962, {f: 8, c: 53964}, {f: 3, c: 53973},
  12736. {f: 3, c: 53977}, {f: 7, c: 53981}, {f: 10, c: 53990}, {f: 2, c: 54002},
  12737. {f: 3, c: 54005}, {f: 7, c: 54009}, 54018, 54020, {f: 6, c: 54022}, 54031,
  12738. {f: 3, c: 54033}, 54037, {f: 5, c: 54039}, 54046, {f: 3, c: 54050},
  12739. {f: 2, c: 54054}, {f: 2, c: 54058}, {f: 3, c: 54061}, {f: 7, c: 54065},
  12740. 54074, {f: 6, c: 54078}, {f: 54, c: 54086}, {f: 2, c: 54142},
  12741. {f: 3, c: 54145}, {f: 7, c: 54149}, 54158, {f: 6, c: 54162},
  12742. {f: 2, c: 54170}, {f: 3, c: 54173}, {f: 7, c: 54177}, 54186, 54188,
  12743. {f: 6, c: 54190}, {f: 3, c: 54197}, {f: 3, c: 54201}, {f: 7, c: 54205},
  12744. {f: 2, c: 54214}, {f: 6, c: 54218}, {f: 7, c: 54225}, {f: 8, c: 54233},
  12745. 54242, {f: 8, c: 54244}, {f: 2, c: 54254}, {f: 3, c: 54257},
  12746. {f: 7, c: 54261}, 54270, 54272, {f: 6, c: 54274}, {f: 20, c: 54281},
  12747. {f: 34, c: 54302}, {f: 3, c: 54337}, {f: 23, c: 54341}, {f: 3, c: 54365},
  12748. {f: 3, c: 54369}, {f: 8, c: 54373}, 54382, {f: 8, c: 54384},
  12749. {f: 2, c: 54394}, {f: 2, c: 54397}, 54401, {f: 5, c: 54403}, 54410, 54412,
  12750. {f: 6, c: 54414}, {f: 20, c: 54421}, {f: 34, c: 54442}, {f: 3, c: 54477},
  12751. {f: 3, c: 54481}, {f: 7, c: 54485}, {f: 2, c: 54493}, {f: 8, c: 54496},
  12752. {f: 3, c: 54505}, {f: 3, c: 54509}, {f: 7, c: 54513}, {f: 2, c: 54521},
  12753. 54524, {f: 6, c: 54526}, {f: 3, c: 54533}, {f: 3, c: 54537},
  12754. {f: 7, c: 54541}, 54550, {f: 36, c: 54552}, {f: 2, c: 54590},
  12755. {f: 3, c: 54593}, {f: 7, c: 54597}, 54606, 54608, {f: 6, c: 54610},
  12756. {f: 2, c: 54618}, {f: 3, c: 54621}, {f: 4, c: 54625}, {f: 2, c: 54630},
  12757. 54634, 54636, {f: 6, c: 54638}, {f: 2, c: 54646}, {f: 3, c: 54649},
  12758. {f: 7, c: 54653}, 54662, {f: 6, c: 54666}, {f: 20, c: 54673},
  12759. {f: 34, c: 54694}, {f: 2, c: 54730}, {f: 3, c: 54733}, 54737,
  12760. {f: 5, c: 54739}, 54746, 54748, {f: 6, c: 54750}, {f: 2, c: 54758},
  12761. {f: 3, c: 54761}, {f: 7, c: 54765}, 54774, 54776, {f: 6, c: 54778},
  12762. {f: 2, c: 54786}, {f: 3, c: 54789}, {f: 7, c: 54793}, 54802,
  12763. {f: 6, c: 54806}, {f: 3, c: 54813}, {f: 3, c: 54817}, {f: 8, c: 54821},
  12764. {f: 10, c: 54830}, {f: 2, c: 54842}, {f: 3, c: 54845}, {f: 4, c: 54849},
  12765. {f: 2, c: 54854}, 54858, 54860, {f: 3, c: 54862}, {f: 2, c: 54866},
  12766. {f: 2, c: 54870}, {f: 3, c: 54873}, {f: 10, c: 54877}, 54888,
  12767. {f: 6, c: 54890}, {f: 2, c: 54898}, {f: 14, c: 54901}, 54916,
  12768. {f: 6, c: 54918}, {f: 2, c: 54926}, {f: 3, c: 54929}, {f: 8, c: 54933},
  12769. 54942, 54944, {f: 6, c: 54946}, {f: 3, c: 54953}, {f: 3, c: 54957},
  12770. {f: 8, c: 54961}, 54970, {f: 8, c: 54972}, {f: 2, c: 54982},
  12771. {f: 3, c: 54985}, {f: 4, c: 54989}, {f: 2, c: 54994}, {f: 2, c: 54997},
  12772. 55000, {f: 6, c: 55002}, {f: 3, c: 55009}, {f: 3, c: 55013},
  12773. {f: 7, c: 55017}, {f: 4, c: 55025}, {f: 6, c: 55030}, {f: 2, c: 55038},
  12774. {f: 3, c: 55041}, {f: 12, c: 55045}, {f: 6, c: 55058}, {f: 2, c: 55066},
  12775. {f: 3, c: 55069}, {f: 7, c: 55073}, 55082, 55084, {f: 6, c: 55086},
  12776. {f: 2, c: 55094}, {f: 3, c: 55097}, {f: 7, c: 55101}, {f: 2, c: 55109},
  12777. 55112, {f: 6, c: 55114}, {f: 2, c: 55122}, 55125, {f: 6, c: 55130}, 55138,
  12778. 55140, {f: 3, c: 55142}, {f: 2, c: 55146}, {f: 3, c: 55149},
  12779. {f: 3, c: 55153}, {f: 7, c: 55157}, {f: 3, c: 55166}, {f: 6, c: 55170},
  12780. {f: 2, c: 55178}, {f: 3, c: 55181}, {f: 7, c: 55185}, 55194, 55196,
  12781. {f: 6, c: 55198}],
  12782. 'Adobe-CNS1': [{f: 95, c: 32}, {s: 3}, 12288, 65292, {f: 2, c: 12289}, 65294,
  12783. 8226, 65307, 65306, 65311, 65281, 65072, 8230, 8229, 65104, 65380, 65106,
  12784. 183, {f: 4, c: 65108}, 65372, 8211, 65073, 8212, {s: 4}, {f: 2, c: 65288},
  12785. {f: 2, c: 65077}, 65371, 65373, {f: 2, c: 65079}, {f: 2, c: 12308},
  12786. {f: 2, c: 65081}, {f: 2, c: 12304}, {f: 2, c: 65083}, {f: 2, c: 12298},
  12787. {f: 2, c: 65085}, {f: 2, c: 12296}, {f: 2, c: 65087}, {f: 2, c: 12300},
  12788. {f: 2, c: 65089}, {f: 2, c: 12302}, {f: 2, c: 65091}, {f: 6, c: 65113},
  12789. {f: 2, c: 8216}, {f: 2, c: 8220}, {f: 2, c: 12317}, 8245, 8242, 65283,
  12790. 65286, 65290, 8251, 167, 12291, 9675, 9679, 9651, 9650, 9678, 9734, 9733,
  12791. 9671, 9670, 9633, 9632, 9661, 9660, 12963, 8453, 8254, 0, 65343, 0,
  12792. {f: 2, c: 65097}, {f: 2, c: 65101}, {f: 2, c: 65099}, {f: 3, c: 65119},
  12793. 65291, 65293, 215, 247, 177, 8730, 65308, 65310, 65309, {f: 2, c: 8806},
  12794. 8800, 8734, 8786, 8801, {f: 5, c: 65122}, 8764, {f: 2, c: 8745}, 8869,
  12795. 8736, 8735, 8895, 13266, 13265, 8747, 8750, 8757, 8756, 9792, 9794, 9793,
  12796. 9737, 8593, 8595, 8594, 8592, {f: 2, c: 8598}, 8601, 8600, 8741, 8739, 0,
  12797. 0, 65295, 65340, 65284, 165, 12306, {f: 2, c: 162}, 65285, 65312, 8451,
  12798. 8457, {f: 3, c: 65129}, 13269, {f: 3, c: 13212}, 13262, 13217,
  12799. {f: 2, c: 13198}, 13252, 176, [20825, 58834], [20827, 58835],
  12800. [20830, 58837], [20829, 58836], 20833, 20835, 21991, [29929, 58044],
  12801. [31950, 58191], {f: 8, c: 9601}, 9615, 9614, 9613, 9612, 9611, 9610, 9609,
  12802. 9532, 9524, 9516, 9508, 9500, 9620, 9472, 9474, 9621, 9484, 9488, 9492,
  12803. 9496, {f: 2, c: 9581}, 9584, 9583, 9552, 9566, 9578, 9569, {f: 2, c: 9698},
  12804. 9701, 9700, {f: 3, c: 9585}, {f: 10, c: 65296}, {f: 10, c: 8544},
  12805. {f: 9, c: 12321}, 0, [21316, 57443], 0, {f: 26, c: 65313},
  12806. {f: 26, c: 65345}, {f: 17, c: 913}, {f: 7, c: 931}, {f: 17, c: 945},
  12807. {f: 7, c: 963}, {f: 37, c: 12549}, 729, 714, 711, 715, [9312, 63153],
  12808. [9313, 63154], [9314, 63155], [9315, 63156], [9316, 63157], [9317, 63158],
  12809. [9318, 63159], [9319, 63160], [9320, 63161], [9321, 63162], [9332, 63163],
  12810. [9333, 63164], [9334, 63165], [9335, 63166], [9336, 63167], [9337, 63168],
  12811. [9338, 63169], [9339, 63170], [9340, 63171], [9341, 63172], [8560, 63173],
  12812. [8561, 63174], [8562, 63175], [8563, 63176], [8564, 63177], [8565, 63178],
  12813. [8566, 63179], [8567, 63180], [8568, 63181], [8569, 63182], [12033, 20008],
  12814. [12034, 20022, 63183], [12035, 20031, 63184], [12037, 20101, 63185],
  12815. [12039, 20128, 63186], [12044, 20866, 63187], [12045, 20886, 63188],
  12816. [12046, 20907, 63189], [12051, 21241, 63190], [12054, 21304, 63191],
  12817. [12057, 21353, 63192], [12059, 21430, 63193],
  12818. [12065, 12066, 22786, 22794, 63194], [12071, 23424, 63195],
  12819. [12078, 24027, 63196], [12083, 24186, 63197], [12084, 24191, 63198],
  12820. [12085, 24308], [12089, 24400, 63200], [12090, 24417, 63201],
  12821. [12097, 25908, 63202], [12102, 26080], [12135, 30098, 63204],
  12822. [12136, 30326], [12193, 36789, 63206], [12202, 38582], {f: 32, c: 9216},
  12823. 9249, [12032, 19968], [12036, 20057], 19969, 19971, 20035, 20061, 20102,
  12824. [12038, 20108], [12040, 20154], [12041, 20799], [12042, 20837],
  12825. [12043, 20843], [12047, 20960], [12049, 20992], 20993, [12050, 21147],
  12826. [12052, 21269], [12055, 21313], [12056, 21340], [12060, 21448], 19977,
  12827. 19979, 19976, 19978, 20011, 20024, 20961, 20037, 20040, 20063, 20062,
  12828. 20110, 20129, [20800, 64012], 20995, 21242, 21315, 21449, [12061, 21475],
  12829. [12063, 22303], [12064, 22763], [12067, 22805], [12068, 22823],
  12830. [12069, 22899], [12070, 23376], 23377, 23379, [12072, 23544],
  12831. [12073, 23567], [12074, 23586], [12075, 23608], [12077, 23665], 24029,
  12832. [12079, 24037], [12080, 24049], {f: 2, c: 24050}, [12081, 24062],
  12833. [12082, 24178], [12086, 24318], [12087, 24331], [12088, 24339], 25165,
  12834. 19985, 19984, 19981, 20013, 20016, 20025, 20043, 23609, 20104, 20113,
  12835. 20117, 20114, 20116, 20130, 20161, 20160, 20163, {f: 2, c: 20166}, 20173,
  12836. {f: 2, c: 20170}, 20164, 20803, 20801, 20839, {f: 2, c: 20845}, 20844,
  12837. 20887, 20982, {f: 3, c: 20998}, 21243, {f: 2, c: 21246}, 21270, 21305,
  12838. 21320, 21319, 21317, 21342, 21380, 21451, 21450, 21453, 22764, 22825,
  12839. 22827, 22826, 22829, 23380, 23569, 23588, 23610, 23663, 24052, 24187,
  12840. 24319, {f: 2, c: 24340}, [12092, 24515], [12093, 25096], [12094, 25142],
  12841. [12095, 25163], 25166, [12096, 25903], [12098, 25991], [12099, 26007],
  12842. [12100, 26020], [12101, 26041], [12103, 26085], [12104, 26352],
  12843. [12105, 26376], [12106, 26408], [12107, 27424], [12108, 27490],
  12844. [12109, 27513], [12111, 27595], [12112, 27604], [12113, 27611],
  12845. [12114, 27663], [12116, 27700], [12117, 28779], [12118, 29226],
  12846. [12119, 29238], [12120, 29243], [12122, 29255], [12123, 29273],
  12847. [12124, 29275], [12125, 29356], 29579, 19993, 19990, 19989, 19988, 19992,
  12848. 20027, 20045, 20047, 20046, 20197, 20184, {f: 4, c: 20180},
  12849. {f: 2, c: 20195}, 20185, 20190, 20805, 20804, {f: 2, c: 20873}, 20908,
  12850. {f: 2, c: 20985}, 20984, 21002, 21152, 21151, [21253, 57435], 21254, 21271,
  12851. 21277, 20191, 21322, 21321, 21345, 21344, 21359, 21358, 21435, 21487,
  12852. 21476, 21491, 21484, 21486, 21481, 21480, 21500, 21496, 21493, 21483,
  12853. 21478, 21482, 21490, 21489, 21488, 21477, 21485, 21499, 22235, 22234,
  12854. 22806, 22830, 22833, 22900, 22902, 23381, 23427, 23612, 24040, 24039,
  12855. 24038, {f: 2, c: 24066}, 24179, 24188, 24321, 24344, 24343, 24517, 25098,
  12856. {f: 2, c: 25171}, 25170, 25169, 26021, 26086, 26414, 26412,
  12857. {f: 2, c: 26410}, 26413, 27491, 27597, 27665, 27664, 27704, 27713, 27712,
  12858. 27710, 29359, [12126, 29572], [12127, 29577], [12128, 29916],
  12859. [12129, 29926], [12130, 29976], [12131, 29983], [12132, 29992], 29993,
  12860. [12133, 30000], {f: 3, c: 30001}, [12134, 30091], [12137, 30333],
  12861. [12138, 30382], [12139, 30399], [12140, 30446], [12141, 30683],
  12862. [12142, 30690], [12143, 30707], [12144, 31034], [12146, 31166],
  12863. [12147, 31348], [12148, 31435], {f: 2, c: 19998}, {f: 2, c: 20050}, 20073,
  12864. 20121, 20132, 20134, 20133, 20223, 20233, 20249, 20234, 20245, 20237,
  12865. {f: 2, c: 20240}, 20239, 20210, 20214, 20219, 20208, 20211, 20221, 20225,
  12866. 20235, 20809, 20807, 20806, 20808, 20840, 20849, 20877, 20912, 21015,
  12867. {f: 2, c: 21009}, 21006, 21014, 21155, 21256, 21281, 21280,
  12868. {f: 2, c: 21360}, 21513, 21519, 21516, 21514, 21520, 21505, 21515, 21508,
  12869. 21521, 21517, 21512, 21507, 21518, 21510, 21522, 22240, 22238, 22237,
  12870. 22323, 22320, 22312, 22317, 22316, 22319, 22313, {f: 2, c: 22809},
  12871. {f: 2, c: 22839}, 22916, 22904, 22915, 22909, 22905, 22914, 22913,
  12872. {f: 2, c: 23383}, {f: 2, c: 23431}, 23429, 23433, 23546, 23574, 23673,
  12873. 24030, 24070, 24182, 24180, 24335, 24347, 24537, 24534, 25102,
  12874. {f: 2, c: 25100}, 25104, 25187, 25179, 25176, 25910, 26089, 26088,
  12875. {f: 2, c: 26092}, {f: 2, c: 26354}, 26377, 26429, 26420, 26417, 26421,
  12876. 27425, 27492, 27515, 27670, 27741, 27735, 27737, {f: 2, c: 27743}, 27728,
  12877. 27733, 27745, 27739, {f: 2, c: 27725}, 28784, 29279, 29277, 30334,
  12878. [12149, 31481], [12150, 31859], [12151, 31992], [12152, 32566],
  12879. [12154, 32650], [12155, 32701], [12156, 32769], 32771, [12157, 32780],
  12880. [12158, 32786], [12159, 32819], [12160, 32895], [12161, 32905],
  12881. {f: 2, c: 32907}, [12162, 33251], [12163, 33258], [12164, 33267],
  12882. [12165, 33276], [12166, 33292], [12167, 33307], [12168, 33311],
  12883. [12169, 33390], [12170, 33394], 33406, [12173, 34411], [12174, 34880],
  12884. [12175, 34892], [12176, 34915], 35199, 38433, 20018, 20136, 20301, 20303,
  12885. 20295, 20311, 20318, 20276, 20315, 20309, 20272, {f: 2, c: 20304}, 20285,
  12886. 20282, 20280, 20291, 20308, 20284, 20294, 20323, 20316, 20320, 20271,
  12887. 20302, 20278, 20313, 20317, 20296, 20314, 20812, 20811, 20813, 20853,
  12888. {f: 2, c: 20918}, 21029, 21028, {f: 2, c: 21033}, 21032, 21163,
  12889. {f: 2, c: 21161}, 21164, 21283, 21363, 21365, 21533, 21549, 21534, 21566,
  12890. 21542, 21582, 21543, 21574, 21571, 21555, 21576, 21570, 21531, 21545,
  12891. 21578, 21561, 21563, 21560, 21550, {f: 2, c: 21557}, 21536, 21564, 21568,
  12892. 21553, 21547, 21535, 21548, 22250, 22256, 22244, 22251, 22346, 22353,
  12893. 22336, 22349, 22343, 22350, 22334, 22352, 22351, 22331, 22767, 22846,
  12894. 22941, 22930, 22952, 22942, 22947, 22937, 22934, 22925, 22948, 22931,
  12895. 22922, 22949, 23389, 23388, {f: 2, c: 23386}, 23436, 23435, 23439, 23596,
  12896. {f: 2, c: 23616}, 23615, 23614, {f: 2, c: 23696}, 23700, 23692, 24043,
  12897. 24076, 24207, 24199, 24202, 24311, 24324, 24351, 24420, 24418, 24439,
  12898. 24441, 24536, 24524, 24535, 24525, 24561, 24555, 24568, 24554, 25106,
  12899. 25105, 25220, 25239, 25238, 25216, 25206, 25225, 25197, 25226, 25212,
  12900. 25214, 25209, 25203, 25234, 25199, 25240, 25198, 25237, 25235, 25233,
  12901. 25222, 25913, 25915, 25912, 26097, 26356, 26463, {f: 4, c: 26446}, 26460,
  12902. 26454, [26462, 57801], 26441, 26438, 26464, 26451, 26455, 27493, 27599,
  12903. 27714, 27742, 27801, 27777, {f: 2, c: 27784}, 27781, 27803, 27754, 27770,
  12904. 27792, 27760, 27788, 27752, 27798, 27794, 27773, 27779, 27762, 27774,
  12905. 27764, 27782, 27766, 27789, 27796, 27800, 27778, 28790, {f: 2, c: 28796},
  12906. 28792, 29282, 29281, 29280, 29380, 29378, 29590, 29996, 29995,
  12907. {f: 2, c: 30007}, 30338, 30447, 30691, 31169, 31168, 31167, 31350, 31995,
  12908. 32597, 32918, 32915, 32925, 32920, 32923, 32922, 32946, 33391, 33426,
  12909. 33419, 33421, [12178, 35211], [12179, 35282], [12180, 35328],
  12910. [12181, 35895], [12182, 35910], [12183, 35925], [12185, 35997],
  12911. [12186, 36196], [12187, 36208], [12188, 36275], [12189, 36523],
  12912. [12190, 36554], [12191, 36763], [12192, 36784], 36802, 36806, 36805, 36804,
  12913. 24033, [12194, 37009], 37026, 37034, 37030, 37027, [12195, 37193],
  12914. [12196, 37318], [12197, 37324], 38450, 38446, 38449, 38442, 38444, 20006,
  12915. 20054, 20083, 20107, 20123, 20126, {f: 2, c: 20139}, 20335, 20381, 20365,
  12916. 20339, 20351, 20332, 20379, 20363, 20358, 20355, 20336, 20341, 20360,
  12917. 20329, 20347, 20374, 20350, 20367, 20369, 20346, 20820, 20818, 20821,
  12918. 20841, 20855, 20854, 20856, 20925, 20989, 21051, 21048, 21047, 21050,
  12919. 21040, 21038, 21046, 21057, 21182, 21179, 21330, 21332, 21331, 21329,
  12920. 21350, {f: 3, c: 21367}, 21462, 21460, 21463, 21619, 21621, 21654, 21624,
  12921. 21653, 21632, 21627, 21623, 21636, 21650, 21638, 21628, 21648, 21617,
  12922. 21622, 21644, 21658, 21602, 21608, 21643, 21629, 21646, 22266, 22403,
  12923. 22391, 22378, 22377, 22369, 22374, 22372, 22396, 22812, 22857,
  12924. {f: 2, c: 22855}, 22852, 22868, 22974, 22971, 22996, 22969, 22958, 22993,
  12925. 22982, 22992, 22989, 22987, 22995, 22986, 22959, 22963, 22994, 22981,
  12926. 23391, 23396, 23395, 23447, 23450, 23448, 23452, 23449, 23451, 23578,
  12927. 23624, {f: 2, c: 23621}, 23735, 23713, 23736, 23721, 23723, 23729, 23731,
  12928. 24088, 24090, 24086, 24085, 24091, 24081, 24184, 24218, 24215, 24220,
  12929. {f: 2, c: 24213}, 24310, {f: 2, c: 24358}, 24361, {f: 2, c: 24448}, 24447,
  12930. 24444, 24541, 24544, 24573, 24565, 24575, 24591, 24596, 24623, 24629,
  12931. 24598, 24618, 24597, 24609, 24615, 24617, 24619, 24603, 25110, 25109,
  12932. 25151, 25150, 25152, 25215, 25289, 25292, 25284, 25279, 25282, 25273,
  12933. 25298, 25307, 25259, {f: 2, c: 25299}, 25291, 25288, 25256, 25277, 25276,
  12934. [25296, 60582], 25305, 25287, 25293, 25269, 25306, 25265, 25304,
  12935. {f: 2, c: 25302}, 25286, 25260, [25294, 61010], 25918, 26023, 26044, 26106,
  12936. 26132, 26131, 26124, 26118, 26114, 26126, 26112, 26127, 26133, 26122,
  12937. 26119, 26381, 26379, 26477, 26507, 26517, 26481, 26524, 26483, 26487,
  12938. 26503, 26525, 26519, {f: 2, c: 26479}, 26495, 26505, 26494, 26512, 26485,
  12939. 26522, 26515, 26492, 26474, 26482, 27427, {f: 2, c: 27494}, 27519, 27667,
  12940. 27675, 27875, 27880, 27891, 27825, 27852, 27877, 27827, {f: 2, c: 27837},
  12941. 27836, 27874, 27819, 27861, 27859, 27832, 27844, 27833, 27841, 27822,
  12942. 27863, 27845, 27889, 27839, 27835, 27873, 27867, 27850, 27820, 27887,
  12943. 27868, 27862, 27872, 28821, 28814, 28818, 28810, 28825, {f: 2, c: 29228},
  12944. 29240, 29256, 29287, 29289, 29376, 29390, 29401, 29399, 29392, 29609,
  12945. 29608, 29599, 29611, 29605, 30013, 30109, {f: 2, c: 30105}, 30340, 30402,
  12946. 30450, 30452, 30693, 30717, 31038, {f: 2, c: 31040}, 31177, 31176, 31354,
  12947. 31353, 31482, 31998, 32596, 32652, 32651, [32773, 58236], 32954, 32933,
  12948. 32930, 32945, 32929, 32939, 32937, 32948, 32938, 32943, 33253, 33278,
  12949. 33293, 33459, 33437, 33433, 33453, 33469, 33439, 33465, 33457, 33452,
  12950. 33445, 33455, 33464, 33443, 33456, 33470, 33463, 34382, 34417, 21021,
  12951. 34920, 36555, 36814, 36820, 36817, 37045, 37048, 37041, 37046, 37319,
  12952. [12198, 37329], [12199, 38263], [12200, 38272], [12201, 38428], 38464,
  12953. 38463, 38459, 38468, 38466, [12203, 38585], [12204, 38632], 38738,
  12954. [12206, 38750], 20127, {f: 2, c: 20141}, 20449, 20405, 20399, 20415, 20448,
  12955. 20433, 20431, 20445, 20419, 20406, 20440, 20447, 20426, 20439, 20398,
  12956. 20432, 20420, 20418, 20442, 20430, 20446, 20407, 20823, 20882, 20881,
  12957. 20896, 21070, 21059, 21066, 21069, 21068, 21067, 21063, 21191, 21193,
  12958. 21187, 21185, 21261, 21335, 21371, 21402, 21467, 21676, 21696, 21672,
  12959. 21710, 21705, 21688, 21670, 21683, 21703, 21698, 21693, 21674, 21697,
  12960. 21700, 21704, 21679, 21675, 21681, 21691, 21673, 21671, 21695, 22271,
  12961. 22402, 22411, 22432, 22435, 22434, 22478, 22446, 22419, 22869, 22865,
  12962. 22863, 22862, 22864, 23004, 23000, 23039, 23011, 23016, 23043, 23013,
  12963. 23018, 23002, 23014, 23041, 23035, 23401, 23459, 23462, 23460, 23458,
  12964. 23461, 23553, {f: 2, c: 23630}, 23629, 23627, 23769, 23762, 24055, 24093,
  12965. 24101, 24095, 24189, 24224, 24230, 24314, 24328, 24365, 24421, 24456,
  12966. 24453, {f: 2, c: 24458}, 24455, 24460, 24457, 24594, 24605, 24608, 24613,
  12967. 24590, 24616, 24653, 24688, 24680, [24674, 60712], 24646, 24643, 24684,
  12968. 24683, 24682, 24676, 25153, 25308, 25366, 25353, 25340, 25325, 25345,
  12969. 25326, 25341, 25351, 25329, 25335, 25327, 25324, 25342, 25332, 25361,
  12970. 25346, 25919, 25925, 26027, 26045, 26082, 26149, 26157, 26144, 26151,
  12971. 26159, 26143, 26152, 26161, 26148, 26359, 26623, 26579, 26609, 26580,
  12972. 26576, 26604, 26550, 26543, 26613, 26601, 26607, 26564, 26577, 26548,
  12973. 26586, 26597, 26552, 26575, 26590, 26611, 26544, 26585, 26594, 26589,
  12974. 26578, 27498, 27523, 27526, 27573, 27602, 27607, 27679, 27849, 27915,
  12975. 27954, 27946, 27969, 27941, 27916, 27953, 27934, 27927, 27963,
  12976. {f: 2, c: 27965}, 27958, 27931, 27893, 27961, 27943, 27960, 27945, 27950,
  12977. 27957, 27918, 27947, 28843, 28858, 28851, 28844, 28847, 28845, 28856,
  12978. 28846, 28836, 29232, 29298, 29295, 29300, 29417, {f: 2, c: 29408}, 29623,
  12979. 29642, 29627, 29618, 29645, 29632, 29619, 29978, 29997, 30031, 30028,
  12980. 30030, 30027, 30123, {f: 2, c: 30116}, {f: 2, c: 30114}, 30328,
  12981. {f: 3, c: 30342}, 30408, 30406, 30403, 30405, 30465, 30457, 30456, 30473,
  12982. 30475, 30462, 30460, 30471, 30684, 30722, 30740, {f: 2, c: 30732}, 31046,
  12983. 31049, 31048, 31047, {f: 2, c: 31161}, {f: 2, c: 31185}, 31179, 31359,
  12984. 31361, 31487, 31485, 31869, 32002, 32005, 32000, 32009, 32007, 32004,
  12985. 32006, 32568, 32654, 32703, 32784, 32781, 32785, 32822, 32982, 32997,
  12986. 32986, {f: 2, c: 32963}, 32972, 32993, 32987, 32974, 32990, 32996, 32989,
  12987. 33268, 33314, 33511, 33539, 33541, 33507, 33499, 33510, 33540, 33509,
  12988. 33538, 33545, 33490, 33495, 33521, 33537, 33500, 33492, 33489, 33502,
  12989. 33491, 33503, 33519, 33542, 34384, 34425, 34427, 34426, 34893, 34923,
  12990. 35201, 35284, 35336, {f: 2, c: 35330}, 35998, 36000, 36212, 36211, 36276,
  12991. 36557, 36556, 36848, 36838, 36834, 36842, 36837, 36845, 36843, 36836,
  12992. 36840, 37066, 37070, 37057, 37059, 37195, 37194, 37325, 38274, 38480,
  12993. {f: 3, c: 38475}, [12207, 38754], [12208, 38761], [12209, 38859],
  12994. [12210, 38893], [12211, 38899], [12212, 38913], [12213, 39080],
  12995. [12214, 39131], [12215, 39135], [12216, 39318], [12217, 39321], 20056,
  12996. 20147, {f: 2, c: 20492}, 20515, 20463, 20518, 20517, 20472, [20521, 57375],
  12997. 20502, 20486, 20540, 20511, 20506, 20498, 20497, 20474, 20480, 20500,
  12998. 20520, 20465, 20513, 20491, 20505, 20504, 20467, 20462, 20525, 20522,
  12999. 20478, 20523, 20489, 20860, {f: 2, c: 20900}, 20898, 20941, 20940, 20934,
  13000. 20939, 21078, 21084, 21076, 21083, 21085, 21290, [21375, 57459], 21407,
  13001. 21405, 21471, 21736, 21776, 21761, 21815, 21756, 21733, 21746, 21766,
  13002. 21754, 21780, 21737, 21741, 21729, 21769, 21742, 21738, 21734, 21799,
  13003. 21767, 21757, 21775, {f: 2, c: 22275}, 22466, 22484, 22475, 22467, 22537,
  13004. 22799, {f: 2, c: 22871}, 22874, 23057, 23064, 23068, 23071, 23067, 23059,
  13005. 23020, 23072, 23075, 23081, 23077, 23052, 23049, 23403, 23640, 23472,
  13006. 23475, 23478, 23476, 23470, 23477, 23481, 23480, 23556, 23633, 23637,
  13007. 23632, 23789, 23805, 23803, 23786, 23784, 23792, 23798, 23809, 23796,
  13008. 24046, 24109, 24107, 24235, 24237, 24231, 24369, 24466, 24465, 24464,
  13009. 24665, 24675, 24677, 24656, 24661, 24685, 24681, 24687, 24708, 24735,
  13010. 24730, 24717, 24724, 24716, 24709, 24726, 25159, 25331, 25352, 25343,
  13011. 25422, 25406, 25391, 25429, 25410, 25414, 25423, 25417, 25402, 25424,
  13012. 25405, {f: 2, c: 25386}, 25384, 25421, 25420, {f: 2, c: 25928}, 26009,
  13013. 26049, 26053, 26178, 26185, 26191, 26179, 26194, 26188, 26181, 26177,
  13014. 26360, {f: 2, c: 26388}, 26391, 26657, 26680, 26696, 26694, 26707, 26681,
  13015. 26690, 26708, 26665, 26803, 26647, 26700, 26705, 26685, 26612, 26704,
  13016. 26688, 26684, 26691, 26666, 26693, 26643, 26648, 26689, 27530, 27529,
  13017. 27575, 27683, {f: 2, c: 27687}, 27686, 27684, 27888, 28010, 28053, 28040,
  13018. 28039, 28006, 28024, 28023, 27993, 28051, 28012, 28041, 28014, 27994,
  13019. 28020, 28009, 28044, 28042, 28025, 28037, 28005, 28052, 28874, 28888,
  13020. 28900, 28889, 28872, 28879, 29241, 29305, 29436, 29433, 29437, 29432,
  13021. 29431, 29574, 29677, 29705, 29678, 29664, 29674, 29662, 30036, 30045,
  13022. 30044, 30042, 30041, 30142, 30149, 30151, {f: 2, c: 30130}, 30141, 30140,
  13023. 30137, 30146, 30136, 30347, 30384, 30410, {f: 2, c: 30413}, 30505,
  13024. {f: 2, c: 30495}, 30504, 30697, 30768, 30759, 30776, 30749, 30772, 30775,
  13025. 30757, 30765, 30752, 30751, 30770, 31061, 31056, 31072, 31071, 31062,
  13026. 31070, 31069, 31063, 31066, 31204, [31203, 60418], 31207, 31199, 31206,
  13027. 31209, 31192, 31364, 31368, 31449, 31494, 31505, 31881, 32033, 32023,
  13028. 32011, 32010, 32032, 32034, 32020, 32016, 32021, 32026, 32028, 32013,
  13029. 32025, 32027, 32570, 32607, 32660, 32709, 32705, 32774, 32772, 32792,
  13030. 32789, 32793, 32791, 32829, 32831, 33009, 33026, 33008, 33029, 33005,
  13031. 33012, 33030, 33016, 33011, 33032, 33021, 33034, 33020, 33007, 33261,
  13032. 33260, 33280, 33296, {f: 2, c: 33322}, 33320, 33324, 33467, 33579, 33618,
  13033. 33620, 33610, 33592, 33616, 33609, 33589, 33588, 33615, 33586, 33593,
  13034. 33590, 33559, 33600, 33585, 33576, 33603, 34388, 34442, 34474, 34451,
  13035. 34468, 34473, 34444, 34467, 34460, 34928, 34935, {f: 2, c: 34945}, 34941,
  13036. 34937, 35352, 35344, 35342, 35340, 35349, 35338, 35351, 35347, 35350,
  13037. 35343, 35345, 35912, 35962, 35961, {f: 2, c: 36001}, [36215, 58442], 36524,
  13038. 36562, 36564, 36559, 36785, 36865, 36870, 36855, 36864, 36858, 36852,
  13039. 36867, 36861, 36869, 36856, 37013, 37089, 37085, 37090, 37202, 37197,
  13040. 37196, 37336, 37341, 37335, 37340, 37337, 38275, {f: 2, c: 38498}, 38497,
  13041. 38491, 38493, 38500, 38488, 38494, 38587, 39138, [12218, 39340],
  13042. [12219, 39592], [12220, 39640], [12222, 39717], [12224, 39730],
  13043. [12225, 39740], 20094, 20602, [20605, 57382], 20572, 20551, 20547, 20556,
  13044. 20570, 20553, 20581, 20598, 20558, 20565, 20597, 20596, 20599, 20559,
  13045. 20495, 20591, 20589, 20828, 20885, 20976, 21098, 21103, 21202, 21209,
  13046. 21208, 21205, 21264, 21263, 21273, {f: 2, c: 21311}, 21310, 21443, 26364,
  13047. 21830, 21866, 21862, 21828, 21854, 21857, 21827, 21834, 21809, 21846,
  13048. 21839, 21845, 21807, 21860, 21816, 21806, 21852, 21804, 21859, 21811,
  13049. 21825, 21847, 22280, 22283, 22281, 22495, 22533, 22538, 22534, 22496,
  13050. 22500, 22522, 22530, 22581, 22519, 22521, 22816, 22882, 23094, 23105,
  13051. 23113, 23142, 23146, 23104, 23100, 23138, 23130, 23110, 23114, 23408,
  13052. 23495, 23493, 23492, 23490, 23487, 23494, 23561, 23560, 23559, 23648,
  13053. {f: 2, c: 23644}, 23815, 23814, 23822, 23835, 23830, 23842, 23825, 23849,
  13054. 23828, 23833, 23844, 23847, 23831, 24034, 24120, 24118, 24115, 24119,
  13055. {f: 2, c: 24247}, 24246, 24245, 24254, 24373, 24375, 24407, 24428, 24425,
  13056. 24427, 24471, 24473, 24478, 24472, 24481, 24480, 24476, 24703, 24739,
  13057. 24713, 24736, 24744, 24779, 24756, 24806, 24765, 24773, 24763, 24757,
  13058. 24796, 24764, 24792, 24789, 24774, 24799, 24760, 24794, 24775,
  13059. {f: 2, c: 25114}, 25160, 25504, 25511, 25458, 25494, 25506, 25509, 25463,
  13060. 25447, 25496, 25514, 25457, 25513, 25481, 25475, 25499, 25451, 25512,
  13061. 25476, 25480, 25497, 25505, 25516, 25490, 25487, 25472, 25467, 25449,
  13062. 25448, 25466, 25949, 25942, 25937, 25945, 25943, 21855, 25935, 25944,
  13063. 25941, 25940, 26012, 26011, 26028, 26063, {f: 2, c: 26059}, 26062, 26205,
  13064. 26202, 26212, 26216, 26214, 26206, 26361, 21207, 26395, 26753, 26799,
  13065. 26786, 26771, 26805, 26751, 26742, 26801, 26791, 26775, 26800, 26755,
  13066. 26820, 26797, 26758, 26757, 26772, 26781, 26792, 26783, 26785, 26754,
  13067. 27442, 27578, {f: 2, c: 27627}, 27691, 28046, 28092, 28147, 28121, 28082,
  13068. 28129, 28108, 28132, 28155, 28154, 28165, 28103, 28107, 28079, 28113,
  13069. 28078, 28126, 28153, 28088, 28151, 28149, 28101, 28114, 28186, 28085,
  13070. 28122, 28139, 28120, 28138, 28145, 28142, 28136, 28102, 28100, 28074,
  13071. 28140, 28095, 28134, 28921, {f: 2, c: 28937}, 28925, 28911, 29245, 29309,
  13072. 29313, 29468, 29467, 29462, 29459, 29465, 29575, 29701, 29706, 29699,
  13073. 29702, 29694, 29709, 29920, {f: 2, c: 29942}, 29980, 29986,
  13074. {f: 2, c: 30053}, 30050, 30064, 30095, {f: 2, c: 30164}, 30133, 30154,
  13075. 30157, 30350, 30420, 30418, 30427, 30519, 30526, 30524, 30518, 30520,
  13076. 30522, 30827, 30787, 30798, 31077, 31080, 31085, 31227, 31378, 31381,
  13077. 31520, 31528, 31515, 31532, 31526, 31513, 31518, 31534, 31890, 31895,
  13078. 31893, 32070, 32067, 32113, 32046, 32057, 32060, 32064, 32048, 32051,
  13079. 32068, 32047, 32066, 32050, 32049, 32573, 32670, 32666, 32716, 32718,
  13080. 32722, 32796, 32842, 32838, 33071, 33046, 33059, 33067, 33065, 33072,
  13081. 33060, 33282, 33333, 33335, 33334, 33337, 33678, 33694, 33688, 33656,
  13082. 33698, 33686, 33725, 33707, 33682, 33674, 33683, 33673, 33696, 33655,
  13083. {f: 2, c: 33659}, 33670, 33703, 34389, 24426, 34503, 34496, 34486, 34500,
  13084. 34485, 34502, 34507, 34481, 34479, 34505, 34899, 34974, 34952, 34987,
  13085. 34962, 34966, 34957, 34955, 35219, 35215, 35370, 35357, 35363, 35365,
  13086. 35377, 35373, 35359, 35355, 35362, 35913, 35930, 36009, 36012, 36011,
  13087. 36008, 36010, 36007, 36199, 36198, 36286, 36282, 36571, 36575, 36889,
  13088. 36877, 36890, 36887, 36899, 36895, 36893, 36880, 36885, 36894, 36896,
  13089. 36879, 36898, 36886, 36891, 36884, 37096, 37101, [37117, 58488], 37207,
  13090. 37326, 37365, 37350, 37347, 37351, 37357, 37353, 38281, 38506, 38517,
  13091. 38515, 38520, 38512, 38516, {f: 2, c: 38518}, 38508, 38592, 38634, 38633,
  13092. 31456, 31455, {f: 2, c: 38914}, [12226, 39770], [12227, 40165],
  13093. [12228, 40565], [12229, 40575], [12230, 40613], [12231, 40635], 20642,
  13094. 20621, 20613, 20633, 20625, 20608, 20630, 20632, 20634, 26368, 20977,
  13095. 21106, {f: 2, c: 21108}, 21097, 21214, 21213, 21211, 21338, 21413, 21883,
  13096. 21888, 21927, 21884, 21898, 21917, 21912, 21890, 21916, 21930, 21908,
  13097. 21895, 21899, 21891, 21939, 21934, 21919, 21822, 21938, 21914, 21947,
  13098. 21932, 21937, 21886, 21897, 21931, 21913, 22285, 22575, 22570, 22580,
  13099. 22564, {f: 2, c: 22576}, 22561, 22557, 22560, {f: 2, c: 22777}, 22880,
  13100. [23159, 57587], 23194, 23167, 23186, 23195, 23207, 23411, 23409, 23506,
  13101. 23500, 23507, 23504, {f: 2, c: 23562}, 23601, 23884, 23888, 23860, 23879,
  13102. 24061, 24133, 24125, 24128, 24131, 24190, 24266, {f: 2, c: 24257}, 24260,
  13103. 24380, 24429, {f: 2, c: 24489}, 24488, 24785, 24801, 24754, 24758, 24800,
  13104. 24860, 24867, 24826, 24853, 24816, 24827, 24820, 24936, 24817, 24846,
  13105. 24822, 24841, 24832, 24850, 25119, 25161, 25507, 25484, 25551, 25536,
  13106. 25577, 25545, 25542, 25549, 25554, 25571, 25552, 25569, 25558,
  13107. {f: 2, c: 25581}, 25462, 25588, 25578, 25563, 25682, 25562, 25593, 25950,
  13108. 25958, {f: 2, c: 25954}, 26001, 26000, 26031, 26222, 26224, [26228, 57786],
  13109. 26230, 26223, 26257, 26234, 26238, 26231, {f: 2, c: 26366}, 26399, 26397,
  13110. 26874, 26837, 26848, 26840, 26839, 26885, 26847, 26869, 26862, 26855,
  13111. 26873, 26834, 26866, 26851, 26827, 26829, 26893, 26898, 26894, 26825,
  13112. 26842, 26990, 26875, 27454, 27450, 27453, 27544, 27542, 27580, 27631,
  13113. {f: 2, c: 27694}, 27692, [28207, 57904], 28216, 28244, 28193, 28210, 28263,
  13114. 28234, 28192, 28197, 28195, 28187, 28251, 28248, 28196, 28246, 28270,
  13115. 28205, 28198, 28271, 28212, 28237, 28218, 28204, 28227, [28189, 57901],
  13116. 28222, 28363, 28297, 28185, 28238, 28259, 28228, 28274, 28265, 28255,
  13117. {f: 2, c: 28953}, 28966, 28976, 28961, 28982, [29038, 57958], 28956, 29260,
  13118. 29316, 29312, 29494, 29477, 29492, 29481, 29754, 29738, 29747, 29730,
  13119. 29733, {f: 2, c: 29749}, 29748, 29743, 29723, 29734, 29736,
  13120. {f: 2, c: 29989}, 30059, 30058, 30178, 30171, 30179, 30169, 30168, 30174,
  13121. 30176, {f: 2, c: 30331}, 30358, 30355, 30388, 30428, 30543, 30701, 30813,
  13122. 30828, 30831, 31245, 31240, 31243, 31237, 31232, 31384, 31383, 31382,
  13123. 31461, 31459, 31561, 31574, 31558, 31568, 31570, 31572, 31565, 31563,
  13124. 31567, [31569, 60510], 31903, 31909, 32094, 32080, 32104, 32085, 32043,
  13125. 32110, 32114, 32097, 32102, 32098, 32112, 32115, 21892, {f: 2, c: 32724},
  13126. 32779, 32850, 32901, 33109, 33108, 33099, 33105, 33102, 33081, 33094,
  13127. 33086, 33100, 33107, 33140, 33298, 33308, 33769, 33795, 33784, 33805,
  13128. 33760, 33733, 33803, [33729, 58309], 33775, 33777, 33780, 33879, 33802,
  13129. 33776, 33804, 33740, 33789, 33778, 33738, 33848, 33806, 33796, 33756,
  13130. 33799, 33748, 33759, 34395, 34527, 34521, 34541, 34516, 34523, 34532,
  13131. 34512, 34526, 34903, {f: 2, c: 35009}, 34993, 35203, 35222, 35387, 35424,
  13132. 35413, 35422, 35388, 35393, 35412, 35419, 35408, 35398, 35380, 35386,
  13133. 35382, 35414, 35937, 35970, 36015, 36028, 36019, 36029, 36033, 36027,
  13134. 36032, 36020, 36023, 36022, 36031, 36024, 36234, 36229, 36225, 36302,
  13135. 36317, 36299, 36314, 36305, 36300, 36315, 36294, 36603, 36600, 36604,
  13136. 36764, 36910, 36917, 36913, 36920, 36914, 36918, 37122, 37109, 37129,
  13137. 37118, 37219, 37221, 37327, {f: 2, c: 37396}, 37411, 37385, 37406, 37389,
  13138. 37392, 37383, 37393, 38292, 38287, 38283, 38289, 38291, 38290, 38286,
  13139. 38538, 38542, 38539, 38525, {f: 2, c: 38533}, 38541, 38514, 38532, 38593,
  13140. 38597, 38596, {f: 2, c: 38598}, 38639, 38642, 38860, {f: 2, c: 38917},
  13141. 38920, 39143, 39146, 39151, 39145, 39154, 39149, 39342, 39341,
  13142. [12232, 40643], [12233, 40653], [12234, 40657], 20098, 20653, 20661,
  13143. {f: 2, c: 20658}, 20677, 20670, 20652, 20663, 20667, 20655, 20679, 21119,
  13144. 21111, 21117, 21215, 21222, 21220, {f: 2, c: 21218}, 21295, 21983, 21992,
  13145. 21971, 21990, 21966, 21980, 21959, 21969, {f: 2, c: 21987}, 21999, 21978,
  13146. 21985, {f: 2, c: 21957}, 21989, 21961, {f: 2, c: 22290}, 22622, 22609,
  13147. 22616, 22615, 22618, 22612, 22635, 22604, 22637, 22602, 22626, 22610,
  13148. 22603, 22887, 23233, 23241, 23244, 23230, 23229, 23228, 23219, 23234,
  13149. 23218, 23913, 23919, 24140, 24185, 24265, 24264, 24338, 24409, 24492,
  13150. 24494, 24858, 24847, 24904, 24863, 24819, 24859, 24825, 24833, 24840,
  13151. 24910, 24908, 24900, 24909, 24894, 24884, 24871, 24845, 24838, 24887,
  13152. {f: 2, c: 25121}, 25619, 25662, 25630, 25642, 25645, 25661, 25644, 25615,
  13153. 25628, 25620, 25613, 25654, {f: 2, c: 25622}, 25606, 25964, 26015, 26032,
  13154. 26263, 26249, {f: 2, c: 26247}, 26262, 26244, 26264, 26253, 26371, 27028,
  13155. 26989, 26970, 26999, 26976, 26964, 26997, 26928, 27010, 26954, 26984,
  13156. 26987, 26974, 26963, 27001, 27014, 26973, 26979, 26971, 27463, 27506,
  13157. 27584, 27583, 27603, 27645, 28322, 28335, 28371, 28342, 28354, 28304,
  13158. 28317, 28359, 28357, 28325, 28312, 28348, 28346, 28331, 28369, 28310,
  13159. 28316, 28356, 28372, 28330, 28327, 28340, 29006, 29017, 29033, 29028,
  13160. 29001, 29031, 29020, 29036, 29030, 29004, 29029, 29022, 28998, 29032,
  13161. 29014, 29242, 29266, 29495, 29509, 29503, 29502, 29807, 29786, 29781,
  13162. 29791, 29790, 29761, 29759, 29785, 29787, [29788, 58019], 30070, 30072,
  13163. 30208, 30192, 30209, 30194, 30193, 30202, 30207, 30196, 30195,
  13164. {f: 2, c: 30430}, 30555, 30571, 30566, 30558, 30563, 30585, 30570, 30572,
  13165. 30556, 30565, 30568, 30562, 30702, 30862, 30896, {f: 2, c: 30871}, 30860,
  13166. 30857, 30844, 30865, 30867, 30847, 31098, 31103, 31105, 33836, 31165,
  13167. 31260, 31258, 31264, 31252, 31263, 31262, {f: 2, c: 31391}, 31607, 31680,
  13168. 31584, 31598, 31591, 31921, 31923, 31925, 32147, 32121, 32145, 32129,
  13169. 32143, 32091, 32622, {f: 2, c: 32617}, 32626, 32681, 32680, 32676, 32854,
  13170. 32856, 32902, 32900, 33137, 33136, 33144, 33125, 33134, 33139, 33131,
  13171. {f: 2, c: 33145}, 33126, 33285, 33351, 33922, 33911, 33853, 33841, 33909,
  13172. 33894, 33899, 33865, 33900, 33883, 33852, 33845, 33889, 33891, 33897,
  13173. 33901, 33862, 34398, 34396, 34399, 34553, 34579, 34568, 34567, 34560,
  13174. 34558, 34555, {f: 2, c: 34562}, 34566, 34570, 34905, 35039, 35028, 35033,
  13175. 35036, 35032, 35037, 35041, 35018, 35029, 35026, 35228, 35299, 35435,
  13176. {f: 2, c: 35442}, 35430, 35433, 35440, 35463, 35452, 35427, 35488, 35441,
  13177. 35461, 35437, 35426, 35438, 35436, 35449, 35451, 35390, 35432, 35938,
  13178. 35978, 35977, 36042, {f: 2, c: 36039}, 36036, 36018, 36035, 36034, 36037,
  13179. 36321, 36319, 36328, 36335, 36339, 36346, 36330, 36324, 36326, 36530,
  13180. 36611, 36617, 36606, 36618, 36767, 36786, 36939, 36938, 36947, 36930,
  13181. 36948, 36924, 36949, 36944, 36935, 36943, 36942, 36941, 36945, 36926,
  13182. 36929, 37138, 37143, 37228, 37226, 37225, 37321, 37431, 37463, 37432,
  13183. 37437, 37440, 37438, 37467, 37451, 37476, 37457, 37428, 37449, 37453,
  13184. 37445, 37433, 37439, 37466, 38296, 38552, {f: 2, c: 38548}, 38605, 38603,
  13185. {f: 2, c: 38601}, 38647, 38651, 38649, 38646, 38742, 38772, 38774,
  13186. {f: 2, c: 38928}, 38931, 38922, 38930, 38924, 39164, 39156,
  13187. {f: 2, c: 39165}, 39347, 39345, 39348, 39649, 40169, 40578, [12237, 40718],
  13188. [12238, 40723], [12239, 40736], 20711, 20718, 20709, 20694, [20717, 60903],
  13189. 20698, 20693, 20687, 20689, 20721, 20686, 20713, 20834, 20979, 21123,
  13190. 21122, 21297, 21421, 22014, 22016, 22043, 22039, 22013, 22036, 22022,
  13191. 22025, {f: 2, c: 22029}, 22007, 22038, 22047, 22024, 22032, 22006, 22296,
  13192. 22294, 22645, 22654, 22659, 22675, 22666, 22649, 22661, 22653, 22781,
  13193. 22821, 22818, 22820, 22890, 22889, 23265, 23270, 23273, 23255, 23254,
  13194. 23256, 23267, 23413, 23518, 23527, 23521, {f: 2, c: 23525}, 23528, 23522,
  13195. 23524, 23519, 23565, 23650, 23940, 23943, 24155, 24163, 24149, 24151,
  13196. 24148, 24275, 24278, 24330, 24390, 24432, 24505, 24903, 24895, 24907,
  13197. 24951, {f: 2, c: 24930}, 24927, 24922, 24920, 24949, 25130, 25735, 25688,
  13198. 25684, 25764, 25720, 25695, 25722, 25681, 25703, 25652, 25709, 25723,
  13199. 25970, 26017, 26071, 26070, 26274, 26280, 26269, 27036, 27048, 27029,
  13200. 27073, 27054, 27091, 27083, 27035, 27063, 27067, 27051, 27060, 27088,
  13201. 27085, 27053, 27084, 27046, 27075, 27043, 27465, 27468, 27699, 28467,
  13202. 28436, 28414, 28435, 28404, 28457, 28478, 28448, 28460, 28431, 28418,
  13203. 28450, 28415, 28399, 28422, 28465, 28472, 28466, 28451, 28437, 28459,
  13204. 28463, 28552, 28458, 28396, 28417, 28402, 28364, 28407, 29076, 29081,
  13205. 29053, 29066, 29060, 29074, 29246, 29330, 29334, 29508, 29520, 29796,
  13206. 29795, 29802, 29808, 29805, 29956, 30097, 30247, 30221, 30219, 30217,
  13207. 30227, 30433, 30435, 30596, 30589, 30591, 30561, 30913, 30879, 30887,
  13208. 30899, 30889, 30883, {f: 2, c: 31118}, 31117, 31278, 31281, 31402, 31401,
  13209. 31469, 31471, 31649, 31637, 31627, 31605, 31639, 31645, 31636, 31631,
  13210. [31672, 58170], 31623, 31620, 31929, {f: 2, c: 31933}, 32187, 32176, 32156,
  13211. {f: 2, c: 32189}, 32160, 32202, 32180, 32178, 32177, 32186, 32162, 32191,
  13212. 32181, 32184, 32173, [32210, 58202], 32199, 32172, 32624, {f: 2, c: 32736},
  13213. 32735, 32862, 32858, 32903, 33104, 33152, 33167, 33160, 33162, 33151,
  13214. 33154, 33255, 33274, 33287, 33300, 33310, 33355, 33993, 33983, 33990,
  13215. 33988, 33945, 33950, 33970, 33948, 33995, 33976, 33984, 34003, 33936,
  13216. 33980, 34001, 33994, 34623, 34588, 34619, 34594, 34597, 34612, 34584,
  13217. 34645, 34615, 34601, 35059, 35074, 35060, 35065, 35064, 35069, 35048,
  13218. 35098, 35055, 35494, 35468, 35486, 35491, 35469, 35489, 35475, 35492,
  13219. 35498, 35493, 35496, 35480, 35473, 35482, 35495, 35946, 35981, 35980,
  13220. 36051, {f: 2, c: 36049}, 36203, 36249, 36245, 36348, 36628, 36626, 36629,
  13221. 36627, 36771, 36960, 36952, 36956, 36963, 36953, 36958, 36962, 36957,
  13222. 36955, 37145, 37144, 37150, 37237, 37240, 37239, 37236, 37496, 37548,
  13223. 37504, 37509, 37528, 37526, 37499, 37523, 37532, 37544, 37500, 37521,
  13224. 38305, {f: 2, c: 38312}, 38307, 38309, 38308, 38553, 38556, 38555, 38604,
  13225. 38610, 38656, 38780, 38789, 38902, {f: 2, c: 38935}, 39087, 39089, 39171,
  13226. 39173, 39180, 39177, 39361, {f: 2, c: 39599}, 39654, {f: 2, c: 39745},
  13227. 40180, 40182, 40179, 40636, [12240, 40763], [12241, 40778], 20740, 20736,
  13228. 20731, 20725, 20729, 20738, {f: 2, c: 20744}, 20741, 20956,
  13229. {f: 3, c: 21127}, 21133, 21130, 21232, 21426, 22062, 22075, 22073, 22066,
  13230. 22079, 22068, 22057, 22099, 22094, 22103, 22132, 22070, {f: 2, c: 22063},
  13231. 22656, 22687, 22686, 22707, 22684, 22702, 22697, 22694, 22893, 23305,
  13232. 23291, 23307, 23285, 23308, 23304, 23534, 23532, 23529, 23531,
  13233. {f: 2, c: 23652}, 23965, 23956, 24162, 24159, 24161, 24290, 24282, 24287,
  13234. 24285, 24291, 24288, 24392, 24433, 24503, 24501, 24950, 24935, 24942,
  13235. 24925, 24917, 24962, 24956, 24944, 24939, 24958, 24999, 24976, 25003,
  13236. 24974, 25004, 24986, 24996, 24980, 25006, 25134, 25705, 25711, 25721,
  13237. 25758, 25778, 25736, [25744, 57745], 25776, 25765, 25747, 25749, 25769,
  13238. 25746, 25774, 25773, 25771, 25754, 25772, 25753, 25762, 25779, 25973,
  13239. {f: 2, c: 25975}, 26286, 26283, 26292, 26289, 27171, 27167, 27112, 27137,
  13240. 27166, 27161, 27133, 27169, 27155, 27146, 27123, 27138, 27141, 27117,
  13241. 27153, 27472, 27470, 27556, {f: 2, c: 27589}, 28479, 28540, 28548, 28497,
  13242. 28518, 28500, 28550, 28525, 28507, 28536, 28526, 28558, 28538, 28528,
  13243. 28516, 28567, 28504, 28373, 28527, 28512, 28511, 29087, 29100, 29105,
  13244. 29096, 29270, 29339, 29518, 29527, 29801, 29835, 29827, 29822, 29824,
  13245. 30079, 30240, 30249, 30239, 30244, 30246, {f: 2, c: 30241}, 30362, 30394,
  13246. 30436, 30606, 30599, 30604, 30609, 30603, 30923, 30917, 30906, 30922,
  13247. 30910, 30933, 30908, 30928, 31295, 31292, 31296, 31293, 31287, 31291,
  13248. 31407, 31406, 31661, 31665, 31684, 31668, {f: 2, c: 31686}, 31681, 31648,
  13249. 31692, 31946, 32224, 32244, 32239, 32251, 32216, 32236, 32221, 32232,
  13250. 32227, 32218, 32222, 32233, 32158, 32217, 32242, 32249, 32629, 32631,
  13251. 32687, 32745, 32806, {f: 3, c: 33179}, 33184, 33178, 33176, 34071, 34109,
  13252. 34074, 34030, {f: 2, c: 34092}, 34067, 34065, 34083, 34081, 34068, 34028,
  13253. 34085, 34047, 34054, 34690, 34676, 34678, 34656, 34662, 34680, 34664,
  13254. 34649, 34647, 34636, 34643, 34907, 34909, 35088, 35079, {f: 2, c: 35090},
  13255. 35093, 35082, 35516, 35538, 35527, 35524, 35477, 35531, 35576, 35506,
  13256. 35529, 35522, 35519, 35504, 35542, 35533, 35510, 35513, 35547, 35916,
  13257. 35918, 35948, 36064, 36062, 36070, 36068, {f: 2, c: 36076},
  13258. {f: 2, c: 36066}, 36060, 36074, 36065, 36205, 36255, 36259, 36395, 36368,
  13259. 36381, 36386, 36367, 36393, 36383, 36385, 36382, 36538, 36637, 36635,
  13260. 36639, 36649, 36646, 36650, 36636, 36638, 36645, 36969, 36974, 36968,
  13261. 36973, 36983, 37168, 37165, 37159, 37169, 37255, 37257, 37259, 37251,
  13262. 37573, 37563, 37559, 37610, 37604, 37569, 37555, 37564, 37586, 37575,
  13263. 37616, 37554, 38317, 38321, 38660, {f: 2, c: 38662}, 38665, 38752, 38797,
  13264. 38795, 38799, 38945, 38955, 38940, 39091, 39178, 39187, 39186, 39192,
  13265. 39389, 39376, 39391, 39387, 39377, 39381, 39378, 39385, 39607,
  13266. {f: 2, c: 39662}, 39719, 39749, 39748, 39799, 39791, 40198, 40201, 40195,
  13267. 40617, 40638, 40654, 22696, [12242, 40786], 20754, 20760, 20756, 20752,
  13268. 20757, 20864, 20906, 20957, 21137, 21139, 21235, 22105, 22123, 22137,
  13269. 22121, 22116, 22136, 22122, 22120, 22117, 22129, 22127, 22124, 22114,
  13270. 22134, 22721, 22718, 22727, 22725, 22894, 23325, 23348, 23416, 23536,
  13271. 23566, 24394, 25010, 24977, 25001, 24970, 25037, 25014, 25022, 25034,
  13272. 25032, 25136, 25797, 25793, 25803, {f: 2, c: 25787}, 25818, 25796, 25799,
  13273. 25794, 25805, 25791, 25810, 25812, 25790, 25972, 26310, 26313, 26297,
  13274. 26308, 26311, 26296, 27197, 27192, 27194, 27225, 27243, 27224, 27193,
  13275. 27204, 27234, 27233, 27211, 27207, 27189, 27231, 27208, 27481, 27511,
  13276. 27653, 28610, 28593, 28577, 28611, 28580, 28609, 28583, 28595, 28608,
  13277. 28601, [28598, 60318], 28582, 28576, 28596, 29118, 29129, 29136, 29138,
  13278. 29128, 29141, 29113, 29134, 29145, 29148, {f: 2, c: 29123}, 29544, 29852,
  13279. 29859, 29848, 29855, 29854, 29922, {f: 2, c: 29964}, 30260, 30264, 30266,
  13280. 30439, 30437, 30624, {f: 2, c: 30622}, 30629, 30952, 30938, 30956, 30951,
  13281. 31142, {f: 2, c: 31309}, 31302, 31308, 31307, 31418, 31705, 31761, 31689,
  13282. 31716, 31707, 31713, 31721, 31718, {f: 2, c: 31957}, 32266, 32273, 32264,
  13283. 32283, 32291, 32286, [32285, 58211], 32265, 32272, 32633, 32690,
  13284. {f: 2, c: 32752}, 32750, [32808, 58239], 33203, 33193, 33192, 33275, 33288,
  13285. {f: 2, c: 33368}, 34122, 34137, 34120, {f: 2, c: 34152}, 34115, 34121,
  13286. 34157, 34154, 34142, 34691, 34719, 34718, 34722, 34701, 34913, 35114,
  13287. 35122, 35109, 35115, 35105, 35242, [35238, 58391], 35558, 35578, 35563,
  13288. 35569, 35584, 35548, 35559, 35566, 35582, {f: 2, c: 35585}, 35575, 35565,
  13289. 35571, 35574, 35580, 35947, 35949, 35987, 36084, 36420, 36401, 36404,
  13290. 36418, 36409, 36405, 36667, 36655, 36664, 36659, 36776, 36774, 36981,
  13291. 36980, 36984, 36978, 36988, 36986, 37172, 37266, 37664, 37686, 37624,
  13292. 37683, 37679, 37666, 37628, 37675, 37636, 37658, 37648, 37670, 37665,
  13293. 37653, 37678, 37657, 38331, {f: 2, c: 38567}, 38570, 38613, 38670, 38673,
  13294. 38678, 38669, 38675, 38671, 38747, [38748, 58565], 38758, 38808, 38960,
  13295. 38968, 38971, 38967, 38957, 38969, 38948, 39184, 39208, 39198, 39195,
  13296. 39201, 39194, 39405, 39394, 39409, 39608, 39612, 39675, 39661, 39720,
  13297. 39825, 40213, 40227, 40230, 40232, 40210, 40219, 40664, 40660,
  13298. [12243, 40845], [12244, 40860], 20778, 20767, 20769, 20786, 21237, 22158,
  13299. 22144, 22160, 22149, 22151, 22159, 22741, 22739, 22737, 22734, 23344,
  13300. 23338, 23332, 23418, 23607, 23656, 23996, 23994, 23997, 23992, 24171,
  13301. 24396, 24509, 25033, 25026, 25031, 25062, 25035, 25138, 25140, 25806,
  13302. 25802, 25816, 25824, 25840, 25830, 25836, 25841, 25826, 25837,
  13303. {f: 2, c: 25986}, 26329, 26326, 27264, 27284, 27268, 27298, 27292, 27355,
  13304. 27299, 27262, 27287, 27280, 27296, 27484, 27566, 27610, 27656, 28632,
  13305. 28657, {f: 2, c: 28639}, 28635, 28644, 28651, 28655, 28544, 28652, 28641,
  13306. 28649, 28629, 28654, 28656, 29159, [29151, 60361], 29166, 29158, 29157,
  13307. 29165, 29164, 29172, 29152, 29237, 29254, 29552, 29554, 29865, 29872,
  13308. 29862, 29864, 30278, 30274, 30284, 30442, 30643, 30634, 30640, 30636,
  13309. 30631, 30637, 30703, 30967, 30970, 30964, 30959, 30977, 31143, 31146,
  13310. 31319, 31423, 31751, 31757, 31742, 31735, 31756, 31712, 31968, 31964,
  13311. 31966, 31970, 31967, 31961, 31965, 32302, 32318, 32326, 32311, 32306,
  13312. 32323, 32299, 32317, 32305, 32325, 32321, 32308, 32313, 32328, 32309,
  13313. 32319, 32303, 32580, 32755, 32764, {f: 2, c: 32881}, 32880, 32879, 32883,
  13314. 33222, 33219, 33210, 33218, 33216, 33215, 33213, 33225, 33214, 33256,
  13315. 33289, 33393, 34218, 34180, 34174, 34204, 34193, 34196, 34223, 34203,
  13316. 34183, 34216, 34186, 34214, 34407, 34752, 34769, 34739, 34770, 34758,
  13317. 34731, 34747, 34746, 34760, 34763, 35131, 35126, 35140, 35128, 35133,
  13318. 35244, 35598, 35607, 35609, 35611, 35594, 35616, 35613, 35588, 35600,
  13319. 35905, 35903, 35955, 36090, 36093, 36092, 36088, 36091, 36264, 36425,
  13320. 36427, 36424, 36426, 36676, 36670, 36674, 36677, 36671, 36991, 36989,
  13321. 36996, {f: 2, c: 36993}, 36992, 37177, 37283, 37278, 37276, 37709, 37762,
  13322. 37672, 37749, 37706, 37733, 37707, 37656, 37758, 37740, 37723, 37744,
  13323. 37722, 37716, {f: 3, c: 38346}, 38344, 38342, 38577, 38584, 38614, 38684,
  13324. 38686, 38816, 38867, 38982, 39094, 39221, 39425, 39423, 39854, 39851,
  13325. 39850, 39853, 40251, 40255, 40587, 40655, 40670, {f: 2, c: 40668}, 40667,
  13326. 40766, 40779, 21474, 22165, 22190, 22745, 22744, 23352, 24413, 25059,
  13327. 25139, 25844, 25842, 25854, 25862, {f: 2, c: 25850}, 25847, 26039, 26332,
  13328. 26406, 27315, 27308, 27331, 27323, 27320, 27330, {f: 2, c: 27310}, 27487,
  13329. 27512, 27567, 28681, 28683, 28670, 28678, 28666, 28689, 28687,
  13330. {f: 2, c: 29179}, 29182, 29176, 29559, 29557, 29863, 29887, 29973, 30294,
  13331. 30296, 30290, 30653, 30655, {f: 2, c: 30651}, 30990, 31150,
  13332. {f: 2, c: 31329}, 31328, {f: 2, c: 31428}, 31787, 31783, 31786, 31774,
  13333. 31779, 31777, 31975, {f: 2, c: 32340}, 32350, 32346, 32353, 32338, 32345,
  13334. 32584, 32761, 32763, 32887, 32886, 33229, 33231, 33290, 34255, 34217,
  13335. 34253, 34256, 34249, 34224, 34234, 34233, 34799, 34796, 34802, 34784,
  13336. 35206, 35250, 35316, 35624, 35641, 35628, 35627, 35920, 36101, 36441,
  13337. 36451, 36454, 36452, 36447, 36437, 36544, 36681, 36685, 36999, 36995,
  13338. 37000, {f: 2, c: 37291}, 37328, 37780, 37770, 37782, 37794, 37811, 37806,
  13339. 37804, 37808, 37784, 37786, 37783, 38356, 38358, 38352, 38357, 38626,
  13340. 38620, 38617, 38619, 38622, 38692, 38819, 38822, 38829, 38905, 38989,
  13341. 38991, 38988, 38990, 38995, 39098, {f: 2, c: 39230}, 39229, 39214, 39333,
  13342. 39438, 39617, 39683, 39686, 39759, 39758, 39757, 39882, 39881, 39933,
  13343. 39880, 39872, 40273, 40285, 40288, 40672, 40725, 40748, 20787, 22181,
  13344. 22184, {f: 2, c: 22750}, 22754, 23541, 40848, 24300, 25074, 25079, 25078,
  13345. 25077, 25856, 25871, 26336, 26333, 27365, 27357, 27354, 27347, 28699,
  13346. 28703, 28712, 28698, 28701, 28693, 28696, 29190, 29197, 29272, 29346,
  13347. 29560, 29562, 29885, 29898, 29923, 30087, 30086, 30303, 30305, 30663,
  13348. 31001, 31153, 31339, 31337, {f: 2, c: 31806}, 31800, 31805, 31799, 31808,
  13349. 32363, 32365, 32377, {f: 2, c: 32361}, 32371, 32645, 32694, 32697, 32696,
  13350. 33240, 34281, 34269, 34282, 34261, {f: 2, c: 34276}, 34295, 34811, 34821,
  13351. 34829, 34809, 34814, 35168, 35167, 35158, 35166, 35649, 35676, 35672,
  13352. 35657, 35674, {f: 2, c: 35662}, 35654, 35673, 36104, 36106, 36476, 36466,
  13353. 36487, 36470, 36460, 36474, 36468, 36692, 36686, 36781, {f: 2, c: 37002},
  13354. 37297, 37294, 37857, 37841, 37855, 37827, 37832, {f: 2, c: 37852}, 37846,
  13355. 37858, 37837, 37848, 37860, 37847, 37864, 38364, 38580, 38627, 38698,
  13356. 38695, 38753, 38876, 38907, 39006, 39000, 39003, 39100, 39237, 39241,
  13357. 39446, 39449, 39693, 39912, 39911, 39894, 39899, 40329, 40289, 40306,
  13358. 40298, 40300, 40594, 40599, 40595, 40628, 21240, 22199, 22198, 22196,
  13359. 22204, 22756, 23360, 23363, 23421, 23542, 24009, 25080, 25082, 25880,
  13360. 25876, 25881, 26342, 26407, 27372, 28734, 28720, 28722, 29200, 29563,
  13361. 29903, 30306, 30309, 31014, 31018, 31020, 31019, 31431, 31478, 31820,
  13362. 31811, 31821, {f: 2, c: 31983}, 36782, 32381, 32380, 32386, 32588, 32768,
  13363. 33242, 33382, 34299, 34297, 34321, 34298, 34310, 34315, 34311, 34314,
  13364. {f: 2, c: 34836}, 35172, 35258, 35320, 35696, 35692, 35686, 35695, 35679,
  13365. 35691, 36111, 36109, 36489, 36481, 36485, 36482, 37300, 37323, 37912,
  13366. 37891, 37885, 38369, 38704, 39108, 39250, 39249, 39336, 39467, 39472,
  13367. 39479, 39477, 39955, 39949, 40569, 40629, 40680, 40751, 40799, 40803,
  13368. 40801, {f: 2, c: 20791}, 22209, 22208, 22210, 22804, 23660, 24013, 25084,
  13369. 25086, 25885, 25884, 26005, 26345, 27387, 27396, 27386, 27570, 28748,
  13370. 29211, 29351, 29910, 29908, 30313, 30675, 31824, 32399, 32396, 32700,
  13371. 34327, 34349, 34330, 34851, 34850, 34849, 34847, 35178, 35180, 35261,
  13372. 35700, 35703, 35709, 36115, 36490, 36493, 36491, 36703, 36783, 37306,
  13373. 37934, 37939, 37941, 37946, 37944, 37938, 37931, 38370, {f: 2, c: 38712},
  13374. 38706, [38911, 58586], 39015, 39013, 39255, 39493, 39491, 39488, 39486,
  13375. 39631, 39764, 39761, 39981, 39973, 40367, 40372, 40386, 40376, 40605,
  13376. 40687, 40729, 40796, {f: 2, c: 40806}, 20796, 20795, 22216, 22218, 22217,
  13377. 23423, 24020, 24018, 24398, 25087, 25892, 27402, 27489, 28753, 28760,
  13378. 29568, 29924, 30090, 30318, 30316, 31155, 31840, 31839, 32894, 32893,
  13379. 33247, 35186, 35183, 35324, 35712, {f: 2, c: 36118}, 36497, 36499, 36705,
  13380. 37192, 37956, {f: 2, c: 37969}, {f: 2, c: 38717}, 38851, 38849, 39019,
  13381. 39253, 39509, 39501, 39634, 39706, 40009, 39985, 39998, 39995, 40403,
  13382. 40407, 40756, 40812, 40810, 40852, 22220, 24022, 25088, 25891, 25899,
  13383. 25898, 26348, 27408, 29914, 31434, 31844, 31843, 31845, 32403, 32406,
  13384. 32404, 33250, 34360, 34367, 34865, 35722, 37008, 37007, 37987, 37984,
  13385. 37988, 38760, 39023, 39260, {f: 2, c: 39514}, 39511, {f: 2, c: 39635},
  13386. 39633, 40020, 40023, 40022, 40421, 40607, 40692, 22225, 22761, 25900,
  13387. 28766, {f: 2, c: 30321}, [30679, 60226], 32592, 32648, 34870, 34873, 34914,
  13388. 35731, 35730, 35734, 33399, 36123, 37312, 37994, 38722, 38728, 38724,
  13389. 38854, 39024, 39519, 39714, 39768, 40031, {f: 2, c: 40441},
  13390. {f: 2, c: 40572}, 40711, 40823, 40818, 24307, 27414, 28771, 31852, 31854,
  13391. 34875, 35264, 36513, 37313, 38002, 38000, 39025, 39262, 39638, 39715,
  13392. 40652, 28772, 30682, 35738, 38007, 38857, 39522, 39525, 32412, 35740,
  13393. 36522, 37317, {f: 2, c: 38013}, 38012, {f: 2, c: 40055}, 40695, 35924,
  13394. 38015, 40474, 29224, 39530, 39729, 40475, 40478, 31858, 20034, 20060,
  13395. [12048, 20981], [12053, 21274], [12058, 21378], 19975, 19980, 20039, 20109,
  13396. [12062, 22231], [12076, 23662], [12091, 24435], 19983, 20871, 19982, 20014,
  13397. 20115, 20162, 20169, 20168, 20888, 21244, 21356, 21433, 22304, 22787,
  13398. 22828, [23568, 60417], 24063, 26081, [12110, 27571], 27596, [12115, 27668],
  13399. [12121, 29247], 20017, 20028, 20200, 20188, 20201, 20193, 20189, 20186,
  13400. 21004, 21001, 21276, 21324, {f: 2, c: 22306}, 22807, 22831, 23425, 23428,
  13401. 23570, 23611, 23668, 23667, 24068, 24192, 24194, 24521, 25097, 25168,
  13402. 27669, 27702, 27715, 27711, 27707, 29358, 29360, 29578, [12145, 31160],
  13403. 32906, 38430, 20238, 20248, 20268, 20213, 20244, 20209, 20224, 20215,
  13404. 20232, 20253, 20226, 20229, 20258, 20243, 20228, 20212, 20242, 20913,
  13405. 21011, 21008, 21158, 21282, 21279, 21325, 21386, 21511, 22241, 22239,
  13406. 22318, 22314, 22324, 22844, 22912, 22908, 22917, 22907, 22910, 22903,
  13407. 22911, 23382, 23573, 23589, 23676, {f: 2, c: 23674}, 23678, 24031,
  13408. [24181, 57646], 24196, 24322, 24346, 24436, 24533, 24532, 24527, 25180,
  13409. 25182, 25188, 25185, 25190, 25186, 25177, 25184, 25178, 25189, 25911,
  13410. 26095, 26094, 26430, 26425, 26424, 26427, 26426, 26431, 26428, 26419,
  13411. 27672, 27718, 27730, 27740, 27727, [27722, 60796], 27732, {f: 2, c: 27723},
  13412. 28785, 29278, {f: 2, c: 29364}, 29582, 29994, 30335, 31349, [12153, 32593],
  13413. [12171, 33400], 33404, 33408, 33405, 33407, [12172, 34381], [12177, 35198],
  13414. 37017, [37015, 59347], 37016, 37019, 37012, 38434, 38436, 38432, 38435,
  13415. 20310, 20283, 20322, 20297, 20307, 20324, 20286, 20327, 20306, 20319,
  13416. 20289, 20312, 20269, 20275, 20287, 20321, 20879, 20921, 21020, 21022,
  13417. 21025, {f: 2, c: 21165}, 21257, 21347, 21362, {f: 2, c: 21390}, 21552,
  13418. 21559, 21546, 21588, 21573, 21529, 21532, 21541, 21528, 21565, 21583,
  13419. 21569, 21544, 21540, 21575, 22254, 22247, 22245, 22337, 22341, 22348,
  13420. 22345, 22347, 22354, 22790, 22848, 22950, 22936, 22944, 22935, 22926,
  13421. 22946, 22928, 22927, 22951, 22945, 23438, 23442, 23592, 23594, 23693,
  13422. 23695, 23688, 23691, 23689, 23698, 23690, 23686, 23699, 23701, 24032,
  13423. 24074, 24078, 24203, 24201, 24204, 24200, 24205, 24325, 24349, 24440,
  13424. 24438, 24530, 24529, 24528, 24557, 24552, 24558, 24563, 24545, 24548,
  13425. 24547, 24570, 24559, 24567, 24571, 24576, 24564, 25146, 25219, 25228,
  13426. {f: 2, c: 25230}, 25236, 25223, 25201, 25211, 25210, 25200, 25217, 25224,
  13427. 25207, 25213, 25202, 25204, 26096, 26100, 26099, 26098, 26101, 26437,
  13428. 26439, 26457, 26453, 26444, 26440, 26461, 26445, 26458, 26443, 27600,
  13429. {f: 2, c: 27673}, 27768, 27751, 27755, 27780, 27787, 27791, 27761, 27759,
  13430. 27753, 27802, 27757, 27783, 27797, [27804, 57900], 27750, 27763, 27749,
  13431. 27771, 27790, 28788, 28794, 29283, 29375, 29373, 29379, 29382, 29377,
  13432. 29370, 29381, 29589, 29591, {f: 2, c: 29587}, 29586, 30010, 30009,
  13433. {f: 2, c: 30100}, 30337, 31037, 32820, 32917, 32921, 32912, 32914, 32924,
  13434. 33424, 33423, 33413, 33422, 33425, 33427, 33418, {f: 2, c: 33411},
  13435. [12184, 35960], 36809, 36799, 37023, 37025, 37029, 37022, 37031, 37024,
  13436. 38448, 38440, 38447, 38445, 20019, 20376, 20348, 20357, 20349, 20352,
  13437. 20359, 20342, 20340, 20361, 20356, 20343, 20300, 20375, 20330, 20378,
  13438. 20345, 20353, 20344, 20368, 20380, 20372, 20382, 20370, 20354, 20373,
  13439. 20331, 20334, 20894, 20924, 20926, 21045, {f: 2, c: 21042}, 21062, 21041,
  13440. 21180, {f: 2, c: 21258}, 21308, 21394, 21396, 21639, 21631, 21633, 21649,
  13441. 21634, 21640, 21611, 21626, 21630, 21605, 21612, 21620, 21606, 21645,
  13442. 21615, 21601, 21600, 21656, 21603, 21607, 21604, 22263, 22265, 22383,
  13443. 22386, 22381, 22379, 22385, 22384, 22390, 22400, 22389, 22395,
  13444. {f: 2, c: 22387}, 22370, 22376, 22397, 22796, 22853, 22965, 22970, 22991,
  13445. 22990, 22962, 22988, 22977, 22966, 22972, 22979, 22998, 22961, 22973,
  13446. 22976, 22984, 22964, 22983, 23394, 23397, 23443, 23445, 23620, 23623,
  13447. 23726, 23716, 23712, 23733, 23727, 23720, 23724, 23711, 23715, 23725,
  13448. 23714, 23722, 23719, 23709, 23717, 23734, 23728, 23718, 24087, 24084,
  13449. 24089, 24360, {f: 3, c: 24354}, 24404, 24450, 24446, 24445, 24542, 24549,
  13450. 24621, 24614, 24601, 24626, 24587, 24628, 24586, 24599, 24627, 24602,
  13451. 24606, 24620, 24610, 24589, 24592, 24622, 24595, 24593, 24588, 24585,
  13452. 24604, 25108, 25149, 25261, 25268, 25297, 25278, 25258, 25270, 25290,
  13453. 25262, 25267, 25263, 25275, 25257, 25264, 25272, 25917, 26024, 26043,
  13454. 26121, 26108, 26116, 26130, 26120, 26107, 26115, 26123, 26125, 26117,
  13455. 26109, 26129, 26128, 26358, 26378, 26501, 26476, 26510, 26514, 26486,
  13456. 26491, 26520, 26502, 26500, 26484, 26509, 26508, 26490, 26527, 26513,
  13457. 26521, 26499, 26493, 26497, {f: 2, c: 26488}, 26516, 27429, 27520, 27518,
  13458. 27614, 27677, 27795, 27884, 27883, 27886, 27865, 27830, 27860, 27821,
  13459. 27879, 27831, 27856, 27842, 27834, 27843, 27846, 27885, 27890, 27858,
  13460. 27869, 27828, 27786, 27805, 27776, 27870, 27840, 27952, 27853, 27847,
  13461. 27824, 27897, 27855, 27881, 27857, 28820, 28824, 28805, 28819, 28806,
  13462. 28804, 28817, 28822, 28802, 28826, 28803, 29290, 29398, 29387, 29400,
  13463. 29385, 29404, 29394, 29396, 29402, 29388, 29393, 29604, 29601, 29613,
  13464. 29606, 29602, 29600, 29612, 29597, 29917, 29928, {f: 2, c: 30015}, 30014,
  13465. 30092, 30104, 30383, 30451, 30449, 30448, 30453, 30712, 30716, 30713,
  13466. 30715, 30714, 30711, 31042, 31039, 31173, 31352, 31355, 31483, 31861,
  13467. 31997, 32821, 32911, 32942, 32931, 32952, 32949, 32941, 33312, 33440,
  13468. 33472, 33451, 33434, 33432, 33435, 33461, 33447, 33454, 33468, 33438,
  13469. 33466, 33460, 33448, 33441, 33449, 33474, 33444, 33475, 33462, 33442,
  13470. 34416, 34415, {f: 2, c: 34413}, 35926, 36818, 36811, 36819, 36813, 36822,
  13471. 36821, 36823, 37042, 37044, 37039, 37043, 37040, 38457, 38461, 38460,
  13472. 38458, 38467, 20429, 20421, 20435, 20402, 20425, 20427, 20417, 20436,
  13473. 20444, 20441, [20411, 60346], 20403, 20443, 20423, 20438, 20410, 20416,
  13474. 20409, 20460, 21060, 21065, 21184, 21186, 21309, 21372, 21399, 21398,
  13475. 21401, 21400, 21690, 21665, 21677, 21669, 21711, 21699, 33549, 21687,
  13476. 21678, 21718, 21686, {f: 2, c: 21701}, 21664, 21616, 21692, 21666, 21694,
  13477. 21618, 21726, 21680, 22453, {f: 2, c: 22430}, 22436, 22412, 22423, 22429,
  13478. 22427, 22420, 22424, 22415, 22425, 22437, 22426, 22421, 22772, 22797,
  13479. 22867, 23009, 23006, 23022, 23040, 23025, 23005, 23034, 23037, 23036,
  13480. 23030, 23012, 23026, 23031, 23003, 23017, 23027, 23029, 23008, 23038,
  13481. 23028, 23021, 23464, 23628, 23760, 23768, 23756, 23767, 23755, 23771,
  13482. 23774, 23770, 23753, 23751, 23754, 23766, {f: 2, c: 23763}, 23759, 23752,
  13483. 23750, 23758, 23775, 23800, 24057, {f: 3, c: 24097}, 24096, 24100, 24240,
  13484. 24228, 24226, 24219, 24227, 24229, 24327, 24366, 24406, 24454, 24631,
  13485. 24633, 24660, 24690, 24670, 24645, 24659, 24647, 24649, 24667, 24652,
  13486. 24640, 24642, 24671, 24612, 24644, 24664, 24678, 24686, {f: 2, c: 25154},
  13487. 25295, 25357, 25355, 25333, 25358, 25347, 25323, 25337, 25359, 25356,
  13488. 25336, 25334, 25344, {f: 2, c: 25363}, 25338, 25365, 25339, 25328, 25921,
  13489. 25923, 26026, 26047, 26166, 26145, 26162, 26165, 26140, 26150, 26146,
  13490. 26163, 26155, 26170, 26141, 26164, 26169, 26158, {f: 2, c: 26383}, 26561,
  13491. 26610, 26568, 26554, 26588, 26555, 26616, 26584, 26560, 26551, 26565,
  13492. 26603, 26596, 26591, 26549, 26573, 26547, 26615, 26614, 26606, 26595,
  13493. 26562, 26553, 26574, 26599, 26608, 26546, 26620, 26566, 26605, 26572,
  13494. 26542, 26598, 26587, 26618, {f: 2, c: 26569}, 26563, 26602, 26571, 27432,
  13495. 27522, 27524, 27574, 27606, 27608, 27616, {f: 2, c: 27680}, 27944, 27956,
  13496. 27949, 27935, 27964, 27967, 27922, 27914, 27866, 27955, 27908, 27929,
  13497. 27962, 27930, 27921, 27904, 27933, 27970, 27905, 27928, 27959, 27907,
  13498. 27919, 27968, 27911, 27936, 27948, 27912, 27938, 27913, 27920, 28855,
  13499. 28831, 28862, 28849, 28848, 28833, {f: 2, c: 28852}, 28841, 29249,
  13500. {f: 2, c: 29257}, 29292, 29296, 29299, 29294, 29386, 29412, 29416, 29419,
  13501. 29407, 29418, 29414, 29411, 29573, 29644, 29634, 29640, 29637, 29625,
  13502. 29622, 29621, 29620, 29675, 29631, 29639, 29630, 29635, 29638, 29624,
  13503. 29643, 29932, 29934, 29998, {f: 2, c: 30023}, 30119, 30122, 30329, 30404,
  13504. 30472, {f: 3, c: 30467}, 30474, 30455, 30459, 30458, {f: 2, c: 30695},
  13505. 30726, {f: 2, c: 30737}, 30725, 30736, 30735, 30734, [30729, 58095], 30723,
  13506. 30739, 31050, 31052, 31051, 31045, 31044, 31189, 31181, 31183, 31190,
  13507. 31182, 31360, 31358, 31441, {f: 2, c: 31488}, 31866, {f: 2, c: 31864},
  13508. {f: 3, c: 31871}, 32003, 32008, 32001, 32600, 32657, 32653, 32702, 32775,
  13509. {f: 2, c: 32782}, 32788, 32823, 32984, 32967, 32992, 32977, 32968, 32962,
  13510. 32976, 32965, 32995, 32985, 32988, 32970, 32981, 32969, 32975, 32983,
  13511. 32998, 32973, 33279, 33313, 33428, 33497, 33534, 33529, 33543, 33512,
  13512. 33536, 33493, 33594, 33515, 33494, 33524, 33516, 33505, 33522, 33525,
  13513. 33548, 33531, 33526, 33520, 33514, 33508, 33504, 33530, 33523, 33517,
  13514. 34423, 34420, 34428, 34419, 34881, 34894, 34919, 34922, 34921, 35283,
  13515. 35332, 35335, 36210, 36835, 36833, 36846, 36832, 37105, 37053, 37055,
  13516. 37077, 37061, 37054, 37063, 37067, 37064, [37332, 60294], 37331, 38484,
  13517. 38479, 38481, 38483, 38474, 38478, 20510, 20485, 20487, 20499, 20514,
  13518. 20528, 20507, 20469, 20468, 20531, 20535, 20524, {f: 2, c: 20470}, 20503,
  13519. 20508, 20512, 20519, 20533, 20527, 20529, 20494, 20826, 20884, 20883,
  13520. 20938, {f: 2, c: 20932}, 20936, 20942, 21089, 21082, 21074,
  13521. {f: 2, c: 21086}, 21077, 21090, 21197, 21262, 21406, 21798, 21730, 21783,
  13522. 21778, 21735, 21747, 21732, 21786, 21759, 21764, 21768, 21739, 21777,
  13523. 21765, 21745, 21770, 21755, {f: 2, c: 21751}, 21728, 21774, 21763, 21771,
  13524. {f: 2, c: 22273}, 22476, 22578, 22485, 22482, 22458, 22470, 22461, 22460,
  13525. 22456, 22454, 22463, 22471, 22480, 22457, 22465, 22798, 22858, 23065,
  13526. 23062, {f: 2, c: 23085}, 23061, 23055, 23063, 23050, 23070, 23091, 23404,
  13527. 23463, 23469, 23468, 23555, 23638, 23636, 23788, 23807, 23790, 23793,
  13528. 23799, 23808, 23801, 24105, 24104, 24232, 24238, 24234, 24236, 24371,
  13529. 24368, 24423, 24669, 24666, 24679, 24641, 24738, 24712, 24704, 24722,
  13530. 24705, 24733, 24707, 24725, 24731, 24727, 24711, 24732, 24718, 25113,
  13531. 25158, 25330, 25360, 25430, 25388, {f: 2, c: 25412}, 25398, 25411, 25572,
  13532. 25401, 25419, 25418, 25404, 25385, 25409, 25396, 25432, 25428, 25433,
  13533. 25389, 25415, 25395, 25434, 25425, 25400, 25431, 25408, 25416, 25930,
  13534. 25926, 26054, {f: 2, c: 26051}, 26050, 26186, 26207, 26183, 26193,
  13535. {f: 2, c: 26386}, 26655, 26650, 26697, {f: 2, c: 26674}, 26683, 26699,
  13536. 26703, 26646, 26673, 26652, 26677, 26667, 26669, 26671, 26702, 26692,
  13537. 26676, 26653, 26642, 26644, 26662, 26664, 26670, 26701, 26682, 26661,
  13538. 26656, 27436, 27439, 27437, 27441, 27444, 27501, 32898, 27528, 27622,
  13539. 27620, 27624, 27619, 27618, 27623, 27685, 28026, {f: 2, c: 28003}, 28022,
  13540. 27917, 28001, 28050, 27992, 28002, 28013, 28015, 28049, 28045, 28143,
  13541. 28031, 28038, 27998, [28007, 59078], 28000, 28055, 28016, 28028, 27999,
  13542. 28034, 28056, 27951, 28008, 28043, 28030, 28032, 28036, 27926, 28035,
  13543. 28027, 28029, 28021, 28048, 28892, 28883, 28881, 28893, 28875, 32569,
  13544. 28898, 28887, 28882, 28894, 28896, 28884, 28877, {f: 3, c: 28869}, 28890,
  13545. 28878, 28897, 29250, 29304, 29303, 29302, 29440, 29434, 29428, 29438,
  13546. 29430, 29427, 29435, 29441, 29651, 29657, 29669, 29654, 29628, 29671,
  13547. 29667, 29673, 29660, 29650, 29659, 29652, 29661, 29658, {f: 2, c: 29655},
  13548. 29672, {f: 2, c: 29918}, {f: 2, c: 29940}, 29985, 30043, 30047, 30128,
  13549. 30145, 30139, 30148, 30144, 30143, 30134, 30138, 30346, 30409, 30493,
  13550. 30491, 30480, 30483, 30482, 30499, 30481, 30485, {f: 2, c: 30489}, 30498,
  13551. 30503, 30755, 30764, 30754, 30773, 30767, 30760, 30766, 30763, 30753,
  13552. 30761, 30771, 30762, 30769, 31060, 31067, 31055, 31068, 31059, 31058,
  13553. 31057, {f: 2, c: 31211}, 31200, 31214, 31213, 31210, 31196, 31198, 31197,
  13554. 31366, 31369, 31365, {f: 2, c: 31371}, 31370, 31367, 31448, 31504, 31492,
  13555. 31507, 31493, 31503, 31496, 31498, 31502, 31497, 31506, 31876, 31889,
  13556. 31882, 31884, 31880, 31885, 31877, 32030, 32029, 32017, 32014, 32024,
  13557. 32022, 32019, 32031, 32018, 32015, 32012, 32604, 32609, 32606, 32608,
  13558. 32605, 32603, 32662, 32658, 32707, 32706, 32704, 32790, 32830, 32825,
  13559. 33018, 33010, 33017, 33013, 33025, 33019, 33024, 33281, 33327, 33317,
  13560. 33587, 33581, 33604, 33561, 33617, 33573, 33622, 33599, 33601, 33574,
  13561. 33564, 33570, 33602, 33614, 33563, 33578, 33544, 33596, 33613, 33558,
  13562. 33572, 33568, 33591, 33583, 33577, 33607, 33605, 33612, 33619, 33566,
  13563. 33580, 33611, 33575, 33608, 34387, 34386, 34466, 34472, 34454, 34445,
  13564. 34449, 34462, 34439, 34455, 34438, 34443, 34458, 34437, 34469, 34457,
  13565. 34465, 34471, 34453, 34456, 34446, 34461, 34448, 34452, {f: 2, c: 34883},
  13566. 34925, {f: 2, c: 34933}, 34930, 34944, 34929, 34943, 34927, 34947, 34942,
  13567. 34932, 34940, 35346, 35911, 35927, 35963, 36004, 36003, 36214, 36216,
  13568. 36277, 36279, 36278, 36561, 36563, 36862, 36853, 36866, 36863, 36859,
  13569. 36868, 36860, 36854, 37078, 37088, {f: 2, c: 37081}, 37091, 37087, 37093,
  13570. 37080, 37083, 37079, 37084, 37092, 37200, {f: 2, c: 37198}, 37333, 37346,
  13571. 37338, 38492, 38495, 38588, 39139, [12221, 39647], [12223, 39727], 20095,
  13572. 20592, 20586, 20577, 20574, 20576, 20563, 20555, 20573, 20594, 20552,
  13573. 20557, 20545, 20571, 20554, 20578, 20501, 20549, 20575, 20585, 20587,
  13574. {f: 2, c: 20579}, 20550, 20544, 20590, 20595, 20567, 20561, 20944, 21099,
  13575. 21101, 21100, 21102, 21206, 21203, 21293, 21404, {f: 2, c: 21877}, 21820,
  13576. 21837, 21840, 21812, 21802, 21841, 21858, 21814, 21813, 21808, 21842,
  13577. 21829, 21772, 21810, 21861, 21838, 21817, 21832, 21805, 21819, 21824,
  13578. 21835, 22282, 22279, 22523, 22548, 22498, 22518, 22492, 22516, 22528,
  13579. 22509, 22525, 22536, 22520, 22539, 22515, 22479, 22535, 22510, 22499,
  13580. 22514, 22501, 22508, 22497, 22542, 22524, 22544, 22503, 22529, 22540,
  13581. 22513, 22505, 22512, 22541, 22532, 22876, 23136, 23128, 23125,
  13582. [23143, 60437], 23134, 23096, 23093, 23149, 23120, 23135, 23141, 23148,
  13583. 23123, 23140, 23127, 23107, 23133, 23122, 23108, 23131, 23112, 23182,
  13584. 23102, 23117, 23097, 23116, 23152, 23145, 23111, 23121, 23126, 23106,
  13585. 23132, 23410, 23406, 23489, 23488, 23641, 23838, 23819, 23837, 23834,
  13586. 23840, 23820, 23848, 23821, 23846, 23845, 23823, 23856, 23826, 23843,
  13587. 23839, 23854, 24126, 24116, 24241, 24244, 24249, {f: 2, c: 24242}, 24374,
  13588. 24376, 24475, 24470, 24479, 24714, 24720, 24710, 24766, 24752, 24762,
  13589. {f: 2, c: 24787}, 24783, 24804, 24793, 24797, 24776, 24753, 24795, 24759,
  13590. 24778, 24767, 24771, 24781, 24768, 25394, 25445, 25482, 25474, 25469,
  13591. 25533, 25502, 25517, 25501, 25495, 25515, 25486, 25455, 25479, 25488,
  13592. 25454, 25519, 25461, 25500, 25453, 25518, 25468, 25508, 25403, 25503,
  13593. 25464, 25477, 25473, 25489, 25485, 25456, 25939, 26061, 26213, 26209,
  13594. 26203, 26201, 26204, 26210, 26392, 26745, 26759, 26768, 26780,
  13595. {f: 2, c: 26733}, 26798, 26795, 26966, 26735, 26787, 26796, 26793, 26741,
  13596. 26740, 26802, 26767, 26743, 26770, 26748, 26731, 26738, 26794, 26752,
  13597. 26737, 26750, 26779, 26774, 26763, 26784, 26761, 26788, 26744, 26747,
  13598. 26769, 26764, 26762, 26749, 27446, 27443, {f: 2, c: 27447}, 27537, 27535,
  13599. {f: 2, c: 27533}, 27532, 27690, 28096, 28075, 28084, 28083, 28276, 28076,
  13600. 28137, 28130, 28087, 28150, 28116, 28160, 28104, 28128, 28127, 28118,
  13601. 28094, 28133, {f: 2, c: 28124}, 28123, 28148, 28106, 28093, 28141, 28144,
  13602. 28090, 28117, 28098, 28111, 28105, 28112, 28146, 28115, 28157, 28119,
  13603. 28109, 28131, 28091, 28922, 28941, 28919, 28951, 28916, 28940, 28912,
  13604. 28932, 28915, 28944, 28924, 28927, 28934, 28947, 28928, 28920, 28918,
  13605. 28939, 28930, 28942, 29310, {f: 2, c: 29307}, 29311, 29469, 29463, 29447,
  13606. 29457, 29464, 29450, 29448, 29439, 29455, 29470, 29576, 29686, 29688,
  13607. 29685, 29700, 29697, 29693, 29703, 29696, 29690, 29692, 29695, 29708,
  13608. 29707, 29684, 29704, 30052, 30051, 30158, 30162, 30159, {f: 2, c: 30155},
  13609. 30161, 30160, 30351, 30345, 30419, 30521, 30511, 30509, {f: 2, c: 30513},
  13610. 30516, 30515, 30525, 30501, 30523, 30517, 30792, 30802, 30793, 30797,
  13611. 30794, 30796, 30758, 30789, 30800, 31076, 31079, {f: 2, c: 31081}, 31075,
  13612. 31083, 31073, 31163, 31226, 31224, {f: 2, c: 31222}, 31375, 31380, 31376,
  13613. 31541, 31547, 31540, 31525, 31536, 31522, 31524, 31539, 31512, 31530,
  13614. 31517, 31537, 31531, 31533, 31535, 31538, 31544, 31514, 31523, 31892,
  13615. 31896, 31894, 31907, 32053, 32061, 32056, 32054, 32058, 32069, 32044,
  13616. 32041, 32065, 32071, {f: 2, c: 32062}, 32074, 32059, 32040, 32611, 32661,
  13617. {f: 2, c: 32668}, 32667, {f: 2, c: 32714}, 32717, {f: 2, c: 32720}, 32711,
  13618. 32719, 32713, 32799, 32798, 32795, 32839, 32835, 32840, 33048, 33061,
  13619. 33049, 33051, 33069, 33055, 33068, 33054, 33057, 33045, 33063, 33053,
  13620. 33058, 33297, 33336, 33331, 33338, 33332, 33330, 33396, 33680, 33699,
  13621. 33704, 33677, 33658, 33651, 33700, 33652, 33679, 33665, 33685, 33689,
  13622. 33653, 33684, 33705, 33661, 33667, 33676, 33693, 33691, 33706, 33675,
  13623. 33662, 33701, 33711, 33672, 33687, 33712, 33663, 33702, 33671, 33710,
  13624. 33654, 34393, 34390, 34495, 34487, 34498, 34497, 34501, 34490, 34480,
  13625. 34504, 34489, 34483, 34488, 34508, 34484, {f: 2, c: 34491}, 34499,
  13626. {f: 2, c: 34493}, 34898, 34953, 34965, 34984, 34978, 34986, 34970, 34961,
  13627. 34977, 34975, 34968, 34983, 34969, 34971, 34967, 34980, 34988, 34956,
  13628. 34963, 34958, 35202, 35286, 35289, 35285, 35376, 35367, 35372, 35358,
  13629. 35897, 35899, {f: 2, c: 35932}, 35965, 36005, 36221, 36219, 36217, 36284,
  13630. 36290, 36281, 36287, 36289, 36568, 36574, 36573, 36572, 36567,
  13631. {f: 2, c: 36576}, 36900, 36875, 36881, 36892, 36876, 36897, 37103, 37098,
  13632. 37104, 37108, {f: 2, c: 37106}, 37076, {f: 2, c: 37099}, 37097, 37206,
  13633. 37208, 37210, 37203, 37205, 37356, 37364, 37361, 37363, 37368, 37348,
  13634. 37369, {f: 2, c: 37354}, 37367, 37352, 37358, 38266, 38278, 38280, 38524,
  13635. 38509, 38507, 38513, 38511, 38591, 38762, 38916, 39141, 39319, 20635,
  13636. 20629, 20628, 20638, 20619, 20643, 20611, 20620, 20622, 20637, 20584,
  13637. 20636, 20626, 20610, 20615, 20831, 20948, 21266, 21265, 21412, 21415,
  13638. 21905, 21928, 21925, 21933, 21879, 22085, 21922, 21907, 21896, 21903,
  13639. 21941, 21889, 21923, 21906, 21924, 21885, 21900, 21926, 21887, 21909,
  13640. 21921, 21902, 22284, 22569, 22583, 22553, 22558, 22567, 22563, 22568,
  13641. 22517, 22600, 22565, 22556, 22555, 22579, 22591, 22582, 22574, 22585,
  13642. 22584, 22573, 22572, 22587, 22881, 23215, 23188, 23199, 23162, 23202,
  13643. 23198, 23160, 23206, 23164, 23205, 23212, 23189, 23214, 23095, 23172,
  13644. 23178, 23191, 23171, 23179, 23209, 23163, 23165, 23180, 23196, 23183,
  13645. 23187, 23197, 23530, 23501, 23499, 23508, 23505, 23498, 23502, 23564,
  13646. 23600, 23863, 23875, 23915, 23873, 23883, 23871, 23861, 23889, 23886,
  13647. 23893, 23859, 23866, 23890, 23869, 23857, 23897, 23874, 23865, 23881,
  13648. 23864, 23868, 23858, 23862, 23872, 23877, 24132, 24129, [24408, 57673],
  13649. 24486, 24485, 24491, 24777, 24761, 24780, 24802, 24782, 24772, 24852,
  13650. 24818, 24842, 24854, 24837, 24821, 24851, 24824, 24828, 24830, 24769,
  13651. 24835, 24856, 24861, 24848, 24831, 24836, 24843, 25162, 25492, 25521,
  13652. 25520, 25550, 25573, 25576, 25583, 25539, 25757, 25587, 25546, 25568,
  13653. 25590, 25557, 25586, 25589, 25697, 25567, 25534, 25565, 25564, 25540,
  13654. 25560, 25555, 25538, 25543, 25548, 25547, 25544, 25584, 25559, 25561,
  13655. 25906, 25959, 25962, 25956, 25948, 25960, 25957, 25996, {f: 2, c: 26013},
  13656. 26030, 26064, 26066, 26236, 26220, 26235, 26240, 26225, 26233, 26218,
  13657. 26226, 26369, 26892, 26835, 26884, 26844, 26922, 26860, 26858, 26865,
  13658. 26895, 26838, 26871, 26859, 26852, 26870, 26899, 26896, 26867, 26849,
  13659. 26887, 26828, 26888, 26992, 26804, 26897, 26863, 26822, 26900, 26872,
  13660. 26832, 26877, 26876, 26856, 26891, 26890, 26903, 26830, 26824,
  13661. {f: 2, c: 26845}, 26854, 26868, 26833, 26886, 26836, 26857, 26901, 26917,
  13662. 26823, 27449, 27451, 27455, 27452, 27540, 27543, 27545, 27541, 27581,
  13663. 27632, {f: 2, c: 27634}, 27696, 28156, {f: 2, c: 28230}, 28191, 28233,
  13664. 28296, {f: 2, c: 28220}, 28229, 28258, 28203, 28223, 28225, 28253, 28275,
  13665. 28188, 28211, 28235, 28224, 28241, 28219, 28163, 28206, 28254, 28264,
  13666. 28252, 28257, 28209, 28200, 28256, 28273, 28267, 28217, 28194, 28208,
  13667. 28243, 28261, 28199, 28280, 28260, 28279, 28245, 28281, 28242, 28262,
  13668. {f: 2, c: 28213}, 28250, 28960, 28958, 28975, 28923, 28974, 28977, 28963,
  13669. 28965, 28962, 28978, 28959, 28968, 28986, 28955, 29259, 29274,
  13670. {f: 2, c: 29320}, 29318, 29317, 29323, 29458, 29451, 29488, 29474, 29489,
  13671. 29491, 29479, 29490, 29485, 29478, 29475, 29493, 29452, 29742, 29740,
  13672. 29744, 29739, 29718, 29722, 29729, 29741, 29745, 29732, 29731, 29725,
  13673. 29737, 29728, 29746, 29947, 29999, 30063, 30060, 30183, 30170, 30177,
  13674. 30182, 30173, 30175, 30180, 30167, 30357, 30354, 30426, {f: 2, c: 30534},
  13675. 30532, 30541, 30533, 30538, 30542, {f: 2, c: 30539}, 30686, 30700, 30816,
  13676. {f: 2, c: 30820}, 30812, 30829, 30833, 30826, 30830, 30832, 30825, 30824,
  13677. 30814, 30818, 31092, 31091, 31090, 31088, 31234, 31242, 31235, 31244,
  13678. 31236, 31385, 31462, 31460, 31562, 31559, 31556, 31560, 31564, 31566,
  13679. 31552, 31576, 31557, 31906, 31902, 31912, 31905, 32088, 32111, 32099,
  13680. 32083, 32086, 32103, 32106, 32079, 32109, 32092, 32107, 32082, 32084,
  13681. 32105, 32081, 32095, 32078, {f: 2, c: 32574}, {f: 2, c: 32613}, 32674,
  13682. {f: 2, c: 32672}, 32727, 32849, {f: 2, c: 32847}, 33022, 32980, 33091,
  13683. 33098, 33106, 33103, 33095, 33085, 33101, 33082, 33254, 33262,
  13684. {f: 3, c: 33271}, 33284, {f: 2, c: 33340}, 33343, 33397, 33595,
  13685. [33743, 60382], 33785, 33827, 33728, 33768, 33810, 33767, 33764, 33788,
  13686. 33782, 33808, 33734, 33736, 33771, 33763, 33727, 33793, 33757, 33765,
  13687. 33752, 33791, 33761, 33739, 33742, 33750, 33781, 33737, 33801,
  13688. [33807, 58332], 33758, 33809, 33798, 33730, 33779, 33749, 33786, 33735,
  13689. 33745, 33770, 33811, 33690, 33731, 33772, 33774, 33732, 33787, 33751,
  13690. 33762, 33819, 33755, 33790, 34520, 34530, 34534, 34515, 34531, 34522,
  13691. 34538, 34525, 34539, 34524, 34540, 34537, 34519, 34536, 34513, 34888,
  13692. 34902, 34901, 35002, 35031, 35001, 35000, 35008, 35006, 34998, 35004,
  13693. 34999, 35005, 34994, 35073, 35017, 35221, 35224, 35223, 35293,
  13694. {f: 2, c: 35290}, 35406, 35405, 35385, 35417, 35392, {f: 2, c: 35415},
  13695. {f: 2, c: 35396}, 35410, 35400, 35409, 35402, 35404, 35407, 35935, 35969,
  13696. 35968, 36026, 36030, 36016, 36025, 36021, 36228, 36224, 36233, 36312,
  13697. 36307, 36301, 36295, 36310, 36316, 36303, 36309, 36313, 36296, 36311,
  13698. 36293, 36591, 36599, 36602, 36601, 36582, 36590, 36581, 36597,
  13699. {f: 2, c: 36583}, 36598, 36587, 36593, 36588, 36596, 36585, 36909, 36916,
  13700. 36911, 37126, 37164, [37124, 60367], 37119, 37116, 37128, 37113, 37115,
  13701. 37121, 37120, 37127, 37125, 37123, 37217, 37220, 37215, 37218, 37216,
  13702. 37377, 37386, 37413, 37379, 37402, 37414, 37391, 37388, 37376, 37394,
  13703. 37375, 37373, 37382, 37380, 37415, 37378, 37404, 37412, 37401, 37399,
  13704. 37381, 37398, 38267, 38285, 38284, 38288, 38535, 38526, {f: 2, c: 38536},
  13705. 38531, 38528, 38594, 38600, 38595, 38641, 38640, 38764, 38768, 38766,
  13706. 38919, 39081, 39147, 40166, [12235, 40697], {f: 2, c: 20099}, 20150, 20669,
  13707. 20671, 20678, 20654, 20676, 20682, 20660, 20680, 20674, 20656, 20673,
  13708. 20666, 20657, 20683, 20681, 20662, 20664, 20951, 21114, 21112,
  13709. {f: 2, c: 21115}, 21955, 21979, 21964, 21968, 21963, 21962, 21981,
  13710. [21952, 64013], 21972, 21956, 21993, 21951, 21970, 21901, 21967, 21973,
  13711. 21986, 21974, 21960, 22002, 21965, 21977, 21954, 22292, 22611, 22632,
  13712. 22628, 22607, 22605, 22601, 22639, 22613, 22606, 22621, 22617, 22629,
  13713. 22619, 22589, 22627, 22641, 22780, 23239, 23236, 23243, 23226, 23224,
  13714. 23217, 23221, 23216, 23231, 23240, 23227, 23238, 23223, 23232, 23242,
  13715. 23220, 23222, 23245, 23225, 23184, 23510, {f: 2, c: 23512}, 23583, 23603,
  13716. 23921, 23907, 23882, 23909, 23922, 23916, 23902, 23912, 23911, 23906,
  13717. 24048, 24143, 24142, 24138, 24141, 24139, 24261, 24268, 24262, 24267,
  13718. 24263, 24384, 24495, 24493, 24823, {f: 2, c: 24905}, 24875, 24901, 24886,
  13719. 24882, 24878, 24902, 24879, 24911, 24873, 24896, 25120, 37224, 25123,
  13720. 25125, 25124, 25541, 25585, 25579, 25616, 25618, 25609, 25632, 25636,
  13721. 25651, 25667, 25631, 25621, 25624, 25657, 25655, {f: 2, c: 25634}, 25612,
  13722. 25638, 25648, 25640, 25665, 25653, 25647, 25610, 25626, 25664, 25637,
  13723. 25639, 25611, 25575, 25627, 25646, 25633, 25614, 25967, 26002, 26067,
  13724. 26246, 26252, 26261, 26256, 26251, 26250, 26265, 26260, 26232, 26400,
  13725. 26982, 26975, 26936, 26958, 26978, 26993, 26943, 26949, 26986, 26937,
  13726. 26946, 26967, 26969, 27002, {f: 2, c: 26952}, 26933, 26988, 26931, 26941,
  13727. 26981, 26864, 27000, 26932, 26985, 26944, 26991, 26948, 26998, 26968,
  13728. 26945, 26996, 26956, 26939, 26955, 26935, 26972, 26959, 26961, 26930,
  13729. 26962, 26927, 27003, 26940, 27462, 27461, 27459, 27458, 27464, 27457,
  13730. 27547, {f: 2, c: 27643}, 27641, {f: 2, c: 27639}, 28315, 28374, 28360,
  13731. 28303, 28352, 28319, {f: 2, c: 28307}, 28320, 28337, 28345, 28358, 28370,
  13732. 28349, 28353, 28318, 28361, 28343, 28336, 28365, 28326, 28367, 28338,
  13733. 28350, 28355, 28380, 28376, 28313, 28306, 28302, 28301, 28324, 28321,
  13734. 28351, 28339, 28368, 28362, 28311, 28334, 28323, 28999, 29012, 29010,
  13735. 29027, 29024, 28993, 29021, [29026, 61080], 29042, 29048, 29034, 29025,
  13736. 28994, 29016, 28995, 29003, 29040, 29023, 29008, 29011, 28996, 29005,
  13737. 29018, 29263, 29325, 29324, 29329, 29328, 29326, 29500, 29506, 29499,
  13738. 29498, 29504, 29514, 29513, 29764, {f: 2, c: 29770}, 29778, 29777, 29783,
  13739. 29760, {f: 2, c: 29775}, 29774, 29762, 29766, 29773, 29780, 29921, 29951,
  13740. 29950, 29949, 29981, 30073, 30071, 27011, 30191, 30223, 30211, 30199,
  13741. 30206, 30204, [30201, 60782], 30200, 30224, 30203, 30198, 30189, 30197,
  13742. 30205, 30361, 30389, 30429, 30549, {f: 2, c: 30559}, 30546, 30550, 30554,
  13743. 30569, 30567, 30548, 30553, 30573, 30688, 30855, 30874, 30868, 30863,
  13744. 30852, 30869, {f: 2, c: 30853}, 30881, 30851, 30841, 30873, 30848, 30870,
  13745. 30843, 31100, 31106, 31101, 31097, 31249, {f: 2, c: 31256}, 31250, 31255,
  13746. 31253, 31266, 31251, 31259, 31248, 31395, 31394, 31390, 31467, 31590,
  13747. 31588, 31597, 31604, 31593, 31602, 31589, 31603, 31601, 31600, 31585,
  13748. 31608, 31606, 31587, 31922, 31924, 31919, 32136, 32134, 32128, 32141,
  13749. 32127, 32133, 32122, 32142, 32123, 32131, 32124, 32140, 32148, 32132,
  13750. 32125, 32146, 32621, 32619, {f: 2, c: 32615}, 32620, 32678, 32677, 32679,
  13751. {f: 2, c: 32731}, 32801, 33124, 33120, 33143, 33116, 33129, 33115, 33122,
  13752. 33138, 26401, 33118, 33142, 33127, 33135, 33092, 33121, 33309, 33353,
  13753. 33348, 33344, 33346, 33349, 34033, 33855, 33878, 33910, 33913, 33935,
  13754. 33933, 33893, 33873, 33856, 33926, 33895, 33840, 33869, 33917, 33882,
  13755. 33881, 33908, 33907, 33885, 34055, 33886, 33847, 33850, 33844, 33914,
  13756. 33859, 33912, 33842, 33861, 33833, 33753, 33867, 33839, 33858, 33837,
  13757. 33887, 33904, 33849, 33870, 33868, 33874, 33903, 33989, 33934, 33851,
  13758. 33863, 33846, 33843, 33896, 33918, 33860, 33835, 33888, 33876, 33902,
  13759. 33872, 34571, 34564, 34551, 34572, 34554, 34518, 34549, 34637, 34552,
  13760. 34574, 34569, 34561, 34550, 34573, 34565, 35030, 35019, {f: 2, c: 35021},
  13761. 35038, 35035, 35034, 35020, 35024, 35205, 35227, 35295, 35301, 35300,
  13762. 35297, 35296, 35298, 35292, 35302, 35446, 35462, 35455, 35425, 35391,
  13763. 35447, 35458, 35460, 35445, 35459, 35457, 35444, 35450, 35900, 35915,
  13764. 35914, 35941, 35940, 35942, 35974, {f: 2, c: 35972}, 36044,
  13765. {f: 2, c: 36200}, 36241, 36236, {f: 2, c: 36238}, 36237, {f: 2, c: 36243},
  13766. 36240, 36242, 36336, 36320, 36332, 36337, 36334, 36304, 36329, 36323,
  13767. 36322, 36327, 36338, 36331, 36340, 36614, 36607, 36609, 36608, 36613,
  13768. {f: 2, c: 36615}, 36610, [36619, 60507], 36946, 36927, 36932, 36937, 36925,
  13769. 37136, 37133, 37135, 37137, 37142, 37140, 37131, 37134, {f: 2, c: 37230},
  13770. 37448, 37458, 37424, 37434, 37478, 37427, 37477, 37470, 37507, 37422,
  13771. 37450, 37446, 37485, 37484, 37455, 37472, 37479, 37487, 37430, 37473,
  13772. 37488, 37425, 37460, 37475, 37456, 37490, 37454, 37459, 37452, 37462,
  13773. 37426, 38303, 38300, 38302, 38299, {f: 2, c: 38546}, 38545, 38551, 38606,
  13774. 38650, 38653, 38648, 38645, 38771, {f: 2, c: 38775}, 38770, 38927,
  13775. {f: 2, c: 38925}, 39084, 39158, 39161, 39343, 39346, 39344, 39349, 39597,
  13776. 39595, 39771, 40170, 40173, 40167, 40576, [12236, 40701], 20710, 20692,
  13777. 20695, 20712, 20723, 20699, 20714, 20701, 20708, 20691, 20716, 20720,
  13778. 20719, 20707, 20704, 20952, {f: 2, c: 21120}, 21225, 21227, 21296, 21420,
  13779. 22055, 22037, 22028, 22034, 22012, 22031, 22044, 22017, 22035, 22018,
  13780. 22010, 22045, 22020, 22015, 22009, 22665, 22652, 22672, 22680, 22662,
  13781. 22657, 22655, 22644, 22667, 22650, 22663, 22673, 22670, 22646, 22658,
  13782. 22664, 22651, 22676, 22671, 22782, 22891, 23260, 23278, 23269, 23253,
  13783. 23274, 23258, 23277, 23275, 23283, 23266, 23264, 23259, 23276, 23262,
  13784. 23261, 23257, 23272, 23263, 23415, 23520, 23523, 23651, 23938, 23936,
  13785. 23933, 23942, 23930, 23937, 23927, 23946, 23945, 23944, 23934, 23932,
  13786. 23949, 23929, 23935, {f: 2, c: 24152}, 24147, 24280, 24273, 24279, 24270,
  13787. 24284, 24277, 24281, 24274, 24276, 24388, 24387, 24431, 24502, 24876,
  13788. 24872, 24897, 24926, 24945, 24947, {f: 2, c: 24914}, 24946, 24940, 24960,
  13789. 24948, 24916, 24954, 24923, 24933, 24891, 24938, 24929, 24918, 25129,
  13790. 25127, 25131, 25643, 25677, 25691, 25693, 25716, 25718, {f: 2, c: 25714},
  13791. 25725, 25717, 25702, 25766, 25678, 25730, 25694, 25692, 25675, 25683,
  13792. 25696, 25680, 25727, 25663, 25708, 25707, 25689, 25701, 25719, 25971,
  13793. 26016, 26273, 26272, 26271, 26373, 26372, 26402, 27057, 27062, 27081,
  13794. 27040, 27086, 27030, 27056, 27052, 27068, 27025, 27033, 27022, 27047,
  13795. 27021, 27049, 27070, 27055, 27071, 27076, 27069, 27044, 27092, 27065,
  13796. 27082, 27034, 27087, 27059, 27027, 27050, 27041, 27038, 27097, 27031,
  13797. 27024, 27074, 27061, 27045, 27078, 27466, 27469, 27467, {f: 3, c: 27550},
  13798. {f: 2, c: 27587}, 27646, 28366, 28405, 28401, 28419, 28453, 28408, 28471,
  13799. 28411, 28462, 28425, 28494, {f: 2, c: 28441}, 28455, 28440, 28475, 28434,
  13800. 28397, 28426, 28470, 28531, 28409, 28398, 28461, 28480, 28464, 28476,
  13801. 28469, 28395, 28423, 28430, 28483, 28421, 28413, 28406, 28473, 28444,
  13802. 28412, 28474, 28447, 28429, 28446, 28424, 28449, 29063, 29072, 29065,
  13803. 29056, 29061, 29058, 29071, 29051, 29062, 29057, 29079, 29252, 29267,
  13804. 29335, 29333, 29331, 29507, 29517, 29521, 29516, 29794, 29811, 29809,
  13805. 29813, 29810, 29799, 29806, 29952, {f: 2, c: 29954}, 30077, 30096, 30230,
  13806. 30216, 30220, 30229, 30225, 30218, 30228, 30392, 30593, 30588, 30597,
  13807. 30594, 30574, 30592, 30575, 30590, 30595, 30898, 30890, 30900, 30893,
  13808. 30888, 30846, 30891, 30878, 30885, 30880, 30892, 30882, 30884, 31128,
  13809. {f: 2, c: 31114}, 31126, 31125, 31124, 31123, 31127, 31112, 31122, 31120,
  13810. 31275, 31306, 31280, 31279, 31272, 31270, 31400, {f: 2, c: 31403}, 31470,
  13811. 31624, 31644, 31626, 31633, 31632, 31638, 31629, 31628, 31643, 31630,
  13812. 31621, 31640, 21124, 31641, 31652, 31618, 31931, 31935, 31932, 31930,
  13813. 32167, 32183, 32194, 32163, 32170, 32193, 32192, 32197, 32157, 32206,
  13814. 32196, 32198, {f: 2, c: 32203}, 32175, 32185, 32150, 32188, 32159, 32166,
  13815. 32174, 32169, 32161, 32201, 32627, {f: 2, c: 32738}, 32741, 32734, 32804,
  13816. 32861, 32860, 33161, 33158, 33155, 33159, 33165, 33164, 33163, 33301,
  13817. 33943, 33956, 33953, 33951, 33978, 33998, 33986, 33964, 33966, 33963,
  13818. 33977, 33972, 33985, 33997, 33962, 33946, 33969, 34000, 33949, 33959,
  13819. 33979, 33954, 33940, 33991, 33996, 33947, 33961, 33967, [33960, 58327],
  13820. 34006, 33944, 33974, 33999, 33952, 34007, 34004, 34002, 34011, 33968,
  13821. 33937, 34401, 34611, 34595, 34600, 34667, 34624, 34606, 34590, 34593,
  13822. 34585, 34587, 34627, 34604, 34625, 34622, 34630, 34592, 34610, 34602,
  13823. 34605, 34620, 34578, 34618, 34609, 34613, 34626, {f: 2, c: 34598}, 34616,
  13824. 34596, 34586, 34608, 34577, 35063, 35047, {f: 2, c: 35057}, 35066, 35070,
  13825. 35054, 35068, 35062, 35067, 35056, 35052, 35051, 35229, 35233, 35231,
  13826. 35230, 35305, 35307, 35304, 35499, 35481, 35467, 35474, 35471, 35478,
  13827. 35901, {f: 2, c: 35944}, 36053, 36047, 36055, 36246, 36361, 36354, 36351,
  13828. 36365, 36349, 36362, 36355, 36359, 36358, 36357, 36350, 36352, 36356,
  13829. {f: 2, c: 36624}, 36622, 36621, 37155, 37148, 37152, 37154, 37151, 37149,
  13830. 37146, 37156, 37153, 37147, 37242, 37234, 37241, 37235, 37541, 37540,
  13831. 37494, 37531, 37498, 37536, 37524, 37546, 37517, 37542, 37530, 37547,
  13832. 37497, 37527, 37503, 37539, 37614, 37518, 37506, 37525, 37538, 37501,
  13833. 37512, 37537, 37514, 37510, 37516, 37529, 37543, 37502, 37511, 37545,
  13834. 37533, 37515, 37421, 38558, 38561, 38655, 38744, 38781, 38778, 38782,
  13835. 38787, 38784, 38786, 38779, 38788, 38785, 38783, 38862, 38861, 38934,
  13836. {f: 2, c: 39085}, 39170, 39168, 39175, 39325, 39324, 39363, 39353, 39355,
  13837. 39354, 39362, 39357, 39367, 39601, 39651, 39655, {f: 2, c: 39742},
  13838. {f: 2, c: 39776}, 39775, {f: 2, c: 40177}, 40181, 40615, 20735, 20739,
  13839. 20784, 20728, {f: 2, c: 20742}, 20726, 20734, {f: 2, c: 20747}, 20733,
  13840. 20746, {f: 2, c: 21131}, 21233, 21231, 22088, 22082, 22092, 22069, 22081,
  13841. 22090, 22089, 22086, 22104, 22106, 22080, 22067, 22077, 22060, 22078,
  13842. 22072, 22058, 22074, 22298, 22699, 22685, 22705, 22688, 22691, 22703,
  13843. 22700, 22693, 22689, 22783, 23295, 23284, 23293, 23287, 23286, 23299,
  13844. 23288, 23298, 23289, 23297, 23303, 23301, 23311, 23655, 23961, 23959,
  13845. 23967, 23954, 23970, 23955, 23957, 23968, 23964, 23969, 23962, 23966,
  13846. 24169, 24157, 24160, 24156, 32243, 24283, 24286, 24289, 24393, 24498,
  13847. 24971, 24963, 24953, 25009, 25008, 24994, 24969, 24987, 24979, 25007,
  13848. 25005, 24991, 24978, 25002, 24993, 24973, 24934, 25011, 25133, 25710,
  13849. 25712, 25750, 25760, 25733, 25751, 25756, 25743, 25739, 25738, 25740,
  13850. 25763, 25759, 25704, 25777, 25752, 25974, 25978, 25977, 25979,
  13851. {f: 2, c: 26034}, 26293, 26288, 26281, 26290, 26295, 26282, 26287, 27136,
  13852. 27142, 27159, 27109, 27128, 27157, 27121, 27108, 27168, 27135, 27116,
  13853. 27106, 27163, 27165, 27134, 27175, 27122, 27118, 27156, 27127, 27111,
  13854. 27200, 27144, 27110, 27131, 27149, 27132, 27115, 27145, 27140, 27160,
  13855. 27173, 27151, 27126, 27174, 27143, 27124, 27158, 27473, 27557, 27555,
  13856. 27554, 27558, 27649, 27648, 27647, 27650, 28481, 28454, 28542, 28551,
  13857. 28614, 28562, 28557, 28553, 28556, 28514, 28495, 28549, 28506, 28566,
  13858. 28534, 28524, 28546, 28501, 28530, 28498, 28496, 28503, 28564, 28563,
  13859. 28509, 28416, 28513, 28523, 28541, 28519, 28560, 28499, 28555, 28521,
  13860. 28543, 28565, 28515, 28535, 28522, 28539, 29106, 29103, 29083, 29104,
  13861. 29088, 29082, 29097, 29109, 29085, 29093, 29086, 29092, 29089, 29098,
  13862. 29084, 29095, 29107, 29336, 29338, 29528, 29522, {f: 3, c: 29534}, 29533,
  13863. 29531, 29537, 29530, 29529, 29538, 29831, {f: 2, c: 29833}, 29830, 29825,
  13864. 29821, 29829, 29832, 29820, [29817, 58868], 29960, 29959, 30078, 30245,
  13865. 30238, 30233, 30237, 30236, 30243, 30234, 30248, 30235, {f: 3, c: 30364},
  13866. 30363, 30605, 30607, 30601, 30600, 30925, 30907, 30927, 30924, 30929,
  13867. 30926, 30932, 30920, {f: 2, c: 30915}, 30921, 31130, 31137, 31136, 31132,
  13868. 31138, [31131, 59175], 27510, 31289, 31410, 31412, 31411, 31671, 31691,
  13869. 31678, 31660, 31694, 31663, 31673, 31690, 31669, 31941, 31944, 31948,
  13870. 31947, 32247, 32219, 32234, 32231, 32215, 32225, 32259, 32250, 32230,
  13871. 32246, 32241, 32240, 32238, 32223, 32630, 32684, 32688, 32685, 32749,
  13872. 32747, 32746, 32748, 32742, 32744, 32868, 32871, 33187, 33183, 33182,
  13873. 33173, 33186, 33177, 33175, 33302, 33359, 33363, 33362, 33360, 33358,
  13874. 33361, 34084, 34107, 34063, 34048, 34089, 34062, 34057, 34061, 34079,
  13875. 34058, 34087, 34076, 34043, 34091, 34042, 34056, 34060, 34036, 34090,
  13876. 34034, 34069, 34039, 34027, 34035, 34044, 34066, 34026, 34025, 34070,
  13877. 34046, 34088, 34077, 34094, 34050, 34045, 34078, 34038, 34097, 34086,
  13878. {f: 2, c: 34023}, 34032, 34031, 34041, 34072, 34080, 34096, 34059, 34073,
  13879. 34095, 34402, 34646, {f: 2, c: 34659}, 34679, 34785, 34675, 34648, 34644,
  13880. 34651, 34642, 34657, 34650, 34641, 34654, 34669, 34666, 34640, 34638,
  13881. 34655, 34653, 34671, 34668, 34682, 34670, 34652, 34661, 34639, 34683,
  13882. 34677, 34658, 34663, 34665, 34906, 35077, 35084, 35092, 35083,
  13883. {f: 3, c: 35095}, 35078, 35094, 35089, 35086, 35081, 35234, 35236, 35235,
  13884. 35309, 35312, 35308, 35535, 35526, 35512, 35539, 35537, {f: 2, c: 35540},
  13885. 35515, 35543, 35518, 35520, 35525, 35544, 35523, 35514, 35517, 35545,
  13886. 35902, 35917, 35983, 36069, 36063, 36057, 36072, 36058, 36061, 36071,
  13887. 36256, 36252, 36257, 36251, 36384, 36387, 36389, 36388, 36398, 36373,
  13888. 36379, 36374, 36369, 36377, {f: 2, c: 36390}, 36372, 36370, 36376, 36371,
  13889. 36380, 36375, 36378, 36652, 36644, 36632, 36634, 36640, 36643,
  13890. {f: 2, c: 36630}, 36979, 36976, 36975, 36967, 36971, 37167, 37163,
  13891. {f: 2, c: 37161}, 37170, 37158, 37166, {f: 2, c: 37253}, 37258,
  13892. {f: 2, c: 37249}, 37252, 37248, 37584, {f: 2, c: 37571}, 37568, 37593,
  13893. 37558, 37583, 37617, 37599, 37592, 37609, 37591, 37597, 37580, 37615,
  13894. 37570, 37608, 37578, 37576, 37582, 37606, 37581, 37589, 37577, 37600,
  13895. 37598, 37607, 37585, 37587, 37557, 37601, 37669, 37574, 37556, 38268,
  13896. 38316, 38315, 38318, 38320, 38564, 38562, 38611, 38661, 38664, 38658,
  13897. 38746, 38794, 38798, 38792, 38864, 38863, 38942, 38941, 38950, 38953,
  13898. 38952, 38944, 38939, 38951, 39090, 39176, 39162, 39185, 39188,
  13899. {f: 2, c: 39190}, 39189, 39388, 39373, 39375, {f: 2, c: 39379}, 39374,
  13900. 39369, [39382, 60270], 39384, 39371, 39383, 39372, 39603, 39660, 39659,
  13901. 39667, 39666, 39665, 39750, 39747, 39783, 39796, 39793, 39782, 39798,
  13902. 39797, 39792, 39784, 39780, 39788, 40188, 40186, 40189, 40191, 40183,
  13903. 40199, 40192, 40185, 40187, 40200, 40197, 40196, 40579, 40659,
  13904. {f: 2, c: 40719}, 20764, 20755, 20759, 20762, 20753, 20958, 21300, 21473,
  13905. 22128, 22112, 22126, 22131, 22118, 22115, 22125, 22130, 22110, 22135,
  13906. 22300, 22299, 22728, 22717, 22729, 22719, 22714, 22722, 22716, 22726,
  13907. 23319, 23321, 23323, 23329, 23316, 23315, 23312, 23318, [23336, 59539],
  13908. 23322, 23328, 23326, 23535, 23980, 23985, 23977, 23975, 23989, 23984,
  13909. 23982, 23978, 23976, 23986, 23981, 23983, 23988, {f: 2, c: 24167}, 24166,
  13910. 24175, 24297, 24295, 24294, 24296, 24293, 24395, 24508, 24507, 24989,
  13911. 25000, 24982, 25029, 25012, 25030, 25025, 25036, 25018, 25023, 25016,
  13912. 24972, 25815, 25814, 25808, 25807, 25801, 25789, 25737, 25795, 25819,
  13913. 25843, 25817, 25907, 25983, 25980, 26018, 26312, 26302, 26304,
  13914. {f: 2, c: 26314}, 26319, 26301, 26299, 26298, 26316, 26403, 27188, 27238,
  13915. 27209, 27239, 27186, 27240, 27198, 27229, 27245, 27254, 27227, 27217,
  13916. 27176, 27226, 27195, 27199, 27201, 27242, 27236, 27216, 27215, 27220,
  13917. 27247, 27241, 27232, 27196, 27230, 27222, 27221, {f: 2, c: 27213}, 27206,
  13918. 27477, 27476, 27478, 27559, {f: 2, c: 27562}, 27592, 27591, 27652, 27651,
  13919. 27654, 28589, 28619, 28579, 28615, 28604, 28622, 28616, 28510, 28612,
  13920. 28605, 28574, 28618, 28584, 28676, 28581, 28590, 28602, 28588, 28586,
  13921. 28623, 28607, 28600, 28578, 28617, 28587, 28621, 28591, 28594, 28592,
  13922. 29125, 29122, 29119, 29112, 29142, {f: 2, c: 29120}, 29131, 29140, 29130,
  13923. 29127, 29135, 29117, 29144, 29116, 29126, {f: 2, c: 29146},
  13924. {f: 2, c: 29341}, 29545, {f: 2, c: 29542}, 29548, 29541, 29547, 29546,
  13925. 29823, 29850, 29856, 29844, 29842, 29845, 29857, 29963, 30080, 30255,
  13926. 30253, 30257, 30269, 30259, 30268, 30261, 30258, 30256, 30395, 30438,
  13927. 30618, 30621, 30625, 30620, 30619, {f: 2, c: 30626}, 30613, 30617, 30615,
  13928. 30941, 30953, 30949, 30954, 30942, 30947, 30939, {f: 2, c: 30945}, 30957,
  13929. {f: 2, c: 30943}, 31140, 31300, 31304, 31303, 31414, 31416, 31413, 31409,
  13930. 31415, 31710, 31715, 31719, 31709, 31701, 31717, 31706, 31720, 31737,
  13931. 31700, 31722, 31714, 31708, 31723, 31704, 31711, 31954, 31956, 31959,
  13932. {f: 2, c: 31952}, 32274, 32289, 32279, 32268, {f: 2, c: 32287}, 32275,
  13933. 32270, 32284, 32277, 32282, 32290, 32267, 32271, 32278, 32269, 32276,
  13934. 32293, 32292, 32579, {f: 2, c: 32635}, 32634, 32689, 32751, 32810, 32809,
  13935. 32876, 33201, 33190, 33198, 33209, 33205, 33195, 33200, 33196, 33204,
  13936. 33202, 33207, 33191, 33266, {f: 3, c: 33365}, 34134, 34117, 34155, 34125,
  13937. 34131, 34145, 34136, 34112, 34118, 34148, 34113, 34146, 34116, 34129,
  13938. 34119, 34147, 34110, 34139, 34161, 34126, 34158, 34165, 34133, 34151,
  13939. 34144, 34188, 34150, 34141, 34132, 34149, 34156, 34403, 34405, 34404,
  13940. 34724, 34715, 34703, 34711, 34707, 34706, 34696, 34689, 34710, 34712,
  13941. 34681, 34695, 34723, 34693, {f: 2, c: 34704}, 34717, 34692, 34708, 34716,
  13942. 34714, 34697, 35102, 35110, 35120, {f: 2, c: 35117}, 35111, 35121, 35106,
  13943. 35113, 35107, 35119, 35116, 35103, 35313, 35552, 35554, 35570,
  13944. {f: 2, c: 35572}, 35549, 35604, 35556, 35551, 35568, 35528, 35550, 35553,
  13945. 35560, 35583, 35567, 35579, {f: 2, c: 35985}, 35984, 36085, 36078, 36081,
  13946. 36080, 36083, 36204, 36206, 36261, 36263, 36403, 36414, 36408, 36416,
  13947. 36421, 36406, {f: 2, c: 36412}, 36417, 36400, 36415, 36541, [36662, 60329],
  13948. 36654, 36661, 36658, 36665, 36663, 36660, 36982, 36985, 36987, 36998,
  13949. 37114, 37171, {f: 2, c: 37173}, 37267, {f: 2, c: 37264}, 37261, 37263,
  13950. 37671, 37662, 37640, 37663, 37638, 37647, 37754, 37688, 37692, 37659,
  13951. 37667, 37650, 37633, 37702, 37677, 37646, 37645, 37579, 37661, 37626,
  13952. 37651, 37625, 37623, 37684, 37634, 37668, 37631, 37673, 37689, 37685,
  13953. 37674, 37652, 37644, 37643, 37630, 37641, 37632, 37627, 37654, 38332,
  13954. 38349, 38334, {f: 2, c: 38329}, 38326, 38335, 38325, 38333, 38569, 38612,
  13955. 38667, 38674, 38672, 38809, 38807, 38804, 38896, 38904, 38965, 38959,
  13956. 38962, 39204, 39199, 39207, 39209, 39326, 39406, 39404, 39397, 39396,
  13957. 39408, 39395, 39402, 39401, 39399, 39609, 39615, 39604, 39611, 39670,
  13958. 39674, 39673, 39671, 39731, 39808, 39813, 39815, 39804, 39806, 39803,
  13959. 39810, 39827, 39826, 39824, 39802, 39829, 39805, 39816, 40229, 40215,
  13960. 40224, 40222, 40212, 40233, 40221, 40216, 40226, 40208, 40217, 40223,
  13961. 40584, {f: 2, c: 40582}, 40622, 40621, {f: 2, c: 40661}, 40698, 40722,
  13962. 40765, 20774, 20773, 20770, 20772, 20768, 20777, 21236, 22163,
  13963. {f: 2, c: 22156}, 22150, 22148, 22147, 22142, 22146, 22143, 22145, 22742,
  13964. 22740, 22735, 22738, 23341, 23333, 23346, 23331, 23340, 23335, 23334,
  13965. 23343, 23342, 23419, {f: 2, c: 23537}, 23991, 24172, 24170, 24510, 25027,
  13966. 25013, 25020, 25063, 25056, 25061, 25060, 25064, 25054, 25839, 25833,
  13967. 25827, 25835, 25828, 25832, 25985, 25984, 26038, 26074, 26322, 27277,
  13968. 27286, 27265, 27301, 27273, 27295, 27291, 27297, 27294, 27271, 27283,
  13969. 27278, 27285, 27267, 27304, 27300, 27281, 27263, 27302, 27290, 27269,
  13970. 27276, 27282, 27483, 27565, 27657, 28620, 28585, 28660, 28628, 28643,
  13971. 28636, 28653, 28647, 28646, 28638, 28658, 28637, 28642, 28648, 29153,
  13972. 29169, 29160, 29170, 29156, 29168, 29154, 29555, {f: 2, c: 29550}, 29847,
  13973. 29874, 29867, 29840, 29866, 29869, 29873, 29861, 29871, {f: 3, c: 29968},
  13974. 29967, 30084, 30275, {f: 2, c: 30280}, 30279, 30372, 30441, 30645, 30635,
  13975. 30642, 30647, 30646, 30644, 30641, 30632, 30704, 30963, 30973, 30978,
  13976. {f: 2, c: 30971}, 30975, 30962, 30981, 30969, 30974, 30980, 31147, 31144,
  13977. 31324, 31323, 31318, 31320, 31316, 31322, 31422, {f: 2, c: 31424}, 31749,
  13978. 31759, 31730, 31744, 31743, 31739, 31758, 31732, 31755, 31731, 31746,
  13979. 31753, 31747, 31745, 31736, 31741, [31750, 58176], {f: 2, c: 31728}, 31760,
  13980. 31754, 31976, 32301, 32316, 32322, 32307, 38984, 32312, 32298, 32329,
  13981. 32320, 32327, 32297, 32332, 32304, 32315, 32310, 32324, 32314, 32581,
  13982. 32639, 32638, 32637, 32756, 32754, 32812, 33211, 33220, 33228, 33226,
  13983. 33221, 33223, 33212, 33257, 33371, 33370, 33372, 34179, 34176, 34191,
  13984. 34215, 34197, 34208, 34187, 34211, 34171, 34212, 34202, 34206, 34167,
  13985. 34172, 34185, 34209, 34170, 34168, 34135, 34190, 34198, 34182, 34189,
  13986. 34201, 34205, 34177, 34210, 34178, 34184, 34181, 34169, 34166, 34200,
  13987. 34192, 34207, 34408, 34750, 34730, 34733, 34757, 34736, 34732, 34745,
  13988. 34741, 34748, 34734, 34761, 34755, 34754, 34764, 34743, 34735, 34756,
  13989. 34762, 34740, 34742, 34751, 34744, 34749, 34782, 34738, 35125, 35123,
  13990. 35132, 35134, 35137, 35154, 35127, 35138, 35245, 35247, 35246,
  13991. {f: 2, c: 35314}, 35614, 35608, 35606, 35601, 35589, 35595, 35618, 35599,
  13992. 35602, 35605, 35591, 35597, 35592, 35590, 35612, 35603, 35610, 35919,
  13993. 35952, 35954, 35953, 35951, 35989, 35988, 36089, 36207, 36430, 36429,
  13994. 36435, 36432, 36428, 36423, 36675, 36672, 36997, 36990, 37176, 37274,
  13995. 37282, 37275, 37273, 37279, 37281, 37277, 37280, 37793, 37763, 37807,
  13996. 37732, 37718, 37703, 37756, 37720, 37724, 37750, 37705, {f: 2, c: 37712},
  13997. 37728, 37741, 37775, 37708, 37738, 37753, 37719, 37717, 37714, 37711,
  13998. 37745, 37751, 37755, 37729, 37726, 37731, 37735, 37710, 37721, 38343,
  13999. 38336, 38345, 38339, 38341, 38327, 38574, 38576, 38572, 38688, 38687,
  14000. 38680, 38685, 38681, 38810, 38817, 38812, 38814, 38813, 38869, 38868,
  14001. 38897, 38977, 38980, 38986, 38985, 38981, 38979, 39205, {f: 2, c: 39211},
  14002. 39210, 39219, 39218, 39215, 39213, 39217, 39216, 39320, 39331, 39329,
  14003. 39426, 39418, 39412, 39415, 39417, 39416, 39414, 39419, {f: 2, c: 39421},
  14004. 39420, 39427, 39614, 39678, 39677, 39681, 39676, 39752, 39834, 39848,
  14005. 39838, 39835, 39846, 39841, 39845, 39844, 39814, 39842, 39840, 39855,
  14006. 40243, 40257, 40295, 40246, {f: 2, c: 40238}, 40241, 40248, 40240, 40261,
  14007. {f: 2, c: 40258}, 40254, 40247, 40256, 40253, 32757, 40237, 40586, 40585,
  14008. 40589, 40624, 40648, 40666, 40699, 40703, 40740, 40739, 40738, 40788,
  14009. [12245, 40864], 20785, {f: 2, c: 20781}, 22168, 22172, 22167, 22170, 22173,
  14010. 22169, 22896, 23356, {f: 2, c: 23657}, 24000, {f: 2, c: 24173}, 25048,
  14011. 25055, {f: 2, c: 25069}, 25073, 25066, 25072, 25067, 25046, 25065, 25855,
  14012. 25860, 25853, 25848, 25857, 25859, 25852, 26004, 26075, {f: 2, c: 26330},
  14013. 26328, 27333, 27321, 27325, 27361, 27334, 27322, {f: 2, c: 27318}, 27335,
  14014. 27316, 27309, 27486, 27593, 27659, 28679, {f: 2, c: 28684}, 28673, 28677,
  14015. 28692, 28686, {f: 2, c: 28671}, 28667, 28710, 28668, 28663, 28682,
  14016. [29185, 60224], 29183, 29177, 29187, 29181, 29558, 29880, 29888, 29877,
  14017. 29889, 29886, 29878, 29883, 29890, 29972, 29971, 30300, 30308, 30297,
  14018. 30288, 30291, 30295, 30298, 30374, 30397, 30444, 30658, 30650, 30988,
  14019. {f: 2, c: 30995}, 30985, 30992, 30994, 30993, 31149, 31148, 31327, 31772,
  14020. 31785, 31769, 31776, 31775, 31789, 31773, 31782, 31784, 31778, 31781,
  14021. 31792, 32348, 32336, 32342, 32355, 32344, 32354, 32351, 32337, 32352,
  14022. 32343, 32339, 32693, 32691, {f: 2, c: 32759}, 32885, {f: 2, c: 33233},
  14023. 33232, 33375, 33374, 34228, 34246, 34240, 34243, 34242, 34227, 34229,
  14024. 34237, 34247, 34244, 34239, 34251, 34254, 34248, 34245, 34225, 34230,
  14025. 34258, 34340, 34232, 34231, 34238, 34409, 34791, 34790, 34786, 34779,
  14026. 34795, 34794, 34789, 34783, 34803, 34788, 34772, 34780, 34771, 34797,
  14027. 34776, 34787, 34775, 34777, 34817, 34804, 34792, 34781, 35155, 35147,
  14028. 35151, 35148, 35142, {f: 2, c: 35152}, 35145, 35626, 35623, 35619, 35635,
  14029. 35632, 35637, 35655, 35631, 35644, 35646, 35633, 35621, 35639, 35622,
  14030. 35638, 35630, 35620, 35643, 35645, 35642, 35906, 35957, 35993, 35992,
  14031. 35991, 36094, 36100, 36098, 36096, 36444, 36450, 36448, 36439, 36438,
  14032. 36446, 36453, 36455, 36443, 36442, 36449, 36445, 36457, 36436,
  14033. {f: 3, c: 36678}, 36683, 37160, {f: 2, c: 37178}, 37182, 37288, 37285,
  14034. 37287, 37295, 37290, 37813, 37772, 37778, 37815, 37787, 37789, 37769,
  14035. 37799, 37774, 37802, 37790, 37798, 37781, 37768, 37785, 37791, 37760,
  14036. 37773, 37809, 37777, 37810, 37796, 37800, 37812, 37795, {f: 2, c: 38354},
  14037. 38353, 38579, 38615, 38618, 24002, 38623, 38616, 38621, 38691, 38690,
  14038. 38693, 38828, 38830, 38824, 38827, 38820, 38826, 38818, 38821, 38871,
  14039. 38873, 38870, 38872, 38906, {f: 3, c: 38992}, 39096, 39233, 39228, 39226,
  14040. 39439, 39435, 39433, 39437, 39428, 39441, 39434, 39429, 39431, 39430,
  14041. 39616, 39644, 39688, {f: 2, c: 39684}, 39721, 39733, 39754, 39756, 39755,
  14042. 39879, 39878, 39875, 39871, 39873, 39861, 39864, 39891, 39862, 39876,
  14043. 39865, 39869, 40284, 40275, 40271, 40266, 40283, 40267, 40281, 40278,
  14044. 40268, 40279, 40274, 40276, 40287, 40280, 40282, 40590, 40588, 40671,
  14045. 40705, 40704, [40726, 58693], 40741, 40747, 40746, 40745, 40744, 40780,
  14046. 40789, {f: 2, c: 20788}, 21142, 21239, 21428, 22187, 22189,
  14047. {f: 2, c: 22182}, 22186, 22188, 22746, 22749, 22747, 22802,
  14048. {f: 3, c: 23357}, 24003, 24176, 24511, 25083, 25863, 25872, 25869, 25865,
  14049. 25868, 25870, 25988, 26078, 26077, 26334, 27367, 27360, 27340, 27345,
  14050. 27353, 27339, 27359, 27356, 27344, 27371, 27343, 27341, 27358, 27488,
  14051. 27568, 27660, 28697, 28711, 28704, 28694, 28715, {f: 3, c: 28705}, 28713,
  14052. 28695, 28708, 28700, 29196, 29194, 29191, 29186, 29189, {f: 2, c: 29349},
  14053. 29348, 29347, 29345, 29899, 29893, 29879, 29891, 29974, 30304,
  14054. {f: 2, c: 30665}, 30660, 30705, 31005, 31003, 31009, 31004, 30999, 31006,
  14055. 31152, {f: 2, c: 31335}, 31795, 31804, 31801, 31788, 31803, 31980, 31978,
  14056. 32374, 32373, 32376, 32368, 32375, 32367, 32378, 32370, 32372, 32360,
  14057. 32587, 32586, 32643, 32646, 32695, {f: 2, c: 32765}, 32888, 33239, 33237,
  14058. 33291, 33380, 33377, 33379, 34283, 34289, 34285, 34265, 34273, 34280,
  14059. 34266, 34263, 34284, 34290, 34296, 34264, 34271, 34275, 34268, 34257,
  14060. 34288, 34278, 34287, 34270, 34274, 34816, 34810, 34819, {f: 2, c: 34806},
  14061. 34825, 34828, 34827, 34822, 34812, 34824, 34815, 34826, 34818, 35170,
  14062. {f: 2, c: 35162}, 35159, 35169, 35164, 35160, 35165, 35161, 35208, 35255,
  14063. 35254, 35318, 35664, 35656, 35658, 35648, 35667, 35670, 35668, 35659,
  14064. 35669, 35665, 35650, 35666, 35671, 35907, 35959, 35958, 35994,
  14065. {f: 2, c: 36102}, 36105, 36268, 36266, 36269, 36267, 36461, 36472, 36467,
  14066. 36458, 36463, 36475, 36546, 36690, 36689, {f: 2, c: 36687}, 36691, 36788,
  14067. 37184, 37183, 37296, 37293, 37854, 37831, 37839, 37826, 37850, 37840,
  14068. 37881, 37868, 37836, 37849, 37801, 37862, 37834, 37844, 37870, 37859,
  14069. 37845, 37828, 37838, 37824, 37842, 37797, 37863, 38269, {f: 2, c: 38362},
  14070. 38625, 38697, {f: 2, c: 38699}, 38696, 38694, 38835, 38839, 38838,
  14071. {f: 3, c: 38877}, 39004, 39001, 39005, 38999, 39103, 39101, 39099, 39102,
  14072. 39240, 39239, 39235, {f: 2, c: 39334}, 39450, 39445, 39461, 39453, 39460,
  14073. 39451, 39458, 39456, 39463, 39459, 39454, 39452, 39444, 39618, 39691,
  14074. 39690, 39694, 39692, 39735, {f: 2, c: 39914}, 39904, 39902, 39908, 39910,
  14075. 39906, 39920, 39892, 39895, 39916, 39900, 39897, 39909, 39893, 39905,
  14076. 39898, 40311, 40321, 40330, 40324, 40328, 40305, 40320, 40312, 40326,
  14077. {f: 2, c: 40331}, 40317, 40299, {f: 2, c: 40308}, 40304, 40297, 40325,
  14078. 40307, 40315, 40322, 40303, 40313, 40319, 40327, 40296, 40596, 40593,
  14079. 40640, 40700, 40749, {f: 2, c: 40768}, 40781, {f: 3, c: 40790}, 21303,
  14080. 22194, 22197, 22195, 22755, 23365, {f: 2, c: 24006}, {f: 2, c: 24302},
  14081. {f: 2, c: 24512}, 25081, 25879, 25878, 25877, 25875, 26079, 26344,
  14082. {f: 2, c: 26339}, 27379, 27376, 27370, 27368, 27385, 27377,
  14083. {f: 2, c: 27374}, 28732, 28725, 28719, 28727, 28724, 28721, 28738, 28728,
  14084. 28735, 28730, 28729, 28714, 28736, 28731, 28723, 28737, {f: 2, c: 29203},
  14085. 29352, 29565, 29564, 29882, 30379, 30378, 30398, 30445, 30668,
  14086. {f: 2, c: 30670}, 30669, 30706, 31013, 31011, {f: 2, c: 31015}, 31012,
  14087. 31017, 31154, 31342, {f: 2, c: 31340}, 31479, 31817, 31816, 31818, 31815,
  14088. 31813, 31982, 32379, 32382, 32385, 32384, 32698, 32767, 32889, 33243,
  14089. 33241, {f: 2, c: 33384}, 34338, 34303, 34305, 34302, 34331, 34304, 34294,
  14090. 34308, 34313, 34309, 34316, 34301, 34841, {f: 2, c: 34832}, 34839, 34835,
  14091. 34838, 35171, 35174, 35257, 35319, 35680, 35690, 35677, 35688, 35683,
  14092. 35685, 35687, 35693, 36270, 36486, 36488, 36484, 36697, {f: 2, c: 36694},
  14093. 36693, 36696, 36698, 37005, 37187, 37185, 37303, 37301, {f: 2, c: 37298},
  14094. 37899, 37907, 37883, 37920, 37903, 37908, 37886, 37909, 37904, 37928,
  14095. 37913, 37901, 37877, 37888, 37879, 37895, 37902, 37910, 37906, 37882,
  14096. 37897, 37880, 37948, 37898, 37887, 37884, 37900, 37878, 37905, 37894,
  14097. 38366, 38368, 38367, {f: 2, c: 38702}, 38841, 38843, {f: 2, c: 38909},
  14098. 39008, {f: 2, c: 39010}, 39007, {f: 2, c: 39105}, 39248, 39246, 39257,
  14099. 39244, 39243, 39251, 39474, 39476, 39473, 39468, 39466, 39478, 39465,
  14100. 39470, 39480, 39469, 39623, 39626, 39622, 39696, 39698, 39697, 39947,
  14101. 39944, 39927, 39941, 39954, 39928, 40000, 39943, 39950, 39942, 39959,
  14102. 39956, 39945, 40351, 40345, 40356, 40349, 40338, 40344, 40336, 40347,
  14103. 40352, 40340, 40348, 40362, 40343, 40353, 40346, 40354, 40360, 40350,
  14104. 40355, 40383, 40361, 40342, {f: 2, c: 40358}, 40601, 40603, 40602, 40677,
  14105. 40676, 40679, 40678, 40752, 40750, 40795, 40800, 40798, 40797, 40793,
  14106. 40849, 20794, 20793, 21144, 21143, 22211, {f: 2, c: 22205}, 23368, 23367,
  14107. 24011, 24015, 24305, 25085, 25883, 27394, 27388, 27395, 27384, 27392,
  14108. {f: 2, c: 28739}, 28746, {f: 2, c: 28744}, {f: 2, c: 28741}, 29213, 29210,
  14109. 29209, 29566, 29975, 30314, 30672, 31021, 31025, 31023, 31828, 31827,
  14110. 31986, 32394, [32391, 60229], 32392, 32395, 32390, 32397, 32589, 32699,
  14111. 32816, 33245, 34328, 34346, 34342, 34335, 34339, 34332, 34329, 34343,
  14112. 34350, 34337, 34336, 34345, 34334, 34341, 34857, 34845, 34843, 34848,
  14113. 34852, 34844, 34859, 34890, 35181, 35177, 35182, 35179, 35322, 35705,
  14114. 35704, 35653, {f: 2, c: 35706}, 36112, 36116, 36271, 36494, 36492, 36702,
  14115. 36699, 36701, 37190, {f: 2, c: 37188}, 37305, 37951, 37947, 37942, 37929,
  14116. 37949, 37936, 37945, 37930, 37943, 37932, 37952, 37937, 38373, 38372,
  14117. 38371, 38709, 38714, 38847, 38881, 39012, 39113, 39110, 39104, 39256,
  14118. 39254, 39481, 39485, 39494, 39492, 39490, 39489, 39482, 39487, 39629,
  14119. 39701, {f: 2, c: 39703}, 39702, 39738, 39762, 39979, 39965, 39964, 39980,
  14120. 39971, {f: 2, c: 39976}, 39972, 39969, 40375, 40374, 40380, 40385, 40391,
  14121. 40394, 40399, 40382, 40389, 40387, 40379, 40373, 40398, {f: 2, c: 40377},
  14122. 40364, 40392, 40369, 40365, 40396, 40371, 40397, 40370, 40570, 40604,
  14123. 40683, 40686, 40685, 40731, 40728, 40730, 40753, 40782, 40805, 40804,
  14124. 40850, 20153, 22214, 22213, 22219, 22897, {f: 2, c: 23371}, 24021, 24017,
  14125. 24306, 25889, 25888, 25894, 25890, 27403, {f: 2, c: 27400}, 27661,
  14126. {f: 3, c: 28757}, 28754, {f: 2, c: 29214}, 29353, 29567, 29912, 29909,
  14127. 29913, 29911, 30317, 30381, 31029, 31156, {f: 2, c: 31344}, 31831, 31836,
  14128. 31833, 31835, 31834, 31988, 31985, 32401, 32591, 32647, 33246, 33387,
  14129. {f: 2, c: 34356}, 34355, 34348, 34354, 34358, 34860, 34856, 34854, 34858,
  14130. 34853, 35185, 35263, 35262, 35323, 35710, 35716, 35714, 35718, 35717,
  14131. 35711, 36117, 36501, 36500, 36506, 36498, 36496, {f: 2, c: 36502}, 36704,
  14132. 36706, 37191, 37964, 37968, {f: 2, c: 37962}, 37967, 37959, 37957,
  14133. {f: 2, c: 37960}, 37958, 38719, 38883, 39018, 39017, 39115, 39252, 39259,
  14134. 39502, {f: 2, c: 39507}, 39500, 39503, 39496, 39498, 39497, 39506, 39504,
  14135. 39632, 39705, 39723, 39739, 39766, 39765, 40006, 40008, 39999, 40004,
  14136. 39993, 39987, 40001, 39996, 39991, 39988, 39986, 39997, 39990, 40411,
  14137. 40402, 40414, 40410, 40395, 40400, 40412, 40401, 40415, 40425, 40409,
  14138. 40408, 40406, 40437, 40405, 40413, 40630, 40688, 40757, 40755, 40754,
  14139. 40770, 40811, 40853, 40866, 20797, 21145, 22760, 22759, 22898, 23373,
  14140. 24024, 34863, 24399, 25089, {f: 2, c: 25091}, 25897, 25893, 26006, 26347,
  14141. {f: 2, c: 27409}, 27407, 27594, 28763, 28762, 29218, 29570, 29569, 29571,
  14142. 30320, 30676, 31847, 31846, 32405, 33388, 34362, 34368, 34361, 34364,
  14143. 34353, 34363, 34366, 34864, 34866, 34862, 34867, 35190, 35188, 35187,
  14144. 35326, 35724, 35726, 35723, 35720, 35909, 36121, 36504, 36708, 36707,
  14145. 37308, 37986, 37973, 37981, 37975, 37982, {f: 2, c: 38852}, 38912, 39510,
  14146. 39513, {f: 3, c: 39710}, 40018, 40024, 40016, 40010, 40013, 40011, 40021,
  14147. 40025, 40012, 40014, 40443, 40439, 40431, 40419, 40427, 40440, 40420,
  14148. 40438, 40417, 40430, 40422, 40434, [40432, 60370], 40418, 40428, 40436,
  14149. 40435, 40424, 40429, 40642, 40656, {f: 2, c: 40690}, 40710, 40732, 40760,
  14150. 40759, 40758, 40771, 40783, 40817, 40816, {f: 2, c: 40814}, 22227, 22221,
  14151. 23374, 23661, 25901, {f: 2, c: 26349}, 27411, 28767, 28769, 28765, 28768,
  14152. 29219, 29915, 29925, 30677, 31032, 31159, 31158, 31850, 32407, 32649,
  14153. 33389, 34371, 34872, 34871, 34869, 34891, {f: 2, c: 35732},
  14154. {f: 3, c: 36510}, 36509, 37310, 37309, 37314, 37995, {f: 2, c: 37992},
  14155. 38629, 38726, 38723, 38727, 38855, 38885, 39518, 39637, 39769, 40035,
  14156. 40039, 40038, 40034, 40030, 40032, 40450, 40446, 40455, 40451, 40454,
  14157. 40453, {f: 2, c: 40448}, 40457, 40447, 40445, 40452, 40608, 40734, 40774,
  14158. {f: 3, c: 40820}, 22228, 25902, 26040, {f: 2, c: 27416}, 27415, 27418,
  14159. 28770, 29222, 29354, {f: 2, c: 30680}, 31033, 31849, 31851, 31990, 32410,
  14160. 32408, 32411, 32409, {f: 2, c: 33248}, {f: 3, c: 34374}, {f: 2, c: 35193},
  14161. 35196, 35195, 35327, {f: 2, c: 35736}, 36517, 36516, 36515, 37998, 37997,
  14162. 37999, 38001, 38003, 38729, 39026, 39263, 40040, 40046, 40045, 40459,
  14163. 40461, 40464, 40463, 40466, 40465, 40609, 40693, 40713, 40775, 40824,
  14164. 40827, 40826, 40825, 22302, 28774, 31855, 34876, 36274, 36518, 37315,
  14165. 38004, 38008, 38006, 38005, 39520, [39726, 60830], 40052, 40051, 40049,
  14166. 40053, 40468, 40467, 40694, 40714, 40868, 28776, 28773, 31991, 34410,
  14167. 34878, 34877, 34879, 35742, 35996, 36521, 36553, 38731, {f: 2, c: 39027},
  14168. 39116, 39265, 39339, 39524, {f: 2, c: 39526}, 39716, 40469, 40471, 40776,
  14169. 25095, 27422, 29223, 34380, 36520, 38018, {f: 2, c: 38016}, 39529, 39528,
  14170. 40473, 34379, 35743, 38019, 40057, 40631, 30325, 39531, 40058, 40477,
  14171. {f: 2, c: 28777}, 29225, 40612, 40830, 40777, 40856, {s: 97}, 65075, 0,
  14172. 65076, 65103, [168, 776, 63208], [710, 63209, 65342], [12541, 63210],
  14173. [12542, 63211], [12445, 63212], [12446, 63213], 0, [12293, 63216],
  14174. [12294, 63217], [12295, 63218], [12540, 63219], [63220, 65339],
  14175. [63221, 65341], [10045, 63222], [12353, 63223], [12354, 63224],
  14176. [12355, 63225], [12356, 63226], [12357, 63227], [12358, 63228],
  14177. [12359, 63229], [12360, 63230], [12361, 63231], [12362, 63232],
  14178. [12363, 63233], [12364, 63234], [12365, 63235], [12366, 63236],
  14179. [12367, 63237], [12368, 63238], [12369, 63239], [12370, 63240],
  14180. [12371, 63241], [12372, 63242], [12373, 63243], [12374, 63244],
  14181. [12375, 63245], [12376, 63246], [12377, 63247], [12378, 63248],
  14182. [12379, 63249], [12380, 63250], [12381, 63251], [12382, 63252],
  14183. [12383, 63253], [12384, 63254], [12385, 63255], [12386, 63256],
  14184. [12387, 63257], [12388, 63258], [12389, 63259], [12390, 63260],
  14185. [12391, 63261], [12392, 63262], [12393, 63263], [12394, 63264],
  14186. [12395, 63265], [12396, 63266], [12397, 63267], [12398, 63268],
  14187. [12399, 63269], [12400, 63270], [12401, 63271], [12402, 63272],
  14188. [12403, 63273], [12404, 63274], [12405, 63275], [12406, 63276],
  14189. [12407, 63277], [12408, 63278], [12409, 63279], [12410, 63280],
  14190. [12411, 63281], [12412, 63282], [12413, 63283], [12414, 63284],
  14191. [12415, 63285], [12416, 63286], [12417, 63287], [12418, 63288],
  14192. [12419, 63289], [12420, 63290], [12421, 63291], [12422, 63292],
  14193. [12423, 63293], [12424, 63294], [12425, 63295], [12426, 63296],
  14194. [12427, 63297], [12428, 63298], [12429, 63299], [12430, 63300],
  14195. [12431, 63301], [12432, 63302], [12433, 63303], [12434, 63304],
  14196. [12435, 63305], [12449, 63306], [12450, 63307], [12451, 63308],
  14197. [12452, 63309], [12453, 63310], [12454, 63311], [12455, 63312],
  14198. [12456, 63313], [12457, 63314], [12458, 63315], [12459, 63316],
  14199. [12460, 63317], [12461, 63318], [12462, 63319], [12463, 63320],
  14200. [12464, 63321], [12465, 63322], [12466, 63323], [12467, 63324],
  14201. [12468, 63325], [12469, 63326], [12470, 63327], [12471, 63328],
  14202. [12472, 63329], [12473, 63330], [12474, 63331], [12475, 63332],
  14203. [12476, 63333], [12477, 63334], [12478, 63335], [12479, 63336],
  14204. [12480, 63337], [12481, 63338], [12482, 63339], [12483, 63340],
  14205. [12484, 63341], [12485, 63342], [12486, 63343], [12487, 63344],
  14206. [12488, 63345], [12489, 63346], [12490, 63347], [12491, 63348],
  14207. [12492, 63349], [12493, 63350], [12494, 63351], [12495, 63352],
  14208. [12496, 63353], [12497, 63354], [12498, 63355], [12499, 63356],
  14209. [12500, 63357], [12501, 63358], [12502, 63359], [12503, 63360],
  14210. [12504, 63361], [12505, 63362], [12506, 63363], [12507, 63364],
  14211. [12508, 63365], [12509, 63366], [12510, 63367], [12511, 63368],
  14212. [12512, 63369], [12513, 63370], [12514, 63371], [12515, 63372],
  14213. [12516, 63373], [12517, 63374], [12518, 63375], [12519, 63376],
  14214. [12520, 63377], [12521, 63378], [12522, 63379], [12523, 63380],
  14215. [12524, 63381], [12525, 63382], [12526, 63383], [12527, 63384],
  14216. [12528, 63385], [12529, 63386], [12530, 63387], [12531, 63388],
  14217. [12532, 63389], [12533, 63390], [12534, 63391], [1040, 63392],
  14218. [1041, 63393], [1042, 63394], [1043, 63395], [1044, 63396], [1045, 63397],
  14219. [1025, 63398], [1046, 63399], [1047, 63400], [1048, 63401], [1049, 63402],
  14220. [1050, 63403], [1051, 63404], [1052, 63405], [1053, 63406], [1054, 63407],
  14221. [1055, 63408], [1056, 63409], [1057, 63410], [1058, 63411], [1059, 63412],
  14222. [1060, 63413], [1061, 63414], [1062, 63415], [1063, 63416], [1064, 63417],
  14223. [1065, 63418], [1066, 63419], [1067, 63420], [1068, 63421], [1069, 63422],
  14224. [1070, 63423], [1071, 63424], [1072, 63425], [1073, 63426], [1074, 63427],
  14225. [1075, 63428], [1076, 63429], [1077, 63430], [1105, 63431], [1078, 63432],
  14226. [1079, 63433], [1080, 63434], [1081, 63435], [1082, 63436], [1083, 63437],
  14227. [1084, 63438], [1085, 63439], [1086, 63440], [1087, 63441], [1088, 63442],
  14228. [1089, 63443], [1090, 63444], [1091, 63445], [1092, 63446], [1093, 63447],
  14229. [1094, 63448], [1095, 63449], [1096, 63450], [1097, 63451], [1098, 63452],
  14230. [1099, 63453], [1100, 63454], [1101, 63455], [1102, 63456], [1103, 63457],
  14231. [8679, 63458], [8632, 63459], [8633, 63460], [20033, 63461],
  14232. [63462, 131276], [20058, 63463], [63464, 131210], [20994, 63465],
  14233. [17553, 63466], 63467, [20872, 63468], [13853, 63469], [63470, 161287],
  14234. {s: 40}, [172, 63511, 65506], [63512, 65508], [63513, 65287],
  14235. [63514, 65282], [12849, 63515], [8470, 63516], [8481, 63517], 30849,
  14236. [37561, 58501], 35023, 22715, 24658, 31911, 23290, 9556, 9574, 9559, 9568,
  14237. 9580, 9571, 9562, 9577, 9565, 9554, 9572, 9557, {s: 3}, 9560, 9575, 9563,
  14238. 9555, 9573, 9558, 9567, 9579, 9570, 9561, 9576, 9564, 9553, {s: 5}, 9619,
  14239. {s: 26}, [58129, 147159], [22462, 58130], [58131, 159443], [28990, 58132],
  14240. [58133, 153568], [27042, 58135], [58136, 166889], [23412, 58137],
  14241. [31305, 58138], [58139, 153825], [58140, 169177], [31333, 58141],
  14242. [31357, 58142], [58143, 154028], [31419, 58144], [31408, 58145],
  14243. [31426, 58146], [31427, 58147], [29137, 58148], [58149, 156813],
  14244. [16842, 58150], [31450, 58151], [31453, 58152], [31466, 58153],
  14245. [16879, 58154], [21682, 58155], [58156, 154625], [31499, 58157],
  14246. [31573, 58158], [31529, 58159], [58160, 152334], [58161, 154878],
  14247. [31650, 58162], [31599, 58163], [33692, 58164], [58165, 154548],
  14248. [58166, 158847], [31696, 58167], [33825, 58168], [31634, 58169], 0,
  14249. [58171, 154912], 0, [33938, 58174], [31738, 58175], 0, [31797, 58177],
  14250. [58178, 154817], [31812, 58179], [31875, 58180], [58181, 149634],
  14251. [31910, 58182], [58184, 148856], [31945, 58185], [31943, 58186],
  14252. [31974, 58187], 0, [31987, 58189], [31989, 58190], [32359, 58192],
  14253. [17693, 58193], [58194, 159300], [32093, 58195], [58196, 159446],
  14254. [32137, 58198], [32171, 58199], [28981, 58200], [32179, 58201], 32214,
  14255. [58203, 147543], [58204, 155689], [32228, 58205], [15635, 58206],
  14256. [32245, 58207], [58208, 137209], [32229, 58209], [58210, 164717], 0,
  14257. [58212, 155937], [58213, 155994], [32366, 58214], 0, [17195, 58216],
  14258. [37996, 58217], [32295, 58218], [32576, 58219], [32577, 58220],
  14259. [32583, 58221], [31030, 58222], [58223, 156368], [39393, 58224],
  14260. [32663, 58225], [58226, 156497], [32675, 58227], [58228, 136801],
  14261. [58229, 131176], [17756, 58230], [58231, 145254], [58233, 164666],
  14262. [32762, 58234], [58235, 156809], 0, [32776, 58237], [32797, 58238], 0,
  14263. [32815, 58240], [58241, 172167], [58242, 158915], [32827, 58243],
  14264. [32828, 58244], [32865, 58245], [58246, 141076], [18825, 58247],
  14265. [58248, 157222], [58249, 146915], [58250, 157416], [26405, 58251],
  14266. [32935, 58252], [58253, 166472], [33031, 58254], [33050, 58255],
  14267. [22704, 58256], [58257, 141046], [27775, 58258], [58259, 156824],
  14268. [25831, 58261], [58262, 136330], [33304, 58263], [58264, 137310],
  14269. [27219, 58265], [58266, 150117], [58267, 150165], [17530, 58268],
  14270. [33321, 58269], [58271, 158290], [58272, 146814], [20473, 58273],
  14271. [58274, 136445], [34018, 58275], [33634, 58276], 0, [58278, 149927],
  14272. [58279, 144688], [58280, 137075], [58281, 146936], [33450, 58282],
  14273. [26907, 58283], [58284, 194964], [16859, 58285], [34123, 58286],
  14274. [33488, 58287], [33562, 58288], [58289, 134678], [58290, 137140],
  14275. [14017, 58291], [58292, 143741], [58293, 144730], [33403, 58294],
  14276. [33506, 58295], [33560, 58296], [58297, 147083], [58298, 159139],
  14277. [58299, 158469], [58300, 158615], [58301, 144846], [15807, 58302],
  14278. [33565, 58303], [21996, 58304], [33669, 58305], [17675, 58306],
  14279. [58307, 159141], [33708, 58308], 0, [33747, 58310], [58312, 159444],
  14280. [27223, 58313], [34138, 58314], [13462, 58315], [58316, 159298],
  14281. [33880, 58318], [58319, 154596], [33905, 58320], [15827, 58321],
  14282. [17636, 58322], [27303, 58323], [33866, 58324], [31064, 58326], 0,
  14283. [58328, 158614], [58329, 159351], [58330, 159299], [34014, 58331], 0,
  14284. [33681, 58333], [17568, 58334], [33939, 58335], [34020, 58336],
  14285. [58337, 154769], [16960, 58338], [58339, 154816], [17731, 58340],
  14286. [34100, 58341], [23282, 58342], 0, [17703, 58344], [34163, 58345],
  14287. [17686, 58346], [26559, 58347], [34326, 58348], [58349, 165413],
  14288. [58350, 165435], [34241, 58351], [58352, 159880], [34306, 58353],
  14289. [58354, 136578], [58355, 159949], [58356, 194994], [17770, 58357],
  14290. [34344, 58358], [13896, 58359], [58360, 137378], [21495, 58361],
  14291. [58362, 160666], [34430, 58363], 0, [58365, 172280], [34798, 58366],
  14292. [58367, 142375], [34737, 58368], [34778, 58369], [34831, 58370, 60990],
  14293. [22113, 58371], [34412, 58372], [26710, 58373], [17935, 58374],
  14294. [34885, 58375], [34886, 58376], [58377, 161248], [58378, 146873],
  14295. [58379, 161252], [34910, 58380], [34972, 58381], [18011, 58382],
  14296. [34996, 58383], [34997, 58384], [35013, 58386], [58388, 161551],
  14297. [35207, 58389], {s: 3}, [35239, 58393], [35260, 58394], [58395, 166437],
  14298. [35303, 58396], [58397, 162084], [58398, 162493], [35484, 58399],
  14299. [30611, 58400], [37374, 58401], [35472, 58402], [58403, 162393],
  14300. [31465, 58404], [58405, 162618], [18195, 58407], [58408, 162616],
  14301. [29052, 58409], [35596, 58410], [35615, 58411], [58412, 152624],
  14302. [58413, 152933], [35647, 58414], 0, [35661, 58416], [35497, 58417],
  14303. [58418, 150138], [35728, 58419], [35739, 58420], [35503, 58421],
  14304. [58422, 136927], [17941, 58423], [34895, 58424], [35995, 58425],
  14305. [58426, 163156], [58427, 163215], [58428, 195028], [14117, 58429],
  14306. [58430, 163155], [36054, 58431], [58432, 163224], [58433, 163261],
  14307. [36114, 58434], [36099, 58435], [58436, 137488], [36059, 58437],
  14308. [28764, 58438], [36113, 58439], [16080, 58441], 0, [36265, 58443],
  14309. [58444, 163842], [58445, 135188], [58446, 149898], [15228, 58447],
  14310. [58448, 164284], [58449, 160012], [31463, 58450], [36525, 58451],
  14311. [36534, 58452], [36547, 58453], [37588, 58454], [36633, 58455],
  14312. [36653, 58456], [58457, 164709], [58458, 164882], [36773, 58459],
  14313. [37635, 58460], [58461, 172703], [58462, 133712], [36787, 58463], 0,
  14314. [58465, 166366], [58466, 165181], [58467, 146875], [24312, 58468],
  14315. [58469, 143970], [36857, 58470], 0, [58474, 140069], [14720, 58475],
  14316. [58476, 159447], [36919, 58477], [58478, 165180], [58479, 162494],
  14317. [36961, 58480], [58481, 165228], [58482, 165387], [37032, 58483],
  14318. [58484, 165651], [37060, 58485], [58486, 165606], [37038, 58487], 0,
  14319. [37223, 58489], [37289, 58491], [37316, 58492], [31916, 58493],
  14320. [58494, 166195], [58495, 138889], [37390, 58496], [27807, 58497],
  14321. [37441, 58498], [37474, 58499], [58500, 153017], [58502, 166598],
  14322. [58503, 146587], [58504, 166668], [58505, 153051], [58506, 134449],
  14323. [37676, 58507], [37739, 58508], [58509, 166625], [58510, 166891],
  14324. [23235, 58512], [58513, 166626], [58514, 166629], [18789, 58515],
  14325. [37444, 58516], [58517, 166892], [58518, 166969], [58519, 166911],
  14326. [37747, 58520], [37979, 58521], [36540, 58522], [38277, 58523],
  14327. [38310, 58524], [37926, 58525], [38304, 58526], [28662, 58527],
  14328. [17081, 58528], [58530, 165592], [58531, 135804], [58532, 146990],
  14329. [18911, 58533], [27676, 58534], [38523, 58535], [38550, 58536],
  14330. [16748, 58537], [38563, 58538], [58539, 159445], [25050, 58540], 58541,
  14331. [30965, 58542], [58543, 166624], [38589, 58544], [21452, 58545],
  14332. [18849, 58546], [58547, 158904], [58548, 131700], [58549, 156688],
  14333. [58550, 168111], [58551, 168165], [58552, 150225], [58553, 137493],
  14334. [58554, 144138], [38705, 58555], [34370, 58556], [38710, 58557],
  14335. [18959, 58558], [17725, 58559], [17797, 58560], [58561, 150249],
  14336. [28789, 58562], [23361, 58563], [38683, 58564], 0, [58566, 168405],
  14337. [38743, 58567], [23370, 58568], [58569, 168427], [38751, 58570],
  14338. [37925, 58571], [20688, 58572], [58573, 143543], [58574, 143548],
  14339. [38793, 58575], [38815, 58576], [38833, 58577], [38846, 58578],
  14340. [38848, 58579], [38866, 58580], [38880, 58581], [58582, 152684],
  14341. [38894, 58583], [29724, 58584], [58585, 169011], 0, [38901, 58587],
  14342. [58588, 168989], [58589, 162170], [19153, 58590], [38964, 58591],
  14343. [38963, 58592], [38987, 58593], [39014, 58594], [15118, 58595],
  14344. [58596, 160117], [15697, 58597], [58598, 132656], [58599, 147804],
  14345. [58600, 153350], [39114, 58601], [39095, 58602], [39112, 58603],
  14346. [39111, 58604], [19199, 58605], [58606, 159015], [58607, 136915],
  14347. [21936, 58608], [39137, 58609], [39142, 58610], [39148, 58611],
  14348. [37752, 58612], [39225, 58613], [58614, 150057], [19314, 58615],
  14349. [58616, 170071], [58617, 170245], [39413, 58618], [39436, 58619],
  14350. [39483, 58620], [39440, 58621], [39512, 58622], [58623, 153381],
  14351. [14020, 58624], [58625, 168113], [58626, 170965], [39648, 58627],
  14352. [39650, 58628], [58629, 170757], [39668, 58630], [19470, 58631],
  14353. [39700, 58632], [39725, 58633], [58634, 165376], [20532, 58635],
  14354. [39732, 58636], [14531, 58638], [58639, 143485], [39760, 58640],
  14355. [39744, 58641], [58642, 171326], [23109, 58643], [58644, 137315],
  14356. [39822, 58645], [39938, 58647], [39935, 58648], [39948, 58649],
  14357. [58650, 171624], [40404, 58651], [58652, 171959], [58653, 172434],
  14358. [58654, 172459], [58655, 172257], [58656, 172323], [58657, 172511],
  14359. [40318, 58658], [40323, 58659], [58660, 172340], [40462, 58661],
  14360. [40388, 58663], [58665, 172435], [58666, 172576], [58667, 137531],
  14361. [58668, 172595], [40249, 58669], [58670, 172217], [58671, 172724],
  14362. [40592, 58672], [40597, 58673], [40606, 58674], [40610, 58675],
  14363. [19764, 58676], [40618, 58677], [40623, 58678], [58679, 148324],
  14364. [40641, 58680], [15200, 58681], [14821, 58682], [15645, 58683],
  14365. [20274, 58684], [14270, 58685], [58686, 166955], [40706, 58687],
  14366. [40712, 58688], [19350, 58689], [37924, 58690], [58691, 159138],
  14367. [40727, 58692, 60836], 0, [40761, 58694], [22175, 58695], [22154, 58696],
  14368. [40773, 58697], [39352, 58698], [58699, 168075], [38898, 58700],
  14369. [33919, 58701], 0, [40809, 58703], [31452, 58704], [40846, 58705],
  14370. [29206, 58706], [19390, 58707], [58708, 149877], [58709, 149947],
  14371. [29047, 58710], [58711, 150008], [58712, 148296], [58713, 150097],
  14372. [29598, 58714], [58715, 166874], [58716, 137466], [31135, 58717],
  14373. [58718, 166270], [58719, 167478], [37737, 58720], [37875, 58721],
  14374. [58722, 166468], [37612, 58723], [37761, 58724], [37835, 58725],
  14375. [58726, 166252], [58727, 148665], [29207, 58728], [16107, 58729],
  14376. [30578, 58730], [31299, 58731], [28880, 58732], [58733, 148595],
  14377. [58734, 148472], [29054, 58735], [58736, 137199], [28835, 58737],
  14378. [58738, 137406], [58739, 144793], [16071, 58740], [58741, 137349],
  14379. [58742, 152623], [58743, 137208], [14114, 58744], [58745, 136955],
  14380. [58746, 137273], [14049, 58747], [58748, 137076], [58749, 137425],
  14381. [58750, 155467], [14115, 58751], [58752, 136896], [22363, 58753],
  14382. [58754, 150053], [58755, 136190], [58756, 135848], [58757, 136134],
  14383. [58758, 136374], [34051, 58759, 58761], [58760, 145062], 0, [33877, 58762],
  14384. [58763, 149908], [58764, 160101], [58765, 146993], [58766, 152924],
  14385. [58767, 147195], [58768, 159826], [17652, 58769], [58770, 145134],
  14386. [58771, 170397], [58772, 159526], [26617, 58773], [14131, 58774],
  14387. [15381, 58775], [15847, 58776], [22636, 58777], [58778, 137506],
  14388. [26640, 58779], [16471, 58780], [58781, 145215], [58782, 147681],
  14389. [58783, 147595], [58784, 147727], [58785, 158753], [21707, 58786],
  14390. [22174, 58787], [58788, 157361], [22162, 58789], [58790, 135135],
  14391. [58791, 134056], [58792, 134669], 0, [58794, 166675], [37788, 58795],
  14392. [20216, 58796], [20779, 58797], [14361, 58798], [58799, 148534],
  14393. [20156, 58800], [58801, 132197], 0, [20299, 58803], [20362, 58804],
  14394. [58805, 153169], [23144, 58806], [58807, 131499], [58808, 132043],
  14395. [14745, 58809], [58810, 131850], [58811, 132116], [13365, 58812],
  14396. [20265, 58813], [58814, 131776], [58815, 167603], [58816, 131701],
  14397. [35546, 58817], [58818, 131596], [20120, 58819], [20685, 58820],
  14398. [20749, 58821], [20386, 58822], [20227, 58823], [58824, 150030],
  14399. [58825, 147082], [20290, 58826], [20526, 58827], [20588, 58828],
  14400. [20609, 58829], [20428, 58830], [20453, 58831], [20568, 58832],
  14401. [20732, 58833], [28278, 58838], [58839, 144789], [58840, 147001],
  14402. [58841, 147135], [28018, 58842], [58843, 137348], [58844, 147081],
  14403. [20904, 58845], [20931, 58846], [58847, 132576], [17629, 58848],
  14404. [58849, 132259], [58850, 132242], [58851, 132241], [36218, 58852],
  14405. [58853, 166556], [58854, 132878], [21081, 58855], [21156, 58856],
  14406. [58857, 133235], [21217, 58858], 0, [18042, 58860], [29068, 58861],
  14407. [58862, 148364], [58863, 134176], [58864, 149932], [58865, 135396],
  14408. [27089, 58866], [58867, 134685], 0, [16094, 58869], [29849, 58870],
  14409. [29716, 58871], [29782, 58872], [29592, 58873], [19342, 58874],
  14410. [58875, 150204], [58876, 147597], [21456, 58877], [13700, 58878],
  14411. [29199, 58879], [58880, 147657], [21940, 58881], [58882, 131909],
  14412. [21709, 58883], [58884, 134086], [22301, 58885], [37469, 58886],
  14413. [38644, 58887], [22493, 58889], [22413, 58890], [22399, 58891],
  14414. [13886, 58892], [22731, 58893], [23193, 58894], [58895, 166470],
  14415. [58896, 136954], [58897, 137071], [58898, 136976], [23084, 58899],
  14416. [22968, 58900], [23166, 58902], [23247, 58903], [23058, 58904],
  14417. [58905, 153926], [58906, 137715], [58907, 137313], [58908, 148117],
  14418. [14069, 58909], [27909, 58910], [29763, 58911], [23073, 58912],
  14419. [58913, 155267], [23169, 58914], [58915, 166871], [58916, 132115],
  14420. [37856, 58917], [29836, 58918], [58919, 135939], [28933, 58920],
  14421. [18802, 58921], [37896, 58922], [58923, 166395], [37821, 58924],
  14422. [14240, 58925], [23582, 58926], [23710, 58927], [24158, 58928],
  14423. [24136, 58929], [58930, 137622], [58931, 137596], [58932, 146158],
  14424. [24269, 58933], [23375, 58934], [58935, 137475], [58936, 137476],
  14425. [14081, 58937], [58938, 137376], [14045, 58939], [58940, 136958],
  14426. [14035, 58941], [33066, 58942], [58943, 166471], [58944, 138682],
  14427. [58945, 144498], [58946, 166312], [24332, 58947, 60916], [24334, 58948],
  14428. [58949, 137511], [58950, 137131], [23147, 58951], [58952, 137019],
  14429. [23364, 58953], [58955, 161277], [34912, 58956], [24702, 58957],
  14430. [58958, 141408], [58959, 140843], [24539, 58960], [16056, 58961],
  14431. [58962, 140719], [58963, 140734], [58964, 168072], [58965, 159603],
  14432. [25024, 58966], [58967, 131134], [58968, 131142], [58969, 140827],
  14433. [24985, 58970], [24984, 58971], [24693, 58972], [58973, 142491],
  14434. [58974, 142599], [58975, 149204], [58976, 168269], [25713, 58977],
  14435. [58978, 149093], [58979, 142186], [14889, 58980], [58981, 142114],
  14436. [58982, 144464], [58983, 170218], [58984, 142968], [25399, 58985],
  14437. [25782, 58987], [25393, 58988], [25553, 58989], [58990, 149987],
  14438. [58991, 142695], [25252, 58992], [58993, 142497], [25659, 58994],
  14439. [25963, 58995], [26994, 58996], [15348, 58997], [58998, 143502],
  14440. [58999, 144045], [59000, 149897], [59001, 144043], [21773, 59002],
  14441. [59003, 144096], [59004, 137433], [59005, 169023], [26318, 59006],
  14442. [59007, 144009], [59008, 143795], [15072, 59009], [59011, 152964],
  14443. [59012, 166690], [59013, 152975], [59014, 136956], [59015, 152923],
  14444. [59016, 152613], [30958, 59017], [59018, 143619], [59019, 137258],
  14445. [59020, 143924], [13412, 59021], [59022, 143887], [59023, 143746],
  14446. [59024, 148169], [26254, 59025], [59026, 159012], [26219, 59027],
  14447. [19347, 59028], [26160, 59029], [59030, 161904], [59031, 138731],
  14448. [26211, 59032], [59033, 144082], [59034, 144097], [26142, 59035],
  14449. [59036, 153714], [14545, 59037], [59038, 145466], [59039, 145340],
  14450. [15257, 59040], [59041, 145314], [59042, 144382], [29904, 59043],
  14451. [15254, 59044], [59046, 149034], [26806, 59047], 0, [15300, 59049],
  14452. [27326, 59050], [59052, 145365], [59053, 148615], [27187, 59054],
  14453. [27218, 59055], [27337, 59056], [27397, 59057], [59058, 137490],
  14454. [25873, 59059], [26776, 59060], [27212, 59061], [15319, 59062],
  14455. [27258, 59063], [27479, 59064], [59065, 147392], [59066, 146586],
  14456. [37792, 59067], [37618, 59068], [59069, 166890], [59070, 166603],
  14457. [37513, 59071], [59072, 163870], [59073, 166364], [37991, 59074],
  14458. [28069, 59075], [28427, 59076], 0, [59079, 147327], [15759, 59080],
  14459. [28164, 59081], [59082, 147516], [23101, 59083], [28170, 59084],
  14460. [22599, 59085], [27940, 59086], [30786, 59087], [28987, 59088],
  14461. [59089, 148250], [59090, 148086], [28913, 59091], [29264, 59092, 61085],
  14462. [29319, 59093], [29332, 59094], [59095, 149391], [59096, 149285],
  14463. [20857, 59097], [59098, 150180], [59099, 132587], [29818, 59100],
  14464. [59101, 147192], [59102, 144991], [59103, 150090], [59104, 149783],
  14465. [59105, 155617], [16134, 59106], [16049, 59107], [59108, 150239],
  14466. [59109, 166947], [59110, 147253], [24743, 59111], [16115, 59112],
  14467. [29900, 59113], [29756, 59114], [37767, 59115], [29751, 59116],
  14468. [17567, 59117], [59118, 159210], [17745, 59119], [30083, 59120],
  14469. [16227, 59121], [59122, 150745], [59123, 150790], [16216, 59124],
  14470. [30037, 59125], [30323, 59126], [59127, 173510], 0, [29800, 59129, 61070],
  14471. [59130, 166604], [59131, 149931], [59132, 149902], [15099, 59133],
  14472. [15821, 59134], [59135, 150094], [16127, 59136], [59137, 149957],
  14473. [59138, 149747], [37370, 59139], [22322, 59140], [37698, 59141],
  14474. [59142, 166627], [59143, 137316], [20703, 59144], [59145, 152097],
  14475. [59146, 152039], [30584, 59147], [59148, 143922], [30478, 59149],
  14476. [30479, 59150], [30587, 59151], [59152, 149143], [59153, 145281],
  14477. [14942, 59154], [59155, 149744], [29752, 59156], [29851, 59157],
  14478. [16063, 59158], [59159, 150202], [59160, 150215], [16584, 59161],
  14479. [59162, 150166], [59163, 156078], [37639, 59164], [59165, 152961],
  14480. [30750, 59166], [30861, 59167], [30856, 59168], [30930, 59169],
  14481. [29648, 59170], [31065, 59171], [59172, 161601], [59173, 153315],
  14482. [16654, 59174], 0, 0, [31141, 59177], [27181, 59178], [59179, 147194],
  14483. [31290, 59180], [31220, 59181], [16750, 59182], [59183, 136934],
  14484. [16690, 59184], [37429, 59185], [31217, 59186], [59187, 134476],
  14485. [59188, 149900], [59189, 131737], [59190, 146874], [59191, 137070],
  14486. [13719, 59192], [21867, 59193], [13680, 59194], [13994, 59195],
  14487. [59196, 131540], [59197, 134157], [31458, 59198], [23129, 59199],
  14488. [59200, 141045], [59201, 154287], [59202, 154268], [23053, 59203],
  14489. [59204, 131675], [30960, 59205], [23082, 59206], [59207, 154566],
  14490. [31486, 59208], [16889, 59209], [31837, 59210], [31853, 59211],
  14491. [16913, 59212], [59213, 154547], [59214, 155324], [59215, 155302],
  14492. [31949, 59216], [59217, 150009], [59218, 137136], [31886, 59219],
  14493. [31868, 59220], [31918, 59221], [27314, 59222], [32220, 59223],
  14494. [32263, 59224], [32211, 59225], [32590, 59226], [59227, 156257],
  14495. [59228, 155996], [59229, 162632], [32151, 59230], [59231, 155266],
  14496. [17002, 59232], [59233, 158581], [59234, 133398], [26582, 59235],
  14497. [59236, 131150], [59237, 144847], [22468, 59238], [59239, 156690],
  14498. [59240, 156664], [32733, 59242], [31527, 59243], [59244, 133164],
  14499. [59245, 154345], [59246, 154947], [31500, 59247], [59248, 155150],
  14500. [39398, 59249], [34373, 59250], [39523, 59251], [27164, 59252],
  14501. [59253, 144447], [59255, 150007], [59256, 157101], [39455, 59257],
  14502. [59258, 157088], 0, [59260, 160039], [59261, 158929], [17642, 59262],
  14503. [33079, 59263], [17410, 59264], [32966, 59265], [33033, 59266],
  14504. [33090, 59267], [59268, 157620], [39107, 59269], [59270, 158274],
  14505. [33378, 59271], [33381, 59272], [59273, 158289], [33875, 59274],
  14506. [59275, 159143], [34320, 59276], [59277, 160283], [23174, 59278],
  14507. [16767, 59279], [59280, 137280], [23339, 59281], [59282, 137377],
  14508. [23268, 59283], [59284, 137432], [34464, 59285], [59286, 195004],
  14509. [59287, 146831], [34861, 59288], [59289, 160802], [23042, 59290],
  14510. [34926, 59291], [20293, 59292], [34951, 59293], [35007, 59294],
  14511. [35046, 59295], [35173, 59296], [35149, 59297], [59298, 153219],
  14512. [35156, 59299], [59300, 161669], [59301, 161668], [59302, 166901],
  14513. [59303, 166873], [59304, 166812], [59305, 166393], [16045, 59306],
  14514. [33955, 59307], [18165, 59308], [18127, 59309], [14322, 59310],
  14515. [35389, 59311], [35356, 59312], [59313, 169032], [24397, 59314],
  14516. [37419, 59315], [59316, 148100], [26068, 59317], [28969, 59318],
  14517. [28868, 59319], [59320, 137285], [40301, 59321], [35999, 59322],
  14518. [36073, 59323], [59324, 163292], [22938, 59325], [30659, 59326],
  14519. [23024, 59327], [14036, 59329], [36394, 59330], [36519, 59331],
  14520. [59332, 150537], [36656, 59333], [36682, 59334], [17140, 59335],
  14521. [27736, 59336], [28603, 59337], [59338, 140065], [18587, 59339],
  14522. [28537, 59340], [28299, 59341], [59342, 137178], [39913, 59343],
  14523. [14005, 59344], [59345, 149807], [37051, 59346], 0, [21873, 59348],
  14524. [18694, 59349], [37307, 59350], [37892, 59351], [59352, 166475],
  14525. [16482, 59353], [59354, 166652], [37927, 59355], [59356, 166941],
  14526. [59357, 166971], [34021, 59358], [35371, 59359], [38297, 59360],
  14527. [38311, 59361], [38295, 59362], [38294, 59363], [59364, 167220],
  14528. [29765, 59365], [16066, 59366], [59367, 149759], [59368, 150082],
  14529. [59369, 148458], [16103, 59370], [59371, 143909], [38543, 59372],
  14530. [59373, 167655], [59374, 167526], [59375, 167525], [16076, 59376],
  14531. [59377, 149997], [59378, 150136], [59379, 147438], [29714, 59380],
  14532. [29803, 59381], [16124, 59382], [38721, 59383], [59384, 168112],
  14533. [26695, 59385], [18973, 59386], [59387, 168083], [59388, 153567], 0,
  14534. [37736, 59390], [59391, 166281], [59392, 166950], [59393, 166703],
  14535. [59394, 156606], [37562, 59395], [23313, 59396], [35689, 59397],
  14536. [18748, 59398], [29689, 59399], [59400, 147995], [38811, 59401], 0,
  14537. [39224, 59403], [59404, 134950], [24001, 59405], [59406, 166853],
  14538. [59407, 150194], [38943, 59408], [59409, 169178], [37622, 59410],
  14539. [59411, 169431], [37349, 59412], [17600, 59413], [59414, 166736],
  14540. [59415, 150119], [59416, 166756], [39132, 59417], [59418, 166469],
  14541. [16128, 59419], [37418, 59420], [18725, 59421], [33812, 59422],
  14542. [39227, 59423], [39245, 59424], [59425, 162566], [15869, 59426], 0,
  14543. [19311, 59428], [39338, 59429], [39516, 59430], [59431, 166757],
  14544. [59432, 153800], [27279, 59433], [39457, 59434], [23294, 59435],
  14545. [39471, 59436], [59437, 170225], [19344, 59438], [59439, 170312],
  14546. [39356, 59440], [19389, 59441], [19351, 59442], [37757, 59443],
  14547. [22642, 59444], [59445, 135938], [22562, 59446], [59447, 149944],
  14548. [59448, 136424], [30788, 59449], [59450, 141087], [59451, 146872],
  14549. [26821, 59452], [15741, 59453], [37976, 59454], [14631, 59455],
  14550. [24912, 59456], [59457, 141185], [59458, 141675], [24839, 59459],
  14551. [40015, 59460], [40019, 59461], [40059, 59462], [39989, 59463],
  14552. [39952, 59464], [39807, 59465], [39887, 59466], [59467, 171565],
  14553. [39839, 59468], [59469, 172533], [59470, 172286], [40225, 59471],
  14554. [19630, 59472], [59473, 147716], [40472, 59474], [19632, 59475],
  14555. [40204, 59476], [59477, 172468], [59478, 172269], [59479, 172275],
  14556. [59480, 170287], [40357, 59481], [33981, 59482], [59483, 159250],
  14557. [59484, 159711], [59485, 158594], [34300, 59486], [17715, 59487],
  14558. [59488, 159140], [59489, 159364], [59490, 159216], [33824, 59491],
  14559. [34286, 59492], [59493, 159232], [59494, 145367], [59495, 155748],
  14560. [31202, 59496], [59497, 144796], [59498, 144960], [59500, 149982],
  14561. [15714, 59501], [37851, 59502], [37566, 59503], [37704, 59504],
  14562. [59505, 131775], [30905, 59506], [37495, 59507], [37965, 59508],
  14563. [20452, 59509], [13376, 59510], [36964, 59511], [59512, 152925],
  14564. [30781, 59513], [30804, 59514], [30902, 59515], [30795, 59516],
  14565. [59517, 137047], [59518, 143817], [59519, 149825], [13978, 59520],
  14566. [20338, 59521], [28634, 59522], [28633, 59523], 0, [28702, 59524, 59525],
  14567. [21524, 59526], [59527, 147893], [22459, 59528], [22771, 59529],
  14568. [22410, 59530], [40214, 59531], [22487, 59532], [28980, 59533],
  14569. [13487, 59534], [59535, 147884], [29163, 59536], [59537, 158784],
  14570. [59538, 151447], 0, [59540, 137141], [59541, 166473], [24844, 59542],
  14571. [23246, 59543], [23051, 59544], [17084, 59545], [59546, 148616],
  14572. [14124, 59547], [19323, 59548], [59549, 166396], [37819, 59550],
  14573. [37816, 59551], [59552, 137430], [59553, 134941], [33906, 59554],
  14574. [59555, 158912], [59556, 136211], [59557, 148218], [59558, 142374],
  14575. [59559, 148417], [22932, 59560], [59561, 146871], [59562, 157505],
  14576. [32168, 59563], [59564, 155995], [59565, 155812], [59566, 149945],
  14577. [59567, 149899], [59568, 166394], [37605, 59569], [29666, 59570],
  14578. [16105, 59571], [29876, 59572], [59573, 166755], [59574, 137375],
  14579. [16097, 59575], [59576, 150195], [27352, 59577], [29683, 59578],
  14580. [29691, 59579], [16086, 59580], [59581, 150078], [59582, 150164],
  14581. [59583, 137177], [59584, 150118], [59585, 132007], [59586, 136228],
  14582. [59587, 149989], [29768, 59588], [59589, 149782], [28837, 59590],
  14583. [59591, 149878], [37508, 59592], [29670, 59593], [37727, 59594],
  14584. [59595, 132350], [37681, 59596], [59597, 166606], [59598, 166422],
  14585. [37766, 59599], [59600, 166887], [59601, 153045], [18741, 59602],
  14586. [59603, 166530], [29035, 59604], [59605, 149827], [59606, 134399],
  14587. [22180, 59607], [59608, 132634], [59609, 134123], [59610, 134328],
  14588. [21762, 59611], [31172, 59612], [59613, 137210], [32254, 59614],
  14589. [59615, 136898], [59616, 150096], [59617, 137298], [17710, 59618],
  14590. [37889, 59619], [14090, 59620], [59621, 166592], [59622, 149933],
  14591. [22960, 59623], [59624, 137407], [59625, 137347], [59626, 160900],
  14592. [23201, 59627], [14050, 59628], [59629, 146779], [14000, 59630],
  14593. [37471, 59631], [23161, 59632], [59633, 166529], [59634, 137314],
  14594. [37748, 59635], [15565, 59636], [59637, 133812], [19094, 59638],
  14595. [14730, 59639], [20724, 59640], [15721, 59641], [15692, 59642],
  14596. [59643, 136092], [29045, 59644], [17147, 59645], [59646, 164376],
  14597. [28175, 59647], [59648, 168164], [17643, 59649], [27991, 59650],
  14598. [59651, 163407], [28775, 59652], [27823, 59653], [15574, 59654],
  14599. [59655, 147437], [59656, 146989], [28162, 59657], [28428, 59658],
  14600. [15727, 59659], [59660, 132085], [30033, 59661], [14012, 59662],
  14601. [13512, 59663], [18048, 59664], [16090, 59665], [18545, 59666],
  14602. [22980, 59667], [37486, 59668], [18750, 59669], [36673, 59670],
  14603. [59671, 166940], [59672, 158656], [22546, 59673], [22472, 59674],
  14604. [14038, 59675], [59676, 136274], [28926, 59677], [59678, 148322],
  14605. [59679, 150129], [59680, 143331], [59681, 135856], [59682, 140221],
  14606. [26809, 59683], [26983, 59684], [59685, 136088], [59686, 144613],
  14607. [59687, 162804], [59688, 145119], [59689, 166531], [59690, 145366],
  14608. [59691, 144378], [59692, 150687], [27162, 59693], [59694, 145069],
  14609. [59695, 158903], [33854, 59696], [17631, 59697], [17614, 59698],
  14610. [59699, 159014], [59700, 159057], [59701, 158850], [59702, 159710], 0, 0,
  14611. [33597, 59705], [59706, 137018], [33773, 59707], [59708, 158848],
  14612. [59709, 159827], [59710, 137179], [22921, 59711], [23170, 59712],
  14613. [59713, 137139], [23137, 59714], [23153, 59715], [59716, 137477],
  14614. [59717, 147964], [14125, 59718], [23023, 59719], [59720, 137020],
  14615. [14023, 59721], [29070, 59722], [37776, 59723], [26266, 59724],
  14616. [59725, 148133], [23150, 59726], [23083, 59727], [59728, 148115],
  14617. [27179, 59729], [59730, 147193], [59731, 161590], [59732, 148571],
  14618. [59733, 148170], [28957, 59734], [59735, 148057], [59736, 166369],
  14619. [20400, 59737], [59738, 159016], [23746, 59739], [59740, 148686],
  14620. [59741, 163405], [59742, 148413], [27148, 59743], [59744, 148054],
  14621. [59745, 135940], 0, [28979, 59747], [59748, 148457], [15781, 59749],
  14622. [27871, 59750], [59751, 194597], [23019, 59754], [24412, 59757],
  14623. [59764, 144128], [31955, 59776], [59783, 162548], [59786, 153334],
  14624. [59790, 162584], [36972, 59791], [33270, 59795], [30476, 59797],
  14625. [27810, 59799], [22269, 59800], [22633, 59828], [26465, 59832],
  14626. [23646, 59838], [22770, 59841], [28857, 59843], [26627, 59853],
  14627. [36795, 59859], [36796, 59861], [20001, 59871], [31545, 59898],
  14628. [15820, 59902], [29482, 57990, 59909], [30048, 59912], [22586, 59920],
  14629. [33446, 59932], [27018, 59940], [24803, 59944], [20206, 59984],
  14630. [39364, 60002], [40639, 60023], [21249, 60025], [26528, 60038],
  14631. [24808, 60046], [20916, 60053], [31363, 60064], [39994, 60075],
  14632. [31432, 60093], [26906, 60098], [22956, 60100], [22592, 60102],
  14633. [21610, 60114], [24807, 60123], [22138, 60125], [26965, 60132],
  14634. [39983, 60133], [34725, 60134], [23584, 60141], [24075, 60143],
  14635. [26398, 60147], [33965, 60157], [35713, 60161], [20088, 60166],
  14636. [25283, 60176], [26709, 60180], 0, [33533, 60190], [35237, 60194],
  14637. [36768, 60196], [38840, 60198], [38983, 60200], [39613, 60201],
  14638. [24497, 60218], [26184, 60219], [26303, 60220], [60221, 162425], 0,
  14639. [60225, 149946], 0, 0, [60230, 131910], [26382, 60232], [26904, 60233],
  14640. [60235, 161367], [60236, 155618], [60239, 161278], [60240, 139418],
  14641. [18640, 60241], [19128, 60242], [60244, 166554], [60247, 147515],
  14642. [60250, 150085], [60251, 132554], [20946, 60252], [60253, 132625],
  14643. [22943, 60254], [60255, 138920], [15294, 60256], [60257, 146687],
  14644. [14747, 60262], [60264, 165352], [60265, 170441], [14178, 60266],
  14645. [60267, 139715], [35678, 60268], [60269, 166734], 0, [29193, 60274],
  14646. [60276, 134264], [60280, 132985], [36570, 60281], [21135, 60283],
  14647. [29041, 60285], [60288, 147274], [60289, 150183], [21948, 60290],
  14648. [60293, 158546], [13427, 60295], [60297, 161330], [18200, 60299],
  14649. [60303, 149823], [20582, 60305], [13563, 60306], [60307, 144332], 0,
  14650. [18300, 60310], [60311, 166216], [60315, 138640], 0, [60320, 162834],
  14651. [36950, 60321], [60323, 151450], [35682, 60324], [23899, 60327],
  14652. [60328, 158711], 0, [60331, 137500], [35562, 60332], [60333, 150006],
  14653. [60335, 147439], [19392, 60337], [60340, 141083], [37989, 60341],
  14654. [60342, 153569], [24981, 60343], [23079, 60344], [60345, 194765], 0,
  14655. [60348, 148769], [20074, 60350], [60351, 149812], [38486, 60352],
  14656. [28047, 60353], [60354, 158909], [35191, 60356], [60359, 156689], 0,
  14657. [31554, 60363], [60364, 168128], [60365, 133649], 0, [31301, 60369],
  14658. [39462, 60372], [13919, 60374], [60375, 156777], [60376, 131105],
  14659. [31107, 60377], [23852, 60380], [60381, 144665], 0, [18128, 60384],
  14660. [30011, 60386], [34917, 60387], [22710, 60389], [14108, 60390],
  14661. [60391, 140685], [15444, 60394], [37505, 60397], [60398, 139642],
  14662. [37680, 60400], [60402, 149968], [27705, 60403], [60406, 134904],
  14663. [34855, 60407], [35061, 60408], [60409, 141606], [60410, 164979],
  14664. [60411, 137137], [28344, 60412], [60413, 150058], [60414, 137248],
  14665. [14756, 60415], 0, 0, [17727, 60419], [26294, 60420], [60421, 171181],
  14666. [60422, 170148], [35139, 60423], [16607, 60427], [60428, 136714],
  14667. [14753, 60429], [60430, 145199], [60431, 164072], [60432, 136133],
  14668. [29101, 60433], [33638, 60434], [60436, 168360], 0, [19639, 60438],
  14669. [60439, 159919], [60440, 166315], [60445, 147834], [31555, 60446],
  14670. [31102, 60447], [28597, 60449], [60450, 172767], [27139, 60451],
  14671. [60452, 164632], [21410, 60453], [60454, 159239], [37823, 60455],
  14672. [26678, 60456], [38749, 59389, 60457], [60458, 164207], [60460, 158133],
  14673. [60461, 136173], [60462, 143919], [23941, 60464], [60465, 166960],
  14674. [22293, 60467], [38947, 60468], [60469, 166217], [23979, 60470],
  14675. [60471, 149896], [26046, 60472], [27093, 60473], [21458, 60474],
  14676. [60475, 150181], [60476, 147329], [15377, 60477], [26422, 60478],
  14677. [60482, 139169], [13770, 60490], [18682, 60493], 0, [30728, 60496],
  14678. [37461, 60497], [17394, 60499], [17375, 60501], [23032, 60505], 0,
  14679. [22155, 60518], [60520, 169449], [36882, 60541], [21953, 60546],
  14680. [17673, 60551], [32383, 60552], [28502, 60553], [27313, 60554],
  14681. [13540, 60556], [60558, 161949], [14138, 60559], 0, [60562, 163876],
  14682. [60565, 162366], [15851, 60567], [60569, 146615], [60574, 156248],
  14683. [22207, 60575], [36366, 60577], [23405, 60578], [25566, 60581], 0,
  14684. [25904, 60585], [22061, 60586], [21530, 60588], [60591, 171416],
  14685. [19581, 60592], [22050, 60593], [22046, 60594], [32585, 60595],
  14686. [22901, 60597], [60598, 146752], [34672, 60599], [33047, 60604],
  14687. [40286, 60605], [36120, 60606], [30267, 60607], [40005, 60608],
  14688. [30286, 60609], [30649, 60610], [37701, 60611], [21554, 60612],
  14689. [33096, 60613], [33527, 60614], [22053, 60615], [33074, 60616],
  14690. [33816, 60617], [32957, 60618], [21994, 60619], [31074, 60620],
  14691. [22083, 60621], [21526, 60622], [60623, 134813], [13774, 60624],
  14692. [22021, 57509, 60625], [22001, 60626], [26353, 60627], [60628, 164578],
  14693. [13869, 60629], [30004, 60630], [22000, 60631], [21946, 60632],
  14694. [21655, 60633], [21874, 60634], [60635, 134209], [60636, 134294],
  14695. [24272, 57652, 60637], [60639, 134774], [60640, 142434], [60641, 134818],
  14696. [40619, 60642], [32090, 60643], 0, [60645, 135285], [25245, 60646],
  14697. [38765, 60647], [21652, 60648], [36045, 60649], [29174, 60650],
  14698. [37238, 60651], [25596, 60652], [25529, 60653], [25598, 60654],
  14699. [21865, 60655], [60656, 142147], [40050, 60657], [60658, 143027],
  14700. [20890, 60659], [13535, 60660], [60661, 134567], [20903, 60662],
  14701. [21581, 60663], [21790, 60664], [21779, 60665], [30310, 60666],
  14702. [36397, 60667], [60668, 157834], [30129, 60669], [32950, 60670],
  14703. [34820, 60671], 0, [35015, 60673], [33206, 60674], [33820, 60675],
  14704. [17644, 60677], [29444, 60678], [33547, 60681], [22139, 60683],
  14705. [37232, 60690], [37384, 60692], [60696, 134905], [29286, 60697],
  14706. [18254, 60699], [60701, 163833], [16634, 60703], [40029, 60704],
  14707. [25887, 60705], [18675, 60707], [60708, 149472], [60709, 171388], 0,
  14708. [60713, 161187], 60715, [60716, 155720], [29091, 60718], [32398, 60719],
  14709. [40272, 60720], [13687, 60723], [27826, 60725], [21351, 60726],
  14710. [14812, 60728], [60731, 149016], [33325, 60734], [21579, 60735], 60739,
  14711. [14930, 60740], [29556, 60742], [60743, 171692], [19721, 60744],
  14712. [39917, 60745], 0, [19547, 60748], [60751, 171998], [33884, 60752],
  14713. [60754, 160434], [25390, 60757], [32037, 60758], [14890, 60761],
  14714. [36872, 60762], [21196, 60763], [15988, 60764], [13946, 60765],
  14715. [17897, 60766], [60767, 132238], [30272, 60768], [23280, 60769],
  14716. [60770, 134838], [30842, 60771], [18358, 60772], [22695, 60773],
  14717. [16575, 60774], [22140, 60775], [39819, 60776], [23924, 60777],
  14718. [30292, 60778], [60779, 173108], [40581, 60780], [19681, 60781], 0,
  14719. [14331, 60783], [24857, 60784], [60786, 148466], 60787, [22109, 60788],
  14720. [60792, 171526], [21044, 60793], [13741, 60795], 0, [40316, 60797],
  14721. [31830, 60798], [39737, 60799], [22494, 60800], [23635, 60802],
  14722. [25811, 60803], [60804, 169168], [60805, 156469], [34477, 60807],
  14723. [60808, 134440], [60811, 134513], 60812, [20990, 60813], [60814, 139023],
  14724. [23950, 60815], [38659, 60816], [60817, 138705], [40577, 60818],
  14725. [36940, 60819], [31519, 60820], [39682, 60821], [23761, 60822],
  14726. [31651, 60823], [25192, 60824], [25397, 60825], [39679, 60826],
  14727. [31695, 60827], [39722, 60828], [31870, 60829], 0, [31810, 60831],
  14728. [31878, 60832], [39957, 60833], [31740, 60834], [39689, 60835], 0, 39982,
  14729. [40794, 60839], [21875, 60840], [23491, 60841], [20477, 60842],
  14730. [40600, 60843], [20466, 60844], [21088, 60845], [21201, 60847],
  14731. [22375, 60848], [20566, 60849], [22967, 60850], [24082, 60851],
  14732. [38856, 60852], [40363, 60853], [36700, 60854], [21609, 60855],
  14733. [38836, 60856], [39232, 60857], [38842, 60858], [21292, 60859],
  14734. [24880, 60860], [26924, 60861], [21466, 60862], [39946, 60863],
  14735. [40194, 60864], [19515, 60865], [38465, 60866], [27008, 60867],
  14736. [20646, 60868], [30022, 60869], [60870, 137069], [39386, 60871],
  14737. [21107, 60872], 60873, [37209, 60874], [38529, 60875], [37212, 60876],
  14738. 60877, [37201, 60878], [60879, 167575], [25471, 60880], [27338, 60882],
  14739. [22033, 60883], [37262, 60884], [30074, 60885], [25221, 60886],
  14740. [29519, 60888], [31856, 60889], [60890, 154657], 60892, [30422, 60894],
  14741. [39837, 60895], [20010, 60896], [60897, 134356], [33726, 60898],
  14742. [34882, 60899], 60900, [23626, 60901], [27072, 60902], 0, 0,
  14743. [21023, 60905], [24053, 60906], [20174, 60907], [27697, 60908],
  14744. [60909, 131570], [20281, 60910], [21660, 60911], 0, [21146, 60913],
  14745. [36226, 60914], [13822, 60915], 0, [13811, 60917], 60918, [27474, 60919],
  14746. [37244, 60920], [40869, 60921], [39831, 60922], [38958, 60923],
  14747. [39092, 60924], [39610, 60925], [40616, 60926], [40580, 60927],
  14748. [31508, 60929], 60930, [27642, 60931], [34840, 60932], [32632, 60933],
  14749. 60934, [22048, 60935], [60936, 173642], [36471, 60937], [40787, 60938],
  14750. 60939, [36308, 60940], [36431, 60941], [40476, 60942], [36353, 60943],
  14751. [25218, 60944], [60945, 164733], [36392, 60946], [36469, 60947],
  14752. [31443, 60948], [31294, 60950], [30936, 60951], [27882, 60952],
  14753. [35431, 60953], [30215, 60954], [40742, 60956], [27854, 60957],
  14754. [34774, 60958], [30147, 60959], [60960, 172722], [30803, 60961],
  14755. [36108, 60963], [29410, 60964], [29553, 60965], [35629, 60966],
  14756. [29442, 60967], [29937, 60968], [36075, 60969], [60970, 150203],
  14757. [34351, 60971], [24506, 60972], [34976, 60973], [17591, 60974], 60975,
  14758. [60977, 159237], 60978, [35454, 60979], [60980, 140571], 60981,
  14759. [24829, 60982], [30311, 60983], [39639, 60984], [40260, 60985],
  14760. [37742, 58859, 60986], [39823, 60987], [34805, 60988], 60989, 0,
  14761. [36087, 60991], [29484, 60992], [38689, 60993], [39856, 60994],
  14762. [13782, 60995], [29362, 60996], [19463, 60997], [31825, 60998],
  14763. [39242, 60999], [24921, 61001], [19460, 61002], [40598, 61003],
  14764. [24957, 61004], 61005, [22367, 61006], [24943, 61007], [25254, 61008],
  14765. [25145, 61009], 0, [14940, 61011], [25058, 61012], [21418, 61013],
  14766. [25444, 61015], [26626, 61016], [13778, 61017], [23895, 61018],
  14767. [36826, 61020], [61021, 167481], 61022, [20697, 61023], [30982, 61025],
  14768. [21298, 61026], [38456, 61027], [61028, 134971], [16485, 61029], 61030,
  14769. [30718, 61031], 61032, [31938, 61033], [61034, 155418], [31962, 61035],
  14770. [31277, 61036], [32870, 61037], [32867, 61038], [32077, 61039],
  14771. [29957, 61040], [29938, 61041], [35220, 61042], [33306, 61043],
  14772. [26380, 61044], [32866, 61045], [61046, 160902], [32859, 61047],
  14773. [29936, 61048], [33027, 61049], [30500, 61050], [35209, 61051],
  14774. [61052, 157644], [30035, 61053], [34729, 61055], [34766, 61056],
  14775. [33224, 61057], [34700, 61058], [35401, 61059], [36013, 61060],
  14776. [35651, 61061], [30507, 61062], [29944, 61063], [34010, 61064],
  14777. [27058, 61066], [36262, 61067], 61068, [35241, 58392, 61069], 0,
  14778. [28089, 61071], [34753, 61072], [61073, 147473], [29927, 61074],
  14779. [15835, 61075], [29046, 61076], [24740, 57702, 61077], [24988, 61078],
  14780. [15569, 61079], 0, [24695, 61081], 61082, [32625, 61083], 0,
  14781. [24809, 61086], [19326, 61087], [57344, 132423], [37595, 57345],
  14782. [57346, 132575], [57347, 147397], [34124, 57348], [17077, 57349],
  14783. [29679, 57350], [20917, 57351], [13897, 57352], [57353, 149826],
  14784. [57354, 166372], [37700, 57355], [57356, 137691], [33518, 57357],
  14785. [57358, 146632], [30780, 57359], [26436, 57360], [25311, 57361],
  14786. [57362, 149811], [57363, 166314], [57364, 131744], [57365, 158643],
  14787. [57366, 135941], [20395, 57367], [57368, 140525], [20488, 57369],
  14788. [57370, 159017], [57371, 162436], [57372, 144896], [57373, 150193],
  14789. [57374, 140563], 0, [57376, 131966], [24484, 57377], [57378, 131968],
  14790. [57379, 131911], [28379, 57380], [57381, 132127], 20702, [20737, 57383],
  14791. [13434, 57384], [20750, 57385], [39020, 57386], [14147, 57387],
  14792. [33814, 57388], [57389, 149924], [57390, 132231], [20832, 57391],
  14793. [57392, 144308], [20842, 57393], [57394, 134143], [57395, 139516],
  14794. [57396, 131813], [57397, 140592], [57398, 132494], [57399, 143923],
  14795. [57400, 137603], [23426, 57401], [34685, 57402], [57403, 132531],
  14796. [57404, 146585], [20914, 57405], [20920, 57406], [40244, 57407],
  14797. [20937, 57408], [20943, 57409], [20945, 57410], [15580, 57411],
  14798. [20947, 57412], [57413, 150182], [20915, 57414], 0, 0, [20973, 57417],
  14799. [33741, 57418], [26942, 57419], [57420, 145197], [24443, 57421],
  14800. [21003, 57422], [21030, 57423], [21052, 57424], [21173, 57425],
  14801. [21079, 57426], [21140, 57427], [21177, 57428], [21189, 57429],
  14802. [31765, 57430], [34114, 57431], [21216, 57432], [34317, 57433],
  14803. [57434, 158483], 0, [57436, 166622], [21833, 57437], [28377, 57438],
  14804. [57439, 147328], [57440, 133460], [57441, 147436], [21299, 57442], 0,
  14805. [57444, 134114], [27851, 57445], [57446, 136998], [26651, 57447],
  14806. [29653, 57448], [24650, 57449], [16042, 57450], [14540, 57451],
  14807. [57452, 136936], [29149, 57453], [17570, 57454], [21357, 57455],
  14808. [21364, 57456], [57457, 165547], [21374, 57458], 0, [57460, 136598],
  14809. [57461, 136723], [30694, 57462], [21395, 57463], [57464, 166555],
  14810. [21408, 57465], [21419, 57466], [21422, 57467], [29607, 57468],
  14811. [57469, 153458], [16217, 57470], [29596, 57471], [21441, 57472],
  14812. [21445, 57473], [27721, 57474], [20041, 57475], [22526, 57476],
  14813. [21465, 57477], [15019, 57478], [57479, 134031], [21472, 57480],
  14814. [57481, 147435], [57482, 142755], [21494, 57483], [57484, 134263],
  14815. [21523, 57485], [28793, 57486], [21803, 57487], [26199, 57488],
  14816. [27995, 57489], [21613, 57490], [57491, 158547], [57492, 134516],
  14817. [21853, 57493], [21647, 57494], [21668, 57495], [18342, 57496],
  14818. [57497, 136973], [57498, 134877], [15796, 57499], [57500, 134477],
  14819. [57501, 166332], [57502, 140952], [21831, 57503], [19693, 57504],
  14820. [21551, 57505], [29719, 57506], [21894, 57507], [21929, 57508], 0,
  14821. [57510, 137431], [57511, 147514], [17746, 57512], [57513, 148533],
  14822. [26291, 57514], [57515, 135348], [22071, 57516], [26317, 57517],
  14823. [57518, 144010], [26276, 57519], 0, [22093, 57521], [22095, 57522],
  14824. [30961, 57523], [22257, 57524], [38791, 57525], [21502, 57526],
  14825. [22272, 57527], [22255, 57528], [22253, 57529], [57530, 166758],
  14826. [13859, 57531], [57532, 135759], [22342, 57533], [57534, 147877],
  14827. [27758, 57535], [28811, 57536], [22338, 57537], [14001, 57538],
  14828. [57539, 158846], [22502, 57540], [57541, 136214], [22531, 57542],
  14829. [57543, 136276], [57544, 148323], [22566, 57545], [57546, 150517], 0,
  14830. [22698, 57548], [13665, 57549], [22752, 57550], [22748, 57551],
  14831. [57552, 135740], [22779, 57553], [23551, 57554], [22339, 57555],
  14832. [57556, 172368], [57557, 148088], [37843, 57558], [13729, 57559],
  14833. [22815, 57560], [26790, 57561], [14019, 57562], [28249, 57563],
  14834. [57564, 136766], [23076, 57565], 0, [57567, 136850], [34053, 57568],
  14835. [22985, 57569], [57570, 134478], [57571, 158849], [57572, 159018],
  14836. [57573, 137180], [23001, 57574], [57575, 137211], [57576, 137138],
  14837. [57577, 159142], [28017, 57578], [57579, 137256], [57580, 136917],
  14838. [23033, 57581], [57582, 159301], [23211, 57583], [23139, 57584],
  14839. [14054, 57585], [57586, 149929], 0, [14088, 57588], [23190, 57589],
  14840. [29797, 57590], [23251, 57591], [57592, 159649], [57593, 140628],
  14841. [57595, 137489], [14130, 57596], [57597, 136888], [24195, 57598],
  14842. [21200, 57599], [23414, 57600], [25992, 57601], [23420, 57602],
  14843. [57603, 162318], [16388, 57604], [18525, 57605], [57606, 131588],
  14844. [23509, 57607], [57609, 137780], [57610, 154060], [57611, 132517],
  14845. [23539, 57612], [23453, 57613], [19728, 57614], [23557, 57615],
  14846. [57616, 138052], [23571, 57617], [29646, 57618], [23572, 57619],
  14847. [57620, 138405], [57621, 158504], [23625, 57622], [18653, 57623],
  14848. [23685, 57624], [23785, 57625], [23791, 57626], [23947, 57627],
  14849. [57628, 138745], [57629, 138807], [23824, 57630], [23832, 57631],
  14850. [23878, 57632], [57633, 138916], [23738, 57634], [24023, 57635],
  14851. [33532, 57636], [14381, 57637], [57638, 149761], [57639, 139337],
  14852. [57640, 139635], [33415, 57641], [14390, 57642], [15298, 57643],
  14853. [24110, 57644], [27274, 57645], 0, 57647, [57648, 148668], [57649, 134355],
  14854. [21414, 57650], [20151, 57651], 0, [21416, 57653], [57654, 137073],
  14855. [24073, 57655], 57656, [57657, 164994], [24313, 57658], [24315, 57659],
  14856. [14496, 57660], [24316, 57661], [26686, 57662], [37915, 57663],
  14857. [24333, 57664], [57665, 131521], [57666, 194708], [15070, 57667],
  14858. [57669, 135994], [24378, 57670], [57671, 157832], [57672, 140240],
  14859. [57674, 140401], [24419, 57675], [57677, 159342], [24434, 57678],
  14860. [37696, 57679], [57680, 166454], [24487, 57681], [23990, 57682],
  14861. [15711, 57683], [57684, 152144], [57685, 139114], [57686, 159992],
  14862. [57687, 140904], [37334, 57688], [57689, 131742], [57690, 166441],
  14863. [24625, 57691], [26245, 57692], [14691, 57694], [15815, 57695],
  14864. [13881, 57696], [22416, 57697], [57698, 141236], [31089, 57699],
  14865. [15936, 57700], [24734, 57701], 0, 0, [57704, 149890], [57705, 149903],
  14866. [57706, 162387], [29860, 57707], [20705, 57708], [23200, 57709],
  14867. [24932, 57710], [24898, 57712], [57713, 194726], [57714, 159442],
  14868. [24961, 57715], [20980, 57716], [57717, 132694], [24967, 57718],
  14869. [23466, 57719], [57720, 147383], [57721, 141407], [25043, 57722],
  14870. [57723, 166813], [57724, 170333], [25040, 57725], [14642, 57726],
  14871. [57727, 141696], [57728, 141505], [24611, 57729], [24924, 57730],
  14872. [25886, 57731], [25483, 57732], [57733, 131352], [25285, 57734],
  14873. [57735, 137072], [25301, 57736], [57737, 142861], [25452, 57738],
  14874. [57739, 149983], [14871, 57740], [25656, 57741], [25592, 57742],
  14875. [57743, 136078], [57744, 137212], [28554, 57746], [57747, 142902], 0,
  14876. [57750, 153373], [25825, 57751], [25829, 57752], [38011, 57753],
  14877. [14950, 57754], [25658, 57755], [14935, 57756], [25933, 57757],
  14878. [28438, 57758], [57759, 150056], [57760, 150051], [25989, 57761],
  14879. [25965, 57762], [25951, 57763], 0, [26037, 57765], [57766, 149824],
  14880. [19255, 57767], [26065, 57768], [16600, 57769], [57770, 137257], 57771,
  14881. [26083, 57772], [24543, 57773], [57774, 144384], [26136, 57775],
  14882. [57776, 143863], [57777, 143864], [26180, 57778], [57779, 143780],
  14883. [57780, 143781], [26187, 57781], [57782, 134773], [26215, 57783],
  14884. [57784, 152038], [26227, 57785], 0, [57788, 143921], [57789, 165364],
  14885. [57790, 143816], [57791, 152339], [30661, 57792], [57793, 141559],
  14886. [39332, 57794], [26370, 57795], [57796, 148380], [57797, 150049],
  14887. [27130, 57799], [57800, 145346], 0, [26471, 57802], [26466, 57803],
  14888. [57804, 147917], [57805, 168173], [26583, 57806], [17641, 57807],
  14889. [26658, 57808], [28240, 57809], [37436, 57810], [26625, 57811],
  14890. [57812, 144358], [57813, 159136], [26717, 57814], [57815, 144495],
  14891. [27105, 57816], [27147, 57817], [57818, 166623], [26995, 57819],
  14892. [26819, 57820], [57821, 144845], [26881, 57822], [26880, 57823],
  14893. [14849, 57825], [57826, 144956], [15232, 57827], [26540, 57828],
  14894. [26977, 57829], [57830, 166474], [17148, 57831], [26934, 57832],
  14895. [27032, 57833], [15265, 57834], [57835, 132041], [33635, 57836],
  14896. [20624, 57837], [27129, 57838], [57839, 144985], [57840, 139562],
  14897. [27205, 57841], [57842, 145155], [27293, 57843], [15347, 57844],
  14898. [26545, 57845], [27336, 57846], [57847, 168348], [15373, 57848],
  14899. [27421, 57849], [57850, 133411], [24798, 57851, 60308], [27445, 57852],
  14900. [27508, 57853], [57854, 141261], [28341, 57855], [57856, 146139], 0,
  14901. [57858, 137560], [14144, 57859], [21537, 57860], [57861, 146266],
  14902. [27617, 57862], [57863, 147196], [27612, 57864], [27703, 57865],
  14903. [57866, 140427], [57867, 149745], [57868, 158545], [27738, 57869],
  14904. [33318, 57870], [27769, 57871], [57872, 146876], [17605, 57873],
  14905. [57874, 146877], [57875, 147876], [57876, 149772], [57877, 149760],
  14906. [57878, 146633], [14053, 57879], [15595, 57880], [57881, 134450],
  14907. [39811, 57882], [57883, 143865], [57884, 140433], [32655, 57885],
  14908. [26679, 57886], [57887, 159013], [57888, 159137], [57889, 159211],
  14909. [28054, 57890], [27996, 57891], [28284, 57892], [28420, 57893],
  14910. [57894, 149887], [57895, 147589], [57896, 159346], [34099, 57897],
  14911. [57898, 159604], [20935, 57899], 0, 0, [33838, 57902], [57903, 166689], 0,
  14912. [57905, 146991], [29779, 57906], [57907, 147330], [31180, 57908],
  14913. [28239, 57909], [23185, 57910], [57911, 143435], [28664, 57912],
  14914. [14093, 57913], [28573, 57914], [57915, 146992], [28410, 57916],
  14915. [57917, 136343], [57918, 147517], [17749, 57919], [37872, 57920],
  14916. [28484, 57921], [28508, 57922], [15694, 57923], [28532, 57924],
  14917. [57925, 168304], [15675, 57926], [28575, 57927], [57928, 147780],
  14918. [28627, 57929], [57930, 147601], [57931, 147797], [57932, 147513],
  14919. [57933, 147440], [57934, 147380], [57935, 147775], [20959, 57936],
  14920. [57937, 147798], [57938, 147799], [57939, 147776], [57940, 156125],
  14921. [28747, 57941], [28798, 57942], [28839, 57943], 0, [28876, 57945],
  14922. [28885, 57946], [28886, 57947], [28895, 57948], [16644, 57949],
  14923. [15848, 57950], [29108, 57951], [29078, 57952], [57953, 148087],
  14924. [28971, 57954], [28997, 57955], [23176, 57956], [29002, 57957], 0,
  14925. [57960, 148325], [29007, 57961], [37730, 57962], [57963, 148161],
  14926. [28972, 57964], [57965, 148570], [57966, 150055], [57967, 150050],
  14927. [29114, 57968], [57969, 166888], [28861, 57970], [29198, 57971],
  14928. [37954, 57972], [29205, 57973], [22801, 57974], [37955, 57975],
  14929. [29220, 57976], [37697, 57977], [57978, 153093], [29230, 57979],
  14930. [29248, 57980], [57981, 149876], [26813, 57982], [29269, 57983],
  14931. [29271, 57984], [15957, 57985], [57986, 143428], [26637, 57987],
  14932. [28477, 57988], [29314, 57989], 0, [29483, 57991], [57992, 149539],
  14933. [57993, 165931], [18669, 57994], [57995, 165892], [29480, 57996],
  14934. [29486, 57997], [29647, 57998], [29610, 57999], [58000, 134202],
  14935. [58001, 158254], [29641, 58002], [29769, 58003], [58004, 147938],
  14936. [58005, 136935], [58006, 150052], [26147, 58007], [14021, 58008],
  14937. [58009, 149943], [58010, 149901], [58011, 150011], [29687, 58012],
  14938. [29717, 58013], [26883, 58014], [58015, 150054], [29753, 58016],
  14939. [16087, 58018], 0, [58020, 141485], [29792, 58021], [58022, 167602],
  14940. [29767, 58023], [29668, 58024], [29814, 58025], [33721, 58026],
  14941. [29804, 58027], [29812, 58029], [37873, 58030], [27180, 58031],
  14942. [29826, 58032], [18771, 58033], [58034, 150156], [58035, 147807],
  14943. [58036, 150137], [58037, 166799], [23366, 58038], [58039, 166915],
  14944. [58040, 137374], [29896, 58041], [58042, 137608], [29966, 58043],
  14945. [29982, 58045], [58046, 167641], [58047, 137803], [23511, 58048],
  14946. [58049, 167596], [37765, 58050], [30029, 58051], [30026, 58052],
  14947. [30055, 58053], [30062, 58054], [58055, 151426], [16132, 58056],
  14948. [58057, 150803], [30094, 58058], [29789, 58059], [30110, 58060],
  14949. [30132, 58061], [30210, 58062], [30252, 58063], [30289, 58064],
  14950. [30287, 58065], [30319, 58066], 58067, [58068, 156661], [30352, 58069],
  14951. [33263, 58070], [14328, 58071], [58072, 157969], [58073, 157966],
  14952. [30369, 58074], [30373, 58075], [30391, 58076], [30412, 58077],
  14953. [58078, 159647], [33890, 58079], [58080, 151709], [58081, 151933],
  14954. [58082, 138780], [30494, 58083], [30502, 58084], [30528, 58085],
  14955. [25775, 58086], [58087, 152096], [30552, 58088], [58089, 144044],
  14956. [30639, 58090], [58091, 166244], [58092, 166248], [58093, 136897],
  14957. [30708, 58094], 0, [26826, 58098], [30895, 58099], [30919, 58100],
  14958. [30931, 58101], [38565, 58102], [31022, 58103], [58104, 153056],
  14959. [30935, 58105], [31028, 58106], [30897, 58107], [58108, 161292],
  14960. [36792, 58109], [34948, 58110], [58113, 140828], [31110, 58114],
  14961. [35072, 58115], [26882, 58116], [31104, 58117], [58118, 153687],
  14962. [31133, 58119], [58120, 162617], [31036, 58121], [31145, 58122],
  14963. [28202, 58123], [58124, 160038], [16040, 58125], [31174, 58126],
  14964. [58127, 168205], [31188, 58128], 0, [21797, 62526], 0, [62528, 134210],
  14965. [62529, 134421], [62530, 151851], [21904, 62531], [62532, 142534],
  14966. [14828, 62533], [62534, 131905], [36422, 62535], [62536, 150968],
  14967. [62537, 169189], 0, [62539, 164030], [30586, 62540], [62541, 142392],
  14968. [14900, 62542], [18389, 62543], [62544, 164189], [62545, 158194],
  14969. [62546, 151018], [25821, 62547], [62548, 134524], [62549, 135092],
  14970. [62550, 134357], 0, [25741, 62552], [36478, 62553], [62554, 134806], 0,
  14971. [62556, 135012], [62557, 142505], [62558, 164438], [62559, 148691], 0,
  14972. [62561, 134470], [62562, 170573], [62563, 164073], [18420, 62564],
  14973. [62565, 151207], [62566, 142530], [39602, 62567], [14951, 62568],
  14974. [62569, 169460], [16365, 62570], [13574, 62571], [62572, 152263],
  14975. [62573, 169940], 0, [62575, 142660], [40302, 62576], [38933, 62577], 0,
  14976. [17369, 62579], 0, [25780, 62581], [21731, 62582], 0, [62584, 142282], 0,
  14977. [14843, 62586], 0, [62588, 157402], [62589, 157462], [62590, 162208],
  14978. [25834, 62591], [62592, 151634], [62593, 134211], [36456, 62594], 0,
  14979. [62596, 166732], [62597, 132913], 0, [18443, 62599], [62600, 131497],
  14980. [16378, 62601], [22643, 62602], [62603, 142733], 0, [62605, 148936],
  14981. [62606, 132348], [62607, 155799], [62608, 134988], 0, [21881, 62610], 0,
  14982. [17338, 62612], 0, [19124, 62614], [62615, 141926], [62616, 135325],
  14983. [33194, 62617], [39157, 62618], [62619, 134556], [25465, 62620],
  14984. [14846, 62621], [62622, 141173], [36288, 62623], [22177, 62624],
  14985. [25724, 62625], [15939, 62626], 0, [62628, 173569], [62629, 134665],
  14986. [62630, 142031], 0, 0, [62633, 135368], [62634, 145858], [14738, 62635],
  14987. [14854, 62636], [62637, 164507], [13688, 62638], [62639, 155209],
  14988. [62640, 139463], 0, 0, [62643, 142514], [62644, 169760], [13500, 62645],
  14989. [27709, 62646], [62647, 151099], 0, 0, [62650, 161140], [62651, 142987],
  14990. [62652, 139784], [62653, 173659], [62654, 167117], [62655, 134778],
  14991. [62656, 134196], [62683, 161337], [62684, 142286], [62687, 142417],
  14992. [14872, 62689], [62691, 135367], [62693, 173618], [62695, 167122],
  14993. [62696, 167321], [62697, 167114], [38314, 62698], 0, [62706, 161630],
  14994. [28992, 62708], 0, [20822, 62385], 0, [20616, 62487], 0, [13459, 62489],
  14995. [20870, 62491], [24130, 63037], [20997, 62495], [21031, 62436],
  14996. [21113, 62497], 0, [13651, 62504], [21442, 62505], [21343, 62715], 0,
  14997. [21823, 62520], 0, [21976, 59986], [13789, 62722], [22049, 63067], 0,
  14998. [22100, 60044], [60148, 135291], 0, [60153, 135379], 0, [61095, 135934], 0,
  14999. 0, [14265, 60104], [23745, 61099], [23829, 63066], [23894, 63030],
  15000. [14392, 63036], [20097, 62477], [24253, 63038], [14612, 63042],
  15001. [25017, 63050], [25232, 63054], [25368, 63056], [25690, 63063],
  15002. [25745, 62381], [33133, 62709], [33156, 59922], [33171, 59924],
  15003. [26624, 63080], [15292, 63093], [29327, 60517], [29389, 59781], 0,
  15004. [29497, 59785], [30018, 59811], [30172, 59817], [16320, 59818],
  15005. [60278, 151205], [16343, 59820], 0, 30336, [30348, 59824, 151388],
  15006. [16552, 59845], [30777, 59846], [16643, 59855], [31377, 59863],
  15007. [31771, 59876], [31981, 59884], [32659, 62658], [32686, 59892], 0,
  15008. [33535, 59936], [22623, 59981], [34482, 59960], 0, [34699, 59963],
  15009. [35143, 59969], 0, [35369, 59972], 0, [36465, 59988], [60484, 164233],
  15010. [36528, 59990], 0, [37214, 62443], [37260, 62441], [39182, 60051],
  15011. [39196, 60054], 0, 0, [39809, 60066], [40384, 60080], [40339, 60078],
  15012. [40620, 60085], [19857, 60540], 0, 37818, [40571, 60084], [28809, 63148],
  15013. [29512, 59788], 0, [31129, 59858], [36791, 59997], 0, [39234, 60056],
  15014. {s: 193}, 8364, {s: 4}, [12443, 63518], [12444, 63519], [11904, 63520],
  15015. {f: 5, c: 62211}, [62216, 131340], 62217, [62218, 131281], [62219, 131277],
  15016. {f: 2, c: 62220}, [62222, 131275], [62223, 139240], 62224, [62225, 131274],
  15017. {f: 4, c: 62226}, [62230, 131342], {f: 2, c: 62231}, {f: 2, c: 62776},
  15018. [62778, 138177], [62779, 194680], [12205, 38737, 62780], [62781, 131206],
  15019. [20059, 62782], [20155, 62783], [13630, 62784], [23587, 62785],
  15020. [24401, 62786], [24516, 62787], [14586, 62788], [25164, 62789],
  15021. [25909, 62790], [27514, 62791], [27701, 62792], [27706, 62793],
  15022. [28780, 62794], [29227, 62795], [20012, 62796], [29357, 62797],
  15023. [62798, 149737], [32594, 62799], [31035, 62800], [31993, 62801],
  15024. [32595, 62802], [62803, 156266], [13505, 62804], [62806, 156491],
  15025. [32770, 62807], [32896, 62808], [62809, 157202], [62810, 158033],
  15026. [21341, 62811], [34916, 62812], [35265, 62813], [62814, 161970],
  15027. [35744, 62815], [36125, 62816], [38021, 62817], [38264, 62818],
  15028. [38271, 62819], [38376, 62820], [62821, 167439], [38886, 62822],
  15029. [39029, 62823], [39118, 62824], [39134, 62825], [39267, 62826],
  15030. [62827, 170000], [40060, 62828], [40479, 62829], [40644, 62830],
  15031. [27503, 62831], [62832, 63751], [20023, 62833], [62834, 131207],
  15032. [38429, 62835], [25143, 62836], [38050, 62837], [11908, 63521],
  15033. [11910, 63522], [11911, 63523], [11912, 63524], [11914, 63525],
  15034. [11916, 63526], [11917, 63527], [11925, 63528], [11932, 63529],
  15035. [11941, 63531], [11943, 63532], [11946, 63533], [11948, 63534],
  15036. [11950, 63535], [11958, 63536], [11964, 63537], [11966, 63538],
  15037. [11978, 63540], [11980, 63541], [11981, 63542], [11983, 63543],
  15038. [11990, 63544], [11991, 63545], [11998, 63546], [62368, 172969],
  15039. [62369, 135493], [25866, 62371], [20029, 62374], [28381, 62375],
  15040. [40270, 62376], [37343, 62377], [62380, 161589], [20250, 62382],
  15041. [20264, 62383], [20392, 62384], [20852, 62386], [20892, 62387],
  15042. [20964, 62388], [21153, 62389], [21160, 62390], [21307, 62391],
  15043. [21326, 62392], [21457, 62393], [21464, 62394], [22242, 62395],
  15044. [22768, 62396], [22788, 62397], [22791, 62398], [22834, 62399],
  15045. [22836, 62400], [23398, 62401], [23454, 62402], [23455, 62403],
  15046. [23706, 62404], [24198, 62405], [24635, 62406], [25993, 62407],
  15047. [26622, 62408], [26628, 62409], [26725, 62410], [27982, 62411],
  15048. [28860, 62412], [30005, 62413], [32420, 62414], [32428, 62415],
  15049. [32442, 62416], [32455, 62417], [32463, 62418], [32479, 62419],
  15050. [32518, 62420], [32567, 62421], [33402, 62422], [33487, 62423],
  15051. [33647, 62424], [35270, 62425], [35774, 62426], [35810, 62427],
  15052. [36710, 62428], [36711, 62429], [36718, 62430], [29713, 62431],
  15053. [31996, 62432], [32205, 62433], [26950, 62434], [31433, 62435],
  15054. [30904, 62442], [32956, 62444], [36107, 62446], [33014, 62447],
  15055. [62448, 133607], [32927, 62451], [40647, 62452], [19661, 62453],
  15056. [40393, 62454], [40460, 62455], [19518, 62456], [62457, 171510],
  15057. [62458, 159758], [40458, 62459], [62460, 172339], [13761, 62461],
  15058. [28314, 62463], [33342, 62464], [29977, 62465], [18705, 62467],
  15059. [39532, 62468], [39567, 62469], [40857, 62470], [31111, 62471],
  15060. [62472, 164972], [62473, 138698], [62474, 132560], [62475, 142054],
  15061. [20004, 62476], [20096, 62478], [20103, 62479], [20159, 62480],
  15062. [20203, 62481], [20279, 62482], [13388, 62483], [20413, 62484],
  15063. [15944, 62485], [20483, 62486], [13437, 62488], [13477, 62490],
  15064. [22789, 62492], [20955, 62493], [20988, 62494], [20105, 62496],
  15065. [21136, 62498], [21287, 62499], [13767, 62500], [21417, 62501],
  15066. [13649, 62502], [21424, 62503], [21539, 62506], [13677, 62507],
  15067. [13682, 62508], [13953, 62509], [21651, 62510], [21667, 62511],
  15068. [21684, 62512], [21689, 62513], [21712, 62514], [21743, 62515],
  15069. [21784, 62516], [21795, 62517], [21800, 62518], [13720, 62519],
  15070. [13733, 62521], [13759, 62522], [21975, 62523], [13765, 62524],
  15071. [62525, 163204], [16467, 62538], [62551, 135412], [62555, 134155],
  15072. [62574, 161992], [62580, 155813], [62583, 142668], [62585, 135287],
  15073. [62587, 135279], [62595, 139681], [62609, 134550], [16571, 62611],
  15074. [62631, 142537], [22098, 62641], [62642, 134961], [62657, 157724],
  15075. [62659, 135375], [62660, 141315], [62661, 141625], [13819, 62662],
  15076. [62663, 152035], [62664, 134796], [62665, 135053], [62666, 134826],
  15077. [16275, 62667], [62668, 134960], [62669, 134471], [62670, 135503],
  15078. [62671, 134732], [62673, 134827], [62674, 134057], [62675, 134472],
  15079. [62676, 135360], [62677, 135485], [16377, 62678], [62679, 140950],
  15080. [25650, 62680], [62681, 135085], [62682, 144372], [62685, 134526],
  15081. [62686, 134527], [62688, 142421], [62690, 134808], [62692, 134958],
  15082. [62694, 158544], [21708, 62699], [33476, 62700], [21945, 62701],
  15083. [62703, 171715], [39974, 62704], [39606, 62705], [62707, 142830],
  15084. [33004, 62710], [23580, 62711], [62712, 157042], [33076, 62713],
  15085. [14231, 62714], [62716, 164029], [37302, 62717], [62718, 134906],
  15086. [62719, 134671], [62720, 134775], [62721, 134907], [62723, 151019],
  15087. [13833, 62724], [62725, 134358], [22191, 62726], [62727, 141237],
  15088. [62728, 135369], [62729, 134672], [62730, 134776], [62731, 135288],
  15089. [62732, 135496], [62733, 164359], [62734, 136277], [62735, 134777],
  15090. [62736, 151120], [62737, 142756], [23124, 62738], [62739, 135197],
  15091. [62740, 135198], [62741, 135413], [62742, 135414], [22428, 62743],
  15092. [62744, 134673], [62745, 161428], [62746, 164557], [62747, 135093],
  15093. [62748, 134779], [62749, 151934], [14083, 62750], [62751, 135094],
  15094. [62752, 135552], [62753, 152280], [62754, 172733], [62755, 149978],
  15095. [62756, 137274], [62757, 147831], [62758, 164476], [22681, 62759],
  15096. [21096, 62760], [13850, 62761], [62762, 153405], [31666, 62763],
  15097. [23400, 62764], [18432, 62765], [19244, 62766], [40743, 62767],
  15098. [18919, 62768], [39967, 62769], [39821, 62770], [62771, 154484],
  15099. [62772, 143677], [22011, 62773], [13810, 62774], [22153, 62775],
  15100. [23870, 63028], [23880, 63029], [15868, 63031], [14351, 63032],
  15101. [23972, 63033], [23993, 63034], [14368, 63035], [24357, 63039],
  15102. [24451, 63040], [14600, 63041], [14655, 63043], [14669, 63044],
  15103. [24791, 63045], [24893, 63046], [23781, 63047], [14729, 63048],
  15104. [25015, 63049], [25039, 63051], [14776, 63052], [25132, 63053],
  15105. [25317, 63055], [14840, 63057], [22193, 63058], [14851, 63059],
  15106. [25570, 63060], [25595, 63061], [25607, 63062], [14923, 63064],
  15107. [25792, 63065], [40863, 63068], [14999, 63069], [25990, 63070],
  15108. [15037, 63071], [26111, 63072], [26195, 63073], [15090, 63074],
  15109. [26258, 63075], [15138, 63076], [26390, 63077], [15170, 63078],
  15110. [26532, 63079], [15192, 63081], [26698, 63082], [26756, 63083],
  15111. [15218, 63084], [15217, 63085], [15227, 63086], [26889, 63087],
  15112. [26947, 63088], [29276, 63089], [26980, 63090], [27039, 63091],
  15113. [27013, 63092], [27094, 63094], [15325, 63095], [27237, 63096],
  15114. [27252, 63097], [27249, 63098], [27266, 63099], [15340, 63100],
  15115. [27289, 63101], [15346, 63102], [27307, 63103], [27317, 63104],
  15116. [27348, 63105], [27382, 63106], [27521, 63107], [27585, 63108],
  15117. [27626, 63109], [27765, 63110], [27818, 63111], [15563, 63112],
  15118. [27906, 63113], [27910, 63114], [27942, 63115], [28033, 63116],
  15119. [15599, 63117], [28068, 63118], [28081, 63119], [28181, 63120],
  15120. [28184, 63121], [28201, 63122], [28294, 63123], [63124, 166336],
  15121. [28347, 63125], [28386, 63126], [28378, 63127], [40831, 63128],
  15122. [28392, 63129], [28393, 63130], [28452, 63131], [28468, 63132],
  15123. [15686, 63133], [63134, 147265], [28545, 63135], [28606, 63136],
  15124. [15722, 63137], [15733, 63138], [29111, 63139], [23705, 63140],
  15125. [15754, 63141], [28716, 63142], [15761, 63143], [28752, 63144],
  15126. [28756, 63145], [28783, 63146], [28799, 63147], [63149, 131877],
  15127. [17345, 63150], [13809, 63151], [63152, 134872], [13902, 58134],
  15128. [15789, 58172], [58173, 154725], [26237, 58183], [31860, 58188],
  15129. [29837, 58197], [32402, 58215], [17667, 58232], [58260, 151480],
  15130. [58270, 133901], [58277, 158474], [13438, 58311], [58317, 143087],
  15131. [58325, 146613], [58343, 159385], [34673, 58364], [25537, 58385],
  15132. [30583, 58387], [35210, 58390], [58406, 147343], [35660, 58415],
  15133. [58440, 150729], [18730, 58464], [58471, 172052], [58472, 165564],
  15134. [58473, 165121], [15088, 58490], [28815, 58511], [58529, 140922],
  15135. [58637, 158120], [58646, 148043], [26760, 58662], [58664, 139611],
  15136. [40802, 58702], [37830, 58793], [58802, 131967], [37734, 58888],
  15137. [37519, 58901], [34324, 58954], [58986, 173147], [16784, 59010],
  15138. [26511, 59045], [26654, 59048], [14435, 59051], [59077, 149996],
  15139. [15129, 59128], [33942, 59176], [59241, 149858], [14818, 59254],
  15140. [33920, 59259], [17262, 59328], [38769, 59402], [39323, 59427],
  15141. [18733, 59499], [28439, 59703], [59704, 160009], [28838, 59746],
  15142. [59752, 150095], [32357, 59753], [23855, 59755], [15859, 59756],
  15143. [59758, 150109], [59759, 137183], [32164, 59760], [33830, 59761],
  15144. [21637, 59762], [59763, 146170], [59765, 131604], [22398, 59766],
  15145. [59767, 133333], [59768, 132633], [16357, 59769], [59770, 139166],
  15146. [59771, 172726], [28675, 59772], [59773, 168283], [23920, 59774],
  15147. [29583, 59775], [59777, 166489], [59778, 168992], [20424, 59779],
  15148. [32743, 59780], [29456, 59782], [29496, 59784], [29505, 59787],
  15149. [16041, 59789], [29173, 59792], [59793, 149746], [29665, 59794],
  15150. [16074, 59796], [16081, 59798], [29721, 59801], [29726, 59802],
  15151. [29727, 59803], [16098, 59804], [16112, 59805], [16116, 59806],
  15152. [16122, 59807], [29907, 59808], [16142, 59809], [16211, 59810],
  15153. [30061, 59812], [30066, 59813], [30093, 59814], [16252, 59815],
  15154. [30152, 59816], [30285, 59819], [30324, 59821], [16348, 59822],
  15155. [30330, 59823], [29064, 59825], [22051, 59826], [35200, 59827],
  15156. [16413, 59829], [30531, 59830], [16441, 59831], [16453, 59833],
  15157. [13787, 59834], [30616, 59835], [16490, 59836], [16495, 59837],
  15158. [30654, 59839], [30667, 59840], [30744, 59842], [30748, 59844],
  15159. [30791, 59847], [30801, 59848], [30822, 59849], [33864, 59850],
  15160. [59851, 152885], [31027, 59852], [31026, 59854], [16649, 59856],
  15161. [31121, 59857], [31238, 59860], [16743, 59862], [16818, 59864],
  15162. [31420, 59865], [33401, 59866], [16836, 59867], [31439, 59868],
  15163. [31451, 59869], [16847, 59870], [31586, 59872], [31596, 59873],
  15164. [31611, 59874], [31762, 59875], [16992, 59877], [17018, 59878],
  15165. [31867, 59879], [31900, 59880], [17036, 59881], [31928, 59882],
  15166. [17044, 59883], [36755, 59885], [28864, 59886], [59887, 134351],
  15167. [32207, 59888], [32212, 59889], [32208, 59890], [32253, 59891],
  15168. [32692, 59893], [29343, 59894], [17303, 59895], [32800, 59896],
  15169. [32805, 59897], [32814, 59899], [32817, 59900], [32852, 59901],
  15170. [22452, 59903], [28832, 59904], [32951, 59905], [33001, 59906],
  15171. [17389, 59907], [33036, 59908], [33038, 59910], [33042, 59911],
  15172. [33044, 59913], [17409, 59914], [15161, 59915], [33110, 59916],
  15173. [33113, 59917], [33114, 59918], [17427, 59919], [33148, 59921],
  15174. [17445, 59923], [17453, 59925], [33189, 59926], [22511, 59927],
  15175. [33217, 59928], [33252, 59929], [33364, 59930], [17551, 59931],
  15176. [33398, 59933], [33482, 59934], [33496, 59935], [17584, 59937],
  15177. [33623, 59938], [38505, 59939], [33797, 59941], [28917, 59942],
  15178. [33892, 59943], [33928, 59945], [17668, 59946], [33982, 59947],
  15179. [34017, 59948], [34040, 59949], [34064, 59950], [34104, 59951],
  15180. [34130, 59952], [17723, 59953], [34159, 59954], [34160, 59955],
  15181. [34272, 59956], [17783, 59957], [34418, 59958], [34450, 59959],
  15182. [34543, 59961], [38469, 59962], [17926, 59964], [17943, 59965],
  15183. [34990, 59966], [35071, 59967], [35108, 59968], [35217, 59970],
  15184. [59971, 162151], [35384, 59973], [35476, 59974], [35508, 59975],
  15185. [35921, 59976], [36052, 59977], [36082, 59978], [36124, 59979],
  15186. [18328, 59980], [36291, 59982], [18413, 59983], [36410, 59985],
  15187. [22356, 59987], [22005, 59989], [18487, 59991], [36558, 59992],
  15188. [36578, 59993], [36580, 59994], [36589, 59995], [36594, 59996],
  15189. [36801, 59998], [36810, 59999], [36812, 60000], [36915, 60001],
  15190. [18605, 60003], [39136, 60004], [37395, 60005], [18718, 60006],
  15191. [37416, 60007], [37464, 60008], [37483, 60009], [37553, 60010],
  15192. [37550, 60011], [37567, 60012], [37603, 60013], [37611, 60014],
  15193. [37619, 60015], [37620, 60016], [37629, 60017], [37699, 60018],
  15194. [37764, 60019], [37805, 60020], [18757, 60021], [18769, 60022],
  15195. [37911, 60024], [37917, 60026], [37933, 60027], [37950, 60028],
  15196. [18794, 60029], [37972, 60030], [38009, 60031], [38189, 60032],
  15197. [38306, 60033], [18855, 60034], [38388, 60035], [38451, 60036],
  15198. [18917, 60037], [18980, 60039], [38720, 60040], [18997, 60041],
  15199. [38834, 60042], [38850, 60043], [19172, 60045], [39097, 60047],
  15200. [19225, 60048], [39153, 60049], [22596, 60050], [39193, 60052],
  15201. [39223, 60055], [39261, 60057], [39266, 60058], [19312, 60059],
  15202. [39365, 60060], [19357, 60061], [39484, 60062], [39695, 60063],
  15203. [39785, 60065], [39901, 60067], [39921, 60068], [39924, 60069],
  15204. [19565, 60070], [39968, 60071], [14191, 60072], [60073, 138178],
  15205. [40265, 60074], [40702, 60076], [22096, 60077], [40381, 60079],
  15206. [40444, 60081], [38134, 60082], [36790, 60083], [40625, 60086],
  15207. [40637, 60087], [40646, 60088], [38108, 60089], [40674, 60090],
  15208. [40689, 60091], [40696, 60092], [40772, 60094], [60095, 131220],
  15209. [60096, 131767], [60097, 132000], [38083, 60099], [60101, 132311],
  15210. [38081, 60103], [60105, 132565], [60106, 132629], [60107, 132726],
  15211. [60108, 136890], [22359, 60109], [29043, 60110], [60111, 133826],
  15212. [60112, 133837], [60113, 134079], [60115, 194619], [60116, 134091],
  15213. [21662, 60117], [60118, 134139], [60119, 134203], [60120, 134227],
  15214. [60121, 134245], [60122, 134268], [60124, 134285], [60126, 134325],
  15215. [60127, 134365], [60128, 134381], [60129, 134511], [60130, 134578],
  15216. [60131, 134600], [60135, 134660], [60136, 134670], [60137, 134871],
  15217. [60138, 135056], [60139, 134957], [60140, 134771], [60142, 135100],
  15218. [60144, 135260], [60145, 135247], [60146, 135286], [60149, 135304],
  15219. [60150, 135318], [13895, 60151], [60152, 135359], [60154, 135471],
  15220. [60155, 135483], [21348, 60156], [60158, 135907], [60159, 136053],
  15221. [60160, 135990], [60162, 136567], [60163, 136729], [60164, 137155],
  15222. [60165, 137159], [28859, 60167], [60168, 137261], [60169, 137578],
  15223. [60170, 137773], [60171, 137797], [60172, 138282], [60173, 138352],
  15224. [60174, 138412], [60175, 138952], [60177, 138965], [60178, 139029],
  15225. [29080, 60179], [60181, 139333], [27113, 60182], [14024, 60183],
  15226. [60184, 139900], [60185, 140247], [60186, 140282], [60187, 141098],
  15227. [60188, 141425], [60189, 141647], [60191, 141671], [60192, 141715],
  15228. [60193, 142037], [60195, 142056], [60197, 142094], [60199, 142143],
  15229. [60202, 142412], [60204, 142472], [60205, 142519], [60206, 154600],
  15230. [60207, 142600], [60208, 142610], [60209, 142775], [60210, 142741],
  15231. [60211, 142914], [60212, 143220], [60213, 143308], [60214, 143411],
  15232. [60215, 143462], [60216, 144159], [60217, 144350], [60222, 144743],
  15233. [60223, 144883], [60227, 144922], [60228, 145174], [22709, 60231],
  15234. [60234, 146087], [60237, 146961], [60238, 147129], [60243, 147737],
  15235. [60245, 148206], [60246, 148237], [60248, 148276], [60249, 148374],
  15236. [60258, 148484], [60259, 148694], [22408, 60260], [60261, 149108],
  15237. [60263, 149295], [60271, 149522], [60272, 149755], [60273, 150037],
  15238. [60275, 150208], [22885, 60277], [60279, 151430], [60282, 151596],
  15239. [22335, 60284], [60286, 152217], [60287, 152601], [60291, 152646],
  15240. [60292, 152686], [60296, 152895], [60298, 152926], [60300, 152930],
  15241. [60301, 152934], [60302, 153543], [60304, 153693], [60309, 153859],
  15242. [60312, 154286], [60313, 154505], [60314, 154630], [22433, 60316],
  15243. [29009, 60317], [60319, 155906], [60322, 156082], [60325, 156674],
  15244. [60326, 156746], [60330, 156804], [60334, 156808], [60336, 156946],
  15245. [60338, 157119], [60339, 157365], [22201, 60347], [60349, 157436],
  15246. [13848, 60355], [60357, 157593], [60358, 157806], [60360, 157790],
  15247. [60362, 157895], [60366, 157990], [60368, 158009], [60371, 158202],
  15248. [60373, 158253], [60378, 158260], [60379, 158555], [60383, 158621],
  15249. [60385, 158884], [60388, 159150], [60392, 159819], [60393, 160205],
  15250. [60395, 160384], [60396, 160389], [60399, 160395], [60401, 160486],
  15251. [38047, 60404], [60405, 160848], [14009, 60416], [60424, 161740],
  15252. [60425, 161880], [22230, 60426], [60435, 162269], [60441, 162301],
  15253. [60442, 162314], [60443, 162571], [60444, 163174], [60448, 163849],
  15254. [60459, 163875], [60463, 163912], [60466, 163971], [60479, 163984],
  15255. [60480, 164084], [60481, 164142], [60483, 164175], [60485, 164271],
  15256. [60486, 164378], [60487, 164614], [60488, 164655], [60489, 164746],
  15257. [60491, 164968], [60492, 165546], [25574, 60494], [60495, 166230],
  15258. [60498, 166328], [60500, 166375], [60502, 166376], [60503, 166726],
  15259. [60504, 166868], [60506, 166921], [60508, 167877], [60509, 168172],
  15260. [60511, 168208], [60512, 168252], [15863, 60513], [60514, 168286],
  15261. [60515, 150218], [36816, 60516], [60519, 169191], [60521, 169392],
  15262. [60522, 169400], [60523, 169778], [60524, 170193], [60525, 170313],
  15263. [60526, 170346], [60527, 170435], [60528, 170536], [60529, 170766],
  15264. [60530, 171354], [60531, 171419], [32415, 60532], [60533, 171768],
  15265. [60534, 171811], [19620, 60535], [38215, 60536], [60537, 172691],
  15266. [29090, 60538], [60539, 172799], [60542, 173515], [19868, 60543],
  15267. [60544, 134300], [36798, 60545], [36794, 60547], [60548, 140464],
  15268. [36793, 60549], [60550, 150163], [20202, 60555], [60557, 166700],
  15269. [36480, 60560], [60561, 137205], [60563, 166764], [60564, 166809],
  15270. [60566, 157359], [60568, 161365], [60570, 153141], [60571, 153942],
  15271. [20122, 60572], [60573, 155265], [60576, 134765], [60579, 147080],
  15272. [60580, 150686], [60583, 137206], [60584, 137339], [60587, 154698],
  15273. [60589, 152337], [15814, 60590], [60596, 155352], [19996, 60600],
  15274. [60601, 135146], [60602, 134473], [60603, 145082], [60638, 151880],
  15275. [21982, 60644], [34694, 60672], [60676, 135361], [60679, 149254],
  15276. [23440, 60680], [60682, 157843], [60684, 141044], [60685, 163119],
  15277. [60686, 147875], [60687, 163187], [60688, 159440], [60689, 160438],
  15278. [60691, 135641], [60693, 146684], [60694, 173737], [60695, 134828],
  15279. [60698, 138402], [60700, 151490], [60702, 135147], [60706, 142752],
  15280. [60710, 135148], [60711, 134666], [60714, 135149], [60717, 135559],
  15281. [19994, 60721], [19972, 60722], [23309, 60724], [13996, 60727],
  15282. [21373, 60729], [13989, 60730], [22682, 60732], [60733, 150382],
  15283. [22442, 60736], [60737, 154261], [60738, 133497], [60741, 140389],
  15284. [60746, 146686], [60747, 171824], [60749, 151465], [60750, 169374],
  15285. [60753, 146870], [60755, 157619], [60756, 145184], [60759, 147191],
  15286. [60760, 146988], [60785, 143578], [60789, 135849], [22439, 60790],
  15287. [60791, 149859], [60794, 159918], [60801, 137068], [60806, 160100],
  15288. [60809, 159010], [60810, 150242], [39963, 60837], [60838, 149822],
  15289. [15878, 60846], [60881, 159011], [60887, 132092], [60891, 146685],
  15290. [60893, 149785], [22394, 60904], [21722, 60912], [29050, 60928],
  15291. [60949, 150135], [60955, 166490], [60962, 194624], [60976, 137275],
  15292. [61000, 155993], [61014, 144373], [61019, 166850], [61024, 138566],
  15293. [61054, 159441], [13877, 61065], [61084, 166701], [21024, 61088],
  15294. [15384, 61089], [61090, 146631], [61091, 155351], [61092, 161366],
  15295. [61093, 152881], [61094, 137540], [61096, 170243], [61097, 159196],
  15296. [61098, 159917], [61100, 156077], [61101, 166415], [61102, 145015],
  15297. [61103, 131310], [61104, 157766], [61105, 151310], [17762, 61106],
  15298. [23327, 61107], [61108, 156492], [40784, 61109], [40614, 61110],
  15299. [61111, 156267], [20962, 57415], [21314, 57416], [26285, 57520],
  15300. [22620, 57547], [21843, 57566], [15749, 57594], [24928, 57608],
  15301. [18606, 57668], [38845, 57676], [57693, 137335], [24755, 57703],
  15302. [33828, 57711], [38932, 57748], [57749, 147596], [57764, 143486],
  15303. [57787, 138813], [15147, 57798], [15666, 57824], [57857, 132021],
  15304. [28801, 57944], [23708, 57959], [58017, 132547], [14128, 58028],
  15305. [58096, 136054], [58097, 150034], [58111, 166699], [58112, 155779],
  15306. [256, 62233], [193, 62234], [461, 62235], [192, 62236], [274, 62237],
  15307. [201, 62238], [282, 62239], [200, 62240], [332, 62241], [211, 62242],
  15308. [465, 62243], [210, 62244], 62245, [7870, 62246], 62247, [7872, 62248],
  15309. [202, 62249], [257, 62250], [225, 62251], [462, 62252], [224, 62253],
  15310. [593, 62254], [275, 62255], [233, 62256], [283, 62257], [232, 62258],
  15311. [299, 62259], [237, 62260], [464, 62261], [236, 62262], [333, 62263],
  15312. [243, 62264], [466, 62265], [242, 62266], [363, 62267], [250, 62268],
  15313. [468, 62269], [249, 62270], [470, 62271], [472, 62272], [474, 62273],
  15314. [476, 62274], [252, 62275], 62276, [7871, 62277], 62278, [7873, 62279],
  15315. [234, 62280], [609, 62281], [643, 63551], [592, 63552], [603, 63553],
  15316. [596, 63554], [629, 63555], [339, 63556], [248, 63557], [331, 63558],
  15317. [650, 63559], [618, 63560], {f: 2, c: 62282}, [11933, 63530],
  15318. [11974, 63539], [12003, 63547], 20539, 28158, [62841, 171123], 62842,
  15319. [15817, 62843], 34959, [62845, 147790], 28791, 23797, [19232, 62848],
  15320. [62849, 152013], [13657, 62850], [62851, 154928], 24866, [62853, 166450],
  15321. 36775, 37366, 29073, 26393, 29626, [62859, 144001], [62860, 172295],
  15322. [15499, 62861], [62862, 137600], [19216, 62863], 30948, 29698, 20910,
  15323. [62867, 165647], [16393, 62868], 27235, [62870, 172730], [16931, 62871],
  15324. 34319, 31274, [62875, 170311], [62876, 166634], 38741, 28749, 21284,
  15325. [62880, 139390], 37876, 30425, [62883, 166371], 62884, 30685, 20131, 20464,
  15326. 20668, 20015, 20247, 62891, 21556, 32139, 22674, 22736, [62896, 138678],
  15327. 24210, 24217, 24514, [62900, 141074], 25995, [62902, 144377], 26905, 27203,
  15328. [62905, 146531], 27903, 29184, [62909, 148741], 29580, [16091, 62911],
  15329. [62912, 150035], 23317, 29881, 35715, [62916, 154788], [62917, 153237],
  15330. 31379, 31724, 31939, 32364, 33528, 34199, 62924, 34960, 62926, 36537,
  15331. 62928, 36815, 34143, 39392, 37409, 62933, [62934, 167353], [62935, 136255],
  15332. [16497, 62936], [17058, 62937], 23066, 39016, 26475, [17014, 62944], 22333,
  15333. 34262, [62948, 149883], 33471, [62950, 160013], [19585, 62951],
  15334. [62952, 159092], 23931, [62954, 158485], [62955, 159678], {f: 2, c: 62956},
  15335. 23446, 62959, 32347],
  15336. 'Adobe-GB1': [{f: 95, c: 32}, {f: 3, c: 12288}, [183, 12539], 713, 711, 168,
  15337. 12291, 12293, 8212, 65374, 8214, [8230, 8943], {f: 2, c: 8216},
  15338. {f: 2, c: 8220}, {f: 2, c: 12308}, {f: 8, c: 12296}, {f: 2, c: 12310},
  15339. {f: 2, c: 12304}, 177, 215, 247, 8758, {f: 2, c: 8743}, 8721, 8719, 8746,
  15340. 8745, 8712, 8759, 8730, 8869, 8741, 8736, 8978, 8857, 8747, 8750, 8801,
  15341. 8780, 8776, 8765, 8733, 8800, {f: 2, c: 8814}, {f: 2, c: 8804}, 8734, 8757,
  15342. 8756, 9794, 9792, 176, {f: 2, c: 8242}, 8451, 65284, 164, {f: 2, c: 65504},
  15343. 8240, 167, 8470, 9734, 9733, 9675, 9679, 9678, 9671, 9670, 9633, 9632,
  15344. 9651, 9650, 8251, 8594, {f: 2, c: 8592}, 8595, 12307, {f: 20, c: 9352},
  15345. {f: 20, c: 9332}, {f: 10, c: 9312}, {f: 10, c: 12832}, {f: 12, c: 8544},
  15346. {f: 3, c: 65281}, 65509, {f: 89, c: 65285}, 65507, {f: 83, c: 12353},
  15347. {f: 86, c: 12449}, {f: 17, c: 913}, {f: 7, c: 931}, {f: 17, c: 945},
  15348. {f: 7, c: 963}, {f: 7, c: 59277}, {f: 2, c: 65077}, {f: 2, c: 65081},
  15349. {f: 2, c: 65087}, {f: 2, c: 65085}, {f: 4, c: 65089}, {f: 2, c: 59284},
  15350. {f: 2, c: 65083}, {f: 2, c: 65079}, 65073, 59286, {f: 2, c: 65075},
  15351. {f: 6, c: 1040}, 1025, {f: 32, c: 1046}, 1105, {f: 26, c: 1078}, 257, 225,
  15352. 462, 224, 275, 233, 283, 232, 299, 237, 464, 236, 333, 243, 466, 242, 363,
  15353. 250, 468, 249, 470, 472, 474, 476, 252, 234, 593, 7743, 324, 328, 505, 609,
  15354. {f: 37, c: 12549}, 0, {f: 76, c: 9472}, {s: 126}, 21834, 38463, 22467,
  15355. 25384, 21710, 21769, 21696, 30353, 30284, 34108, 30702, 33406, 30861,
  15356. 29233, 38552, 38797, 27688, 23433, 20474, 25353, 26263, 23736, 33018,
  15357. 26696, 32942, 26114, 30414, 20985, 25942, 29100, 32753, 34948, 20658,
  15358. 22885, 25034, 28595, 33453, 25420, 25170, 21485, 21543, 31494,
  15359. [12043, 20843], 30116, 24052, 25300, 36299, 38774, 25226, 32793, 22365,
  15360. 38712, 32610, 29240, [12137, 30333], 26575, 30334, 25670, 20336, 36133,
  15361. 25308, 31255, 26001, 29677, 25644, 25203, 33324, 39041, 26495, 29256,
  15362. 25198, 25292, 20276, 29923, 21322, 21150, 32458, 37030, 24110, 26758,
  15363. 27036, 33152, 32465, 26834, 30917, 34444, 38225, 20621, 35876, 33502,
  15364. 32990, 21253, 35090, 21093, 34180, 38649, 20445, 22561, 39281, 23453,
  15365. 25265, 25253, 26292, 35961, 40077, 29190, 26479, 30865, 24754, 21329,
  15366. 21271, 36744, 32972, 36125, 38049, 20493, 29384, 22791, 24811, 28953,
  15367. 34987, 22868, 33519, 26412, 31528, 23849, 32503, 29997, 27893, 36454,
  15368. 36856, 36924, [12240, 40763], [12112, 27604], 37145, 31508, 24444, 30887,
  15369. 34006, 34109, 27605, 27609, 27606, 24065, 24199, 30201, 38381, 25949,
  15370. 24330, 24517, 36767, 22721, 33218, 36991, 38491, 38829, 36793, 32534,
  15371. 36140, 25153, 20415, 21464, 21342, {f: 2, c: 36776}, 36779, 36941, 26631,
  15372. 24426, 33176, 34920, 40150, 24971, 21035, 30250, 24428, 25996, 28626,
  15373. 28392, 23486, 25672, 20853, 20912, 26564, 19993, 31177, 39292, 28851,
  15374. 30149, 24182, 29627, 33760, 25773, 25320, 38069, 27874, 21338, 21187,
  15375. 25615, 38082, 31636, 20271, 24091, 33334, 33046, 33162, 28196, 27850,
  15376. 39539, 25429, [12056, 21340], 21754, 34917, 22496, 19981, 24067, 27493,
  15377. 31807, 37096, 24598, 25830, 29468, 35009, 26448, 25165, 36130, 30572,
  15378. 36393, 37319, 24425, 33756, 34081, 39184, 21442, 34453, 27531, 24813,
  15379. 24808, 28799, 33485, 33329, 20179, 27815, 34255, 25805, 31961, 27133,
  15380. 26361, 33609, 21397, 31574, 20391, 20876, 27979, 23618, 36461, 25554,
  15381. 21449, 33580, 33590, 26597, 30900, 25661, 23519, 23700, 24046, 35815,
  15382. 25286, 26612, 35962, 25600, 25530, 34633, 39307, 35863, 32544, 38130,
  15383. 20135, 38416, 39076, 26124, 29462, 22330, 23581, 24120, 38271, 20607,
  15384. 32928, [12058, 21378], 25950, 30021, 21809, 20513, 36229, 25220, 38046,
  15385. 26397, 22066, 28526, 24034, 21557, 28818, 36710, 25199, 25764, 25507,
  15386. 24443, 28552, 37108, [12162, 33251], [12192, 36784], 23576, 26216, 24561,
  15387. 27785, 38472, 36225, 34924, 25745, 31216, 22478, 27225, 25104, 21576,
  15388. 20056, 31243, 24809, 28548, 35802, 25215, 36894, 39563, 31204, 21507,
  15389. 30196, 25345, 21273, 27744, 36831, 24347, 39536, 32827, 40831, 20360,
  15390. 23610, [12186, 36196], 32709, 26021, 28861, 20805, 20914, [12173, 34411],
  15391. 23815, 23456, 25277, 37228, 30068, 36364, 31264, 24833, 31609, 20167,
  15392. 32504, 30597, 19985, 33261, 21021, 20986, 27249, 21416, 36487, 38148,
  15393. 38607, 28353, 38500, 26970, 30784, 20648, 30679, 25616, 35302, 22788,
  15394. 25571, 24029, 31359, 26941, 20256, 33337, 21912, 20018, 30126, 31383,
  15395. 24162, 24202, 38383, 21019, 21561, 28810, 25462, 38180, 22402, 26149,
  15396. 26943, 37255, 21767, 28147, 32431, 34850, 25139, 32496, 30133, 33576,
  15397. 30913, 38604, 36766, 24904, 29943, 35789, 27492, 21050, 36176, 27425,
  15398. 32874, 33905, 22257, 21254, 20174, 19995, 20945, 31895, 37259, 31751,
  15399. 20419, 36479, 31713, 31388, 25703, 23828, 20652, 33030, 30209, 31929,
  15400. 28140, 32736, 26449, 23384, [12072, 23544], 30923, 25774, 25619, 25514,
  15401. 25387, 38169, 25645, 36798, 31572, 30249, 25171, [12068, 22823], 21574,
  15402. [12109, 27513], 20643, 25140, 24102, 27526, 20195, 36151, 34955, 24453,
  15403. 36910, 24608, 32829, 25285, 20025, 21333, 37112, 25528, 32966, 26086,
  15404. 27694, 20294, 24814, 28129, 35806, 24377, 34507, 24403, 25377, 20826,
  15405. 33633, 26723, [12049, 20992], 25443, 36424, 20498, 23707, 31095, 23548,
  15406. 21040, 31291, 24764, 36947, 30423, 24503, 24471, 30340, 36460, 28783,
  15407. 30331, 31561, 30634, 20979, 37011, 22564, 20302, 28404, 36842, 25932,
  15408. 31515, 29380, 28068, 32735, 23265, 25269, 24213, 22320, 33922, 31532,
  15409. 24093, 24351, 36882, 32532, 39072, 25474, 28359, 30872, 28857, 20856,
  15410. 38747, 22443, 30005, 20291, 30008, 24215, 24806, 22880, 28096, 27583,
  15411. 30857, 21500, 38613, 20939, 20993, 25481, 21514, 38035, 35843, 36300,
  15412. 29241, 30879, 34678, 36845, 35853, 21472, 19969, 30447, 21486, 38025,
  15413. 39030, [12237, 40718], 38189, 23450, 35746, 20002, 19996, 20908, 33891,
  15414. 25026, 21160, 26635, 20375, 24683, 20923, 27934, 20828, 25238,
  15415. [12099, 26007], 38497, [12182, 35910], 36887, 30168, 37117, 30563, 27602,
  15416. 29322, 29420, 35835, 22581, 30585, 36172, 26460, 38208, 32922, 24230,
  15417. 28193, 22930, 31471, 30701, 38203, 27573, 26029, 32526, 22534, 20817,
  15418. 38431, 23545, 22697, 21544, 36466, 25958, 39039, 22244, 38045, 30462,
  15419. 36929, 25479, 21702, 22810, 22842, 22427, 36530, 26421, 36346, 33333,
  15420. 21057, 24816, 22549, 34558, 23784, 40517, 20420, 39069, 35769, 23077,
  15421. 24694, 21380, 25212, 36943, 37122, 39295, 24681, [12157, 32780],
  15422. [12041, 20799], [12159, 32819], 23572, 39285, 27953, [12038, 20108], 36144,
  15423. 21457, 32602, 31567, 20240, 20047, 38400, 27861, 29648, 34281, 24070,
  15424. 30058, 32763, 27146, 30718, 38034, 32321, 20961, 28902, 21453, 36820,
  15425. 33539, 36137, 29359, 39277, 27867, 22346, 33459, [12101, 26041], 32938,
  15426. 25151, 38450, 22952, 20223, 35775, 32442, 25918, 33778, [12206, 38750],
  15427. 21857, 39134, 32933, 21290, 35837, 21536, 32954, 24223, 27832, 36153,
  15428. 33452, 37210, 21545, 27675, 20998, 32439, 22367, 28954, 27774, 31881,
  15429. 22859, 20221, 24575, 24868, 31914, 20016, 23553, 26539, 34562, 23792,
  15430. 38155, 39118, 30127, 28925, 36898, 20911, 32541, 35773, 22857, 20964,
  15431. 20315, 21542, 22827, 25975, 32932, 23413, 25206, 25282, 36752, 24133,
  15432. 27679, 31526, 20239, 20440, 26381, 28014, 28074, 31119, 34993, 24343,
  15433. 29995, 25242, 36741, 20463, 37340, 26023, 33071, 33105, 24220, 33104,
  15434. 36212, 21103, 35206, 36171, 22797, 20613, 20184, [12201, 38428],
  15435. [12119, 29238], 33145, 36127, 23500, 35747, 38468, 22919, 32538, 21648,
  15436. 22134, 22030, 35813, 25913, 27010, 38041, 30422, 28297, [12082, 24178],
  15437. [12130, 29976], 26438, 26577, 31487, 32925, 36214, 24863, 31174, 25954,
  15438. 36195, 20872, 21018, 38050, 32568, 32923, 32434, 23703, 28207, 26464,
  15439. 31705, 30347, [12220, 39640], 33167, 32660, 31957, 25630, 38224, 31295,
  15440. 21578, 21733, 27468, 25601, [12093, 25096], 40509, 33011, 30105, 21106,
  15441. [12208, 38761], 33883, 26684, 34532, 38401, 38548, 38124, 20010, 21508,
  15442. 32473, 26681, 36319, 32789, 26356, 24218, 32697, 22466, 32831, 26775,
  15443. [12079, 24037], 25915, 21151, 24685, 40858, 20379, 36524, 20844, 23467,
  15444. [12088, 24339], 24041, 27742, 25329, 36129, 20849, 38057, 21246, 27807,
  15445. 33503, 29399, 22434, 26500, 36141, 22815, 36764, 33735, 21653, 31629,
  15446. 20272, 27837, 23396, 22993, [12238, 40723], 21476, 34506, [12219, 39592],
  15447. [12181, 35895], 32929, 25925, 39038, 22266, 38599, 21038, [12128, 29916],
  15448. 21072, 23521, 25346, 35074, 20054, 25296, 24618, 26874, 20851, 23448,
  15449. 20896, 35266, 31649, 39302, 32592, 24815, 28748, 36143, 20809,
  15450. [12084, 24191], 36891, 29808, 35268, 22317, 30789, 24402, 40863, 38394,
  15451. 36712, [12225, 39740], 35809, 30328, 26690, 26588, 36330, 36149, 21053,
  15452. 36746, 28378, 26829, 38149, 37101, 22269, 26524, 35065, 36807, 21704,
  15453. 39608, 23401, 28023, 27686, 20133, 23475, 39559, 37219, 25000, 37039,
  15454. 38889, 21547, 28085, 23506, 20989, 21898, 32597, 32752, 25788, 25421,
  15455. 26097, 25022, 24717, 28938, 27735, 27721, 22831, 26477, 33322, 22741,
  15456. 22158, 35946, 27627, 37085, 22909, 32791, 21495, 28009, 21621, 21917,
  15457. 33655, 33743, 26680, [12146, 31166], 21644, 20309, 21512, 30418, 35977,
  15458. 38402, 27827, 28088, 36203, 35088, 40548, 36154, 22079, [12234, 40657],
  15459. 30165, 24456, 29408, 24680, 21756, 20136, 27178, 34913, 24658, 36720,
  15460. 21700, 28888, 34425, 40511, 27946, 23439, 24344, 32418, 21897, 20399,
  15461. 29492, 21564, 21402, 20505, 21518, 21628, 20046, 24573, 29786, 22774,
  15462. 33899, 32993, 34676, 29392, 31946, 28246, 24359, 34382, 21804, 25252,
  15463. 20114, 27818, 25143, 33457, 21719, 21326, 29502, 28369, 30011, 21010,
  15464. 21270, 35805, 27088, 24458, 24576, 28142, 22351, 27426, 29615, 26707,
  15465. 36824, 32531, 25442, 24739, 21796, 30186, 35938, 28949, 28067, 23462,
  15466. 24187, 33618, 24908, 40644, 30970, 34647, 31783, 30343, 20976, 24822,
  15467. 29004, 26179, 24140, 24653, 35854, 28784, 25381, 36745, 24509, 24674,
  15468. 34516, 22238, 27585, 24724, 24935, 21321, 24800, 26214, 36159, 31229,
  15469. 20250, 28905, 27719, 35763, 35826, 32472, 33636, 26127, 23130, 39746,
  15470. 27985, 28151, 35905, 27963, 20249, [12117, 28779], 33719, 25110, 24785,
  15471. 38669, 36135, 31096, 20987, 22334, 22522, 26426, 30072, 31293, 31215,
  15472. 31637, 32908, 39269, 36857, 28608, 35749, 40481, 23020, 32489, 32521,
  15473. 21513, 26497, 26840, 36753, 31821, 38598, 21450, 24613, 30142, 27762,
  15474. 21363, 23241, 32423, 25380, [12047, 20960], 33034, [12080, 24049], 34015,
  15475. 25216, 20864, 23395, 20238, 31085, 21058, 24760, 27982, 23492, 23490,
  15476. 35745, 35760, 26082, 24524, 38469, 22931, 32487, 32426, 22025, 26551,
  15477. 22841, 20339, 23478, 21152, 33626, 39050, 36158, 30002, 38078, 20551,
  15478. 31292, 20215, 26550, 39550, 23233, 27516, 30417, 22362, 23574, 31546,
  15479. 38388, 29006, 20860, 32937, 33392, 22904, 32516, 33575, 26816, 26604,
  15480. 30897, 30839, 25315, 25441, 31616, 20461, 21098, 20943, 33616, 27099,
  15481. 37492, 36341, 36145, 35265, 38190, 31661, 20214, 20581, 33328, 21073,
  15482. 39279, 28176, 28293, 28071, 24314, 20725, 23004, 23558, 27974, 27743,
  15483. 30086, 33931, 26728, 22870, 35762, 21280, 37233, 38477, 34121, 26898,
  15484. 30977, 28966, 33014, 20132, 37066, 27975, 39556, 23047, 22204, 25605,
  15485. 38128, 30699, 20389, 33050, 29409, [12179, 35282], 39290, 32564, 32478,
  15486. 21119, 25945, 37237, 36735, 36739, 21483, 31382, 25581, 25509, 30342,
  15487. 31224, 34903, 38454, 25130, 21163, 33410, 26708, 26480, 25463, 30571,
  15488. 31469, 27905, 32467, 35299, 22992, 25106, 34249, 33445, 30028, 20511,
  15489. 20171, 30117, 35819, 23626, [12081, 24062], 31563, [12100, 26020],
  15490. [12198, 37329], 20170, 27941, 35167, 32039, 38182, 20165, 35880, 36827,
  15491. 38771, 26187, 31105, 36817, 28908, 28024, 23613, 21170, 33606, 20834,
  15492. 33550, 30555, 26230, 40120, 20140, 24778, 31934, 31923, 32463, 20117,
  15493. 35686, 26223, 39048, 38745, 22659, 25964, 38236, 24452, 30153, 38742,
  15494. 31455, 31454, 20928, 28847, 31384, 25578, 31350, 32416, 29590,
  15495. [12210, 38893], 20037, 28792, 20061, 37202, 21417, 25937, 26087,
  15496. [12165, 33276], 33285, 21646, 23601, 30106, 38816, 25304, 29401, 30141,
  15497. 23621, 39545, 33738, 23616, 21632, 30697, 20030, 27822, 32858, 25298,
  15498. 25454, 24040, 20855, 36317, 36382, 38191, 20465, 21477, 24807, 28844,
  15499. 21095, 25424, 40515, 23071, 20518, 30519, 21367, 32482, 25733, 25899,
  15500. 25225, 25496, 20500, 29237, 35273, 20915, 35776, 32477, 22343, 33740,
  15501. 38055, 20891, 21531, 23803, 20426, 31459, 27994, 37089, 39567, 21888,
  15502. 21654, 21345, 21679, 24320, 25577, 26999, 20975, 24936, 21002, 22570,
  15503. 21208, 22350, 30733, 30475, 24247, 24951, 31968, 25179, 25239, 20130,
  15504. 28821, 32771, 25335, 28900, 38752, 22391, 33499, 26607, 26869, 30933,
  15505. 39063, 31185, 22771, 21683, 21487, 28212, 20811, 21051, 23458, 35838,
  15506. 32943, 21827, 22438, 24691, 22353, 21549, 31354, 24656, 23380, 25511,
  15507. 25248, [12061, 21475], 25187, 23495, 26543, 21741, 31391, 33510, 37239,
  15508. 24211, 35044, 22840, 22446, 25358, 36328, 33007, 22359, 31607, 20393,
  15509. 24555, 23485, 27454, 21281, 31568, 29378, 26694, 30719, 30518, 26103,
  15510. 20917, 20111, 30420, 23743, 31397, 33909, 22862, 39745, 20608, 39304,
  15511. 24871, 28291, 22372, 26118, 25414, 22256, 25324, 25193, 24275, 38420,
  15512. 22403, 25289, 21895, 34593, 33098, 36771, 21862, 33713, 26469, 36182,
  15513. 34013, 23146, 26639, 25318, 31726, 38417, 20848, 28572, 35888, 25597,
  15514. 35272, 25042, 32518, 28866, 28389, 29701, 27028, 29436, 24266, 37070,
  15515. 26391, 28010, 25438, 21171, 29282, [12156, 32769], 20332, 23013, 37226,
  15516. 28889, 28061, 21202, 20048, 38647, 38253, 34174, 30922, 32047, 20769,
  15517. 22418, 25794, 32907, 31867, 27882, 26865, 26974, 20919, 21400, 26792,
  15518. 29313, 40654, 31729, 29432, 31163, 28435, 29702, 26446, [12197, 37324],
  15519. 40100, 31036, 33673, 33620, 21519, 26647, 20029, 21385, 21169, 30782,
  15520. 21382, 21033, 20616, 20363, 20432, 30178, [12148, 31435], 31890, 27813,
  15521. [12202, 38582], [12050, 21147], 29827, 21737, 20457, 32852, 33714, 36830,
  15522. 38256, 24265, 24604, 28063, 24088, 25947, 33080, 38142, 24651, 28860,
  15523. 32451, 31918, 20937, 26753, 31921, 33391, 20004, 36742, 37327, 26238,
  15524. 20142, 35845, 25769, 32842, 20698, 30103, 29134, 23525, 36797, 28518,
  15525. 20102, 25730, 38243, 24278, 26009, 21015, 35010, 28872, 21155, 29454,
  15526. 29747, 26519, 30967, 38678, 20020, 37051, 40158, 28107, 20955, 36161,
  15527. 21533, 25294, 29618, 33777, 38646, 40836, 38083, 20278, 32666, 20940,
  15528. 28789, 38517, 23725, 39046, 21478, 20196, 28316, 29705, 27060, 30827,
  15529. 39311, 30041, 21016, 30244, 27969, 26611, 20845, 40857, 32843, 21657,
  15530. 31548, 31423, 38534, 22404, 25314, 38471, 27004, 23044, 25602, 31699,
  15531. 28431, 38475, 33446, 21346, 39045, 24208, 28809, 25523, 21348, 34383,
  15532. 40065, 40595, 30860, 38706, 36335, 36162, [12229, 40575], 28510, 31108,
  15533. 24405, 38470, 25134, 39540, 21525, 38109, 20387, 26053, 23653, 23649,
  15534. 32533, 34385, 27695, 24459, 29575, 28388, 32511, 23782, 25371, 23402,
  15535. 28390, 21365, 20081, 25504, 30053, 25249, 36718, 20262, 20177, 27814,
  15536. 32438, 35770, 33821, 34746, 32599, 36923, 38179, 31657, 39585, 35064,
  15537. 33853, 27931, 39558, 32476, 22920, [12231, 40635], 29595, 30721, 34434,
  15538. 39532, 39554, 22043, 21527, 22475, 20080, 40614, 21334, 36808, 33033,
  15539. 30610, 39314, 34542, 28385, 34067, 26364, 24930, 28459, 35881, 33426,
  15540. 33579, 30450, 27667, 24537, 33725, 29483, 33541, 38170, [12113, 27611],
  15541. [12141, 30683], 38086, 21359, 33538, 20882, 24125, 35980, 36152, 20040,
  15542. 29611, 26522, 26757, 37238, 38665, 29028, 27809, 30473, 23186, 38209,
  15543. 27599, 32654, 26151, 23504, 22969, 23194, 38376, 38391, 20204, 33804,
  15544. 33945, 27308, 30431, 38192, 29467, 26790, 23391, 30511, 37274, 38753,
  15545. 31964, 36855, 35868, 24357, [12150, 31859], 31192, 35269, 27852, 34588,
  15546. 23494, 24130, 26825, 30496, 32501, 20885, 20813, 21193, 23081, 32517,
  15547. [12207, 38754], 33495, 25551, 30596, 34256, 31186, 28218, 24217, 22937,
  15548. 34065, 28781, 27665, 25279, [12139, 30399], 25935, 24751, 38397, 26126,
  15549. 34719, 40483, 38125, 21517, 21629, 35884, {f: 2, c: 25720}, 34321, 27169,
  15550. 33180, 30952, 25705, 39764, 25273, 26411, 33707, 22696, 40664, 27819,
  15551. 28448, 23518, 38476, 35851, 29279, 26576, 25287, 29281, 20137, 22982,
  15552. 27597, 22675, 26286, 24149, 21215, 24917, [12106, 26408], [12140, 30446],
  15553. 30566, 29287, 31302, 25343, 21738, 21584, 38048, 37027, 23068, 32435,
  15554. 27670, 20035, 22902, 32784, 22856, 21335, 30007, 38590, 22218, 25376,
  15555. 33041, 24700, 38393, 28118, 21602, 39297, 20869, 23273, 33021, 22958,
  15556. 38675, 20522, 27877, 23612, 25311, 20320, 21311, 33147, 36870, 28346,
  15557. 34091, 25288, 24180, 30910, 25781, 25467, 24565, 23064, 37247, 40479,
  15558. 23615, 25423, 32834, 23421, 21870, 38218, 38221, 28037, 24744, 26592,
  15559. 29406, 20957, 23425, 25319, 27870, [12124, 29275], 25197, 38062, 32445,
  15560. 33043, 27987, 20892, 24324, 22900, 21162, 24594, [12069, 22899], 26262,
  15561. 34384, 30111, 25386, 25062, 31983, 35834, 21734, 27431, 40485, 27572,
  15562. 34261, 21589, 20598, 27812, 21866, 36276, 29228, 24085, 24597, 29750,
  15563. 25293, 25490, 29260, 24472, 28227, 27966, 25856, 28504, 30424, 30928,
  15564. 30460, 30036, 21028, 21467, 20051, 24222, 26049, 32810, 32982, 25243,
  15565. 21638, 21032, 28846, 34957, 36305, 27873, 21624, 32986, 22521, 35060,
  15566. 36180, 38506, 37197, 20329, 27803, 21943, 30406, 30768, 25256, 28921,
  15567. 28558, 24429, 34028, 26842, 30844, 31735, 33192, 26379, 40527, 25447,
  15568. 30896, 22383, 30738, 38713, 25209, 25259, 21128, 29749, 27607, 21860,
  15569. 33086, 30130, [12138, 30382], 21305, 30174, 20731, 23617, 35692, 31687,
  15570. 20559, [12122, 29255], 39575, 39128, 28418, 29922, 31080, 25735, 30629,
  15571. 25340, 39057, 36139, 21697, 32856, 20050, 22378, 33529, 33805, 24179,
  15572. 20973, 29942, 35780, 23631, 22369, 27900, 39047, 23110, 30772, 39748,
  15573. 36843, 31893, 21078, 25169, 38138, 20166, 33670, 33889, 33769, 33970,
  15574. 22484, 26420, 22275, 26222, 28006, 35889, 26333, 28689, 26399, 27450,
  15575. 26646, 25114, 22971, 19971, 20932, 28422, 26578, 27791, 20854, 26827,
  15576. 22855, 27495, 30054, 23822, 33040, 40784, 26071, 31048, 31041, 39569,
  15577. 36215, 23682, 20062, 20225, 21551, 22865, 30732, 22120, [12115, 27668],
  15578. 36804, 24323, 27773, 27875, 35755, 25488, 24688, 27965, 29301, 25190,
  15579. 38030, 38085, 21315, 36801, 31614, 20191, 35878, 20094, 40660, 38065,
  15580. 38067, 21069, 28508, 36963, 27973, 35892, 22545, 23884, [12107, 27424],
  15581. 27465, 26538, 21595, 33108, 32652, 22681, 34103, 24378, 25250, 27207,
  15582. 38201, 25970, 24708, 26725, 30631, 20052, 20392, 24039, 38808, 25772,
  15583. 32728, 23789, 20431, 31373, 20999, 33540, 19988, 24623, 31363, 38054,
  15584. 20405, 20146, 31206, 29748, 21220, 33465, 25810, 31165, 23517, 27777,
  15585. 38738, 36731, 27682, 20542, 21375, 28165, 25806, 26228, 27696, 24773,
  15586. 39031, 35831, 24198, 29756, 31351, 31179, 19992, 37041, 29699, 27714,
  15587. 22234, 37195, 27845, 36235, 21306, 34502, 26354, 36527, 23624, 39537,
  15588. 28192, 21462, 23094, 40843, 36259, 21435, 22280, 39079, 26435, 37275,
  15589. 27849, 20840, 30154, 25331, [12125, 29356], 21048, 21149, 32570, 28820,
  15590. 30264, 21364, 40522, 27063, 30830, 38592, 35033, 32676, 28982, 29123,
  15591. 20873, 26579, 29924, 22756, 25880, 22199, 35753, 39286, 25200, 32469,
  15592. 24825, 28909, 22764, 20161, [12040, 20154], 24525, 38887, 20219, 35748,
  15593. 20995, 22922, 32427, 25172, 20173, [12103, 26085], 25102, 33592, 33993,
  15594. 33635, 34701, 29076, 28342, 23481, 32466, 20887, 25545, 26580,
  15595. [12161, 32905], 33593, 34837, 20754, 23418, 22914, 36785, 20083, 27741,
  15596. [12042, 20837], 35109, 36719, 38446, 34122, 29790, 38160, 38384, 28070,
  15597. 33509, 24369, 25746, 27922, 33832, 33134, 40131, 22622, 36187, 19977,
  15598. 21441, 20254, 25955, 26705, 21971, 20007, 25620, 39578, 25195, 23234,
  15599. 29791, [12170, 33394], 28073, 26862, 20711, 33678, 30722, 26432, 21049,
  15600. 27801, 32433, 20667, 21861, 29022, 31579, 26194, 29642, 33515, 26441,
  15601. [12077, 23665], 21024, 29053, 34923, 38378, 38485, 25797, 36193, 33203,
  15602. 21892, 27733, 25159, 32558, 22674, 20260, 21830, 36175, 26188, 19978,
  15603. 23578, 35059, 26786, 25422, 31245, 28903, 33421, 21242, 38902, 23569,
  15604. 21736, 37045, 32461, 22882, 36170, 34503, [12166, 33292], 33293, 36198,
  15605. 25668, 23556, 24913, 28041, 31038, 35774, 30775, 30003, 21627, 20280,
  15606. [12189, 36523], 28145, 23072, 32453, 31070, 27784, 23457, 23158, 29978,
  15607. 32958, 24910, 28183, 22768, [12131, 29983], 29989, 29298, 21319, 32499,
  15608. 30465, 30427, 21097, 32988, 22307, 24072, 22833, 29422, 26045, 28287,
  15609. 35799, [12075, 23608], 34417, [12055, 21313], [12143, 30707], 25342, 26102,
  15610. 20160, [12215, 39135], 34432, 23454, 35782, 21490, [12142, 30690], 20351,
  15611. 23630, 39542, 22987, 24335, [12144, 31034], [12064, 22763], 19990, 26623,
  15612. 20107, 25325, 35475, 36893, 21183, 26159, 21980, 22124, 36866, 20181,
  15613. 20365, 37322, 39280, [12114, 27663], 24066, 24643, 23460, 35270, 35797,
  15614. 25910, [12095, 25163], [12216, 39318], 23432, 23551, 25480, 21806, 21463,
  15615. 30246, 20861, 34092, 26530, 26803, 27530, 25234, 36755, 21460, 33298,
  15616. 28113, 30095, 20070, 36174, 23408, 29087, 34223, 26257, 26329, 32626,
  15617. 34560, [12233, 40653], [12239, 40736], 23646, 26415, 36848, 26641, 26463,
  15618. 25101, 31446, 22661, 24246, 25968, 28465, 24661, 21047, 32781, 25684,
  15619. 34928, 29993, 24069, 26643, 25332, 38684, 21452, 29245, 35841,
  15620. [12116, 27700], 30561, 31246, 21550, 30636, 39034, 33308, 35828, 30805,
  15621. 26388, 28865, 26031, 25749, 22070, 24605, 31169, 21496, 19997, 27515,
  15622. 32902, 23546, 21987, 22235, 20282, 20284, 39282, 24051, 26494, 32824,
  15623. 24578, 39042, 36865, 23435, 35772, 35829, 25628, 33368, 25822, 22013,
  15624. 33487, 37221, 20439, 32032, 36895, 31903, 20723, 22609, 28335, 23487,
  15625. 35785, 32899, 37240, 33948, 31639, 34429, 38539, 38543, 32485, 39635,
  15626. 30862, 23681, 31319, 36930, 38567, 31071, 23385, 25439, 31499, 34001,
  15627. 26797, 21766, 32553, 29712, 32034, 38145, 25152, 22604, 20182, 23427,
  15628. 22905, 22612, 29549, 25374, 36427, 36367, 32974, 33492, 25260, 21488,
  15629. 27888, 37214, 22826, 24577, 27760, 22349, 25674, 36138, 30251, 28393,
  15630. 22363, 27264, 30192, 28525, 35885, 35848, 22374, 27631, 34962, 30899,
  15631. 25506, 21497, 28845, 27748, 22616, 25642, 22530, 26848, 33179, 21776,
  15632. 31958, 20504, 36538, 28108, 36255, 28907, 25487, 28059, 28372, 32486,
  15633. 33796, 26691, 36867, 28120, 38518, 35752, 22871, 29305, 34276, 33150,
  15634. 30140, 35466, 26799, 21076, 36386, 38161, 25552, 39064, 36420, 21884,
  15635. 20307, 26367, 22159, 24789, 28053, 21059, 23625, 22825, 28155, 22635,
  15636. [12133, 30000], 29980, 24684, 33300, 33094, 25361, 26465, 36834, 30522,
  15637. 36339, 36148, 38081, 24086, 21381, 21548, 28867, 27712, 24311, 20572,
  15638. 20141, 24237, 25402, 33351, 36890, 26704, 37230, 30643, 21516, 38108,
  15639. 24420, 31461, 26742, 25413, 31570, 32479, 30171, 20599, 25237, 22836,
  15640. 36879, 20984, 31171, 31361, 22270, 24466, 36884, 28034, 23648,
  15641. [12063, 22303], 21520, 20820, 28237, 22242, 25512, 39059, 33151, 34581,
  15642. 35114, 36864, 21534, 23663, 33216, 25302, 25176, 33073, 40501, 38464,
  15643. 39534, 39548, 26925, 22949, 25299, 21822, 25366, 21703, 34521, 27964,
  15644. 23043, [12129, 29926], 34972, 27498, 22806, 35916, 24367, 28286, 29609,
  15645. 39037, 20024, 28919, 23436, 30871, 25405, 26202, 30358, 24779, 23451,
  15646. 23113, 19975, 33109, 27754, 29579, 20129, 26505, [12153, 32593], 24448,
  15647. 26106, 26395, 24536, 22916, 23041, 24013, 24494, 21361, 38886, 36829,
  15648. 26693, 22260, 21807, 24799, 20026, 28493, 32500, 33479, 33806, 22996,
  15649. 20255, 20266, 23614, 32428, 26410, 34074, 21619, 30031, 32963, 21890,
  15650. 39759, 20301, 28205, 35859, 23561, 24944, 21355, 30239, 28201, 34442,
  15651. [12098, 25991], 38395, 32441, 21563, 31283, 32010, 38382, 21985, 32705,
  15652. 29934, 25373, 34583, 28065, 31389, 25105, 26017, 21351, 25569, 27779,
  15653. 24043, 21596, 38056, 20044, 27745, 35820, 23627, [12102, 26080], 33436,
  15654. 26791, 21566, 21556, [12111, 27595], 27494, 20116, 25410, 21320, 33310,
  15655. 20237, 20398, 22366, 25098, 38654, 26212, 29289, 21247, 21153, 24735,
  15656. 35823, 26132, 29081, 26512, 35199, 30802, 30717, 26224, 22075, 21560,
  15657. 38177, 29306, 31232, 24687, 24076, 24713, 33181, [12067, 22805], 24796,
  15658. 29060, 28911, 28330, 27728, 29312, 27268, 34989, 24109, 20064, 23219,
  15659. 21916, 38115, 27927, 31995, 38553, 25103, 32454, 30606, 34430, 21283,
  15660. 38686, 36758, 26247, 23777, 20384, 29421, 19979, 21414, 22799, 21523,
  15661. 25472, 38184, 20808, 20185, 40092, 32420, 21688, 36132, 34900, 33335,
  15662. 38386, 28046, 24358, 23244, 26174, 38505, 29616, 29486, 21439, 33146,
  15663. 39301, 32673, 23466, 38519, 38480, 32447, 30456, 21410, 38262,
  15664. [12217, 39321], 31665, 35140, 28248, 20065, 32724, 31077, 35814, 24819,
  15665. 21709, 20139, 39033, 24055, 27233, 20687, 21521, 35937, 33831, 30813,
  15666. 38660, 21066, 21742, 22179, 38144, 28040, 23477, 28102, 26195,
  15667. [12073, 23567], 23389, 26657, 32918, 21880, 31505, 25928, 26964, 20123,
  15668. 27463, 34638, 38795, 21327, 25375, 25658, 37034, 26012, 32961, 35856,
  15669. 20889, 26800, 21368, 34809, 25032, 27844, 27899, 35874, 23633, 34218,
  15670. 33455, 38156, 27427, [12191, 36763], 26032, 24571, [12092, 24515], 20449,
  15671. 34885, 26143, 33125, 29481, 24826, 20852, 21009, 22411, 24418, 37026,
  15672. [12175, 34892], 37266, 24184, 26447, 24615, 22995, 20804, 20982, 33016,
  15673. 21256, 27769, 38596, 29066, 20241, 20462, 32670, 26429, 21957, 38152,
  15674. 31168, 34966, 32483, 22687, 25100, 38656, 34394, 22040, 39035, 24464,
  15675. 35768, 33988, 37207, 21465, 26093, 24207, 30044, 24676, 32110, 23167,
  15676. 32490, 32493, 36713, 21927, 23459, 24748, 26059, [12126, 29572], 36873,
  15677. 30307, 30505, 32474, 38772, 34203, 23398, [12147, 31348], 38634,
  15678. [12174, 34880], 21195, 29071, 24490, 26092, 35810, 23547, 39535, 24033,
  15679. 27529, 27739, 35757, 35759, 36874, 36805, 21387, 25276, 40486, 40493,
  15680. 21568, 20011, 33469, [12123, 29273], 34460, 23830, 34905, 28079, 38597,
  15681. 21713, 20122, 35766, 28937, 21693, 38409, 28895, 28153, 30416, 20005,
  15682. 30740, 34578, 23721, 24310, [12180, 35328], 39068, 38414, 28814, 27839,
  15683. 22852, 25513, 30524, 34893, 28436, 33395, 22576, 29141, 21388, 30746,
  15684. 38593, 21761, 24422, 28976, 23476, 35866, 39564, 27523, 22830, 40495,
  15685. 31207, 26472, 25196, 20335, 30113, [12154, 32650], 27915, 38451, 27687,
  15686. 20208, 30162, 20859, 26679, 28478, 36992, 33136, 22934, 29814, 25671,
  15687. 23591, 36965, 31377, 35875, 23002, 21676, 33280, 33647, 35201, 32768,
  15688. 26928, 22094, 32822, 29239, 37326, 20918, 20063, 39029, 25494, 19994,
  15689. 21494, 26355, 33099, 22812, 28082, [12032, 19968], 22777, 21307, 25558,
  15690. 38129, 20381, 20234, [12176, 34915], 39056, 22839, 36951, 31227, 20202,
  15691. 33008, 30097, 27778, 23452, 23016, 24413, 26885, 34433, 20506, 24050,
  15692. [12036, 20057], 30691, 20197, 33402, 25233, 26131, [12194, 37009], 23673,
  15693. 20159, 24441, 33222, 36920, 32900, 30123, 20134, 35028, 24847, 27589,
  15694. 24518, 20041, 30410, 28322, 35811, 35758, 35850, 35793, 24322, 32764,
  15695. 32716, 32462, 33589, 33643, 22240, 27575, [12211, 38899], 38452, 23035,
  15696. 21535, 38134, 28139, 23493, 39278, 23609, 24341, 38544, 21360, 33521,
  15697. 27185, 23156, 40560, 24212, 32552, 33721, {f: 2, c: 33828}, 33639, 34631,
  15698. 36814, 36194, 30408, 24433, 39062, 30828, 26144, 21727, 25317, 20323,
  15699. 33219, 30152, 24248, 38605, 36362, 34553, 21647, 27891, 28044, 27704,
  15700. 24703, 21191, [12132, 29992], 24189, 20248, 24736, 24551, 23588, 30001,
  15701. 37038, 38080, 29369, 27833, 28216, [12195, 37193], 26377, 21451, 21491,
  15702. 20305, 37321, 35825, [12060, 21448], 24188, 36802, 28132, 20110, 30402,
  15703. 27014, 34398, 24858, 33286, 20313, 20446, 36926, 40060, 24841, 28189,
  15704. 28180, 38533, 20104, 23089, [12204, 38632], 19982, 23679, 31161, 23431,
  15705. 35821, [12155, 32701], [12127, 29577], 22495, 33419, 37057, 21505, 36935,
  15706. 21947, 23786, 24481, 24840, 27442, 29425, 32946, 35465, 28020, 23507,
  15707. 35029, 39044, 35947, 39533, 40499, 28170, 20900, 20803, 22435, 34945,
  15708. 21407, 25588, 36757, 22253, 21592, 22278, 29503, 28304, 32536, 36828,
  15709. 33489, 24895, 24616, 38498, [12104, 26352], 32422, 36234, 36291, 38053,
  15710. 23731, 31908, [12105, 26376], 24742, 38405, 32792, 20113, 37095, 21248,
  15711. 38504, 20801, 36816, 34164, 37213, 26197, 38901, 23381, 21277, 30776,
  15712. 26434, 26685, 21705, 28798, 23472, 36733, 20877, 22312, 21681, 25874,
  15713. 26242, 36190, 36163, 33039, 33900, 36973, 31967, 20991, 34299, 26531,
  15714. 26089, 28577, 34468, 36481, 22122, 36896, 30338, 28790, 29157, 36131,
  15715. 25321, 21017, 27901, 36156, 24590, 22686, 24974, 26366, 36192, 25166,
  15716. 21939, 28195, 26413, 36711, 38113, 38392, 30504, 26629, 27048, 21643,
  15717. 20045, 28856, 35784, 25688, 25995, 23429, 31364, 20538, 23528, 30651,
  15718. 27617, 35449, 31896, 27838, 30415, 26025, 36759, 23853, 23637, 34360,
  15719. 26632, 21344, 25112, 31449, 28251, 32509, 27167, 31456, 24432, 28467,
  15720. 24352, 25484, 28072, 26454, 19976, 24080, 36134, 20183, 32960, 30260,
  15721. 38556, 25307, 26157, 25214, 27836, 36213, 29031, 32617, 20806, 32903,
  15722. 21484, 36974, 25240, 21746, 34544, 36761, 32773, 38167, 34071, 36825,
  15723. 27993, 29645, 26015, 30495, 29956, 30759, 33275, 36126, 38024, 20390,
  15724. 26517, 30137, 35786, 38663, 25391, 38215, 38453, 33976, 25379, 30529,
  15725. 24449, 29424, 20105, 24596, 25972, 25327, 27491, 25919, 24103, 30151,
  15726. 37073, 35777, 33437, 26525, [12096, 25903], 21553, 34584, 30693, 32930,
  15727. 33026, 27713, 20043, 32455, 32844, 30452, 26893, 27542, 25191, 20540,
  15728. 20356, 22336, 25351, [12108, 27490], 36286, 21482, 26088, 32440, 24535,
  15729. 25370, 25527, [12164, 33267], 33268, 32622, 24092, 23769, 21046, 26234,
  15730. 31209, 31258, 36136, 28825, 30164, 28382, 27835, 31378, 20013, 30405,
  15731. 24544, 38047, 34935, 32456, 31181, 32959, 37325, 20210, 20247,
  15732. [12168, 33311], 21608, 24030, 27954, 35788, 31909, 36724, 32920, 24090,
  15733. 21650, 30385, 23449, 26172, 39588, 29664, 26666, 34523, 26417, 29482,
  15734. 35832, 35803, 36880, [12149, 31481], 28891, 29038, 25284, 30633, 22065,
  15735. 20027, 33879, 26609, 21161, 34496, 36142, 38136, 31569, 20303, 27880,
  15736. 31069, 39547, 25235, [12118, 29226], 25341, 19987, 30742, 36716, 25776,
  15737. 36186, 31686, 26729, 24196, 35013, 22918, 25758, 22766, 29366, 26894,
  15738. 38181, 36861, 36184, 22368, 32512, 35846, 20934, 25417, 25305, 21331,
  15739. 26700, 29730, 33537, 37196, 21828, 30528, 28796, 27978, 20857, 21672,
  15740. 36164, 23039, 28363, 28100, 23388, 32043, 20180, 31869, 28371,
  15741. [12070, 23376], [12163, 33258], 28173, 23383, 39683, 26837, 36394, 23447,
  15742. 32508, 24635, 32437, 37049, [12187, 36208], 22863, 25549, 31199,
  15743. [12188, 36275], 21330, 26063, 31062, 35781, 38459, 32452, 38075, 32386,
  15744. 22068, 37257, 26368, 32618, 23562, 36981, 26152, 24038, 20304, 26590,
  15745. 20570, 20316, 22352, 24231, 20109, 19980, 20800, 19984, 24319, 21317,
  15746. 19989, 20120, 19998, [12224, 39730], 23404, 22121, [12033, 20008], 31162,
  15747. [12035, 20031], [12052, 21269], 20039, 22829, [12120, 29243], 21358, 27664,
  15748. 22239, 32996, 39319, 27603, 30590, 40727, [12034, 20022], 20127, 40720,
  15749. 20060, 20073, 20115, 33416, 23387, 21868, 22031, 20164, 21389, 21405,
  15750. 21411, 21413, 21422, 38757, 36189, [12053, 21274], 21493, 21286, 21294,
  15751. 21310, 36188, 21350, 21347, 20994, 21000, 21006, 21037, 21043,
  15752. {f: 2, c: 21055}, 21068, 21086, 21089, 21084, 33967, 21117, 21122, 21121,
  15753. 21136, 21139, [12044, 20866], 32596, 20155, 20163, 20169, 20162, 20200,
  15754. 20193, 20203, 20190, 20251, 20211, 20258, 20324, 20213, 20261, 20263,
  15755. 20233, 20267, 20318, 20327, 25912, 20314, 20317, 20319, 20311, 20274,
  15756. 20285, 20342, 20340, 20369, 20361, 20355, 20367, 20350, 20347, 20394,
  15757. 20348, 20396, 20372, 20454, 20456, 20458, 20421, 20442, 20451, 20444,
  15758. 20433, 20447, 20472, 20521, 20556, 20467, 20524, 20495, 20526, 20525,
  15759. 20478, 20508, 20492, 20517, 20520, 20606, 20547, 20565, 20552, 20558,
  15760. 20588, 20603, 20645, 20647, 20649, 20666, 20694, 20742, 20717, 20716,
  15761. 20710, 20718, 20743, 20747, 20189, 27709, 20312, 20325, 20430,
  15762. [12245, 40864], 27718, 31860, 20846, 24061, 40649, 39320, 20865, 22804,
  15763. [12051, 21241], 21261, 35335, 21264, 20971, 22809, 20821, [12039, 20128],
  15764. 20822, 20147, 34926, 34980, 20149, 33044, 35026, 31104, 23348, 34819,
  15765. 32696, [12046, 20907], 20913, 20925, 20924, 20935, [12045, 20886], 20898,
  15766. 20901, 35744, {f: 2, c: 35750}, 35754, {f: 2, c: 35764}, 35767,
  15767. {f: 2, c: 35778}, 35787, 35791, 35790, {f: 3, c: 35794}, 35798,
  15768. {f: 2, c: 35800}, 35804, {f: 2, c: 35807}, 35812, {f: 2, c: 35816}, 35822,
  15769. 35824, 35827, 35830, 35833, 35836, {f: 2, c: 35839}, 35842, 35844, 35847,
  15770. 35852, 35855, {f: 2, c: 35857}, {f: 3, c: 35860}, 35865, 35867, 35864,
  15771. 35869, {f: 3, c: 35871}, 35877, 35879, {f: 2, c: 35882}, {f: 2, c: 35886},
  15772. {f: 2, c: 35890}, {f: 2, c: 35893}, [12057, 21353], 21370, 38429, 38434,
  15773. 38433, 38449, 38442, 38461, 38460, 38466, 38473, 38484, 38495, 38503,
  15774. 38508, 38514, 38516, 38536, 38541, 38551, 38576, 37015, 37019, 37021,
  15775. 37017, 37036, 37025, 37044, 37043, 37046, 37050, 37048, 37040, 37071,
  15776. 37061, 37054, 37072, 37060, 37063, 37075, 37094, 37090, 37084, 37079,
  15777. 37083, 37099, 37103, 37118, 37124, 37154, 37150, 37155, 37169, 37167,
  15778. 37177, 37187, 37190, 21005, 22850, 21154, {f: 2, c: 21164}, 21182, 21759,
  15779. 21200, 21206, 21232, 21471, 29166, 30669, [12085, 24308], [12048, 20981],
  15780. 20988, [12223, 39727], [12059, 21430], 24321, 30042, 24047, 22348, 22441,
  15781. 22433, 22654, 22716, 22725, 22737, 22313, 22316, 22314, 22323, 22329,
  15782. {f: 2, c: 22318}, 22364, 22331, 22338, 22377, 22405, 22379, 22406, 22396,
  15783. 22395, 22376, 22381, 22390, 22387, 22445, 22436, 22412, 22450, 22479,
  15784. 22439, 22452, 22419, 22432, 22485, 22488, 22490, 22489, 22482, 22456,
  15785. 22516, 22511, 22520, 22500, 22493, 22539, 22541, 22525, 22509, 22528,
  15786. 22558, 22553, 22596, 22560, 22629, 22636, 22657, 22665, 22682, 22656,
  15787. 39336, 40729, 25087, 33401, 33405, 33407, 33423, 33418, 33448, 33412,
  15788. 33422, 33425, 33431, 33433, 33451, 33464, 33470, 33456, 33480, 33482,
  15789. 33507, 33432, 33463, 33454, {f: 2, c: 33483}, 33473, 33449, 33460, 33441,
  15790. 33450, 33439, 33476, 33486, 33444, 33505, 33545, 33527, 33508, 33551,
  15791. 33543, 33500, 33524, 33490, 33496, 33548, 33531, 33491, 33553, 33562,
  15792. 33542, {f: 2, c: 33556}, 33504, 33493, 33564, 33617, {f: 2, c: 33627},
  15793. 33544, 33682, 33596, 33588, 33585, 33691, 33630, 33583, 33615, 33607,
  15794. 33603, 33631, 33600, 33559, 33632, 33581, 33594, 33587, 33638, 33637,
  15795. 33640, 33563, 33641, 33644, 33642, {f: 2, c: 33645}, 33712, 33656,
  15796. {f: 2, c: 33715}, 33696, 33706, 33683, 33692, 33669, 33660, 33718, 33705,
  15797. 33661, 33720, 33659, 33688, 33694, 33704, 33722, 33724, 33729, 33793,
  15798. 33765, 33752, 22535, 33816, 33803, 33757, 33789, 33750, 33820, 33848,
  15799. 33809, 33798, 33748, 33759, 33807, 33795, {f: 2, c: 33784}, 33770, 33733,
  15800. 33728, 33830, 33776, 33761, 33884, 33873, 33882, 33881, 33907,
  15801. {f: 2, c: 33927}, 33914, 33929, 33912, 33852, 33862, 33897, 33910, 33932,
  15802. 33934, 33841, 33901, 33985, 33997, 34000, 34022, 33981, 34003, 33994,
  15803. 33983, 33978, 34016, 33953, 33977, 33972, 33943, 34021, 34019, 34060,
  15804. 29965, 34104, 34032, 34105, 34079, 34106, 34134, 34107, 34047, 34044,
  15805. 34137, 34120, 34152, 34148, 34142, 34170, 30626, 34115, 34162, 34171,
  15806. 34212, 34216, 34183, 34191, 34169, 34222, 34204, 34181, 34233, 34231,
  15807. 34224, 34259, 34241, 34268, 34303, 34343, 34309, 34345, 34326, 34364,
  15808. [12086, 24318], 24328, 22844, 22849, 32823, 22869, 22874, 22872, 21263,
  15809. [12074, 23586], 23589, 23596, 23604, 25164, 25194, 25247, 25275, 25290,
  15810. 25306, 25303, 25326, 25378, 25334, 25401, 25419, 25411, 25517, 25590,
  15811. 25457, 25466, 25486, 25524, 25453, 25516, 25482, 25449, 25518, 25532,
  15812. 25586, 25592, 25568, 25599, 25540, 25566, 25550, 25682, 25542, 25534,
  15813. 25669, 25665, 25611, 25627, 25632, 25612, 25638, 25633, 25694, 25732,
  15814. 25709, 25750, 25722, {f: 2, c: 25783}, 25753, 25786, 25792, 25808, 25815,
  15815. 25828, 25826, 25865, 25893, 25902, [12087, 24331], 24530, 29977, 24337,
  15816. 21343, 21489, 21501, 21481, 21480, 21499, 21522, 21526, 21510, 21579,
  15817. {f: 3, c: 21586}, 21590, 21571, 21537, 21591, 21593, 21539, 21554, 21634,
  15818. 21652, 21623, 21617, 21604, {f: 2, c: 21658}, 21636, 21622, 21606, 21661,
  15819. 21712, 21677, 21698, 21684, 21714, 21671, 21670, {f: 2, c: 21715}, 21618,
  15820. 21667, 21717, 21691, 21695, 21708, {f: 2, c: 21721}, 21724,
  15821. {f: 2, c: 21673}, 21668, 21725, 21711, 21726, 21787, 21735, 21792, 21757,
  15822. 21780, 21747, {f: 2, c: 21794}, 21775, 21777, 21799, 21802, 21863, 21903,
  15823. 21941, 21833, 21869, 21825, 21845, 21823, 21840, 21820, 21815, 21846,
  15824. {f: 3, c: 21877}, 21811, 21808, 21852, 21899, 21970, 21891, 21937, 21945,
  15825. 21896, 21889, 21919, 21886, 21974, 21905, 21883, 21983, {f: 2, c: 21949},
  15826. 21908, 21913, 21994, 22007, 21961, 22047, 21969, {f: 2, c: 21995}, 21972,
  15827. 21990, 21981, 21956, 21999, 21989, {f: 2, c: 22002}, {f: 2, c: 21964},
  15828. 21992, 22005, 21988, 36756, 22046, 22024, 22028, 22017, 22052, 22051,
  15829. 22014, 22016, 22055, 22061, 22104, 22073, 22103, 22060, 22093, 22114,
  15830. 22105, 22108, 22092, 22100, 22150, 22116, 22129, 22123, {f: 2, c: 22139},
  15831. 22149, 22163, 22191, 22228, [12062, 22231], 22237, 22241, 22261, 22251,
  15832. 22265, 22271, 22276, 22282, 22281, 22300, 24079, 24089, 24084, 24081,
  15833. 24113, {f: 2, c: 24123}, 24119, 24132, 24148, 24155, 24158, 24161, 23692,
  15834. 23674, 23693, 23696, 23702, 23688, {f: 2, c: 23704}, 23697, 23706, 23708,
  15835. 23733, 23714, 23741, 23724, 23723, 23729, 23715, 23745, 23735, 23748,
  15836. 23762, 23780, 23755, 23781, {f: 2, c: 23810}, 23847, 23846, 23854, 23844,
  15837. 23838, 23814, 23835, 23896, 23870, 23860, 23869, 23916, 23899, 23919,
  15838. 23901, 23915, 23883, 23882, 23913, 23924, 23938, 23961, 23965, 35955,
  15839. 23991, 24005, [12091, 24435], 24439, 24450, 24455, 24457, 24460, 24469,
  15840. 24473, 24476, 24488, 24493, 24501, 24508, 34914, [12090, 24417], 29357,
  15841. 29360, 29364, {f: 2, c: 29367}, 29379, 29377, 29390, 29389, 29394, 29416,
  15842. 29423, 29417, 29426, 29428, 29431, 29441, 29427, 29443, {f: 2, c: 29434},
  15843. 29463, 29459, 29473, 29450, 29470, 29469, 29461, 29474, 29497, 29477,
  15844. 29484, 29496, 29489, 29520, 29517, 29527, 29536, 29548, 29551, 29566,
  15845. [12167, 33307], 22821, 39143, 22820, [12065, 22786], 39267,
  15846. {f: 6, c: 39271}, 39284, 39287, 39293, 39296, 39300, 39303, 39306, 39309,
  15847. {f: 2, c: 39312}, {f: 3, c: 39315}, 24192, 24209, 24203, 24214, 24229,
  15848. 24224, 24249, 24245, 24254, 24243, 36179, 24274, 24273, 24283, 24296,
  15849. 24298, 33210, 24516, 24521, 24534, 24527, 24579, 24558, 24580, 24545,
  15850. 24548, 24574, {f: 2, c: 24581}, 24554, 24557, 24568, 24601, 24629, 24614,
  15851. 24603, 24591, 24589, 24617, 24619, 24586, 24639, 24609, {f: 2, c: 24696},
  15852. 24699, 24698, 24642, 24682, 24701, 24726, 24730, 24749, 24733, 24707,
  15853. 24722, 24716, 24731, 24812, 24763, 24753, 24797, 24792, 24774, 24794,
  15854. 24756, 24864, 24870, 24853, 24867, 24820, 24832, 24846, 24875, 24906,
  15855. 24949, 25004, 24980, 24999, 25015, 25044, 25077, 24541, 38579, 38377,
  15856. 38379, 38385, 38387, {f: 2, c: 38389}, 38396, 38398, {f: 2, c: 38403},
  15857. 38406, 38408, {f: 4, c: 38410}, 38415, 38418, {f: 3, c: 38421},
  15858. {f: 2, c: 38425}, 20012, [12121, 29247], 25109, 27701, 27732, 27740, 27722,
  15859. 27811, 27781, 27792, 27796, 27788, {f: 2, c: 27752}, 27764, 27766, 27782,
  15860. 27817, 27856, 27860, 27821, {f: 2, c: 27895}, 27889, 27863, 27826, 27872,
  15861. 27862, 27898, 27883, 27886, 27825, 27859, 27887, 27902, 27961, 27943,
  15862. 27916, 27971, 27976, 27911, 27908, 27929, 27918, 27947, 27981, 27950,
  15863. 27957, 27930, 27983, 27986, 27988, 27955, 28049, 28015, 28062, 28064,
  15864. 27998, {f: 2, c: 28051}, 27996, 28000, 28028, 28003, 28186, 28103, 28101,
  15865. 28126, 28174, 28095, 28128, 28177, 28134, 28125, 28121, 28182, 28075,
  15866. 28172, 28078, 28203, 28270, 28238, 28267, 28338, 28255, 28294,
  15867. {f: 2, c: 28243}, 28210, 28197, 28228, 28383, 28337, 28312, 28384, 28461,
  15868. 28386, 28325, 28327, 28349, 28347, 28343, 28375, 28340, 28367, 28303,
  15869. 28354, 28319, 28514, {f: 2, c: 28486}, 28452, 28437, 28409, 28463, 28470,
  15870. 28491, 28532, 28458, 28425, 28457, 28553, 28557, 28556, 28536, 28530,
  15871. 28540, 28538, 28625, 28617, 28583, 28601, 28598, 28610, 28641, 28654,
  15872. 28638, 28640, 28655, 28698, 28707, 28699, 28729, 28725, 28751, 28766,
  15873. [12071, 23424], 23428, 23445, 23443, 23461, 23480, 29999, 39582, 25652,
  15874. 23524, 23534, 35120, 23536, 36423, 35591, 36790, 36819, 36821, 36837,
  15875. 36846, 36836, 36841, 36838, 36851, 36840, 36869, 36868, 36875, 36902,
  15876. 36881, 36877, 36886, 36897, {f: 2, c: 36917}, 36909, 36911, 36932,
  15877. {f: 2, c: 36945}, 36944, 36968, 36952, 36962, 36955, 26297, 36980, 36989,
  15878. 36994, 37000, 36995, 37003, [12089, 24400], 24407, 24406, 24408, 23611,
  15879. 21675, 23632, 23641, 23409, 23651, 23654, 32700, 24362, 24361, 24365,
  15880. 33396, 24380, 39739, [12076, 23662], 22913, 22915, 22925, {f: 2, c: 22953},
  15881. 22947, 22935, 22986, 22955, 22942, 22948, 22994, 22962, 22959, 22999,
  15882. 22974, {f: 2, c: 23045}, 23005, 23048, 23011, 23000, 23033, 23052, 23049,
  15883. 23090, 23092, 23057, 23075, 23059, 23104, 23143, 23114, 23125, 23100,
  15884. 23138, 23157, 33004, 23210, 23195, 23159, 23162, 23230, 23275, 23218,
  15885. 23250, 23252, 23224, 23264, 23267, 23281, 23254, 23270, 23256, 23260,
  15886. 23305, 23319, 23318, 23346, 23351, 23360, 23573, 23580, 23386, 23397,
  15887. 23411, 23377, 23379, 23394, 39541, {f: 2, c: 39543}, 39546, 39551, 39549,
  15888. {f: 2, c: 39552}, 39557, 39560, 39562, 39568, {f: 2, c: 39570}, 39574,
  15889. 39576, {f: 3, c: 39579}, {f: 2, c: 39583}, {f: 2, c: 39586}, 39589, 39591,
  15890. 32415, 32417, 32419, 32421, {f: 2, c: 32424}, 32429, 32432, 32446,
  15891. {f: 3, c: 32448}, 32457, {f: 2, c: 32459}, 32464, 32468, 32471, 32475,
  15892. {f: 2, c: 32480}, 32488, 32491, {f: 2, c: 32494}, {f: 2, c: 32497}, 32525,
  15893. 32502, {f: 2, c: 32506}, 32510, {f: 3, c: 32513}, {f: 2, c: 32519},
  15894. {f: 2, c: 32523}, 32527, {f: 2, c: 32529}, 32535, 32537, 32540, 32539,
  15895. 32543, {f: 7, c: 32545}, {f: 4, c: 32554}, {f: 5, c: 32559}, 32565,
  15896. [12083, 24186], 30079, [12078, 24027], 30014, 37013, 29582, 29585, 29614,
  15897. 29602, 29599, 29647, 29634, 29649, 29623, 29619, 29632, 29641, 29640,
  15898. 29669, 29657, 39036, 29706, 29673, 29671, 29662, 29626, 29682, 29711,
  15899. 29738, 29787, 29734, 29733, 29736, 29744, 29742, 29740, 29723, 29722,
  15900. 29761, 29788, 29783, 29781, 29785, 29815, 29805, 29822, 29852, 29838,
  15901. {f: 2, c: 29824}, 29831, 29835, 29854, {f: 2, c: 29864}, 29840, 29863,
  15902. 29906, 29882, {f: 3, c: 38890}, 26444, 26451, 26462, 26440, 26473, 26533,
  15903. 26503, 26474, 26483, 26520, 26535, 26485, 26536, 26526, 26541, 26507,
  15904. 26487, 26492, 26608, 26633, 26584, 26634, 26601, 26544, 26636, 26585,
  15905. 26549, 26586, 26547, 26589, 26624, 26563, 26552, 26594, 26638, 26561,
  15906. 26621, {f: 2, c: 26674}, {f: 2, c: 26720}, 26702, 26722, 26692, 26724,
  15907. 26755, 26653, 26709, 26726, 26689, 26727, 26688, 26686, 26698, 26697,
  15908. 26665, 26805, 26767, 26740, 26743, 26771, 26731, 26818, 26990, 26876,
  15909. {f: 2, c: 26911}, 26873, 26916, 26864, 26891, 26881, 26967, 26851, 26896,
  15910. 26993, 26937, 26976, 26946, 26973, 27012, 26987, 27008, 27032, 27000,
  15911. 26932, 27084, {f: 2, c: 27015}, 27086, 27017, 26982, 26979, 27001, 27035,
  15912. 27047, 27067, 27051, 27053, 27092, 27057, 27073, 27082, 27103, 27029,
  15913. 27104, 27021, 27135, 27183, 27117, {f: 2, c: 27159}, 27237, 27122, 27204,
  15914. 27198, 27296, 27216, 27227, 27189, 27278, 27257, 27197, 27176, 27224,
  15915. 27260, 27281, 27280, 27305, 27287, 27307, 29495, 29522, {f: 2, c: 27521},
  15916. 27527, 27524, {f: 2, c: 27538}, 27533, {f: 2, c: 27546}, 27553, 27562,
  15917. 36715, 36717, {f: 3, c: 36721}, {f: 2, c: 36725}, 36728, 36727,
  15918. {f: 2, c: 36729}, 36732, 36734, {f: 2, c: 36737}, 36740, 36743, 36747,
  15919. {f: 3, c: 36749}, 36760, 36762, 36558, 25099, 25111, 25115, 25119, 25122,
  15920. 25121, 25125, 25124, 25132, 33255, 29935, 29940, 29951, 29967, 29969,
  15921. 29971, [12097, 25908], {f: 3, c: 26094}, 26122, 26137, 26482, 26115, 26133,
  15922. 26112, 28805, 26359, 26141, 26164, 26161, 26166, 26165, 32774, 26207,
  15923. 26196, 26177, 26191, 26198, 26209, 26199, 26231, 26244, 26252, 26279,
  15924. 26269, 26302, {f: 2, c: 26331}, 26342, 26345, {f: 2, c: 36146}, 36150,
  15925. 36155, 36157, 36160, {f: 2, c: 36165}, {f: 2, c: 36168}, 36167, 36173,
  15926. 36181, 36185, 35271, {f: 3, c: 35274}, {f: 4, c: 35278}, 29294, 29343,
  15927. 29277, 29286, 29295, {f: 2, c: 29310}, 29316, 29323, 29325, 29327, 29330,
  15928. 25352, 25394, 25520, 25663, 25816, 32772, 27626, 27635, 27645, 27637,
  15929. 27641, 27653, 27655, 27654, 27661, 27669, {f: 3, c: 27672}, 27681, 27689,
  15930. 27684, 27690, 27698, 25909, 25941, 25963, 29261, 29266, 29270, 29232,
  15931. 34402, 21014, 32927, 32924, 32915, 32956, 26378, 32957, 32945, 32939,
  15932. 32941, 32948, 32951, {f: 4, c: 32999}, 32987, 32962, 32964, 32985, 32973,
  15933. 32983, 26384, 32989, 33003, 33009, 33012, 33005, {f: 2, c: 33037}, 33010,
  15934. 33020, 26389, 33042, 35930, 33078, 33054, 33068, 33048, 33074, 33096,
  15935. 33100, 33107, 33140, {f: 2, c: 33113}, 33137, 33120, 33129,
  15936. {f: 2, c: 33148}, 33133, 33127, 22605, 23221, 33160, 33154, 33169, 28373,
  15937. 33187, 33194, 33228, 26406, 33226, 33211, 33217, 33190, 27428, 27447,
  15938. 27449, 27459, 27462, 27481, {f: 3, c: 39121}, 39125, {f: 2, c: 39129},
  15939. [12110, 27571], 24384, 27586, 35315, 26000, 40785, 26003, 26044, 26054,
  15940. 26052, 26051, 26060, 26062, 26066, 26070, 28800, 28828, 28822, 28829,
  15941. 28859, 28864, 28855, 28843, 28849, 28904, 28874, 28944, 28947, 28950,
  15942. 28975, 28977, 29043, 29020, 29032, 28997, 29042, 29002, 29048, 29050,
  15943. 29080, 29107, 29109, 29096, 29088, 29152, 29140, 29159, 29177, 29213,
  15944. 29224, 28780, 28952, 29030, 29113, 25150, 25149, 25155, {f: 2, c: 25160},
  15945. 31035, 31040, 31046, 31049, {f: 2, c: 31067}, 31059, 31066, 31074, 31063,
  15946. 31072, 31087, 31079, 31098, 31109, 31114, 31130, 31143, 31155, 24529,
  15947. 24528, 24636, 24669, 24666, 24679, 24641, 24665, 24675, 24747, 24838,
  15948. 24845, 24925, 25001, 24989, 25035, 25041, 25094, 32896, [12160, 32895],
  15949. 27795, 27894, 28156, 30710, 30712, 30720, 30729, {f: 2, c: 30743}, 30737,
  15950. 26027, 30765, {f: 2, c: 30748}, {f: 3, c: 30777}, 30751, 30780, 30757,
  15951. 30764, 30755, 30761, 30798, 30829, {f: 2, c: 30806}, 30758, 30800, 30791,
  15952. 30796, 30826, 30875, 30867, 30874, 30855, 30876, 30881, 30883, 30898,
  15953. 30905, 30885, 30932, 30937, 30921, 30956, 30962, 30981, 30964, 30995,
  15954. 31012, 31006, 31028, 40859, [12235, 40697], {f: 2, c: 40699}, 30449, 30468,
  15955. 30477, 30457, {f: 2, c: 30471}, 30490, 30498, 30489, 30509, 30502, 30517,
  15956. 30520, {f: 2, c: 30544}, 30535, 30531, 30554, 30568, 30562, 30565, 30591,
  15957. 30605, 30589, 30592, 30604, 30609, {f: 2, c: 30623}, 30640, 30645, 30653,
  15958. 30010, 30016, 30030, 30027, 30024, 30043, 30066, 30073, 30083, 32600,
  15959. 32609, 32607, 35400, 32616, 32628, 32625, 32633, 32641, 32638, 30413,
  15960. 30437, 34866, {f: 3, c: 38021}, 38027, 38026, {f: 2, c: 38028},
  15961. {f: 2, c: 38031}, 38036, 38039, 38037, {f: 3, c: 38042}, {f: 2, c: 38051},
  15962. 38059, 38058, 38061, 38060, {f: 2, c: 38063}, 38066, 38068,
  15963. {f: 5, c: 38070}, {f: 2, c: 38076}, 38079, 38084, {f: 7, c: 38088},
  15964. {f: 3, c: 38096}, {f: 3, c: 38101}, 38105, 38104, 38107, {f: 3, c: 38110},
  15965. 38114, {f: 2, c: 38116}, {f: 2, c: 38119}, 38122, 38121, 38123,
  15966. {f: 2, c: 38126}, {f: 3, c: 38131}, 38135, 38137, {f: 2, c: 38140}, 38143,
  15967. 38147, 38146, {f: 2, c: 38150}, {f: 2, c: 38153}, {f: 3, c: 38157},
  15968. {f: 5, c: 38162}, 38168, 38171, {f: 3, c: 38173}, 38178, {f: 2, c: 38186},
  15969. 38185, 38188, {f: 2, c: 38193}, 38196, {f: 3, c: 38198}, 38204,
  15970. {f: 2, c: 38206}, 38210, 38197, {f: 3, c: 38212}, 38217, 38220,
  15971. {f: 2, c: 38222}, {f: 3, c: 38226}, {f: 4, c: 38230}, 38235,
  15972. {f: 2, c: 38238}, 38237, {f: 2, c: 38241}, {f: 9, c: 38244}, 38255,
  15973. {f: 3, c: 38257}, 38202, 30695, 30700, 38601, 31189, 31213, 31203, 31211,
  15974. 31238, 23879, 31235, 31234, 31262, 31252, 31289, 31287, 31313, 40655,
  15975. 39333, 31344, 30344, 30350, 30355, 30361, 30372, 29918, 29920, 29996,
  15976. 40480, 40482, {f: 5, c: 40488}, 40498, 40497, 40502, 40504, 40503,
  15977. {f: 2, c: 40505}, 40510, {f: 2, c: 40513}, 40516, {f: 4, c: 40518},
  15978. {f: 2, c: 40523}, 40526, 40529, 40533, 40535, {f: 3, c: 40538}, 40542,
  15979. 40547, {f: 7, c: 40550}, 40561, 40557, 40563, [12135, 30098], 30100, 30102,
  15980. 30112, 30109, 30124, 30115, {f: 2, c: 30131}, 30136, 30148, 30129, 30128,
  15981. 30147, 30146, 30166, 30157, 30179, 30184, 30182, 30180, 30187, 30183,
  15982. 30211, 30193, 30204, 30207, 30224, 30208, 30213, 30220, 30231, 30218,
  15983. 30245, 30232, 30229, 30233, 30235, 30268, 30242, 30240, 30272, 30253,
  15984. 30256, 30271, 30261, 30275, 30270, 30259, 30285, 30302, 30292, 30300,
  15985. 30294, 30315, 30319, 32714, 31462, {f: 2, c: 31352}, 31360, 31366, 31368,
  15986. 31381, 31398, 31392, 31404, 31400, 31405, 31411, 34916, 34921, 34930,
  15987. 34941, 34943, 34946, 34978, 35014, 34999, 35004, 35017, 35042, 35022,
  15988. 35043, 35045, 35057, 35098, 35068, 35048, 35070, 35056, 35105, 35097,
  15989. 35091, 35099, 35082, 35124, 35115, 35126, 35137, 35174, 35195,
  15990. [12134, 30091], 32997, 30386, 30388, 30684, [12158, 32786], 32788, 32790,
  15991. 32796, 32800, 32802, {f: 3, c: 32805}, 32809, 32808, 32817, 32779, 32821,
  15992. 32835, 32838, 32845, 32850, 32873, 32881, 35203, 39032, 39040, 39043,
  15993. 39049, {f: 2, c: 39052}, 39055, 39060, {f: 2, c: 39066}, {f: 2, c: 39070},
  15994. {f: 2, c: 39073}, {f: 2, c: 39077}, [12172, 34381], 34388, 34412, 34414,
  15995. 34431, 34426, 34428, 34427, 34472, 34445, 34443, 34476, 34461, 34471,
  15996. 34467, 34474, 34451, 34473, 34486, 34500, 34485, 34510, 34480, 34490,
  15997. 34481, 34479, 34505, 34511, 34484, 34537, {f: 2, c: 34545}, 34541, 34547,
  15998. 34512, 34579, 34526, 34548, 34527, 34520, 34513, 34563, 34567, 34552,
  15999. 34568, 34570, 34573, 34569, 34595, 34619, 34590, 34597, 34606, 34586,
  16000. 34622, 34632, 34612, 34609, 34601, 34615, 34623, 34690, 34594,
  16001. {f: 2, c: 34685}, 34683, 34656, 34672, 34636, 34670, 34699, 34643, 34659,
  16002. 34684, 34660, 34649, 34661, 34707, 34735, 34728, 34770, 34758, 34696,
  16003. 34693, 34733, 34711, 34691, 34731, 34789, 34732, 34741, 34739, 34763,
  16004. 34771, 34749, 34769, 34752, 34762, 34779, 34794, 34784, 34798, 34838,
  16005. 34835, 34814, 34826, 34843, 34849, 34873, 34876, [12152, 32566], 32578,
  16006. {f: 2, c: 32580}, 33296, 31482, 31485, 31496, {f: 2, c: 31491}, 31509,
  16007. 31498, 31531, 31503, 31559, 31544, 31530, 31513, 31534, 31537, 31520,
  16008. 31525, 31524, 31539, 31550, 31518, 31576, 31578, 31557, 31605, 31564,
  16009. 31581, 31584, 31598, 31611, 31586, 31602, 31601, 31632, {f: 2, c: 31654},
  16010. 31672, 31660, 31645, 31656, 31621, 31658, 31644, 31650, 31659, 31668,
  16011. 31697, 31681, 31692, 31709, 31706, {f: 2, c: 31717}, 31722, 31756, 31742,
  16012. 31740, 31759, 31766, 31755, 31775, 31786, 31782, 31800, 31809, 31808,
  16013. 33278, {f: 2, c: 33281}, 33284, 33260, 34884, {f: 3, c: 33313}, 33325,
  16014. 33327, 33320, 33323, 33336, 33339, {f: 2, c: 33331}, 33342, 33348, 33353,
  16015. 33355, 33359, 33370, 33375, 33384, 34942, 34949, 34952, 35032, 35039,
  16016. 35166, 32669, 32671, 32679, {f: 2, c: 32687}, 32690, 31868, 25929, 31889,
  16017. 31901, 31900, 31902, 31906, 31922, {f: 2, c: 31932}, 31937, 31943,
  16018. {f: 2, c: 31948}, 31944, 31941, 31959, 31976, [12169, 33390], 26280, 32703,
  16019. 32718, 32725, 32741, 32737, 32742, 32745, 32750, 32755, [12151, 31992],
  16020. 32119, 32166, 32174, 32327, 32411, 40632, 40628, 36211, 36228, 36244,
  16021. 36241, 36273, 36199, 36205, 35911, 35913, 37194, 37200, {f: 2, c: 37198},
  16022. 37220, 37218, 37217, 37232, 37225, 37231, {f: 2, c: 37245}, 37234, 37236,
  16023. 37241, 37260, 37253, 37264, 37261, 37265, {f: 2, c: 37282}, 37290,
  16024. {f: 3, c: 37293}, 37301, 37300, 37306, [12183, 35925], 40574, 36280, 36331,
  16025. 36357, 36441, 36457, 36277, 36287, 36284, 36282, 36292, {f: 2, c: 36310},
  16026. 36314, 36318, {f: 2, c: 36302}, 36315, 36294, 36332, {f: 2, c: 36343},
  16027. 36323, 36345, 36347, 36324, 36361, 36349, 36372, 36381, 36383, 36396,
  16028. 36398, 36387, 36399, 36410, 36416, 36409, 36405, 36413, 36401, 36425,
  16029. {f: 2, c: 36417}, {f: 2, c: 36433}, 36426, 36464, 36470, 36476, 36463,
  16030. 36468, 36485, 36495, 36500, 36496, 36508, 36510, [12184, 35960], 35970,
  16031. 35978, 35973, 35992, 35988, 26011, 35286, 35294, 35290, 35292, 35301,
  16032. 35307, 35311, 35390, 35622, 38739, 38633, 38643, 38639, 38662, 38657,
  16033. 38664, 38671, 38670, 38698, 38701, 38704, 38718, 40832, 40835,
  16034. {f: 6, c: 40837}, 40844, 40702, 40715, 40717, [12203, 38585],
  16035. {f: 2, c: 38588}, 38606, 38610, 30655, 38624, 37518, 37550, 37576, 37694,
  16036. 37738, 37834, 37775, 37950, 37995, 40063, 40066, {f: 4, c: 40069}, 31267,
  16037. 40075, 40078, {f: 3, c: 40080}, {f: 2, c: 40084}, {f: 2, c: 40090},
  16038. {f: 6, c: 40094}, {f: 5, c: 40101}, 40107, {f: 2, c: 40109},
  16039. {f: 8, c: 40112}, {f: 4, c: 40122}, {f: 4, c: 40132}, {f: 7, c: 40138},
  16040. {f: 3, c: 40147}, {f: 3, c: 40151}, {f: 2, c: 40156}, 40159, 40162, 38780,
  16041. 38789, {f: 2, c: 38801}, 38804, 38831, 38827, 38819, 38834, 38836, 39601,
  16042. 39600, 39607, 40536, 39606, 39610, 39612, 39617, 39616, 39621, 39618,
  16043. {f: 2, c: 39627}, 39633, 39749, 39747, 39751, 39753, 39752, 39757, 39761,
  16044. 39144, 39181, 39214, 39253, 39252, [12221, 39647], 39649, 39654, 39663,
  16045. 39659, 39675, 39661, 39673, 39688, 39695, 39699, 39711, 39715,
  16046. {f: 2, c: 40637}, 32315, 40578, {f: 2, c: 40583}, 40587, 40594, 37846,
  16047. 40605, 40607, {f: 3, c: 40667}, 40672, 40671, 40674, 40681, 40679, 40677,
  16048. 40682, 40687, 40738, 40748, 40751, 40761, 40759, {f: 2, c: 40765}, 40772,
  16049. 12295, {s: 13}, 30362, 34297, 31001, 24859, 39599, 35158, 22761, 32631,
  16050. 25850, 25943, 38930, 36774, 32070, 24171, 32129, 37770, 35607, 39165,
  16051. 23542, 22577, 39825, 36649, [12185, 35997], 37575, 29437, 20633, 24970,
  16052. 32179, 31558, 30050, 25987, 24163, 38281, 37002, 32232, 36022, 35722,
  16053. 36783, 36782, 27161, 40009, 30303, 28693, 28657, 36051, 25839, 39173,
  16054. 25765, 37474, 37457, 39361, 35036, 36001, 21443, 34870, 27544, 24922,
  16055. 24920, 29158, 33980, 33369, 20489, 28356, 21408, 20596, 28204, 23652,
  16056. 35435, 25881, 25723, 34796, 39262, 35730, 32399, 37855, 29987, 38369,
  16057. 39019, 22580, 22039, [12199, 38263], 20767, 33144, 24288, 26274, 37396,
  16058. [12190, 36554], 24505, 22645, 38515, 35183, 31281, 25074, 35488, 39425,
  16059. 36978, 39347, [12242, 40786], 29118, 34909, 34802, 23541, 30087, 36490,
  16060. 31820, 32162, 37276, 37604, 38619, 30990, 20786, 35320, 34389, 20659,
  16061. 30241, 38358, 21109, 37656, 32020, 32189, 36781, 35422, 36060, 32880,
  16062. 24478, 21474, 36517, 31428, 37679, 36948, 24118, 36024, 25812, 21934,
  16063. 37170, 25763, 33213, 24986, 35477, 24392, 30070, 25803, 40680, 34153,
  16064. 27284, 25623, 23798, 31153, 23566, 29128, 37159, 25973, 28364, 36958,
  16065. 32224, 39003, 40670, 22666, 38651, 28593, 37347, 35519, 35548, 37336,
  16066. 38914, 37664, 35330, 26481, 21205, 26847, 20941, [12222, 39717], 29346,
  16067. 29544, 35712, 36077, 37709, 37723, 26039, 32222, 38538, 23565, 22136,
  16068. 38931, 37389, 22890, 22702, 40285, 38989, 35355, 24801, 39187, 20818,
  16069. 29246, 39180, 36019, 30332, 32624, 38309, 31020, 37353, 29033, 31684,
  16070. 36009, 39151, 35370, 32033, [12214, 39131], 35513, 24290, 36027, 32027,
  16071. 22707, 22894, 24996, 31966, 35920, 26963, 37586, [12213, 39080], 30219,
  16072. 39342, 32299, 35575, 40179, 33178, 36667, 25771, 36628, 36070, 24489,
  16073. 36000, 35331, 23142, 32283, 35442, 37411, 33995, 24185, 36245, 36123,
  16074. 23713, 21083, 37628, 32177, 23831, 37804, 25841, 40255, 38307, 37499,
  16075. 20491, 32102, 40852, 38799, 36002, 37390, 28317, 27083, 36092, 34865,
  16076. 39015, 21102, 38364, 35264, 39208, 24931, 36011, 24291, 35215, 27512,
  16077. [12244, 40860], 38312, 36556, 35437, 27331, 36020, 21130, 36645, 37707,
  16078. 22283, 36942, 39405, 38867, 28450, 34399, 38305, 40372, 36032, 36703,
  16079. 40251, 32005, 22778, 35703, 28396, 22057, 33775, 30059, 21123, 35441,
  16080. 25079, 22750, 27489, 29872, 36996, 32233, 35594, 25582, 36637, 36036,
  16081. 31330, 26371, 29172, 21295, 35569, 35496, 32362, 33911, 28222, 29554,
  16082. 36008, 31117, 25802, 27231, 31309, 39249, 35663, 40388, 32318, 32221,
  16083. 26997, 36655, 32026, 25824, 24190, 34186, 21137, 28639, 35336, 35352,
  16084. 38555, 32380, 32000, 22846, 33698, 38960, 36040, 37440, 20729, 39381,
  16085. 27570, 30435, 22533, 31627, 38291, 33393, 32216, 32365, 27298, 40572,
  16086. 25536, 25791, 31777, 20745, 34214, 27323, 37970, 36368, 36068,
  16087. [12178, 35211], 37749, 33382, 21133, 39198, 28472, 28666, 28567, 23559,
  16088. 28479, 34083, 27123, 22892, 35611, 37292, 33184, 28550, 39509, 23308,
  16089. 25898, 37496, 30703, 20709, 39171, 32371, 32094, 36686, 36611, 38542,
  16090. 31680, 28500, 32080, 35489, 32202, 37670, 20677, 35641, 36914, 29180,
  16091. 30433, 21185, 33686, 39912, 39514, 32147, 38968, 37857, 24465, 30169,
  16092. 31478, 31998, 33290, 39378, 33289, 25818, 37624, 25084, 21127, 40273,
  16093. 32121, 35258, 35363, 32118, 37406, 36557, 39423, 38283, 20977, 38982,
  16094. 27579, 35506, 22718, 25031, 25715, 24235, 35122, 35463, 22602, 20744,
  16095. 23532, 31014, 26336, 34407, 24011, 31418, 39243, 28528, 25844, 38346,
  16096. 34847, 33240, 33802, 20358, 36084, 34253, 27396, 25876, 31811, 38348,
  16097. 34349, 28734, 35733, 25900, 35261, 25078, 32412, 29211, 28651, 25736,
  16098. 21214, 28551, 27138, 37939, 22744, 39006, 31852, 38626, 28757, 35023,
  16099. 39881, 31150, 40599, 21426, 21237, 31019, 27511, 28701, 38584, 20486,
  16100. 32879, 34030, 36899, 37934, 24976, 28451, 31806, 25986, 33225, 37832,
  16101. 25088, 29001, 32244, 31975, 20841, 36635, 35538, 30274, 36988, 37904,
  16102. 29557, 33256, 37168, 40023, 36035, 40801, 37428, 38728, 23994, 38936,
  16103. 39230, 21129, [12243, 40845], 32894, 22184, 31840, 22751, 25871, 38580,
  16104. 27155, 23105, 25695, 31757, 34310, 30439, 39025, 24300, 29200, 25796,
  16105. 28407, 34396, 39791, 36034, 37682, 38520, 39522, 37569, 23650, 32311,
  16106. 24942, 28670, 32209, 24018, 25891, 23423, 28772, 20098, 25476, 36650,
  16107. 20523, 20374, 28138, 32184, 35542, 34367, 32645, 37007, 38012, 31854,
  16108. 39486, 39409, 32097, 23229, 29802, 30908, 34718, [12218, 39340], 39393,
  16109. 21966, 36023, [12230, 40613], 36067, 36993, 30622, 39237, 34875, 28415,
  16110. 35646, 37672, 37466, 36031, 37762, [12200, 38272], 24758, 20497, 37683,
  16111. 22818, 35598, 24396, 35219, 32191, 32236, 24287, 28357, 25003, 38313,
  16112. 40180, 37528, 35628, 35584, 30045, 37385, 32013, 38627, 25747, 33126,
  16113. 24817, 39719, 39186, 25836, 33193, 25862, 37312, [12227, 40165], 32886,
  16114. 22169, 38007, 37811, 27320, 29552, 23527, 25840, 28632, 37397, 32016,
  16115. 33215, 28611, 36786, 30247, 35582, 27472, 40407, 27590, 22036, 28442,
  16116. 30436, 40848, 36064, 22132, 40300, 39449, 39108, 38971, 36007, 34315,
  16117. 24977, 35413, 28497, 38935, 25778, 37610, 20693, 27192, 35676, 33229,
  16118. [12241, 40778], 39438, 35912, 21843, 27683, 35350, 29309, 37370, 37467,
  16119. 36983, 31805, 35609, 37666, 37463, 28154, 35700, 22649, 27085, 21958,
  16120. 22715, 34196, 25654, 37740, 27211, 21932, 20689, 32761, 31429, 31434,
  16121. 27453, 35242, 23522, 36629, 27691, 20670, 38915, 35531, 24950, 29898,
  16122. 31406, 36264, 21312, 36544, 39493, 40818, 39028, 27402, 21240, 40306,
  16123. 30906, 35731, 39250, 25854, 32350, 29105, 38860, 35469, 32009, 27054,
  16124. 32104, 36575, 37613, 38287, 28516, 28753, 34217, 39955, 36093, 20632,
  16125. 21930, 39479, 25475, 28544, 27578, 32023, 31721, 26348, 38275, 38493,
  16126. 36109, 32341, 20663, 36062, 29138, 32057, 36050, 25448, 25885, 25086,
  16127. 35373, 32051, 23529, 23352, 33102, 28402, 32882, 32361, 21213, 32854,
  16128. 24107, 29509, 28629, 35433, 26178, 34645, 23526, 35672, 39387, 21218,
  16129. 36969, 37323, 39166, 35222, 35430, 22781, 29560, 27166, 36664, 26360,
  16130. 36118, 23660, 34899, 27193, 31466, 25976, 24101, 38617, 35504, 38918,
  16131. 35500, 30889, 29197, 32114, 39164, 39686, 32883, 24939, 38924, 35359,
  16132. 35494, 25851, 34311, 35380, 32901, 38614, 38568, 32143, 27506, 23403,
  16133. 25613, 32302, 29795, 37782, 29562, 25787, 33274, 24907, 25892, 36010,
  16134. 30321, 28760, 22727, 35674, 35527, 22022, 28271, 29145, 28644, 32295,
  16135. 35342, 39472, 35588, 37563, 38988, 39636, 26781, 36028, 37941, 24307,
  16136. 32893, 28916, 37509, 32113, 38957, 22294, 22615, 22296, 38973, 40213,
  16137. 39345, 39389, 27234, 31402, 35178, 24398, 28771, 38929, 33836, 32178,
  16138. [12209, 38859], 36949, 22285, 29234, 28656, 32173, 33894, 20553, 20702,
  16139. 32239, 35586, 34907, 32862, 32011, 31337, 21839, 25790, 34680, 28198,
  16140. 31401, 21978, 37794, 28879, 35491, 28961, 34154, 22626, 38695, 21209,
  16141. 35492, 37675, 29351, 35186, 32722, 37521, 25138, 32048, 34662, 36676,
  16142. 23805, 20448, 29433, 22151, 37697, 39854, 32406, 36066, 37532, 38289,
  16143. 39023, 38570, 29694, 29563, 32291, 39201, 25010, 32171, 38002, 37129,
  16144. 35443, 38911, 38917, 34157, 22210, 37559, 26313, 22063, 21332, 25406,
  16145. 33029, 35559, 23531, 28681, 35613, 37573, 37313, 33288, 37561, 32137,
  16146. 38920, 35377, 32210, 32396, 36562, 25080, 36984, 30316, 32098, 23416,
  16147. 21211, 35426, 23563, 39348, 35347, 35338, 36956, 22739, 40201, 40232,
  16148. 21854, 20126, 35357, 38329, 40573, 22196, 38996, 38331, 33399, 21421,
  16149. 30831, 35578, 39511, 40230, 26954, 25562, 30221, 38525, 30306, 39178,
  16150. 27171, 22575, 35617, 34277, 29242, [12212, 38913], 26989, 33865, 37291,
  16151. 37541, 38948, 36986, 20736, 34811, 34269, 20740, 25014, 32681, 35427,
  16152. 35696, 35516, 35695, 32377, 34093, 38512, 37504, 39154, 38577, 27387,
  16153. 23344, 40441, 25033, 32403, 29801, 34722, 29151, 29074, 34821, 36111,
  16154. 31310, 21938, 25793, 20653, 30320, 36404, 20778, 24962, 37109, 37438,
  16155. 29494, 35480, 36671, 39192, [12226, 39770], 28417, 33287, 23996, 35486,
  16156. 39729, 29508, 35709, 38928, 39341, 40219, 28149, 36677, 22290, 21729,
  16157. 22291, 32227, 36960, 39000, 32004, 36493, 38000, 38322, 38642, 37142,
  16158. 38549, 36939, 34292, 37270, 26248, 38620, 36617, 25890, 26283, 36106,
  16159. 36124, 33247, 38015, 26839, 31432, 36012, 25799, 21063, 28580, 36042,
  16160. 36104, 36555, 37720, 38296, 35408, 40779, 20661, 27656, 30430, 26028,
  16161. 36670, 23940, 26855, 25136, 32187, 24373, 28466, 24115, 36076, 33081,
  16162. 36249, 34756, 36685, 37754, 36889, 35998, 37341, 20597, 35386, 37806,
  16163. 38499, 24128, 30309, 37165, 35657, 32340, 32887, 22519, 34937, 32025,
  16164. 25711, 25842, 24159, 36074, 28399, 37912, 32066, 31278, 33131, 34886,
  16165. 35589, 36600, 30394, 26205, 39519, 35576, 35461, 29165, 30682, 22225,
  16166. 36015, 37956, 31689, 39376, 23560, 30938, 36681, 36090, 27137, 33674,
  16167. 35037, 22941, 22767, 29376, 37648, 36101, 22684, 32180, 35524, 28310,
  16168. 28609, 36039, 28460, 32156, 32317, 32305, 37138, 35419, 32068, 38013,
  16169. 21959, 21401, 21428, 38760, 36107, 21293, 21297, 36094, 21060, 21132,
  16170. 21108, 20660, 20480, 20630, 20757, 20738, 20756, 20796, 20791, 20712,
  16171. 20674, 20795, 20752, 20794, 20681, 31988, 40652, 22213, 40172, 35131,
  16172. 33248, 35329, 35344, 35340, 35349, 35635, 35406, 35365, 35393, 35382,
  16173. 35398, 35412, 35416, 35410, 35462, 35460, 35455, 35440, 35452, 35445,
  16174. 35436, 35438, 35533, 35554, 35425, 35482, 35493, {f: 2, c: 35473}, 35535,
  16175. 35537, 35529, 35547, 35543, 35522, 35510, 35574, 35563, 35604, 35585,
  16176. 35556, 35565, 35580, 35571, 35558, 35566, 35550, 35624, 35740, 35606,
  16177. 35610, 35600, 35627, 35629, 35670, 35673, 35662, 35742, 35691, 35734,
  16178. 38488, 37178, 37140, 37172, 37087, 37174, 37126, 37192, 33467, 21233,
  16179. 24048, 22538, 22745, 22754, 22752, 22746, 22497, 22607, 22550, 22610,
  16180. 22557, 22628, 34188, 34131, 34294, 33703, 33799, 34031, 33511, 34338,
  16181. 34086, 22603, 29026, 34136, 34045, 34126, 34184, 34234, 29334, 28366,
  16182. 34113, 34254, 34130, 33984, 33874, 33892, 33940, 33845, 34207, 34133,
  16183. 40367, 33939, 32264, 34118, 34146, 34078, 39488, 34362, 37795, 34167,
  16184. 34334, 34298, 34308, 34282, 34330, 22889, 23607, 25451, 25718, 25759,
  16185. 25681, 25692, 25779, 25860, 25878, 25847, 25852, 25883, 22064, 22072,
  16186. 22216, 22182, 21764, 21692, 22144, 22109, 22112, 22069, 22006, 22118,
  16187. 22130, 22156, 22117, 22044, 22062, 21993, 22038, 22208, 22029, 22195,
  16188. 22209, 22127, 36705, 22198, 22165, 22279, 24131, 24172, 24152, 24151,
  16189. 23943, 23796, 23888, 23852, 23975, 23968, 23959, 23821, 23992, 23937,
  16190. 24020, 24480, 29559, 29505, 29546, 29499, 29547, 29568, 29564, 39136,
  16191. 39219, 39145, 39228, {f: 2, c: 39146}, 39149, 39156, 39177, 39185, 39195,
  16192. 39223, 39231, 39235, {f: 3, c: 39240}, 39244, 39266, 24289, 36065, 25082,
  16193. 25006, 24938, 24894, 24757, 24884, 25036, 24927, 25064, 24827, 24887,
  16194. 24818, 24947, 24860, 24978, 38274, 38278, 38344, 38286, 38292, 38284,
  16195. 38373, 38317, 38315, 39726, 38316, 38334, 38326, 39721, 38335, 38333,
  16196. 38332, 38339, 38347, 38356, 38352, 38357, 38366, 28739, 28505, 28711,
  16197. 28696, 28668, 28039, 28025, 28254, 28590, 28687, 28408, 28527, 28150,
  16198. 28543, 28678, 28576, 28683, 28775, 28740, 28677, 28535, 28704, 28703,
  16199. 28722, 28712, 28765, 39467, 36999, 36885, 37008, 23656, 24371, 23285,
  16200. 23255, 23296, 23149, 23304, 23372, 23207, 23291, 23307, 23329, 23338,
  16201. 23321, 39380, 39391, 39385, 39478, 39515, 39377, 39384, 39501, 39498,
  16202. 39394, 39530, 39439, 39437, 39429, 39490, 39469, 39446, 39489, 39470,
  16203. 39480, {f: 2, c: 39491}, 39503, 39525, 39524, 31993, 32006, 32002,
  16204. {f: 2, c: 32007}, 32394, 32028, 32021, 32019, 32058, 32050, 32049, 32272,
  16205. 32060, 32064, 32063, 32093, 32078, 32115, 32134, 32131, 32136, 32190,
  16206. 32186, 32203, 32212, 32196, 32158, 32172, 32185, 32163, 32176, 32199,
  16207. 32217, 32215, 32249, 32242, 32354, 32230, 32246, 32241, 32267, 32225,
  16208. 32265, 32285, 32287, 32286, 32301, 32266, 32273, 32381, 32313, 32309,
  16209. 32306, 32326, 32325, 32392, 32346, 32338, 32366, 32382, 32368, 32367,
  16210. 32408, 29859, 29771, 29903, 38922, 29885, 29759, 29833, 29862, 29908,
  16211. 29914, 38873, 38878, 38876, 27050, 27370, 26776, 26838, 27141, 26783,
  16212. 27355, 27379, 27368, 27359, 27273, 26895, 27208, 26984, 27071, 27194,
  16213. 27292, 27410, 27422, 27357, 27111, 27407, 27414, 27372, 27354, 27384,
  16214. 27315, 27367, 27299, 27347, 27358, 27556, 27550, 27566, 27563, 27567,
  16215. 36564, 36571, 36594, 36603, 36708, 36601, 36604, 36587, 36580, 36706,
  16216. 36602, 36606, 36618, 36615, 36613, 36626, 36646, {f: 2, c: 36638}, 36636,
  16217. 36659, 36678, 36692, 25108, 25127, 29964, 26311, 26308, 26249, 26326,
  16218. 36033, 36016, 36026, 36029, 36100, 36018, 36037, 36112, 36049, 36058,
  16219. 36053, 36075, 36071, 36091, 35224, 35244, 35233, 35263, 35238, 35247,
  16220. 35250, 35255, 27647, 27660, 27692, 29272, 26407, 33110, 33242, 33051,
  16221. 33214, 33121, 33231, 27487, {f: 2, c: 39086}, 39094, 39100, 39110, 39112,
  16222. 36674, 40783, 26005, 29036, 29010, 29079, 29121, 29148, 29182, 31152,
  16223. 31118, 31146, 25055, 24932, 25059, 25095, 28585, 30959, 30893, 30824,
  16224. 30904, 31018, 31025, 30820, 30973, 30951, 30947, 40853, 30616, 30558,
  16225. 30652, 32646, 32648, {f: 3, c: 37330}, 37337, 37335, 37333, 37367, 37351,
  16226. 37348, 37702, 37365, 37369, 37384, 37414, 37445, 37393, 37392, 37377,
  16227. 37415, 37380, 37413, 37376, 37434, 37478, 37431, 37427, 37461, 37437,
  16228. 37432, 37470, {f: 2, c: 37484}, 37439, 37984, 37424, 37449, 37448, 37453,
  16229. 37422, 37433, 37944, 37548, 37536, 37498, 37546, 37614, 37583, 37891,
  16230. 37603, 37946, 37553, 37542, 37799, 37526, 37580, 37545, 37877, 37523,
  16231. 37503, 37801, 37530, 37658, 37547, 37507, 37899, 37544, 37539, 37906,
  16232. 37688, 37617, 37847, 37605, 37616, 37615, 37608, 37564, 37597, 37622,
  16233. {f: 2, c: 37926}, 37571, 37599, 37606, 37650, 37638, 37737, 37659, 37696,
  16234. 37633, 37653, 37678, 37699, {f: 2, c: 37639}, 37663, 37657, 37733, 37703,
  16235. 37750, 37716, 37732, 37802, 37744, 37764, 37860, 37848, 37928, 37767,
  16236. 37836, 37784, 37816, 37823, 37798, 37808, 37813, 37964, 37858,
  16237. {f: 2, c: 37852}, 37837, 37854, 37827, 37831, 37841, 37908, 37917, 37879,
  16238. 37989, 37907, 37997, 37920, 38009, 37881, 37913, 37962, 37938, 37951,
  16239. 37972, 37987, 37758, 31329, 40169, 40182, 40199, 40198, 40227, 40327,
  16240. 40469, 40221, 40223, 40421, 40239, 40409, 40240, 40258, 40478, 40275,
  16241. 40477, 40288, 40274, 40435, 40284, 40289, 40339, 40298, 40303, 40329,
  16242. 40344, 40346, 40384, 40357, 40361, 40386, 40380, 40474, 40403, 40410,
  16243. 40431, 40422, 40434, 40440, 40460, 40442, 40475, 30308, 30296, 30311,
  16244. 30210, {f: 2, c: 30278}, 30281, 30238, 30267, {f: 2, c: 30317}, 30313,
  16245. 30322, 31431, 31414, 35168, 35123, 35165, 35143, 35128, 35172, 30392,
  16246. 32814, 32812, 32889, 32885, 38919, {f: 2, c: 38926}, 38945, 38940, 28481,
  16247. 38950, 38967, 38990, 38995, 39027, 39010, 39001, 39013, 39020, 39024,
  16248. 34787, 34822, 34566, 34851, 34806, 34554, 34799, 34692, 34832, 34760,
  16249. 34833, 34747, 34766, 32588, 31716, 31591, 31849, 31731, 31744, 31691,
  16250. 31836, 31774, 31787, 31779, 31850, 31839, 33380, 33387, 35018, 32677,
  16251. 31986, 31990, 31965, 32310, 40617, 36274, 37317, 37315, 40570, 36489,
  16252. 36428, 36498, 36474, 36437, 36506, 36491, 36499, 36497, 36513, 36451,
  16253. 36522, 36518, 35316, 35318, 38746, 38722, 38717, 38724, 40788, 40799,
  16254. 40793, 40800, 40796, 40806, 40812, 40810, 40823, [12236, 40701], 40703,
  16255. 40713, 35726, 38014, 37864, 39799, 39796, 39809, 39811, 39822, 40056,
  16256. 31308, 39826, 40031, 39824, 39853, 39834, 39850, 39838, 40045, 39851,
  16257. 39837, 40024, 39873, 40058, 39985, 39993, 39971, 39991, 39872, 39882,
  16258. 39879, 39933, 39894, {f: 2, c: 39914}, 39905, 39908, 39911, 39901, 39906,
  16259. 39920, 39899, 39924, 39892, 40029, 39944, 39952, 39949, 39954, 39945,
  16260. 39935, 39968, 39986, 39981, 39976, 39973, 39977, 39987, 39998, 40008,
  16261. 39995, 39989, 40005, 40022, 40020, 40018, 40039, 38851, 38845, 38857,
  16262. 40379, 39631, 39638, 39637, 39768, 39758, 39255, 39260, 39714, 40695,
  16263. 40690, 35180, 38342, 37686, 24390, 34068, 32404, 40803, 22137, 40725,
  16264. 22081, 39662, 35079, 31296, 39091, 38308, 39693, 36852, 24409, 31339,
  16265. 39138, 20642, 34193, 20760, 25458, 21067, 30543, 32397, 26310, 30637,
  16266. [12228, 40565], 22217, 40692, 28635, 25054, 30663, 28720, 40629, 34890,
  16267. 38370, 38854, 31844, 32308, 38822, 40623, 22220, 39089, 27311, 32590,
  16268. 31984, 20418, 32363, 40569, 22190, 39706, 33903, 31142, 31858, 39634,
  16269. 38587, 32251, 35069, 30787, {f: 10, c: 8560}, {f: 2, c: 714}, 729, 8211,
  16270. 8213, 8229, 8245, 8453, 8457, {f: 4, c: 8598}, 8725, 8735, 8739, 8786,
  16271. {f: 2, c: 8806}, 8895, {f: 36, c: 9552}, {f: 15, c: 9601}, {f: 3, c: 9619},
  16272. {f: 2, c: 9660}, {f: 4, c: 9698}, 9737, 8853, 12306, {f: 2, c: 12317},
  16273. {f: 9, c: 12321}, 12963, {f: 2, c: 13198}, {f: 3, c: 13212}, 13217, 13252,
  16274. 13262, {f: 2, c: 13265}, 13269, 65072, 65506, 65508, 8481, 12849, 8208,
  16275. 12540, {f: 2, c: 12443}, {f: 2, c: 12541}, 12294, {f: 2, c: 12445},
  16276. {f: 10, c: 65097}, {f: 4, c: 65108}, {f: 14, c: 65113}, {f: 4, c: 65128},
  16277. 12350, {f: 12, c: 12272}, 19970, {f: 3, c: 19972}, 19983, 19986, 19991,
  16278. {f: 3, c: 19999}, 20003, 20006, 20009, {f: 2, c: 20014}, 20017, 20019,
  16279. 20021, 20023, 20028, {f: 3, c: 20032}, 20036, 20038, 20042, 20049, 20053,
  16280. 20055, {f: 2, c: 20058}, {f: 4, c: 20066}, {f: 2, c: 20071},
  16281. {f: 6, c: 20074}, 20082, {f: 10, c: 20084}, {f: 3, c: 20095},
  16282. {f: 2, c: 20099}, [12037, 20101], 20103, 20106, 20112, {f: 2, c: 20118},
  16283. 20121, {f: 2, c: 20124}, 20131, 20138, {f: 3, c: 20143}, 20148,
  16284. {f: 4, c: 20150}, {f: 3, c: 20156}, 20168, 20172, {f: 2, c: 20175}, 20178,
  16285. {f: 3, c: 20186}, 20192, 20194, {f: 2, c: 20198}, 20201, {f: 3, c: 20205},
  16286. 20209, 20212, {f: 3, c: 20216}, 20220, 20222, 20224, {f: 7, c: 20226},
  16287. {f: 2, c: 20235}, {f: 5, c: 20242}, {f: 2, c: 20252}, 20257, 20259,
  16288. {f: 2, c: 20264}, {f: 3, c: 20268}, 20273, 20275, 20277, 20279, 20281,
  16289. 20283, {f: 5, c: 20286}, {f: 2, c: 20292}, {f: 6, c: 20295}, 20306, 20308,
  16290. 20310, {f: 2, c: 20321}, 20326, 20328, {f: 2, c: 20330}, {f: 2, c: 20333},
  16291. {f: 2, c: 20337}, 20341, {f: 4, c: 20343}, 20349, {f: 3, c: 20352}, 20357,
  16292. 20359, 20362, 20364, 20366, 20368, {f: 2, c: 20370}, 20373,
  16293. {f: 3, c: 20376}, 20380, {f: 2, c: 20382}, {f: 2, c: 20385}, 20388, 20395,
  16294. 20397, {f: 5, c: 20400}, {f: 9, c: 20406}, {f: 2, c: 20416},
  16295. {f: 4, c: 20422}, {f: 3, c: 20427}, {f: 5, c: 20434}, 20441, 20443, 20450,
  16296. {f: 2, c: 20452}, 20455, {f: 2, c: 20459}, 20464, 20466, {f: 4, c: 20468},
  16297. 20473, {f: 3, c: 20475}, 20479, {f: 5, c: 20481}, {f: 2, c: 20487}, 20490,
  16298. 20494, 20496, 20499, {f: 3, c: 20501}, 20507, {f: 2, c: 20509}, 20512,
  16299. {f: 3, c: 20514}, 20519, {f: 11, c: 20527}, 20539, 20541, {f: 4, c: 20543},
  16300. {f: 3, c: 20548}, {f: 2, c: 20554}, 20557, {f: 5, c: 20560},
  16301. {f: 4, c: 20566}, 20571, {f: 8, c: 20573}, {f: 6, c: 20582},
  16302. {f: 7, c: 20589}, {f: 3, c: 20600}, {f: 2, c: 20604}, {f: 4, c: 20609},
  16303. {f: 2, c: 20614}, {f: 4, c: 20617}, {f: 8, c: 20622}, 20631,
  16304. {f: 8, c: 20634}, 20644, 20646, {f: 2, c: 20650}, {f: 4, c: 20654}, 20662,
  16305. {f: 2, c: 20664}, {f: 2, c: 20668}, {f: 3, c: 20671}, {f: 2, c: 20675},
  16306. {f: 3, c: 20678}, {f: 5, c: 20682}, 20688, {f: 3, c: 20690},
  16307. {f: 3, c: 20695}, {f: 3, c: 20699}, {f: 6, c: 20703}, {f: 3, c: 20713},
  16308. {f: 4, c: 20719}, 20724, {f: 3, c: 20726}, 20730, {f: 4, c: 20732}, 20737,
  16309. 20739, 20741, 20746, {f: 4, c: 20748}, 20753, 20755, {f: 2, c: 20758},
  16310. {f: 6, c: 20761}, 20768, {f: 8, c: 20770}, {f: 7, c: 20779},
  16311. {f: 4, c: 20787}, {f: 2, c: 20792}, {f: 2, c: 20797}, 20802, 20807, 20810,
  16312. 20812, {f: 3, c: 20814}, 20819, {f: 3, c: 20823}, 20827, {f: 5, c: 20829},
  16313. {f: 2, c: 20835}, {f: 2, c: 20838}, 20842, 20847, 20850, 20858,
  16314. {f: 2, c: 20862}, {f: 2, c: 20867}, {f: 2, c: 20870}, {f: 2, c: 20874},
  16315. {f: 4, c: 20878}, {f: 2, c: 20883}, 20888, 20890, {f: 3, c: 20893}, 20897,
  16316. 20899, {f: 5, c: 20902}, {f: 2, c: 20909}, 20916, {f: 3, c: 20920},
  16317. {f: 2, c: 20926}, {f: 3, c: 20929}, 20933, 20936, 20938, 20942, 20944,
  16318. {f: 9, c: 20946}, 20956, {f: 2, c: 20958}, {f: 2, c: 20962},
  16319. {f: 6, c: 20965}, 20972, 20974, 20978, 20980, 20983, 20990,
  16320. {f: 2, c: 20996}, 21001, {f: 2, c: 21003}, {f: 2, c: 21007},
  16321. {f: 3, c: 21011}, 21020, {f: 2, c: 21022}, {f: 3, c: 21025},
  16322. {f: 3, c: 21029}, 21034, 21036, 21039, {f: 2, c: 21041}, {f: 2, c: 21044},
  16323. 21052, 21054, {f: 2, c: 21061}, {f: 2, c: 21064}, {f: 2, c: 21070},
  16324. {f: 2, c: 21074}, 21077, {f: 4, c: 21079}, 21085, {f: 2, c: 21087},
  16325. {f: 3, c: 21090}, 21094, 21096, {f: 3, c: 21099}, {f: 2, c: 21104}, 21107,
  16326. {f: 7, c: 21110}, 21118, 21120, {f: 3, c: 21124}, 21131, {f: 2, c: 21134},
  16327. 21138, {f: 7, c: 21140}, 21148, {f: 4, c: 21156}, {f: 3, c: 21166},
  16328. {f: 10, c: 21172}, 21184, 21186, {f: 3, c: 21188}, 21192, 21194,
  16329. {f: 4, c: 21196}, 21201, {f: 2, c: 21203}, 21207, 21210, 21212,
  16330. {f: 2, c: 21216}, 21219, {f: 11, c: 21221}, {f: 3, c: 21234},
  16331. {f: 2, c: 21238}, {f: 3, c: 21243}, {f: 4, c: 21249}, 21255,
  16332. {f: 4, c: 21257}, 21262, {f: 4, c: 21265}, 21272, {f: 2, c: 21275},
  16333. {f: 2, c: 21278}, 21282, {f: 2, c: 21284}, {f: 3, c: 21287},
  16334. {f: 2, c: 21291}, 21296, {f: 6, c: 21298}, [12054, 21304],
  16335. {f: 2, c: 21308}, 21314, 21316, 21318, {f: 3, c: 21323}, 21328,
  16336. {f: 2, c: 21336}, 21339, 21341, 21349, 21352, 21354, {f: 2, c: 21356},
  16337. 21362, 21366, 21369, {f: 4, c: 21371}, {f: 2, c: 21376}, 21379,
  16338. {f: 2, c: 21383}, 21386, {f: 7, c: 21390}, {f: 2, c: 21398},
  16339. {f: 2, c: 21403}, 21406, 21409, 21412, 21415, {f: 3, c: 21418},
  16340. {f: 3, c: 21423}, 21427, 21429, {f: 4, c: 21431}, {f: 3, c: 21436}, 21440,
  16341. {f: 4, c: 21444}, {f: 3, c: 21454}, {f: 2, c: 21458}, 21461, 21466,
  16342. {f: 3, c: 21468}, 21473, 21479, 21492, 21498, {f: 3, c: 21502}, 21506,
  16343. 21509, 21511, 21515, 21524, {f: 3, c: 21528}, 21532, 21538,
  16344. {f: 2, c: 21540}, 21546, 21552, 21555, {f: 2, c: 21558}, 21562, 21565,
  16345. 21567, {f: 2, c: 21569}, {f: 2, c: 21572}, 21575, 21577, {f: 4, c: 21580},
  16346. 21585, 21594, {f: 5, c: 21597}, 21603, 21605, 21607, {f: 8, c: 21609},
  16347. 21620, {f: 2, c: 21625}, {f: 2, c: 21630}, 21633, 21635, 21637,
  16348. {f: 4, c: 21639}, 21645, 21649, 21651, {f: 2, c: 21655}, 21660,
  16349. {f: 5, c: 21662}, 21669, 21678, 21680, 21682, {f: 3, c: 21685},
  16350. {f: 2, c: 21689}, 21694, 21699, 21701, {f: 2, c: 21706}, 21718, 21720,
  16351. 21723, 21728, {f: 3, c: 21730}, {f: 2, c: 21739}, {f: 3, c: 21743},
  16352. {f: 6, c: 21748}, 21755, 21758, 21760, {f: 2, c: 21762}, 21765, 21768,
  16353. {f: 5, c: 21770}, {f: 2, c: 21778}, {f: 6, c: 21781}, {f: 4, c: 21788},
  16354. 21793, {f: 2, c: 21797}, {f: 2, c: 21800}, 21803, 21805, 21810,
  16355. {f: 3, c: 21812}, {f: 4, c: 21816}, 21821, 21824, 21826, 21829,
  16356. {f: 2, c: 21831}, {f: 4, c: 21835}, {f: 2, c: 21841}, 21844,
  16357. {f: 5, c: 21847}, 21853, {f: 2, c: 21855}, {f: 2, c: 21858},
  16358. {f: 2, c: 21864}, 21867, {f: 6, c: 21871}, {f: 2, c: 21881}, 21885, 21887,
  16359. {f: 2, c: 21893}, {f: 3, c: 21900}, 21904, {f: 2, c: 21906},
  16360. {f: 3, c: 21909}, {f: 2, c: 21914}, 21918, {f: 7, c: 21920},
  16361. {f: 2, c: 21928}, 21931, 21933, {f: 2, c: 21935}, 21940, 21942, 21944,
  16362. 21946, 21948, {f: 5, c: 21951}, 21960, {f: 2, c: 21962}, {f: 2, c: 21967},
  16363. 21973, {f: 3, c: 21975}, 21979, 21982, 21984, 21986, 21991,
  16364. {f: 2, c: 21997}, {f: 2, c: 22000}, 22004, {f: 5, c: 22008}, 22015,
  16365. {f: 4, c: 22018}, 22023, {f: 2, c: 22026}, {f: 4, c: 22032}, 22037,
  16366. {f: 2, c: 22041}, 22045, {f: 3, c: 22048}, {f: 2, c: 22053}, 22056,
  16367. {f: 2, c: 22058}, 22067, 22071, 22074, {f: 3, c: 22076}, 22080,
  16368. {f: 10, c: 22082}, {f: 5, c: 22095}, {f: 2, c: 22101}, {f: 2, c: 22106},
  16369. {f: 2, c: 22110}, 22113, 22115, 22119, {f: 2, c: 22125}, 22128, 22131,
  16370. 22133, 22135, 22138, {f: 3, c: 22141}, {f: 4, c: 22145}, {f: 4, c: 22152},
  16371. 22157, {f: 3, c: 22160}, 22164, {f: 3, c: 22166}, {f: 9, c: 22170},
  16372. {f: 2, c: 22180}, 22183, {f: 5, c: 22185}, {f: 3, c: 22192}, 22197,
  16373. {f: 4, c: 22200}, {f: 3, c: 22205}, {f: 2, c: 22211}, {f: 2, c: 22214},
  16374. 22219, {f: 4, c: 22221}, {f: 2, c: 22226}, {f: 2, c: 22229},
  16375. {f: 2, c: 22232}, 22236, 22243, {f: 6, c: 22245}, 22252, {f: 2, c: 22254},
  16376. {f: 2, c: 22258}, {f: 3, c: 22262}, {f: 2, c: 22267}, {f: 3, c: 22272},
  16377. 22277, 22284, {f: 4, c: 22286}, {f: 2, c: 22292}, 22295, {f: 3, c: 22297},
  16378. {f: 2, c: 22301}, {f: 3, c: 22304}, {f: 4, c: 22308}, 22315,
  16379. {f: 2, c: 22321}, {f: 5, c: 22324}, {f: 2, c: 22332}, 22335, 22337,
  16380. {f: 4, c: 22339}, {f: 2, c: 22344}, 22347, {f: 5, c: 22354},
  16381. {f: 2, c: 22360}, {f: 2, c: 22370}, 22373, 22375, 22380, 22382,
  16382. {f: 3, c: 22384}, {f: 2, c: 22388}, {f: 3, c: 22392}, {f: 5, c: 22397},
  16383. {f: 4, c: 22407}, {f: 5, c: 22413}, {f: 7, c: 22420}, {f: 4, c: 22428},
  16384. 22437, 22440, 22442, 22444, {f: 3, c: 22447}, 22451, {f: 3, c: 22453},
  16385. {f: 9, c: 22457}, {f: 7, c: 22468}, {f: 2, c: 22476}, {f: 2, c: 22480},
  16386. 22483, {f: 2, c: 22486}, {f: 2, c: 22491}, 22494, {f: 2, c: 22498},
  16387. {f: 8, c: 22501}, 22510, {f: 4, c: 22512}, {f: 2, c: 22517},
  16388. {f: 2, c: 22523}, {f: 2, c: 22526}, 22529, {f: 2, c: 22531},
  16389. {f: 2, c: 22536}, 22540, {f: 3, c: 22542}, {f: 3, c: 22546},
  16390. {f: 2, c: 22551}, {f: 3, c: 22554}, 22559, {f: 2, c: 22562},
  16391. {f: 5, c: 22565}, {f: 4, c: 22571}, {f: 2, c: 22578}, {f: 14, c: 22582},
  16392. {f: 5, c: 22597}, 22606, 22608, 22611, {f: 2, c: 22613}, {f: 5, c: 22617},
  16393. {f: 3, c: 22623}, 22627, {f: 5, c: 22630}, {f: 8, c: 22637},
  16394. {f: 3, c: 22646}, {f: 4, c: 22650}, 22655, 22658, 22660, {f: 3, c: 22662},
  16395. {f: 7, c: 22667}, {f: 5, c: 22676}, 22683, 22685, {f: 8, c: 22688},
  16396. {f: 4, c: 22698}, {f: 4, c: 22703}, {f: 7, c: 22708}, 22717,
  16397. {f: 2, c: 22719}, {f: 3, c: 22722}, 22726, {f: 9, c: 22728}, 22738, 22740,
  16398. {f: 2, c: 22742}, {f: 3, c: 22747}, 22753, 22755, {f: 4, c: 22757}, 22762,
  16399. 22765, {f: 2, c: 22769}, {f: 2, c: 22772}, {f: 2, c: 22775},
  16400. {f: 2, c: 22779}, {f: 4, c: 22782}, 22787, {f: 2, c: 22789},
  16401. {f: 2, c: 22792}, [12066, 22794], {f: 2, c: 22795}, 22798,
  16402. {f: 4, c: 22800}, {f: 2, c: 22807}, 22811, {f: 2, c: 22813},
  16403. {f: 2, c: 22816}, 22819, 22822, 22824, 22828, 22832, {f: 2, c: 22834},
  16404. {f: 2, c: 22837}, 22843, 22845, {f: 2, c: 22847}, 22851, {f: 2, c: 22853},
  16405. 22858, {f: 2, c: 22860}, 22864, {f: 2, c: 22866}, 22873, {f: 5, c: 22875},
  16406. 22881, {f: 2, c: 22883}, {f: 3, c: 22886}, 22891, 22893, {f: 4, c: 22895},
  16407. 22901, 22903, {f: 3, c: 22906}, {f: 3, c: 22910}, 22917, 22921,
  16408. {f: 2, c: 22923}, {f: 4, c: 22926}, {f: 2, c: 22932}, 22936,
  16409. {f: 3, c: 22938}, {f: 4, c: 22943}, {f: 2, c: 22950}, {f: 2, c: 22956},
  16410. {f: 2, c: 22960}, {f: 6, c: 22963}, 22970, {f: 2, c: 22972},
  16411. {f: 7, c: 22975}, {f: 3, c: 22983}, {f: 4, c: 22988}, {f: 2, c: 22997},
  16412. 23001, 23003, {f: 5, c: 23006}, 23012, {f: 2, c: 23014}, {f: 3, c: 23017},
  16413. {f: 12, c: 23021}, 23034, {f: 3, c: 23036}, 23040, 23042, {f: 2, c: 23050},
  16414. {f: 4, c: 23053}, 23058, {f: 4, c: 23060}, {f: 3, c: 23065},
  16415. {f: 2, c: 23069}, {f: 2, c: 23073}, 23076, {f: 3, c: 23078},
  16416. {f: 7, c: 23082}, 23091, 23093, {f: 5, c: 23095}, {f: 3, c: 23101},
  16417. {f: 4, c: 23106}, {f: 2, c: 23111}, {f: 10, c: 23115}, {f: 4, c: 23126},
  16418. {f: 7, c: 23131}, {f: 3, c: 23139}, {f: 2, c: 23144}, {f: 2, c: 23147},
  16419. {f: 6, c: 23150}, {f: 2, c: 23160}, {f: 4, c: 23163}, {f: 18, c: 23168},
  16420. {f: 7, c: 23187}, {f: 11, c: 23196}, {f: 2, c: 23208}, {f: 7, c: 23211},
  16421. 23220, {f: 2, c: 23222}, {f: 4, c: 23225}, {f: 2, c: 23231},
  16422. {f: 6, c: 23235}, {f: 2, c: 23242}, {f: 5, c: 23245}, 23251, 23253,
  16423. {f: 3, c: 23257}, {f: 3, c: 23261}, 23266, {f: 2, c: 23268},
  16424. {f: 2, c: 23271}, 23274, {f: 5, c: 23276}, {f: 3, c: 23282},
  16425. {f: 5, c: 23286}, {f: 4, c: 23292}, {f: 7, c: 23297}, 23306,
  16426. {f: 9, c: 23309}, 23320, {f: 7, c: 23322}, {f: 8, c: 23330},
  16427. {f: 5, c: 23339}, 23345, 23347, {f: 2, c: 23349}, {f: 7, c: 23353},
  16428. {f: 11, c: 23361}, {f: 3, c: 23373}, 23378, 23382, 23390, {f: 2, c: 23392},
  16429. {f: 2, c: 23399}, {f: 3, c: 23405}, 23410, 23412, {f: 2, c: 23414}, 23417,
  16430. {f: 2, c: 23419}, 23422, 23426, 23430, 23434, {f: 2, c: 23437},
  16431. {f: 3, c: 23440}, 23444, 23446, 23455, {f: 3, c: 23463}, {f: 4, c: 23468},
  16432. {f: 2, c: 23473}, 23479, {f: 3, c: 23482}, {f: 2, c: 23488}, 23491,
  16433. {f: 4, c: 23496}, {f: 3, c: 23501}, 23505, {f: 9, c: 23508}, 23520, 23523,
  16434. 23530, 23533, 23535, {f: 4, c: 23537}, 23543, {f: 2, c: 23549}, 23552,
  16435. {f: 2, c: 23554}, 23557, 23564, 23568, {f: 2, c: 23570}, 23575, 23577,
  16436. 23579, {f: 4, c: 23582}, 23587, 23590, {f: 4, c: 23592}, {f: 4, c: 23597},
  16437. {f: 2, c: 23602}, {f: 2, c: 23605}, {f: 2, c: 23619}, {f: 2, c: 23622},
  16438. {f: 2, c: 23628}, {f: 3, c: 23634}, {f: 3, c: 23638}, {f: 4, c: 23642},
  16439. 23647, 23655, {f: 3, c: 23657}, 23661, 23664, {f: 7, c: 23666},
  16440. {f: 4, c: 23675}, 23680, {f: 5, c: 23683}, {f: 3, c: 23689},
  16441. {f: 2, c: 23694}, {f: 2, c: 23698}, 23701, {f: 4, c: 23709},
  16442. {f: 5, c: 23716}, 23722, {f: 3, c: 23726}, 23730, 23732, 23734,
  16443. {f: 4, c: 23737}, 23742, 23744, {f: 2, c: 23746}, {f: 6, c: 23749},
  16444. {f: 6, c: 23756}, {f: 6, c: 23763}, {f: 7, c: 23770}, {f: 2, c: 23778},
  16445. 23783, 23785, {f: 2, c: 23787}, {f: 2, c: 23790}, {f: 3, c: 23793}, 23797,
  16446. {f: 4, c: 23799}, 23804, {f: 4, c: 23806}, {f: 2, c: 23812},
  16447. {f: 5, c: 23816}, {f: 5, c: 23823}, 23829, {f: 3, c: 23832},
  16448. {f: 2, c: 23836}, {f: 5, c: 23839}, 23845, 23848, {f: 2, c: 23850},
  16449. {f: 5, c: 23855}, {f: 8, c: 23861}, {f: 8, c: 23871}, {f: 2, c: 23880},
  16450. {f: 3, c: 23885}, {f: 7, c: 23889}, {f: 2, c: 23897}, 23900,
  16451. {f: 11, c: 23902}, 23914, {f: 2, c: 23917}, {f: 4, c: 23920},
  16452. {f: 12, c: 23925}, 23939, {f: 2, c: 23941}, {f: 15, c: 23944}, 23960,
  16453. {f: 3, c: 23962}, {f: 2, c: 23966}, {f: 6, c: 23969}, {f: 15, c: 23976},
  16454. 23993, 23995, {f: 8, c: 23997}, {f: 5, c: 24006}, 24012, {f: 4, c: 24014},
  16455. 24019, {f: 6, c: 24021}, 24028, {f: 2, c: 24031}, {f: 2, c: 24035}, 24042,
  16456. {f: 2, c: 24044}, {f: 2, c: 24053}, {f: 5, c: 24056}, {f: 2, c: 24063},
  16457. 24068, 24071, {f: 3, c: 24073}, {f: 2, c: 24077}, {f: 2, c: 24082}, 24087,
  16458. {f: 7, c: 24094}, {f: 3, c: 24104}, 24108, {f: 2, c: 24111}, 24114,
  16459. {f: 2, c: 24116}, {f: 2, c: 24121}, {f: 2, c: 24126}, 24129,
  16460. {f: 6, c: 24134}, {f: 7, c: 24141}, 24150, {f: 2, c: 24153},
  16461. {f: 2, c: 24156}, 24160, {f: 7, c: 24164}, {f: 5, c: 24173}, 24181, 24183,
  16462. {f: 3, c: 24193}, 24197, {f: 2, c: 24200}, {f: 3, c: 24204}, 24210, 24216,
  16463. 24219, 24221, {f: 4, c: 24225}, {f: 3, c: 24232}, 24236, {f: 5, c: 24238},
  16464. 24244, {f: 4, c: 24250}, {f: 10, c: 24255}, {f: 6, c: 24267},
  16465. {f: 2, c: 24276}, {f: 4, c: 24279}, {f: 3, c: 24284}, {f: 4, c: 24292},
  16466. 24297, 24299, {f: 6, c: 24301}, 24309, {f: 2, c: 24312}, {f: 3, c: 24315},
  16467. {f: 3, c: 24325}, 24329, {f: 3, c: 24332}, 24336, 24338, 24340, 24342,
  16468. {f: 2, c: 24345}, {f: 3, c: 24348}, {f: 4, c: 24353}, 24360,
  16469. {f: 2, c: 24363}, 24366, 24368, 24370, 24372, {f: 3, c: 24374}, 24379,
  16470. {f: 3, c: 24381}, {f: 5, c: 24385}, 24391, {f: 3, c: 24393}, 24397, 24399,
  16471. 24401, 24404, {f: 3, c: 24410}, {f: 3, c: 24414}, 24419, 24421,
  16472. {f: 2, c: 24423}, 24427, {f: 2, c: 24430}, 24434, {f: 3, c: 24436}, 24440,
  16473. 24442, {f: 3, c: 24445}, 24451, 24454, {f: 3, c: 24461}, {f: 2, c: 24467},
  16474. 24470, {f: 2, c: 24474}, 24477, 24479, {f: 6, c: 24482}, {f: 2, c: 24491},
  16475. {f: 6, c: 24495}, 24502, 24504, {f: 2, c: 24506}, {f: 5, c: 24510},
  16476. {f: 2, c: 24519}, {f: 2, c: 24522}, 24526, {f: 3, c: 24531},
  16477. {f: 3, c: 24538}, {f: 2, c: 24542}, {f: 2, c: 24546}, {f: 2, c: 24549},
  16478. {f: 2, c: 24552}, 24556, {f: 2, c: 24559}, {f: 3, c: 24562},
  16479. {f: 2, c: 24566}, {f: 2, c: 24569}, 24572, {f: 3, c: 24583},
  16480. {f: 2, c: 24587}, {f: 2, c: 24592}, 24595, {f: 2, c: 24599}, 24602,
  16481. {f: 2, c: 24606}, {f: 3, c: 24610}, {f: 3, c: 24620}, {f: 5, c: 24624},
  16482. {f: 5, c: 24630}, {f: 2, c: 24637}, 24640, {f: 7, c: 24644}, 24652,
  16483. {f: 2, c: 24654}, 24657, {f: 2, c: 24659}, {f: 3, c: 24662},
  16484. {f: 2, c: 24667}, {f: 4, c: 24670}, {f: 2, c: 24677}, 24686,
  16485. {f: 2, c: 24689}, {f: 2, c: 24692}, 24695, 24702, {f: 3, c: 24704},
  16486. {f: 4, c: 24709}, {f: 2, c: 24714}, {f: 4, c: 24718}, 24723, 24725,
  16487. {f: 3, c: 24727}, 24732, 24734, {f: 2, c: 24737}, {f: 2, c: 24740}, 24743,
  16488. {f: 2, c: 24745}, 24750, 24752, 24755, 24759, {f: 2, c: 24761},
  16489. {f: 8, c: 24765}, {f: 3, c: 24775}, {f: 5, c: 24780}, {f: 3, c: 24786},
  16490. {f: 2, c: 24790}, 24793, 24795, 24798, {f: 4, c: 24802}, 24810, 24821,
  16491. {f: 2, c: 24823}, {f: 4, c: 24828}, {f: 4, c: 24834}, 24839,
  16492. {f: 3, c: 24842}, {f: 5, c: 24848}, {f: 4, c: 24854}, {f: 2, c: 24861},
  16493. {f: 2, c: 24865}, 24869, {f: 3, c: 24872}, {f: 8, c: 24876},
  16494. {f: 2, c: 24885}, {f: 6, c: 24888}, {f: 8, c: 24896}, 24905, 24909,
  16495. {f: 2, c: 24911}, {f: 3, c: 24914}, {f: 2, c: 24918}, 24921,
  16496. {f: 2, c: 24923}, 24926, {f: 2, c: 24928}, {f: 2, c: 24933}, 24937,
  16497. {f: 2, c: 24940}, 24943, {f: 2, c: 24945}, 24948, {f: 10, c: 24952},
  16498. {f: 7, c: 24963}, {f: 2, c: 24972}, 24975, 24979, {f: 5, c: 24981},
  16499. {f: 2, c: 24987}, {f: 6, c: 24990}, {f: 2, c: 24997}, 25002, 25005,
  16500. {f: 3, c: 25007}, {f: 3, c: 25011}, {f: 6, c: 25016}, {f: 3, c: 25023},
  16501. {f: 4, c: 25027}, {f: 4, c: 25037}, 25043, {f: 9, c: 25045},
  16502. {f: 3, c: 25056}, {f: 2, c: 25060}, 25063, {f: 9, c: 25065},
  16503. {f: 2, c: 25075}, 25081, 25083, 25085, {f: 5, c: 25089}, 25097, 25107,
  16504. 25113, {f: 3, c: 25116}, 25120, 25123, 25126, {f: 2, c: 25128}, 25131,
  16505. 25133, 25135, 25137, 25141, [12094, 25142], {f: 5, c: 25144}, 25154,
  16506. {f: 3, c: 25156}, 25162, {f: 2, c: 25167}, {f: 3, c: 25173},
  16507. {f: 2, c: 25177}, {f: 7, c: 25180}, {f: 2, c: 25188}, 25192,
  16508. {f: 2, c: 25201}, {f: 2, c: 25204}, {f: 2, c: 25207}, {f: 2, c: 25210},
  16509. 25213, {f: 3, c: 25217}, {f: 4, c: 25221}, {f: 6, c: 25227}, 25236, 25241,
  16510. {f: 3, c: 25244}, 25251, {f: 2, c: 25254}, {f: 2, c: 25257},
  16511. {f: 4, c: 25261}, {f: 3, c: 25266}, {f: 3, c: 25270}, 25274, 25278,
  16512. {f: 2, c: 25280}, 25283, 25291, 25295, 25297, 25301, {f: 2, c: 25309},
  16513. {f: 2, c: 25312}, 25316, {f: 2, c: 25322}, 25328, 25330, 25333,
  16514. {f: 4, c: 25336}, 25344, {f: 4, c: 25347}, {f: 4, c: 25354},
  16515. {f: 2, c: 25359}, {f: 4, c: 25362}, {f: 3, c: 25367}, 25372,
  16516. {f: 2, c: 25382}, 25385, {f: 3, c: 25388}, {f: 2, c: 25392},
  16517. {f: 6, c: 25395}, {f: 2, c: 25403}, {f: 3, c: 25407}, 25412,
  16518. {f: 2, c: 25415}, 25418, {f: 4, c: 25425}, {f: 8, c: 25430}, 25440,
  16519. {f: 3, c: 25444}, 25450, 25452, {f: 2, c: 25455}, {f: 3, c: 25459},
  16520. {f: 2, c: 25464}, {f: 4, c: 25468}, 25473, {f: 2, c: 25477}, 25483, 25485,
  16521. 25489, {f: 3, c: 25491}, 25495, {f: 7, c: 25497}, 25505, 25508, 25510,
  16522. 25515, 25519, {f: 2, c: 25521}, {f: 2, c: 25525}, 25529, 25531, 25533,
  16523. 25535, {f: 3, c: 25537}, 25541, {f: 2, c: 25543}, {f: 3, c: 25546}, 25553,
  16524. {f: 3, c: 25555}, {f: 3, c: 25559}, {f: 3, c: 25563}, 25567, 25570,
  16525. {f: 5, c: 25572}, {f: 2, c: 25579}, {f: 3, c: 25583}, 25587, 25589, 25591,
  16526. {f: 4, c: 25593}, 25598, {f: 2, c: 25603}, {f: 5, c: 25606}, 25614,
  16527. {f: 2, c: 25617}, {f: 2, c: 25621}, {f: 3, c: 25624}, 25629, 25631,
  16528. {f: 4, c: 25634}, {f: 3, c: 25639}, 25643, {f: 6, c: 25646}, 25653,
  16529. {f: 3, c: 25655}, {f: 2, c: 25659}, 25662, 25664, {f: 2, c: 25666}, 25673,
  16530. {f: 6, c: 25675}, 25683, {f: 3, c: 25685}, {f: 3, c: 25689}, 25693,
  16531. {f: 7, c: 25696}, 25704, {f: 3, c: 25706}, 25710, {f: 3, c: 25712},
  16532. {f: 2, c: 25716}, 25719, {f: 6, c: 25724}, 25731, 25734, {f: 8, c: 25737},
  16533. 25748, {f: 2, c: 25751}, {f: 4, c: 25754}, {f: 3, c: 25760},
  16534. {f: 3, c: 25766}, 25770, 25775, 25777, 25780, 25782, 25785, 25789, 25795,
  16535. 25798, {f: 2, c: 25800}, 25804, 25807, 25809, 25811, {f: 2, c: 25813},
  16536. 25817, {f: 3, c: 25819}, 25823, 25825, 25827, 25829, {f: 5, c: 25831},
  16537. {f: 2, c: 25837}, 25843, {f: 2, c: 25845}, {f: 2, c: 25848}, 25853, 25855,
  16538. {f: 3, c: 25857}, 25861, {f: 2, c: 25863}, {f: 5, c: 25866},
  16539. {f: 2, c: 25872}, 25875, 25877, 25879, 25882, 25884, {f: 4, c: 25886},
  16540. {f: 4, c: 25894}, 25901, {f: 4, c: 25904}, 25911, 25914, {f: 2, c: 25916},
  16541. {f: 5, c: 25920}, {f: 2, c: 25926}, {f: 2, c: 25930}, {f: 2, c: 25933},
  16542. 25936, {f: 3, c: 25938}, 25944, 25946, 25948, {f: 3, c: 25951},
  16543. {f: 2, c: 25956}, {f: 4, c: 25959}, {f: 3, c: 25965}, 25969, 25971, 25974,
  16544. {f: 9, c: 25977}, {f: 3, c: 25988}, {f: 3, c: 25992}, {f: 3, c: 25997},
  16545. 26002, 26004, 26006, 26008, 26010, {f: 2, c: 26013}, 26016,
  16546. {f: 2, c: 26018}, 26022, 26024, 26026, 26030, {f: 6, c: 26033}, 26040,
  16547. {f: 2, c: 26042}, {f: 3, c: 26046}, 26050, {f: 4, c: 26055}, 26061,
  16548. {f: 2, c: 26064}, {f: 3, c: 26067}, {f: 8, c: 26072}, 26081,
  16549. {f: 2, c: 26083}, {f: 2, c: 26090}, {f: 4, c: 26098}, {f: 2, c: 26104},
  16550. {f: 5, c: 26107}, 26113, {f: 2, c: 26116}, {f: 3, c: 26119}, 26123, 26125,
  16551. {f: 3, c: 26128}, {f: 3, c: 26134}, {f: 3, c: 26138}, 26142,
  16552. {f: 4, c: 26145}, 26150, {f: 4, c: 26153}, 26158, 26160, {f: 2, c: 26162},
  16553. {f: 5, c: 26167}, 26173, {f: 2, c: 26175}, {f: 7, c: 26180},
  16554. {f: 2, c: 26189}, {f: 2, c: 26192}, {f: 2, c: 26200}, {f: 2, c: 26203},
  16555. 26206, 26208, {f: 2, c: 26210}, 26213, 26215, {f: 5, c: 26217},
  16556. {f: 3, c: 26225}, 26229, {f: 2, c: 26232}, {f: 3, c: 26235},
  16557. {f: 3, c: 26239}, 26243, {f: 2, c: 26245}, {f: 2, c: 26250},
  16558. {f: 4, c: 26253}, {f: 4, c: 26258}, {f: 5, c: 26264}, {f: 4, c: 26270},
  16559. {f: 4, c: 26275}, {f: 2, c: 26281}, {f: 2, c: 26284}, {f: 5, c: 26287},
  16560. {f: 4, c: 26293}, {f: 4, c: 26298}, {f: 5, c: 26303}, 26309, 26312,
  16561. {f: 12, c: 26314}, {f: 2, c: 26327}, 26330, {f: 2, c: 26334},
  16562. {f: 5, c: 26337}, {f: 2, c: 26343}, {f: 2, c: 26346}, {f: 3, c: 26349},
  16563. 26353, {f: 2, c: 26357}, {f: 2, c: 26362}, 26365, {f: 2, c: 26369},
  16564. {f: 4, c: 26372}, 26380, {f: 2, c: 26382}, {f: 3, c: 26385}, 26390,
  16565. {f: 3, c: 26392}, 26396, 26398, {f: 6, c: 26400}, 26409, 26414, 26416,
  16566. {f: 2, c: 26418}, {f: 4, c: 26422}, {f: 2, c: 26427}, {f: 2, c: 26430},
  16567. 26433, {f: 2, c: 26436}, 26439, {f: 2, c: 26442}, 26445, 26450,
  16568. {f: 2, c: 26452}, {f: 5, c: 26455}, 26461, {f: 3, c: 26466},
  16569. {f: 2, c: 26470}, {f: 2, c: 26475}, 26478, 26484, 26486, {f: 4, c: 26488},
  16570. 26493, 26496, {f: 2, c: 26498}, {f: 2, c: 26501}, 26504, 26506,
  16571. {f: 4, c: 26508}, {f: 4, c: 26513}, 26518, 26521, 26523, {f: 3, c: 26527},
  16572. 26532, 26534, 26537, 26540, 26542, {f: 2, c: 26545}, 26548,
  16573. {f: 8, c: 26553}, 26562, {f: 10, c: 26565}, {f: 3, c: 26581}, 26587, 26591,
  16574. 26593, {f: 2, c: 26595}, {f: 3, c: 26598}, {f: 2, c: 26602},
  16575. {f: 2, c: 26605}, 26610, {f: 8, c: 26613}, 26622, {f: 4, c: 26625}, 26630,
  16576. 26637, 26640, 26642, {f: 2, c: 26644}, {f: 5, c: 26648}, {f: 3, c: 26654},
  16577. {f: 7, c: 26658}, {f: 7, c: 26667}, {f: 3, c: 26676}, {f: 2, c: 26682},
  16578. 26687, 26695, 26699, 26701, 26703, 26706, {f: 10, c: 26710}, 26730,
  16579. {f: 8, c: 26732}, 26741, {f: 9, c: 26744}, 26754, 26756, {f: 8, c: 26759},
  16580. {f: 3, c: 26768}, {f: 3, c: 26772}, {f: 4, c: 26777}, 26782,
  16581. {f: 2, c: 26784}, {f: 3, c: 26787}, {f: 4, c: 26793}, 26798,
  16582. {f: 2, c: 26801}, 26804, {f: 10, c: 26806}, 26817, {f: 6, c: 26819}, 26826,
  16583. 26828, {f: 4, c: 26830}, {f: 2, c: 26835}, 26841, {f: 4, c: 26843},
  16584. {f: 2, c: 26849}, {f: 3, c: 26852}, {f: 6, c: 26856}, 26863,
  16585. {f: 3, c: 26866}, {f: 3, c: 26870}, 26875, {f: 4, c: 26877},
  16586. {f: 3, c: 26882}, {f: 5, c: 26886}, 26892, 26897, {f: 12, c: 26899},
  16587. {f: 3, c: 26913}, {f: 8, c: 26917}, {f: 2, c: 26926}, {f: 3, c: 26929},
  16588. {f: 4, c: 26933}, {f: 3, c: 26938}, 26942, {f: 2, c: 26944},
  16589. {f: 7, c: 26947}, {f: 8, c: 26955}, {f: 2, c: 26965}, {f: 2, c: 26968},
  16590. {f: 2, c: 26971}, 26975, {f: 2, c: 26977}, {f: 2, c: 26980}, 26983,
  16591. {f: 2, c: 26985}, 26988, {f: 2, c: 26991}, {f: 3, c: 26994}, 26998,
  16592. {f: 2, c: 27002}, {f: 3, c: 27005}, 27009, 27011, 27013, {f: 3, c: 27018},
  16593. {f: 6, c: 27022}, {f: 2, c: 27030}, {f: 2, c: 27033}, {f: 10, c: 27037},
  16594. 27049, 27052, {f: 2, c: 27055}, {f: 2, c: 27058}, {f: 2, c: 27061},
  16595. {f: 3, c: 27064}, {f: 3, c: 27068}, 27072, {f: 8, c: 27074}, 27087,
  16596. {f: 3, c: 27089}, {f: 6, c: 27093}, {f: 3, c: 27100}, {f: 6, c: 27105},
  16597. {f: 5, c: 27112}, {f: 4, c: 27118}, {f: 9, c: 27124}, 27134, 27136,
  16598. {f: 2, c: 27139}, {f: 4, c: 27142}, {f: 8, c: 27147}, {f: 3, c: 27156},
  16599. {f: 4, c: 27162}, 27168, 27170, {f: 4, c: 27172}, 27177, {f: 4, c: 27179},
  16600. 27184, {f: 3, c: 27186}, {f: 2, c: 27190}, {f: 2, c: 27195},
  16601. {f: 5, c: 27199}, {f: 2, c: 27205}, {f: 2, c: 27209}, {f: 4, c: 27212},
  16602. {f: 7, c: 27217}, 27226, {f: 3, c: 27228}, 27232, {f: 2, c: 27235},
  16603. {f: 11, c: 27238}, {f: 7, c: 27250}, {f: 2, c: 27258}, {f: 3, c: 27261},
  16604. {f: 3, c: 27265}, {f: 4, c: 27269}, {f: 4, c: 27274}, 27279,
  16605. {f: 2, c: 27282}, {f: 2, c: 27285}, {f: 4, c: 27288}, {f: 3, c: 27293},
  16606. 27297, {f: 5, c: 27300}, 27306, {f: 2, c: 27309}, {f: 3, c: 27312},
  16607. {f: 4, c: 27316}, {f: 2, c: 27321}, {f: 7, c: 27324}, {f: 15, c: 27332},
  16608. {f: 6, c: 27348}, 27356, {f: 7, c: 27360}, 27369, 27371, {f: 6, c: 27373},
  16609. {f: 4, c: 27380}, {f: 2, c: 27385}, {f: 8, c: 27388}, {f: 5, c: 27397},
  16610. {f: 4, c: 27403}, {f: 2, c: 27408}, {f: 3, c: 27411}, {f: 7, c: 27415},
  16611. 27423, {f: 2, c: 27429}, {f: 10, c: 27432}, {f: 4, c: 27443}, 27448,
  16612. {f: 2, c: 27451}, {f: 4, c: 27455}, {f: 2, c: 27460}, 27464,
  16613. {f: 2, c: 27466}, {f: 3, c: 27469}, {f: 8, c: 27473}, {f: 5, c: 27482},
  16614. 27488, {f: 2, c: 27496}, {f: 7, c: 27499}, {f: 4, c: 27507}, 27514,
  16615. {f: 4, c: 27517}, 27525, 27528, 27532, {f: 4, c: 27534}, {f: 2, c: 27540},
  16616. 27543, 27545, {f: 2, c: 27548}, {f: 2, c: 27551}, {f: 2, c: 27554},
  16617. {f: 5, c: 27557}, {f: 2, c: 27564}, {f: 2, c: 27568}, 27574,
  16618. {f: 2, c: 27576}, {f: 3, c: 27580}, 27584, {f: 2, c: 27587},
  16619. {f: 4, c: 27591}, 27596, 27598, {f: 2, c: 27600}, 27608, 27610,
  16620. {f: 5, c: 27612}, {f: 8, c: 27618}, {f: 3, c: 27628}, {f: 3, c: 27632},
  16621. 27636, {f: 3, c: 27638}, {f: 3, c: 27642}, 27646, {f: 5, c: 27648},
  16622. {f: 3, c: 27657}, 27662, 27666, 27671, {f: 3, c: 27676}, 27680, 27685,
  16623. 27693, 27697, 27699, {f: 2, c: 27702}, {f: 4, c: 27705}, {f: 2, c: 27710},
  16624. {f: 3, c: 27715}, 27720, {f: 5, c: 27723}, {f: 3, c: 27729}, 27734,
  16625. {f: 3, c: 27736}, {f: 2, c: 27746}, {f: 3, c: 27749}, {f: 5, c: 27755},
  16626. 27761, 27763, 27765, {f: 2, c: 27767}, {f: 3, c: 27770}, {f: 2, c: 27775},
  16627. 27780, 27783, {f: 2, c: 27786}, {f: 2, c: 27789}, {f: 2, c: 27793},
  16628. {f: 4, c: 27797}, 27802, {f: 3, c: 27804}, 27808, 27810, 27816, 27820,
  16629. {f: 2, c: 27823}, {f: 4, c: 27828}, 27834, {f: 4, c: 27840},
  16630. {f: 3, c: 27846}, 27851, {f: 3, c: 27853}, {f: 2, c: 27857},
  16631. {f: 3, c: 27864}, {f: 2, c: 27868}, 27871, 27876, {f: 2, c: 27878}, 27881,
  16632. {f: 2, c: 27884}, 27890, 27892, 27897, {f: 2, c: 27903}, {f: 2, c: 27906},
  16633. {f: 2, c: 27909}, {f: 3, c: 27912}, 27917, {f: 3, c: 27919},
  16634. {f: 4, c: 27923}, 27928, {f: 2, c: 27932}, {f: 6, c: 27935}, 27942,
  16635. {f: 2, c: 27944}, {f: 2, c: 27948}, {f: 2, c: 27951}, 27956,
  16636. {f: 3, c: 27958}, 27962, {f: 2, c: 27967}, 27970, 27972, 27977, 27980,
  16637. 27984, {f: 4, c: 27989}, 27995, 27997, 27999, {f: 2, c: 28001},
  16638. {f: 2, c: 28004}, {f: 2, c: 28007}, {f: 3, c: 28011}, {f: 4, c: 28016},
  16639. {f: 2, c: 28021}, {f: 2, c: 28026}, {f: 5, c: 28029}, {f: 2, c: 28035},
  16640. 28038, {f: 2, c: 28042}, 28045, {f: 2, c: 28047}, 28050, {f: 5, c: 28054},
  16641. 28060, 28066, 28069, {f: 2, c: 28076}, {f: 2, c: 28080}, {f: 2, c: 28083},
  16642. {f: 2, c: 28086}, {f: 6, c: 28089}, {f: 3, c: 28097}, {f: 3, c: 28104},
  16643. {f: 4, c: 28109}, {f: 4, c: 28114}, 28119, {f: 3, c: 28122}, 28127,
  16644. {f: 2, c: 28130}, 28133, {f: 3, c: 28135}, 28141, {f: 2, c: 28143}, 28146,
  16645. 28148, 28152, {f: 8, c: 28157}, {f: 4, c: 28166}, 28171, 28175,
  16646. {f: 2, c: 28178}, 28181, {f: 2, c: 28184}, {f: 2, c: 28187},
  16647. {f: 2, c: 28190}, 28194, {f: 2, c: 28199}, 28202, 28206, {f: 2, c: 28208},
  16648. 28211, {f: 3, c: 28213}, 28217, {f: 3, c: 28219}, {f: 4, c: 28223},
  16649. {f: 8, c: 28229}, {f: 4, c: 28239}, 28245, 28247, {f: 2, c: 28249},
  16650. {f: 2, c: 28252}, {f: 11, c: 28256}, {f: 2, c: 28268}, {f: 14, c: 28272},
  16651. {f: 3, c: 28288}, 28292, {f: 2, c: 28295}, {f: 5, c: 28298},
  16652. {f: 5, c: 28305}, 28311, {f: 3, c: 28313}, 28318, {f: 2, c: 28320},
  16653. {f: 2, c: 28323}, 28326, {f: 2, c: 28328}, {f: 4, c: 28331}, 28336, 28339,
  16654. 28341, {f: 2, c: 28344}, 28348, {f: 3, c: 28350}, 28355, 28358,
  16655. {f: 3, c: 28360}, 28365, 28368, 28370, 28374, {f: 2, c: 28376},
  16656. {f: 3, c: 28379}, 28387, 28391, {f: 2, c: 28394}, {f: 2, c: 28397},
  16657. {f: 2, c: 28400}, 28403, {f: 2, c: 28405}, {f: 5, c: 28410}, 28416,
  16658. {f: 3, c: 28419}, {f: 2, c: 28423}, {f: 5, c: 28426}, {f: 3, c: 28432},
  16659. {f: 4, c: 28438}, {f: 5, c: 28443}, 28449, {f: 4, c: 28453}, 28462, 28464,
  16660. {f: 2, c: 28468}, 28471, {f: 5, c: 28473}, 28480, {f: 4, c: 28482},
  16661. {f: 3, c: 28488}, 28492, {f: 3, c: 28494}, {f: 2, c: 28498},
  16662. {f: 3, c: 28501}, {f: 2, c: 28506}, 28509, {f: 3, c: 28511}, 28515, 28517,
  16663. {f: 6, c: 28519}, 28529, 28531, {f: 2, c: 28533}, 28537, 28539,
  16664. {f: 2, c: 28541}, {f: 3, c: 28545}, 28549, {f: 2, c: 28554},
  16665. {f: 8, c: 28559}, {f: 4, c: 28568}, {f: 3, c: 28573}, {f: 2, c: 28578},
  16666. {f: 2, c: 28581}, 28584, {f: 4, c: 28586}, {f: 2, c: 28591}, 28594,
  16667. {f: 2, c: 28596}, {f: 2, c: 28599}, {f: 6, c: 28602}, {f: 5, c: 28612},
  16668. {f: 7, c: 28618}, {f: 2, c: 28627}, {f: 2, c: 28630}, {f: 2, c: 28633},
  16669. {f: 2, c: 28636}, {f: 2, c: 28642}, {f: 6, c: 28645}, {f: 2, c: 28652},
  16670. {f: 8, c: 28658}, 28667, 28669, {f: 6, c: 28671}, {f: 2, c: 28679}, 28682,
  16671. {f: 3, c: 28684}, 28688, {f: 3, c: 28690}, {f: 2, c: 28694}, 28697, 28700,
  16672. 28702, {f: 2, c: 28705}, {f: 3, c: 28708}, {f: 7, c: 28713}, 28721,
  16673. {f: 2, c: 28723}, {f: 3, c: 28726}, {f: 4, c: 28730}, {f: 4, c: 28735},
  16674. {f: 7, c: 28741}, {f: 2, c: 28749}, 28752, {f: 3, c: 28754},
  16675. {f: 2, c: 28758}, {f: 4, c: 28761}, {f: 4, c: 28767}, {f: 2, c: 28773},
  16676. {f: 3, c: 28776}, 28782, {f: 4, c: 28785}, 28791, {f: 3, c: 28793}, 28797,
  16677. {f: 4, c: 28801}, {f: 3, c: 28806}, {f: 3, c: 28811}, {f: 3, c: 28815},
  16678. 28819, {f: 2, c: 28823}, {f: 2, c: 28826}, {f: 13, c: 28830}, 28848, 28850,
  16679. {f: 3, c: 28852}, 28858, {f: 2, c: 28862}, {f: 4, c: 28868}, 28873,
  16680. {f: 4, c: 28875}, {f: 8, c: 28880}, 28890, {f: 3, c: 28892},
  16681. {f: 4, c: 28896}, 28901, 28906, 28910, {f: 4, c: 28912}, {f: 2, c: 28917},
  16682. 28920, {f: 3, c: 28922}, {f: 11, c: 28926}, {f: 5, c: 28939},
  16683. {f: 2, c: 28945}, 28948, 28951, {f: 6, c: 28955}, {f: 4, c: 28962},
  16684. {f: 8, c: 28967}, {f: 4, c: 28978}, {f: 14, c: 28983}, {f: 3, c: 28998},
  16685. 29003, 29005, {f: 3, c: 29007}, {f: 9, c: 29011}, 29021, {f: 3, c: 29023},
  16686. 29027, 29029, {f: 2, c: 29034}, 29037, {f: 3, c: 29039}, {f: 4, c: 29044},
  16687. 29049, {f: 2, c: 29051}, {f: 6, c: 29054}, {f: 5, c: 29061},
  16688. {f: 4, c: 29067}, {f: 2, c: 29072}, 29075, {f: 2, c: 29077},
  16689. {f: 5, c: 29082}, {f: 7, c: 29089}, {f: 3, c: 29097}, {f: 4, c: 29101},
  16690. 29106, 29108, {f: 3, c: 29110}, {f: 4, c: 29114}, {f: 2, c: 29119}, 29122,
  16691. {f: 4, c: 29124}, {f: 5, c: 29129}, {f: 3, c: 29135}, 29139,
  16692. {f: 3, c: 29142}, {f: 2, c: 29146}, {f: 2, c: 29149}, {f: 4, c: 29153},
  16693. {f: 5, c: 29160}, {f: 5, c: 29167}, {f: 4, c: 29173}, {f: 2, c: 29178},
  16694. 29181, {f: 7, c: 29183}, {f: 6, c: 29191}, {f: 2, c: 29198},
  16695. {f: 10, c: 29201}, 29212, {f: 10, c: 29214}, 29225, 29227,
  16696. {f: 3, c: 29229}, {f: 2, c: 29235}, 29244, {f: 7, c: 29248},
  16697. {f: 3, c: 29257}, {f: 4, c: 29262}, {f: 3, c: 29267}, 29271, 29274, 29276,
  16698. 29278, 29280, {f: 3, c: 29283}, 29288, {f: 4, c: 29290}, {f: 2, c: 29296},
  16699. {f: 2, c: 29299}, {f: 3, c: 29302}, {f: 2, c: 29307}, {f: 2, c: 29314},
  16700. {f: 5, c: 29317}, 29324, 29326, {f: 2, c: 29328}, {f: 3, c: 29331},
  16701. {f: 8, c: 29335}, {f: 2, c: 29344}, {f: 4, c: 29347}, {f: 4, c: 29352},
  16702. 29358, {f: 3, c: 29361}, 29365, {f: 6, c: 29370}, {f: 3, c: 29381},
  16703. {f: 4, c: 29385}, 29391, 29393, {f: 4, c: 29395}, 29400, {f: 4, c: 29402},
  16704. 29407, {f: 6, c: 29410}, {f: 2, c: 29418}, {f: 2, c: 29429},
  16705. {f: 3, c: 29438}, 29442, {f: 6, c: 29444}, {f: 3, c: 29451},
  16706. {f: 4, c: 29455}, 29460, {f: 3, c: 29464}, {f: 2, c: 29471},
  16707. {f: 2, c: 29475}, {f: 3, c: 29478}, 29485, {f: 2, c: 29487},
  16708. {f: 2, c: 29490}, 29493, 29498, {f: 2, c: 29500}, 29504, {f: 2, c: 29506},
  16709. {f: 7, c: 29510}, {f: 2, c: 29518}, 29521, {f: 4, c: 29523},
  16710. {f: 8, c: 29528}, {f: 7, c: 29537}, 29545, 29550, 29553, {f: 2, c: 29555},
  16711. 29558, 29561, 29565, 29567, {f: 3, c: 29569}, {f: 2, c: 29573}, 29576,
  16712. 29578, {f: 2, c: 29580}, {f: 2, c: 29583}, {f: 4, c: 29586},
  16713. {f: 4, c: 29591}, {f: 3, c: 29596}, {f: 2, c: 29600}, {f: 6, c: 29603},
  16714. 29610, {f: 2, c: 29612}, 29617, {f: 3, c: 29620}, {f: 2, c: 29624},
  16715. {f: 4, c: 29628}, 29633, {f: 5, c: 29635}, {f: 2, c: 29643}, 29646,
  16716. {f: 7, c: 29650}, {f: 4, c: 29658}, 29663, {f: 4, c: 29665}, 29670, 29672,
  16717. {f: 3, c: 29674}, {f: 4, c: 29678}, {f: 11, c: 29683}, {f: 4, c: 29695},
  16718. 29700, {f: 2, c: 29703}, {f: 4, c: 29707}, {f: 9, c: 29713},
  16719. {f: 6, c: 29724}, {f: 2, c: 29731}, 29735, 29737, 29739, 29741, 29743,
  16720. {f: 2, c: 29745}, {f: 5, c: 29751}, {f: 2, c: 29757}, 29760,
  16721. {f: 9, c: 29762}, {f: 9, c: 29772}, 29782, 29784, 29789, {f: 3, c: 29792},
  16722. {f: 5, c: 29796}, {f: 2, c: 29803}, {f: 2, c: 29806}, {f: 5, c: 29809},
  16723. {f: 6, c: 29816}, 29823, 29826, {f: 3, c: 29828}, 29832, 29834,
  16724. {f: 2, c: 29836}, 29839, {f: 11, c: 29841}, 29853, {f: 4, c: 29855},
  16725. {f: 2, c: 29860}, {f: 6, c: 29866}, {f: 9, c: 29873}, {f: 2, c: 29883},
  16726. {f: 12, c: 29886}, {f: 4, c: 29899}, {f: 2, c: 29904}, 29907,
  16727. {f: 5, c: 29909}, 29915, 29917, 29919, 29921, 29925, {f: 7, c: 29927},
  16728. {f: 4, c: 29936}, 29941, {f: 7, c: 29944}, {f: 4, c: 29952},
  16729. {f: 7, c: 29957}, 29966, 29968, 29970, {f: 4, c: 29972}, 29979,
  16730. {f: 2, c: 29981}, {f: 3, c: 29984}, 29988, {f: 2, c: 29990}, 29994, 29998,
  16731. 30004, 30006, 30009, {f: 2, c: 30012}, 30015, {f: 4, c: 30017},
  16732. {f: 2, c: 30022}, {f: 2, c: 30025}, 30029, {f: 4, c: 30032},
  16733. {f: 4, c: 30037}, {f: 4, c: 30046}, {f: 2, c: 30051}, {f: 3, c: 30055},
  16734. {f: 6, c: 30060}, 30067, 30069, 30071, {f: 5, c: 30074}, {f: 3, c: 30080},
  16735. {f: 2, c: 30084}, {f: 3, c: 30088}, {f: 3, c: 30092}, 30096, 30099, 30101,
  16736. 30104, {f: 2, c: 30107}, 30110, 30114, {f: 5, c: 30118}, 30125,
  16737. {f: 2, c: 30134}, {f: 2, c: 30138}, {f: 3, c: 30143}, 30150,
  16738. {f: 2, c: 30155}, {f: 4, c: 30158}, 30163, 30167, 30170, {f: 2, c: 30172},
  16739. {f: 3, c: 30175}, 30181, 30185, {f: 4, c: 30188}, {f: 2, c: 30194},
  16740. {f: 4, c: 30197}, {f: 2, c: 30202}, {f: 2, c: 30205}, 30212,
  16741. {f: 4, c: 30214}, {f: 2, c: 30222}, {f: 4, c: 30225}, 30230, 30234,
  16742. {f: 2, c: 30236}, 30243, 30248, 30252, {f: 2, c: 30254}, {f: 2, c: 30257},
  16743. {f: 2, c: 30262}, {f: 2, c: 30265}, 30269, 30273, {f: 2, c: 30276}, 30280,
  16744. {f: 2, c: 30282}, {f: 6, c: 30286}, 30293, 30295, {f: 3, c: 30297}, 30301,
  16745. {f: 2, c: 30304}, 30310, 30312, 30314, {f: 3, c: 30323}, [12136, 30326],
  16746. 30327, {f: 2, c: 30329}, {f: 3, c: 30335}, 30339, 30341, {f: 2, c: 30345},
  16747. {f: 2, c: 30348}, {f: 2, c: 30351}, 30354, {f: 2, c: 30356},
  16748. {f: 2, c: 30359}, {f: 9, c: 30363}, {f: 9, c: 30373}, {f: 2, c: 30383},
  16749. 30387, {f: 3, c: 30389}, 30393, {f: 4, c: 30395}, {f: 2, c: 30400},
  16750. {f: 2, c: 30403}, 30407, 30409, {f: 2, c: 30411}, 30419, 30421,
  16751. {f: 2, c: 30425}, {f: 2, c: 30428}, 30432, 30434, 30438, {f: 6, c: 30440},
  16752. 30448, 30451, {f: 3, c: 30453}, {f: 2, c: 30458}, 30461, {f: 2, c: 30463},
  16753. {f: 2, c: 30466}, {f: 2, c: 30469}, 30474, 30476, {f: 11, c: 30478},
  16754. {f: 4, c: 30491}, 30497, {f: 3, c: 30499}, 30503, {f: 3, c: 30506}, 30510,
  16755. {f: 5, c: 30512}, 30521, 30523, {f: 3, c: 30525}, 30530, {f: 3, c: 30532},
  16756. {f: 7, c: 30536}, {f: 8, c: 30546}, {f: 2, c: 30556}, {f: 2, c: 30559},
  16757. 30564, 30567, {f: 2, c: 30569}, {f: 12, c: 30573}, {f: 3, c: 30586},
  16758. {f: 3, c: 30593}, {f: 6, c: 30598}, {f: 2, c: 30607}, {f: 5, c: 30611},
  16759. {f: 5, c: 30617}, 30625, {f: 2, c: 30627}, 30630, 30632, 30635,
  16760. {f: 2, c: 30638}, {f: 2, c: 30641}, 30644, {f: 5, c: 30646}, 30654,
  16761. {f: 7, c: 30656}, {f: 5, c: 30664}, {f: 9, c: 30670}, {f: 2, c: 30680},
  16762. {f: 5, c: 30685}, 30692, 30694, 30696, 30698, {f: 3, c: 30704},
  16763. {f: 2, c: 30708}, 30711, {f: 4, c: 30713}, {f: 6, c: 30723},
  16764. {f: 2, c: 30730}, {f: 3, c: 30734}, 30739, 30741, 30745, 30747, 30750,
  16765. {f: 3, c: 30752}, 30756, 30760, {f: 2, c: 30762}, {f: 2, c: 30766},
  16766. {f: 3, c: 30769}, {f: 2, c: 30773}, 30781, 30783, {f: 2, c: 30785}, 30788,
  16767. 30790, {f: 4, c: 30792}, 30797, 30799, 30801, {f: 2, c: 30803},
  16768. {f: 5, c: 30808}, {f: 6, c: 30814}, {f: 3, c: 30821}, 30825,
  16769. {f: 7, c: 30832}, {f: 4, c: 30840}, {f: 10, c: 30845}, 30856,
  16770. {f: 2, c: 30858}, {f: 2, c: 30863}, 30866, {f: 3, c: 30868}, 30873,
  16771. {f: 2, c: 30877}, 30880, 30882, 30884, 30886, 30888, {f: 3, c: 30890},
  16772. {f: 2, c: 30894}, {f: 3, c: 30901}, 30907, 30909, {f: 2, c: 30911},
  16773. {f: 3, c: 30914}, {f: 3, c: 30918}, {f: 4, c: 30924}, {f: 3, c: 30929},
  16774. {f: 3, c: 30934}, {f: 8, c: 30939}, {f: 3, c: 30948}, {f: 3, c: 30953},
  16775. {f: 2, c: 30957}, {f: 2, c: 30960}, 30963, {f: 2, c: 30965},
  16776. {f: 2, c: 30968}, {f: 2, c: 30971}, {f: 3, c: 30974}, {f: 3, c: 30978},
  16777. {f: 8, c: 30982}, {f: 4, c: 30991}, {f: 5, c: 30996}, {f: 4, c: 31002},
  16778. {f: 5, c: 31007}, 31013, {f: 3, c: 31015}, {f: 4, c: 31021},
  16779. {f: 2, c: 31026}, {f: 5, c: 31029}, 31037, 31039, {f: 4, c: 31042}, 31047,
  16780. {f: 9, c: 31050}, {f: 2, c: 31060}, {f: 2, c: 31064}, 31073,
  16781. {f: 2, c: 31075}, 31078, {f: 4, c: 31081}, 31086, {f: 7, c: 31088}, 31097,
  16782. {f: 5, c: 31099}, {f: 2, c: 31106}, {f: 4, c: 31110}, {f: 2, c: 31115},
  16783. {f: 10, c: 31120}, {f: 11, c: 31131}, {f: 2, c: 31144}, {f: 3, c: 31147},
  16784. 31151, 31154, {f: 4, c: 31156}, [12145, 31160], 31164, 31167, 31170,
  16785. {f: 2, c: 31172}, {f: 2, c: 31175}, 31178, 31180, {f: 3, c: 31182},
  16786. {f: 2, c: 31187}, {f: 2, c: 31190}, {f: 6, c: 31193}, {f: 3, c: 31200},
  16787. 31205, 31208, 31210, 31212, 31214, {f: 7, c: 31217}, {f: 2, c: 31225},
  16788. 31228, {f: 2, c: 31230}, 31233, {f: 2, c: 31236}, {f: 4, c: 31239}, 31244,
  16789. {f: 5, c: 31247}, {f: 2, c: 31253}, {f: 2, c: 31256}, {f: 3, c: 31259},
  16790. 31263, {f: 2, c: 31265}, {f: 10, c: 31268}, {f: 2, c: 31279}, 31282,
  16791. {f: 3, c: 31284}, 31288, 31290, 31294, {f: 5, c: 31297}, {f: 5, c: 31303},
  16792. {f: 2, c: 31311}, {f: 5, c: 31314}, {f: 9, c: 31320}, {f: 6, c: 31331},
  16793. 31338, {f: 4, c: 31340}, {f: 3, c: 31345}, 31349, {f: 4, c: 31355}, 31362,
  16794. 31365, 31367, {f: 4, c: 31369}, {f: 3, c: 31374}, {f: 2, c: 31379},
  16795. {f: 3, c: 31385}, 31390, {f: 4, c: 31393}, 31399, 31403, {f: 4, c: 31407},
  16796. {f: 2, c: 31412}, {f: 3, c: 31415}, {f: 4, c: 31419}, {f: 4, c: 31424},
  16797. 31430, 31433, {f: 10, c: 31436}, {f: 2, c: 31447}, {f: 4, c: 31450},
  16798. {f: 2, c: 31457}, 31460, {f: 3, c: 31463}, {f: 2, c: 31467}, 31470,
  16799. {f: 6, c: 31472}, {f: 2, c: 31479}, {f: 2, c: 31483}, 31486,
  16800. {f: 3, c: 31488}, 31493, 31495, 31497, {f: 3, c: 31500}, 31504,
  16801. {f: 2, c: 31506}, {f: 3, c: 31510}, 31514, {f: 2, c: 31516}, 31519,
  16802. {f: 3, c: 31521}, 31527, 31529, 31533, {f: 2, c: 31535}, 31538,
  16803. {f: 4, c: 31540}, 31545, 31547, 31549, {f: 6, c: 31551}, 31560, 31562,
  16804. {f: 2, c: 31565}, 31571, 31573, 31575, 31577, 31580, {f: 2, c: 31582},
  16805. 31585, {f: 4, c: 31587}, {f: 6, c: 31592}, {f: 2, c: 31599},
  16806. {f: 2, c: 31603}, 31606, 31608, 31610, {f: 2, c: 31612}, 31615,
  16807. {f: 4, c: 31617}, {f: 5, c: 31622}, 31628, {f: 2, c: 31630},
  16808. {f: 3, c: 31633}, 31638, {f: 4, c: 31640}, {f: 3, c: 31646},
  16809. {f: 3, c: 31651}, {f: 3, c: 31662}, {f: 2, c: 31666}, {f: 3, c: 31669},
  16810. {f: 7, c: 31673}, {f: 2, c: 31682}, 31685, 31688, 31690, {f: 4, c: 31693},
  16811. 31698, {f: 5, c: 31700}, {f: 2, c: 31707}, {f: 3, c: 31710},
  16812. {f: 2, c: 31714}, {f: 2, c: 31719}, {f: 3, c: 31723}, {f: 2, c: 31727},
  16813. 31730, {f: 3, c: 31732}, {f: 4, c: 31736}, 31741, 31743, {f: 6, c: 31745},
  16814. {f: 3, c: 31752}, 31758, {f: 6, c: 31760}, {f: 7, c: 31767}, 31776, 31778,
  16815. {f: 2, c: 31780}, {f: 2, c: 31784}, {f: 12, c: 31788}, {f: 4, c: 31801},
  16816. 31810, {f: 8, c: 31812}, {f: 14, c: 31822}, {f: 2, c: 31837},
  16817. {f: 3, c: 31841}, {f: 4, c: 31845}, 31851, 31853, {f: 3, c: 31855},
  16818. {f: 6, c: 31861}, {f: 11, c: 31870}, {f: 7, c: 31882}, {f: 2, c: 31891},
  16819. 31894, {f: 3, c: 31897}, {f: 2, c: 31904}, 31907, {f: 4, c: 31910},
  16820. {f: 3, c: 31915}, {f: 2, c: 31919}, {f: 5, c: 31924}, {f: 2, c: 31930},
  16821. {f: 2, c: 31935}, {f: 3, c: 31938}, 31942, 31945, 31947, {f: 7, c: 31950},
  16822. 31960, {f: 2, c: 31962}, {f: 6, c: 31969}, {f: 6, c: 31977}, 31985, 31987,
  16823. 31989, 31991, 31994, {f: 2, c: 31996}, 31999, 32001, 32003, 32012,
  16824. {f: 2, c: 32014}, {f: 2, c: 32017}, 32022, 32024, {f: 3, c: 32029},
  16825. {f: 4, c: 32035}, {f: 3, c: 32040}, {f: 3, c: 32044}, {f: 5, c: 32052},
  16826. 32059, {f: 2, c: 32061}, 32065, 32067, 32069, {f: 7, c: 32071}, 32079,
  16827. {f: 12, c: 32081}, {f: 2, c: 32095}, {f: 3, c: 32099}, 32103,
  16828. {f: 5, c: 32105}, {f: 2, c: 32111}, {f: 2, c: 32116}, 32120,
  16829. {f: 7, c: 32122}, 32130, {f: 2, c: 32132}, 32135, {f: 5, c: 32138},
  16830. {f: 3, c: 32144}, {f: 8, c: 32148}, 32157, {f: 3, c: 32159},
  16831. {f: 2, c: 32164}, {f: 4, c: 32167}, 32175, {f: 3, c: 32181}, 32188,
  16832. {f: 4, c: 32192}, {f: 2, c: 32197}, {f: 2, c: 32200}, {f: 5, c: 32204},
  16833. 32211, {f: 2, c: 32213}, {f: 3, c: 32218}, 32223, 32226, {f: 2, c: 32228},
  16834. 32231, {f: 2, c: 32234}, {f: 2, c: 32237}, 32240, 32243, 32245,
  16835. {f: 2, c: 32247}, 32250, {f: 12, c: 32252}, {f: 4, c: 32268},
  16836. {f: 9, c: 32274}, 32284, {f: 3, c: 32288}, {f: 3, c: 32292},
  16837. {f: 3, c: 32296}, 32300, {f: 2, c: 32303}, 32307, 32312, 32314, 32316,
  16838. {f: 2, c: 32319}, {f: 3, c: 32322}, {f: 10, c: 32328}, 32339,
  16839. {f: 4, c: 32342}, {f: 3, c: 32347}, {f: 3, c: 32351}, {f: 6, c: 32355},
  16840. 32364, {f: 2, c: 32369}, {f: 5, c: 32372}, {f: 2, c: 32378},
  16841. {f: 3, c: 32383}, {f: 5, c: 32387}, 32393, 32395, 32398, {f: 3, c: 32400},
  16842. 32405, 32407, {f: 2, c: 32409}, {f: 2, c: 32413}, 32430, 32436,
  16843. {f: 2, c: 32443}, 32470, 32484, 32492, 32505, 32522, 32528, 32542, 32567,
  16844. 32569, {f: 7, c: 32571}, 32579, {f: 6, c: 32582}, 32589, 32591,
  16845. {f: 2, c: 32594}, 32598, 32601, {f: 4, c: 32603}, 32608, {f: 5, c: 32611},
  16846. {f: 3, c: 32619}, 32623, 32627, {f: 2, c: 32629}, 32632, {f: 4, c: 32634},
  16847. {f: 2, c: 32639}, {f: 3, c: 32642}, 32647, 32649, 32651, 32653,
  16848. {f: 5, c: 32655}, {f: 5, c: 32661}, {f: 2, c: 32667}, 32672,
  16849. {f: 2, c: 32674}, 32678, 32680, {f: 5, c: 32682}, 32689, {f: 5, c: 32691},
  16850. {f: 2, c: 32698}, 32702, 32704, {f: 3, c: 32706}, {f: 4, c: 32710}, 32715,
  16851. 32717, {f: 3, c: 32719}, 32723, {f: 2, c: 32726}, {f: 6, c: 32729},
  16852. {f: 3, c: 32738}, {f: 2, c: 32743}, {f: 4, c: 32746}, 32751, 32754,
  16853. {f: 5, c: 32756}, 32762, {f: 3, c: 32765}, 32770, {f: 4, c: 32775},
  16854. {f: 2, c: 32782}, 32785, 32787, {f: 2, c: 32794}, {f: 3, c: 32797}, 32801,
  16855. {f: 2, c: 32803}, 32811, 32813, {f: 2, c: 32815}, 32818, 32820,
  16856. {f: 2, c: 32825}, 32828, 32830, {f: 2, c: 32832}, {f: 2, c: 32836},
  16857. {f: 3, c: 32839}, {f: 4, c: 32846}, 32851, 32853, 32855, 32857,
  16858. {f: 3, c: 32859}, {f: 10, c: 32863}, {f: 4, c: 32875}, 32884, 32888,
  16859. {f: 3, c: 32890}, {f: 2, c: 32897}, 32904, 32906, {f: 6, c: 32909},
  16860. {f: 2, c: 32916}, 32919, 32921, 32926, 32931, {f: 3, c: 32934}, 32940,
  16861. 32944, 32947, {f: 2, c: 32949}, {f: 2, c: 32952}, 32955, 32965,
  16862. {f: 5, c: 32967}, {f: 7, c: 32975}, 32984, {f: 2, c: 32991},
  16863. {f: 2, c: 32994}, 32998, 33006, 33013, 33015, 33017, 33019,
  16864. {f: 4, c: 33022}, {f: 2, c: 33027}, {f: 2, c: 33031}, {f: 2, c: 33035},
  16865. 33045, 33047, 33049, {f: 2, c: 33052}, {f: 13, c: 33055}, {f: 2, c: 33069},
  16866. 33072, {f: 3, c: 33075}, 33079, {f: 4, c: 33082}, {f: 7, c: 33087}, 33095,
  16867. 33097, 33101, 33103, 33106, {f: 2, c: 33111}, {f: 5, c: 33115},
  16868. {f: 3, c: 33122}, 33128, 33130, 33132, 33135, {f: 2, c: 33138},
  16869. {f: 3, c: 33141}, 33153, {f: 5, c: 33155}, 33161, {f: 4, c: 33163}, 33168,
  16870. {f: 6, c: 33170}, 33177, {f: 2, c: 33182}, {f: 2, c: 33185},
  16871. {f: 2, c: 33188}, 33191, {f: 8, c: 33195}, {f: 6, c: 33204}, 33212,
  16872. {f: 2, c: 33220}, {f: 2, c: 33223}, 33227, 33230, {f: 8, c: 33232}, 33241,
  16873. {f: 4, c: 33243}, {f: 2, c: 33249}, {f: 3, c: 33252}, 33257, 33259,
  16874. {f: 5, c: 33262}, {f: 5, c: 33269}, 33277, 33279, 33283, 33291,
  16875. {f: 2, c: 33294}, 33297, 33299, {f: 6, c: 33301}, 33309, 33312,
  16876. {f: 4, c: 33316}, 33321, 33326, 33330, 33338, {f: 2, c: 33340},
  16877. {f: 5, c: 33343}, {f: 2, c: 33349}, 33352, 33354, {f: 3, c: 33356},
  16878. {f: 8, c: 33360}, {f: 4, c: 33371}, {f: 4, c: 33376}, 33381, 33383,
  16879. {f: 2, c: 33385}, {f: 2, c: 33388}, {f: 2, c: 33397}, [12171, 33400],
  16880. {f: 2, c: 33403}, {f: 2, c: 33408}, 33411, {f: 3, c: 33413}, 33417, 33420,
  16881. 33424, {f: 4, c: 33427}, {f: 2, c: 33434}, 33438, 33440, {f: 2, c: 33442},
  16882. 33447, 33458, {f: 2, c: 33461}, 33466, 33468, {f: 2, c: 33471},
  16883. {f: 2, c: 33474}, {f: 2, c: 33477}, 33481, 33488, 33494, {f: 2, c: 33497},
  16884. 33501, 33506, {f: 3, c: 33512}, {f: 3, c: 33516}, 33520, {f: 2, c: 33522},
  16885. {f: 2, c: 33525}, 33528, 33530, {f: 5, c: 33532}, {f: 2, c: 33546}, 33549,
  16886. 33552, {f: 2, c: 33554}, 33558, {f: 2, c: 33560}, {f: 10, c: 33565},
  16887. {f: 2, c: 33577}, 33582, 33584, 33586, 33591, 33595, {f: 3, c: 33597},
  16888. {f: 2, c: 33601}, {f: 2, c: 33604}, 33608, {f: 5, c: 33610}, 33619,
  16889. {f: 5, c: 33621}, 33629, 33634, {f: 7, c: 33648}, {f: 2, c: 33657},
  16890. {f: 7, c: 33662}, {f: 2, c: 33671}, {f: 3, c: 33675}, {f: 3, c: 33679},
  16891. {f: 2, c: 33684}, 33687, {f: 2, c: 33689}, 33693, 33695, 33697,
  16892. {f: 4, c: 33699}, {f: 4, c: 33708}, 33717, 33723, {f: 2, c: 33726},
  16893. {f: 3, c: 33730}, 33734, {f: 2, c: 33736}, 33739, {f: 2, c: 33741},
  16894. {f: 4, c: 33744}, 33749, 33751, {f: 3, c: 33753}, 33758, {f: 3, c: 33762},
  16895. {f: 3, c: 33766}, {f: 4, c: 33771}, {f: 5, c: 33779}, {f: 3, c: 33786},
  16896. {f: 3, c: 33790}, 33794, 33797, {f: 2, c: 33800}, 33808, {f: 6, c: 33810},
  16897. {f: 3, c: 33817}, {f: 6, c: 33822}, {f: 3, c: 33833}, {f: 4, c: 33837},
  16898. {f: 3, c: 33842}, {f: 2, c: 33846}, {f: 3, c: 33849}, {f: 8, c: 33854},
  16899. {f: 2, c: 33863}, {f: 7, c: 33866}, {f: 4, c: 33875}, 33880,
  16900. {f: 4, c: 33885}, 33890, 33893, {f: 2, c: 33895}, 33898, 33902, 33904,
  16901. 33906, 33908, 33913, {f: 7, c: 33915}, {f: 4, c: 33923}, 33930, 33933,
  16902. {f: 4, c: 33935}, {f: 2, c: 33941}, 33944, {f: 2, c: 33946},
  16903. {f: 4, c: 33949}, {f: 13, c: 33954}, {f: 2, c: 33968}, 33971,
  16904. {f: 3, c: 33973}, 33979, 33982, {f: 2, c: 33986}, {f: 4, c: 33989}, 33996,
  16905. {f: 2, c: 33998}, 34002, {f: 2, c: 34004}, {f: 6, c: 34007}, 34014,
  16906. {f: 2, c: 34017}, 34020, {f: 5, c: 34023}, 34029, {f: 11, c: 34033}, 34046,
  16907. {f: 12, c: 34048}, {f: 4, c: 34061}, 34066, {f: 2, c: 34069},
  16908. {f: 2, c: 34072}, {f: 3, c: 34075}, 34080, 34082, {f: 2, c: 34084},
  16909. {f: 4, c: 34087}, {f: 9, c: 34094}, {f: 3, c: 34110}, 34114,
  16910. {f: 2, c: 34116}, 34119, {f: 3, c: 34123}, {f: 3, c: 34127}, 34132, 34135,
  16911. {f: 4, c: 34138}, {f: 3, c: 34143}, 34147, {f: 3, c: 34149},
  16912. {f: 2, c: 34155}, {f: 4, c: 34158}, 34163, {f: 2, c: 34165}, 34168,
  16913. {f: 2, c: 34172}, {f: 5, c: 34175}, 34182, 34185, 34187, {f: 2, c: 34189},
  16914. 34192, {f: 2, c: 34194}, {f: 6, c: 34197}, {f: 2, c: 34205},
  16915. {f: 4, c: 34208}, 34213, 34215, {f: 3, c: 34219}, {f: 6, c: 34225}, 34232,
  16916. {f: 6, c: 34235}, {f: 7, c: 34242}, {f: 3, c: 34250}, {f: 2, c: 34257},
  16917. 34260, {f: 6, c: 34262}, {f: 6, c: 34270}, {f: 3, c: 34278},
  16918. {f: 9, c: 34283}, 34293, {f: 2, c: 34295}, {f: 3, c: 34300},
  16919. {f: 4, c: 34304}, {f: 3, c: 34312}, {f: 5, c: 34316}, {f: 4, c: 34322},
  16920. {f: 3, c: 34327}, {f: 3, c: 34331}, {f: 3, c: 34335}, {f: 4, c: 34339},
  16921. 34344, {f: 3, c: 34346}, {f: 10, c: 34350}, 34361, 34363, {f: 2, c: 34365},
  16922. {f: 13, c: 34368}, {f: 2, c: 34386}, {f: 4, c: 34390}, 34395, 34397,
  16923. {f: 2, c: 34400}, {f: 4, c: 34403}, {f: 3, c: 34408}, 34413,
  16924. {f: 2, c: 34415}, {f: 7, c: 34418}, {f: 7, c: 34435}, {f: 5, c: 34446},
  16925. 34452, {f: 6, c: 34454}, {f: 5, c: 34462}, {f: 2, c: 34469}, 34475,
  16926. {f: 2, c: 34477}, {f: 2, c: 34482}, {f: 3, c: 34487}, {f: 5, c: 34491},
  16927. {f: 3, c: 34497}, 34501, 34504, {f: 2, c: 34508}, {f: 2, c: 34514},
  16928. {f: 3, c: 34517}, 34522, {f: 2, c: 34524}, {f: 4, c: 34528},
  16929. {f: 4, c: 34533}, {f: 3, c: 34538}, 34543, {f: 3, c: 34549},
  16930. {f: 3, c: 34555}, 34559, 34561, {f: 2, c: 34564}, {f: 2, c: 34571},
  16931. {f: 4, c: 34574}, 34580, 34582, 34585, 34587, 34589, {f: 2, c: 34591},
  16932. 34596, {f: 3, c: 34598}, {f: 4, c: 34602}, {f: 2, c: 34607},
  16933. {f: 2, c: 34610}, {f: 2, c: 34613}, {f: 3, c: 34616}, {f: 2, c: 34620},
  16934. {f: 7, c: 34624}, {f: 2, c: 34634}, 34637, {f: 4, c: 34639}, 34644, 34646,
  16935. 34648, {f: 6, c: 34650}, {f: 2, c: 34657}, {f: 7, c: 34663}, 34671,
  16936. {f: 3, c: 34673}, 34677, 34679, {f: 2, c: 34681}, {f: 3, c: 34687},
  16937. {f: 2, c: 34694}, {f: 2, c: 34697}, 34700, {f: 5, c: 34702},
  16938. {f: 3, c: 34708}, {f: 6, c: 34712}, {f: 2, c: 34720}, {f: 5, c: 34723},
  16939. {f: 2, c: 34729}, 34734, {f: 3, c: 34736}, 34740, {f: 4, c: 34742}, 34748,
  16940. {f: 2, c: 34750}, {f: 3, c: 34753}, 34757, 34759, 34761, {f: 2, c: 34764},
  16941. {f: 2, c: 34767}, {f: 7, c: 34772}, {f: 4, c: 34780}, {f: 2, c: 34785},
  16942. 34788, {f: 4, c: 34790}, 34795, 34797, {f: 2, c: 34800}, {f: 3, c: 34803},
  16943. {f: 2, c: 34807}, 34810, {f: 2, c: 34812}, {f: 4, c: 34815}, 34820,
  16944. {f: 3, c: 34823}, {f: 5, c: 34827}, 34834, 34836, {f: 4, c: 34839},
  16945. {f: 3, c: 34844}, 34848, {f: 13, c: 34852}, {f: 3, c: 34867},
  16946. {f: 2, c: 34871}, 34874, {f: 3, c: 34877}, {f: 3, c: 34881},
  16947. {f: 3, c: 34887}, 34891, {f: 5, c: 34894}, {f: 2, c: 34901}, 34904, 34906,
  16948. 34908, {f: 3, c: 34910}, {f: 2, c: 34918}, 34922, 34925, 34927, 34929,
  16949. {f: 4, c: 34931}, 34936, {f: 3, c: 34938}, 34944, 34947, {f: 2, c: 34950},
  16950. {f: 2, c: 34953}, 34956, {f: 4, c: 34958}, {f: 3, c: 34963},
  16951. {f: 5, c: 34967}, {f: 5, c: 34973}, 34979, {f: 6, c: 34981}, 34988,
  16952. {f: 3, c: 34990}, {f: 5, c: 34994}, {f: 4, c: 35000}, {f: 4, c: 35005},
  16953. {f: 2, c: 35011}, {f: 2, c: 35015}, {f: 3, c: 35019}, {f: 2, c: 35024},
  16954. 35027, {f: 2, c: 35030}, {f: 2, c: 35034}, 35038, {f: 2, c: 35040},
  16955. {f: 2, c: 35046}, {f: 7, c: 35049}, 35058, {f: 3, c: 35061},
  16956. {f: 2, c: 35066}, {f: 3, c: 35071}, {f: 4, c: 35075}, {f: 2, c: 35080},
  16957. {f: 5, c: 35083}, 35089, {f: 5, c: 35092}, {f: 5, c: 35100},
  16958. {f: 3, c: 35106}, {f: 4, c: 35110}, {f: 4, c: 35116}, 35121, 35125, 35127,
  16959. {f: 2, c: 35129}, {f: 5, c: 35132}, {f: 2, c: 35138}, {f: 2, c: 35141},
  16960. {f: 14, c: 35144}, {f: 6, c: 35159}, {f: 3, c: 35169}, 35173,
  16961. {f: 3, c: 35175}, 35179, {f: 2, c: 35181}, {f: 2, c: 35184},
  16962. {f: 8, c: 35187}, {f: 2, c: 35196}, [12177, 35198], 35200, 35202,
  16963. {f: 2, c: 35204}, {f: 4, c: 35207}, {f: 3, c: 35212}, {f: 3, c: 35216},
  16964. {f: 2, c: 35220}, 35223, {f: 8, c: 35225}, {f: 4, c: 35234},
  16965. {f: 3, c: 35239}, 35243, {f: 2, c: 35245}, {f: 2, c: 35248},
  16966. {f: 4, c: 35251}, {f: 2, c: 35256}, {f: 2, c: 35259}, 35262, 35267, 35277,
  16967. {f: 3, c: 35283}, {f: 3, c: 35287}, 35291, 35293, {f: 4, c: 35295}, 35300,
  16968. {f: 4, c: 35303}, {f: 3, c: 35308}, {f: 3, c: 35312}, 35317, 35319,
  16969. {f: 7, c: 35321}, {f: 3, c: 35332}, 35337, 35339, 35341, 35343,
  16970. {f: 2, c: 35345}, 35348, 35351, {f: 2, c: 35353}, 35356, 35358,
  16971. {f: 3, c: 35360}, 35364, {f: 4, c: 35366}, {f: 2, c: 35371},
  16972. {f: 3, c: 35374}, {f: 2, c: 35378}, 35381, {f: 3, c: 35383},
  16973. {f: 3, c: 35387}, {f: 2, c: 35391}, {f: 4, c: 35394}, 35399,
  16974. {f: 5, c: 35401}, 35407, 35409, 35411, {f: 2, c: 35414}, {f: 2, c: 35417},
  16975. {f: 2, c: 35420}, {f: 2, c: 35423}, {f: 2, c: 35428}, {f: 2, c: 35431},
  16976. 35434, 35439, 35444, {f: 3, c: 35446}, {f: 2, c: 35450}, {f: 2, c: 35453},
  16977. {f: 4, c: 35456}, 35464, {f: 2, c: 35467}, {f: 3, c: 35470}, 35476,
  16978. {f: 2, c: 35478}, 35481, {f: 3, c: 35483}, 35487, 35490, 35495,
  16979. {f: 3, c: 35497}, {f: 3, c: 35501}, 35505, {f: 3, c: 35507},
  16980. {f: 2, c: 35511}, {f: 2, c: 35514}, {f: 2, c: 35517}, {f: 2, c: 35520},
  16981. 35523, {f: 2, c: 35525}, 35528, 35530, 35532, 35534, 35536,
  16982. {f: 3, c: 35539}, {f: 3, c: 35544}, 35549, {f: 3, c: 35551}, 35555, 35557,
  16983. {f: 3, c: 35560}, 35564, {f: 2, c: 35567}, 35570, {f: 2, c: 35572}, 35577,
  16984. 35579, 35581, 35583, 35587, 35590, {f: 2, c: 35592}, {f: 3, c: 35595},
  16985. 35599, {f: 3, c: 35601}, 35605, 35608, 35612, {f: 3, c: 35614},
  16986. {f: 4, c: 35618}, 35623, {f: 2, c: 35625}, {f: 5, c: 35630},
  16987. {f: 5, c: 35636}, {f: 4, c: 35642}, {f: 10, c: 35647}, {f: 4, c: 35658},
  16988. {f: 6, c: 35664}, 35671, 35675, {f: 9, c: 35677}, {f: 4, c: 35687},
  16989. {f: 2, c: 35693}, {f: 3, c: 35697}, {f: 2, c: 35701}, {f: 5, c: 35704},
  16990. {f: 2, c: 35710}, {f: 9, c: 35713}, {f: 3, c: 35723}, {f: 3, c: 35727},
  16991. 35732, {f: 5, c: 35735}, 35741, 35743, 35756, 35761, 35771, 35783, 35792,
  16992. 35818, 35849, 35870, {f: 9, c: 35896}, {f: 4, c: 35906}, {f: 2, c: 35914},
  16993. {f: 3, c: 35917}, {f: 4, c: 35921}, {f: 4, c: 35926}, {f: 6, c: 35931},
  16994. {f: 7, c: 35939}, {f: 7, c: 35948}, {f: 4, c: 35956}, {f: 7, c: 35963},
  16995. {f: 2, c: 35971}, {f: 3, c: 35974}, 35979, {f: 7, c: 35981},
  16996. {f: 3, c: 35989}, {f: 4, c: 35993}, 35999, {f: 4, c: 36003},
  16997. {f: 2, c: 36013}, 36017, 36021, 36025, 36030, 36038, 36041,
  16998. {f: 6, c: 36043}, 36052, {f: 4, c: 36054}, 36059, 36061, 36063, 36069,
  16999. {f: 2, c: 36072}, {f: 6, c: 36078}, {f: 5, c: 36085}, {f: 5, c: 36095},
  17000. {f: 2, c: 36102}, 36105, 36108, 36110, {f: 5, c: 36113}, {f: 4, c: 36119},
  17001. 36128, {f: 2, c: 36177}, 36183, 36191, 36197, {f: 3, c: 36200}, 36204,
  17002. {f: 2, c: 36206}, {f: 2, c: 36209}, {f: 9, c: 36216}, {f: 2, c: 36226},
  17003. {f: 4, c: 36230}, {f: 5, c: 36236}, {f: 2, c: 36242}, {f: 3, c: 36246},
  17004. {f: 5, c: 36250}, {f: 3, c: 36256}, {f: 4, c: 36260}, {f: 8, c: 36265},
  17005. {f: 2, c: 36278}, 36281, 36283, 36285, {f: 3, c: 36288}, 36293,
  17006. {f: 4, c: 36295}, 36301, 36304, {f: 4, c: 36306}, {f: 2, c: 36312}, 36316,
  17007. {f: 3, c: 36320}, {f: 3, c: 36325}, 36329, {f: 2, c: 36333},
  17008. {f: 3, c: 36336}, 36340, 36342, 36348, {f: 7, c: 36350}, {f: 3, c: 36358},
  17009. 36363, {f: 2, c: 36365}, {f: 3, c: 36369}, {f: 8, c: 36373},
  17010. {f: 2, c: 36384}, {f: 5, c: 36388}, 36395, 36397, 36400, {f: 2, c: 36402},
  17011. {f: 3, c: 36406}, {f: 2, c: 36411}, {f: 2, c: 36414}, 36419,
  17012. {f: 2, c: 36421}, {f: 4, c: 36429}, {f: 2, c: 36435}, {f: 3, c: 36438},
  17013. {f: 9, c: 36442}, {f: 2, c: 36452}, {f: 2, c: 36455}, {f: 2, c: 36458},
  17014. 36462, 36465, 36467, 36469, {f: 3, c: 36471}, 36475, {f: 2, c: 36477},
  17015. 36480, {f: 3, c: 36482}, 36486, 36488, 36492, 36494, {f: 5, c: 36501},
  17016. 36507, 36509, {f: 2, c: 36511}, {f: 3, c: 36514}, {f: 3, c: 36519},
  17017. {f: 2, c: 36525}, {f: 2, c: 36528}, {f: 7, c: 36531}, {f: 5, c: 36539},
  17018. {f: 9, c: 36545}, {f: 3, c: 36559}, 36563, {f: 6, c: 36565},
  17019. {f: 3, c: 36572}, {f: 4, c: 36576}, {f: 6, c: 36581}, {f: 6, c: 36588},
  17020. {f: 5, c: 36595}, 36605, {f: 4, c: 36607}, 36612, 36614, 36616,
  17021. {f: 7, c: 36619}, 36627, {f: 5, c: 36630}, {f: 5, c: 36640},
  17022. {f: 2, c: 36647}, {f: 4, c: 36651}, {f: 3, c: 36656}, {f: 4, c: 36660},
  17023. {f: 2, c: 36665}, {f: 2, c: 36668}, {f: 2, c: 36672}, 36675,
  17024. {f: 2, c: 36679}, {f: 3, c: 36682}, {f: 5, c: 36687}, {f: 10, c: 36693},
  17025. 36704, 36707, 36709, 36714, 36736, 36748, 36754, 36765, {f: 3, c: 36768},
  17026. {f: 2, c: 36772}, 36775, 36778, 36780, {f: 2, c: 36787}, [12193, 36789],
  17027. {f: 2, c: 36791}, {f: 3, c: 36794}, {f: 2, c: 36799}, 36803, 36806,
  17028. {f: 5, c: 36809}, 36815, 36818, {f: 2, c: 36822}, 36826, {f: 2, c: 36832},
  17029. 36835, 36839, 36844, 36847, {f: 2, c: 36849}, {f: 2, c: 36853},
  17030. {f: 3, c: 36858}, {f: 2, c: 36862}, {f: 2, c: 36871}, 36876, 36878, 36883,
  17031. 36888, 36892, {f: 2, c: 36900}, {f: 6, c: 36903}, {f: 2, c: 36912},
  17032. {f: 2, c: 36915}, 36919, {f: 2, c: 36921}, 36925, {f: 2, c: 36927}, 36931,
  17033. {f: 2, c: 36933}, {f: 3, c: 36936}, 36940, 36950, {f: 2, c: 36953}, 36957,
  17034. 36959, 36961, 36964, {f: 2, c: 36966}, {f: 3, c: 36970}, {f: 3, c: 36975},
  17035. 36979, 36982, 36985, 36987, 36990, {f: 2, c: 36997}, 37001,
  17036. {f: 3, c: 37004}, 37010, 37012, 37014, 37016, 37018, 37020,
  17037. {f: 3, c: 37022}, {f: 2, c: 37028}, {f: 3, c: 37031}, 37035, 37037, 37042,
  17038. 37047, {f: 2, c: 37052}, {f: 2, c: 37055}, {f: 2, c: 37058}, 37062,
  17039. {f: 2, c: 37064}, {f: 3, c: 37067}, 37074, {f: 3, c: 37076},
  17040. {f: 3, c: 37080}, 37086, 37088, {f: 3, c: 37091}, {f: 2, c: 37097}, 37100,
  17041. 37102, {f: 4, c: 37104}, {f: 2, c: 37110}, {f: 4, c: 37113},
  17042. {f: 3, c: 37119}, 37123, 37125, {f: 2, c: 37127}, {f: 8, c: 37130}, 37139,
  17043. 37141, {f: 2, c: 37143}, {f: 4, c: 37146}, {f: 3, c: 37151},
  17044. {f: 3, c: 37156}, {f: 5, c: 37160}, 37166, 37171, 37173, {f: 2, c: 37175},
  17045. {f: 8, c: 37179}, {f: 2, c: 37188}, 37191, 37201, {f: 4, c: 37203},
  17046. {f: 2, c: 37208}, {f: 2, c: 37211}, {f: 2, c: 37215}, {f: 3, c: 37222},
  17047. 37227, 37229, 37235, {f: 3, c: 37242}, {f: 5, c: 37248}, 37254, 37256,
  17048. 37258, {f: 2, c: 37262}, {f: 3, c: 37267}, {f: 3, c: 37271},
  17049. {f: 5, c: 37277}, {f: 6, c: 37284}, {f: 4, c: 37296}, {f: 4, c: 37302},
  17050. {f: 5, c: 37307}, 37314, 37316, [12196, 37318], 37320, 37328, 37334,
  17051. {f: 2, c: 37338}, {f: 5, c: 37342}, {f: 2, c: 37349}, 37352,
  17052. {f: 11, c: 37354}, 37366, 37368, {f: 5, c: 37371}, {f: 2, c: 37378},
  17053. {f: 3, c: 37381}, {f: 3, c: 37386}, 37391, {f: 2, c: 37394},
  17054. {f: 8, c: 37398}, {f: 4, c: 37407}, 37412, {f: 6, c: 37416}, 37423,
  17055. {f: 2, c: 37425}, {f: 2, c: 37429}, {f: 2, c: 37435}, {f: 4, c: 37441},
  17056. {f: 2, c: 37446}, {f: 3, c: 37450}, {f: 3, c: 37454}, {f: 3, c: 37458},
  17057. 37462, {f: 2, c: 37464}, {f: 2, c: 37468}, {f: 3, c: 37471},
  17058. {f: 3, c: 37475}, {f: 5, c: 37479}, {f: 6, c: 37486}, {f: 3, c: 37493},
  17059. 37497, {f: 3, c: 37500}, {f: 2, c: 37505}, 37508, {f: 8, c: 37510},
  17060. {f: 2, c: 37519}, 37522, {f: 2, c: 37524}, 37527, 37529, 37531,
  17061. {f: 3, c: 37533}, {f: 2, c: 37537}, 37540, 37543, 37549, {f: 2, c: 37551},
  17062. {f: 5, c: 37554}, 37560, 37562, {f: 4, c: 37565}, 37570, 37572, 37574,
  17063. {f: 3, c: 37577}, {f: 2, c: 37581}, {f: 2, c: 37584}, {f: 10, c: 37587},
  17064. 37598, {f: 3, c: 37600}, 37607, 37609, {f: 2, c: 37611}, {f: 4, c: 37618},
  17065. 37623, {f: 3, c: 37625}, {f: 4, c: 37629}, {f: 4, c: 37634},
  17066. {f: 7, c: 37641}, 37649, {f: 2, c: 37651}, {f: 2, c: 37654},
  17067. {f: 3, c: 37660}, 37665, {f: 3, c: 37667}, 37671, {f: 2, c: 37673},
  17068. {f: 2, c: 37676}, {f: 2, c: 37680}, {f: 2, c: 37684}, 37687,
  17069. {f: 5, c: 37689}, 37695, 37698, {f: 2, c: 37700}, {f: 3, c: 37704}, 37708,
  17070. {f: 6, c: 37710}, {f: 3, c: 37717}, {f: 2, c: 37721}, {f: 8, c: 37724},
  17071. {f: 3, c: 37734}, 37739, {f: 3, c: 37741}, {f: 4, c: 37745},
  17072. {f: 3, c: 37751}, {f: 3, c: 37755}, {f: 3, c: 37759}, 37763,
  17073. {f: 2, c: 37765}, {f: 2, c: 37768}, {f: 4, c: 37771}, {f: 6, c: 37776},
  17074. 37783, {f: 9, c: 37785}, {f: 2, c: 37796}, 37800, 37803, 37805, 37807,
  17075. {f: 2, c: 37809}, 37812, {f: 2, c: 37814}, {f: 6, c: 37817},
  17076. {f: 3, c: 37824}, {f: 3, c: 37828}, 37833, 37835, {f: 3, c: 37838},
  17077. {f: 4, c: 37842}, {f: 3, c: 37849}, 37856, 37859, {f: 3, c: 37861},
  17078. {f: 12, c: 37865}, 37878, 37880, {f: 9, c: 37882}, {f: 7, c: 37892},
  17079. {f: 4, c: 37900}, 37905, {f: 3, c: 37909}, {f: 3, c: 37914},
  17080. {f: 2, c: 37918}, {f: 5, c: 37921}, {f: 5, c: 37929}, {f: 3, c: 37935},
  17081. 37940, {f: 2, c: 37942}, 37945, {f: 3, c: 37947}, {f: 4, c: 37952},
  17082. {f: 5, c: 37957}, 37963, {f: 5, c: 37965}, 37971, {f: 11, c: 37973},
  17083. {f: 2, c: 37985}, 37988, {f: 5, c: 37990}, 37996, {f: 2, c: 37998}, 38001,
  17084. {f: 4, c: 38003}, 38008, {f: 2, c: 38010}, {f: 5, c: 38016}, 38033, 38038,
  17085. 38040, 38087, 38095, {f: 2, c: 38099}, 38106, 38118, 38139, 38172, 38176,
  17086. 38183, 38195, 38205, 38211, 38216, 38219, 38229, 38234, 38240, 38254,
  17087. {f: 2, c: 38260}, {f: 7, c: 38264}, 38273, {f: 2, c: 38276},
  17088. {f: 2, c: 38279}, 38282, 38285, 38288, 38290, {f: 3, c: 38293},
  17089. {f: 8, c: 38297}, 38306, {f: 2, c: 38310}, 38314, {f: 4, c: 38318},
  17090. {f: 3, c: 38323}, {f: 2, c: 38327}, 38330, {f: 3, c: 38336},
  17091. {f: 2, c: 38340}, 38343, 38345, {f: 3, c: 38349}, {f: 3, c: 38353},
  17092. {f: 5, c: 38359}, 38365, {f: 2, c: 38367}, {f: 2, c: 38371},
  17093. {f: 2, c: 38374}, 38380, 38399, 38407, 38419, 38424, 38427, 38430, 38432,
  17094. {f: 7, c: 38435}, {f: 3, c: 38443}, {f: 2, c: 38447}, {f: 4, c: 38455},
  17095. 38462, 38465, 38467, 38474, {f: 2, c: 38478}, {f: 3, c: 38481},
  17096. {f: 2, c: 38486}, {f: 2, c: 38489}, 38492, 38494, 38496, {f: 2, c: 38501},
  17097. 38507, {f: 3, c: 38509}, 38513, {f: 4, c: 38521}, {f: 7, c: 38526}, 38535,
  17098. 38537, 38540, {f: 3, c: 38545}, 38550, 38554, {f: 10, c: 38557}, 38569,
  17099. {f: 5, c: 38571}, 38578, 38581, 38583, 38586, 38591, {f: 2, c: 38594},
  17100. 38600, {f: 2, c: 38602}, {f: 2, c: 38608}, {f: 2, c: 38611},
  17101. {f: 2, c: 38615}, 38618, {f: 3, c: 38621}, 38625, {f: 4, c: 38628},
  17102. {f: 4, c: 38635}, {f: 2, c: 38640}, {f: 2, c: 38644}, 38648, 38650,
  17103. {f: 2, c: 38652}, 38655, {f: 2, c: 38658}, 38661, {f: 3, c: 38666},
  17104. {f: 3, c: 38672}, {f: 2, c: 38676}, {f: 5, c: 38679}, 38685,
  17105. {f: 8, c: 38687}, {f: 2, c: 38696}, {f: 2, c: 38699}, {f: 2, c: 38702},
  17106. 38705, {f: 5, c: 38707}, {f: 3, c: 38714}, {f: 3, c: 38719}, 38723,
  17107. {f: 3, c: 38725}, {f: 8, c: 38729}, [12205, 38737], {f: 2, c: 38740},
  17108. {f: 2, c: 38743}, {f: 2, c: 38748}, 38751, {f: 2, c: 38755},
  17109. {f: 2, c: 38758}, {f: 9, c: 38762}, 38773, {f: 5, c: 38775},
  17110. {f: 8, c: 38781}, {f: 5, c: 38790}, 38796, 38798, 38800, 38803,
  17111. {f: 3, c: 38805}, {f: 7, c: 38809}, {f: 2, c: 38817}, {f: 2, c: 38820},
  17112. {f: 4, c: 38823}, 38828, 38830, {f: 2, c: 38832}, 38835, {f: 8, c: 38837},
  17113. {f: 5, c: 38846}, {f: 2, c: 38852}, {f: 2, c: 38855}, 38858,
  17114. {f: 6, c: 38861}, {f: 5, c: 38868}, {f: 2, c: 38874}, 38877,
  17115. {f: 7, c: 38879}, 38888, {f: 5, c: 38894}, 38900, {f: 8, c: 38903}, 38912,
  17116. 38916, 38921, 38923, 38925, {f: 3, c: 38932}, {f: 3, c: 38937},
  17117. {f: 4, c: 38941}, {f: 2, c: 38946}, 38949, {f: 6, c: 38951},
  17118. {f: 2, c: 38958}, {f: 6, c: 38961}, {f: 2, c: 38969}, 38972,
  17119. {f: 8, c: 38974}, {f: 5, c: 38983}, {f: 4, c: 38991}, {f: 3, c: 38997},
  17120. 39002, {f: 2, c: 39004}, {f: 3, c: 39007}, {f: 2, c: 39011}, 39014,
  17121. {f: 3, c: 39016}, {f: 2, c: 39021}, 39026, 39051, 39054, 39058, 39061,
  17122. 39065, 39075, {f: 5, c: 39081}, 39088, 39090, {f: 2, c: 39092},
  17123. {f: 5, c: 39095}, {f: 7, c: 39101}, 39109, 39111, {f: 5, c: 39113},
  17124. {f: 2, c: 39119}, 39124, {f: 2, c: 39126}, {f: 2, c: 39132}, 39137,
  17125. {f: 4, c: 39139}, 39148, 39150, {f: 2, c: 39152}, 39155, {f: 7, c: 39157},
  17126. {f: 4, c: 39167}, 39172, {f: 3, c: 39174}, 39179, {f: 2, c: 39182},
  17127. {f: 4, c: 39188}, {f: 2, c: 39193}, {f: 2, c: 39196}, {f: 2, c: 39199},
  17128. {f: 6, c: 39202}, {f: 5, c: 39209}, {f: 4, c: 39215}, {f: 3, c: 39220},
  17129. {f: 4, c: 39224}, 39229, {f: 3, c: 39232}, 39236, {f: 2, c: 39238},
  17130. {f: 4, c: 39245}, 39251, 39254, {f: 4, c: 39256}, 39261, {f: 3, c: 39263},
  17131. 39268, 39270, 39283, {f: 2, c: 39288}, 39291, 39294, {f: 2, c: 39298},
  17132. 39305, 39308, 39310, {f: 11, c: 39322}, {f: 2, c: 39334}, {f: 3, c: 39337},
  17133. {f: 2, c: 39343}, 39346, {f: 12, c: 39349}, {f: 14, c: 39362}, 39379,
  17134. {f: 2, c: 39382}, 39386, 39388, 39390, 39392, {f: 10, c: 39395},
  17135. {f: 3, c: 39406}, {f: 13, c: 39410}, 39424, {f: 3, c: 39426},
  17136. {f: 7, c: 39430}, {f: 6, c: 39440}, {f: 2, c: 39447}, {f: 17, c: 39450},
  17137. 39468, 39471, {f: 5, c: 39473}, {f: 5, c: 39481}, 39487, {f: 4, c: 39494},
  17138. {f: 2, c: 39499}, 39502, {f: 5, c: 39504}, 39510, {f: 2, c: 39512},
  17139. {f: 3, c: 39516}, {f: 2, c: 39520}, 39523, {f: 4, c: 39526}, 39531, 39538,
  17140. 39555, 39561, {f: 2, c: 39565}, {f: 2, c: 39572}, 39577, 39590,
  17141. {f: 6, c: 39593}, {f: 4, c: 39602}, 39609, 39611, {f: 3, c: 39613},
  17142. {f: 2, c: 39619}, {f: 5, c: 39622}, {f: 2, c: 39629}, 39632, 39639,
  17143. {f: 6, c: 39641}, 39648, {f: 4, c: 39650}, {f: 4, c: 39655}, 39660,
  17144. {f: 9, c: 39664}, 39674, {f: 7, c: 39676}, {f: 2, c: 39684}, 39687,
  17145. {f: 4, c: 39689}, 39694, {f: 3, c: 39696}, {f: 6, c: 39700},
  17146. {f: 4, c: 39707}, {f: 2, c: 39712}, 39716, 39718, 39720, {f: 4, c: 39722},
  17147. 39728, {f: 8, c: 39731}, {f: 4, c: 39741}, 39750, {f: 3, c: 39754}, 39760,
  17148. {f: 2, c: 39762}, {f: 3, c: 39765}, 39769, {f: 20, c: 39771},
  17149. {f: 4, c: 39792}, {f: 2, c: 39797}, {f: 9, c: 39800}, 39810,
  17150. {f: 10, c: 39812}, 39823, {f: 7, c: 39827}, {f: 2, c: 39835},
  17151. {f: 11, c: 39839}, 39852, {f: 17, c: 39855}, {f: 5, c: 39874}, 39880,
  17152. {f: 9, c: 39883}, 39893, {f: 4, c: 39895}, 39900, {f: 3, c: 39902}, 39907,
  17153. {f: 2, c: 39909}, 39913, {f: 4, c: 39916}, {f: 3, c: 39921},
  17154. {f: 8, c: 39925}, 39934, {f: 8, c: 39936}, {f: 3, c: 39946},
  17155. {f: 2, c: 39950}, 39953, {f: 12, c: 39956}, {f: 2, c: 39969}, 39972,
  17156. {f: 2, c: 39974}, {f: 3, c: 39978}, {f: 3, c: 39982}, 39988, 39990, 39992,
  17157. 39994, {f: 2, c: 39996}, {f: 6, c: 39999}, {f: 2, c: 40006},
  17158. {f: 8, c: 40010}, 40019, 40021, {f: 4, c: 40025}, 40030, {f: 7, c: 40032},
  17159. {f: 5, c: 40040}, {f: 10, c: 40046}, 40057, 40059, {f: 2, c: 40061}, 40064,
  17160. {f: 2, c: 40067}, {f: 2, c: 40073}, 40076, 40079, 40083, {f: 4, c: 40086},
  17161. 40093, 40106, 40108, 40111, 40121, {f: 5, c: 40126}, {f: 2, c: 40136},
  17162. {f: 2, c: 40145}, {f: 2, c: 40154}, {f: 2, c: 40160}, {f: 2, c: 40163},
  17163. {f: 3, c: 40166}, {f: 2, c: 40170}, {f: 6, c: 40173}, 40181,
  17164. {f: 15, c: 40183}, 40200, {f: 11, c: 40202}, {f: 5, c: 40214}, 40220,
  17165. 40222, {f: 3, c: 40224}, {f: 2, c: 40228}, 40231, {f: 6, c: 40233},
  17166. {f: 10, c: 40241}, {f: 3, c: 40252}, {f: 2, c: 40256}, {f: 14, c: 40259},
  17167. {f: 8, c: 40276}, {f: 2, c: 40286}, {f: 8, c: 40290}, 40299,
  17168. {f: 2, c: 40301}, {f: 2, c: 40304}, {f: 20, c: 40307}, 40328,
  17169. {f: 9, c: 40330}, {f: 4, c: 40340}, 40345, {f: 10, c: 40347},
  17170. {f: 3, c: 40358}, {f: 5, c: 40362}, {f: 4, c: 40368}, {f: 6, c: 40373},
  17171. {f: 3, c: 40381}, 40385, 40387, {f: 14, c: 40389}, {f: 3, c: 40404}, 40408,
  17172. {f: 10, c: 40411}, {f: 8, c: 40423}, {f: 2, c: 40432}, {f: 4, c: 40436},
  17173. {f: 17, c: 40443}, {f: 8, c: 40461}, {f: 4, c: 40470}, 40476, 40484, 40487,
  17174. 40494, 40496, 40500, {f: 2, c: 40507}, 40512, 40525, 40528,
  17175. {f: 3, c: 40530}, 40534, 40537, 40541, {f: 4, c: 40543}, 40549,
  17176. {f: 2, c: 40558}, 40562, 40564, {f: 3, c: 40566}, 40571, {f: 2, c: 40576},
  17177. {f: 4, c: 40579}, {f: 2, c: 40585}, {f: 6, c: 40588}, {f: 3, c: 40596},
  17178. {f: 5, c: 40600}, 40606, {f: 5, c: 40608}, {f: 2, c: 40615},
  17179. {f: 5, c: 40618}, {f: 4, c: 40624}, {f: 2, c: 40630}, {f: 2, c: 40633},
  17180. 40636, {f: 4, c: 40639}, [12232, 40643], {f: 4, c: 40645},
  17181. {f: 2, c: 40650}, 40656, {f: 2, c: 40658}, {f: 3, c: 40661},
  17182. {f: 2, c: 40665}, 40673, {f: 2, c: 40675}, 40678, {f: 4, c: 40683},
  17183. {f: 2, c: 40688}, 40691, {f: 2, c: 40693}, 40696, 40698, {f: 9, c: 40704},
  17184. 40714, 40716, 40719, {f: 2, c: 40721}, 40724, 40726, 40728,
  17185. {f: 6, c: 40730}, 40737, {f: 9, c: 40739}, {f: 2, c: 40749},
  17186. {f: 7, c: 40752}, 40760, 40762, 40764, {f: 5, c: 40767}, {f: 5, c: 40773},
  17187. {f: 3, c: 40780}, 40787, {f: 4, c: 40789}, {f: 2, c: 40794},
  17188. {f: 2, c: 40797}, 40802, {f: 2, c: 40804}, {f: 3, c: 40807}, 40811,
  17189. {f: 5, c: 40813}, {f: 4, c: 40819}, {f: 7, c: 40824}, {f: 2, c: 40833},
  17190. {f: 2, c: 40846}, {f: 3, c: 40849}, {f: 3, c: 40854}, {f: 2, c: 40861},
  17191. {f: 5, c: 40865}, 63788, {f: 3, c: 64013}, 64017, {f: 2, c: 64019}, 64024,
  17192. {f: 3, c: 64031}, {f: 2, c: 64035}, {f: 3, c: 64039}, 11905,
  17193. [59414, 131207], [59415, 131209], [59416, 131276], 11908, 13427, 13383,
  17194. 11912, 11915, 59422, 13726, 13850, 13838, 11916, 11927, 14702, 14616,
  17195. 59430, 14799, 14815, 14963, 14800, {f: 2, c: 59435}, 15182, 15470, 15584,
  17196. 11943, [59441, 136663], 59442, 11946, 16470, 16735, 11950, 17207, 11955,
  17197. {f: 2, c: 11958}, [59451, 141711], 17329, 17324, 11963, 17373, 17622,
  17198. 18017, 17996, [59459, 132361], 18211, 18217, 18300, 18317, 11978, 18759,
  17199. 18810, 18813, {f: 2, c: 18818}, {f: 2, c: 18821}, 18847, 18843, 18871,
  17200. 18870, [59476, 133533], [59477, 147966], 19619, {f: 3, c: 19615}, 19575,
  17201. 19618, {f: 7, c: 19731}, 19886, 59492, {s: 226}, 8364, 165, 0, 0, 12351,
  17202. {s: 17}, 12436, {s: 14}, 12535, 12537, 12536, 12538, 0, {f: 3, c: 12339},
  17203. {f: 3, c: 12344}, {f: 3, c: 12586}, {f: 24, c: 12704}, 11904,
  17204. {f: 2, c: 11906}, {f: 3, c: 11909}, {f: 2, c: 11913}, {f: 10, c: 11917},
  17205. {f: 2, c: 11928}, {f: 12, c: 11931}, {f: 2, c: 11944}, {f: 3, c: 11947},
  17206. {f: 4, c: 11951}, {f: 2, c: 11956}, {f: 3, c: 11960}, {f: 14, c: 11964},
  17207. {f: 41, c: 11979}, {f: 71, c: 13312}, {f: 43, c: 13384},
  17208. {f: 298, c: 13428}, {f: 111, c: 13727}, {f: 11, c: 13839},
  17209. {f: 765, c: 13851}, {f: 85, c: 14617}, {f: 96, c: 14703},
  17210. {f: 14, c: 14801}, {f: 147, c: 14816}, {f: 218, c: 14964},
  17211. {f: 287, c: 15183}, {f: 113, c: 15471}, {f: 885, c: 15585},
  17212. {f: 264, c: 16471}, {f: 471, c: 16736}, {f: 116, c: 17208},
  17213. {f: 4, c: 17325}, {f: 43, c: 17330}, {f: 248, c: 17374},
  17214. {f: 373, c: 17623}, {f: 20, c: 17997}, {f: 193, c: 18018},
  17215. {f: 5, c: 18212}, {f: 82, c: 18218}, {f: 16, c: 18301}, {f: 441, c: 18318},
  17216. {f: 50, c: 18760}, {f: 2, c: 18811}, {f: 4, c: 18814}, 18820,
  17217. {f: 20, c: 18823}, {f: 3, c: 18844}, {f: 22, c: 18848}, {f: 703, c: 18872},
  17218. {f: 39, c: 19576}, {f: 111, c: 19620}, {f: 148, c: 19738},
  17219. {f: 7, c: 19887}]
  17220. };
  17221. var ARCFourCipher = (function ARCFourCipherClosure() {
  17222. function ARCFourCipher(key) {
  17223. this.a = 0;
  17224. this.b = 0;
  17225. var s = new Uint8Array(256);
  17226. var i, j = 0, tmp, keyLength = key.length;
  17227. for (i = 0; i < 256; ++i) {
  17228. s[i] = i;
  17229. }
  17230. for (i = 0; i < 256; ++i) {
  17231. tmp = s[i];
  17232. j = (j + tmp + key[i % keyLength]) & 0xFF;
  17233. s[i] = s[j];
  17234. s[j] = tmp;
  17235. }
  17236. this.s = s;
  17237. }
  17238. ARCFourCipher.prototype = {
  17239. encryptBlock: function ARCFourCipher_encryptBlock(data) {
  17240. var i, n = data.length, tmp, tmp2;
  17241. var a = this.a, b = this.b, s = this.s;
  17242. var output = new Uint8Array(n);
  17243. for (i = 0; i < n; ++i) {
  17244. a = (a + 1) & 0xFF;
  17245. tmp = s[a];
  17246. b = (b + tmp) & 0xFF;
  17247. tmp2 = s[b];
  17248. s[a] = tmp2;
  17249. s[b] = tmp;
  17250. output[i] = data[i] ^ s[(tmp + tmp2) & 0xFF];
  17251. }
  17252. this.a = a;
  17253. this.b = b;
  17254. return output;
  17255. }
  17256. };
  17257. ARCFourCipher.prototype.decryptBlock = ARCFourCipher.prototype.encryptBlock;
  17258. return ARCFourCipher;
  17259. })();
  17260. var calculateMD5 = (function calculateMD5Closure() {
  17261. var r = new Uint8Array([
  17262. 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
  17263. 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20,
  17264. 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
  17265. 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]);
  17266. var k = new Int32Array([
  17267. -680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426,
  17268. -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162,
  17269. 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632,
  17270. 643717713, -373897302, -701558691, 38016083, -660478335, -405537848,
  17271. 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784,
  17272. 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556,
  17273. -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222,
  17274. -722521979, 76029189, -640364487, -421815835, 530742520, -995338651,
  17275. -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606,
  17276. -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649,
  17277. -145523070, -1120210379, 718787259, -343485551]);
  17278. function hash(data, offset, length) {
  17279. var h0 = 1732584193, h1 = -271733879, h2 = -1732584194, h3 = 271733878;
  17280. // pre-processing
  17281. var paddedLength = (length + 72) & ~63; // data + 9 extra bytes
  17282. var padded = new Uint8Array(paddedLength);
  17283. var i, j, n;
  17284. for (i = 0; i < length; ++i) {
  17285. padded[i] = data[offset++];
  17286. }
  17287. padded[i++] = 0x80;
  17288. n = paddedLength - 8;
  17289. while (i < n) {
  17290. padded[i++] = 0;
  17291. }
  17292. padded[i++] = (length << 3) & 0xFF;
  17293. padded[i++] = (length >> 5) & 0xFF;
  17294. padded[i++] = (length >> 13) & 0xFF;
  17295. padded[i++] = (length >> 21) & 0xFF;
  17296. padded[i++] = (length >>> 29) & 0xFF;
  17297. padded[i++] = 0;
  17298. padded[i++] = 0;
  17299. padded[i++] = 0;
  17300. // chunking
  17301. // TODO ArrayBuffer ?
  17302. var w = new Int32Array(16);
  17303. for (i = 0; i < paddedLength;) {
  17304. for (j = 0; j < 16; ++j, i += 4) {
  17305. w[j] = (padded[i] | (padded[i + 1] << 8) |
  17306. (padded[i + 2] << 16) | (padded[i + 3] << 24));
  17307. }
  17308. var a = h0, b = h1, c = h2, d = h3, f, g;
  17309. for (j = 0; j < 64; ++j) {
  17310. if (j < 16) {
  17311. f = (b & c) | ((~b) & d);
  17312. g = j;
  17313. } else if (j < 32) {
  17314. f = (d & b) | ((~d) & c);
  17315. g = (5 * j + 1) & 15;
  17316. } else if (j < 48) {
  17317. f = b ^ c ^ d;
  17318. g = (3 * j + 5) & 15;
  17319. } else {
  17320. f = c ^ (b | (~d));
  17321. g = (7 * j) & 15;
  17322. }
  17323. var tmp = d, rotateArg = (a + f + k[j] + w[g]) | 0, rotate = r[j];
  17324. d = c;
  17325. c = b;
  17326. b = (b + ((rotateArg << rotate) | (rotateArg >>> (32 - rotate)))) | 0;
  17327. a = tmp;
  17328. }
  17329. h0 = (h0 + a) | 0;
  17330. h1 = (h1 + b) | 0;
  17331. h2 = (h2 + c) | 0;
  17332. h3 = (h3 + d) | 0;
  17333. }
  17334. return new Uint8Array([
  17335. h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >>> 24) & 0xFF,
  17336. h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >>> 24) & 0xFF,
  17337. h2 & 0xFF, (h2 >> 8) & 0xFF, (h2 >> 16) & 0xFF, (h2 >>> 24) & 0xFF,
  17338. h3 & 0xFF, (h3 >> 8) & 0xFF, (h3 >> 16) & 0xFF, (h3 >>> 24) & 0xFF
  17339. ]);
  17340. }
  17341. return hash;
  17342. })();
  17343. var NullCipher = (function NullCipherClosure() {
  17344. function NullCipher() {}
  17345. NullCipher.prototype = {
  17346. decryptBlock: function NullCipher_decryptBlock(data) {
  17347. return data;
  17348. }
  17349. };
  17350. return NullCipher;
  17351. })();
  17352. var AES128Cipher = (function AES128CipherClosure() {
  17353. var rcon = new Uint8Array([
  17354. 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
  17355. 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a,
  17356. 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd,
  17357. 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a,
  17358. 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
  17359. 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6,
  17360. 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72,
  17361. 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc,
  17362. 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10,
  17363. 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e,
  17364. 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5,
  17365. 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94,
  17366. 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02,
  17367. 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d,
  17368. 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d,
  17369. 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f,
  17370. 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb,
  17371. 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
  17372. 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a,
  17373. 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd,
  17374. 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a,
  17375. 0x74, 0xe8, 0xcb, 0x8d]);
  17376. var s = new Uint8Array([
  17377. 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b,
  17378. 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
  17379. 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26,
  17380. 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
  17381. 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2,
  17382. 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0,
  17383. 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed,
  17384. 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
  17385. 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f,
  17386. 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5,
  17387. 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec,
  17388. 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
  17389. 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14,
  17390. 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c,
  17391. 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d,
  17392. 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
  17393. 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f,
  17394. 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e,
  17395. 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11,
  17396. 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
  17397. 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f,
  17398. 0xb0, 0x54, 0xbb, 0x16]);
  17399. var inv_s = new Uint8Array([
  17400. 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e,
  17401. 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87,
  17402. 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32,
  17403. 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e,
  17404. 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49,
  17405. 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16,
  17406. 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50,
  17407. 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84,
  17408. 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05,
  17409. 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02,
  17410. 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41,
  17411. 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73,
  17412. 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8,
  17413. 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89,
  17414. 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b,
  17415. 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4,
  17416. 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59,
  17417. 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d,
  17418. 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d,
  17419. 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61,
  17420. 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63,
  17421. 0x55, 0x21, 0x0c, 0x7d]);
  17422. var mix = new Uint32Array([
  17423. 0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927,
  17424. 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45,
  17425. 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb,
  17426. 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381,
  17427. 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf,
  17428. 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66,
  17429. 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28,
  17430. 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012,
  17431. 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec,
  17432. 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e,
  17433. 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd,
  17434. 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7,
  17435. 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89,
  17436. 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b,
  17437. 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815,
  17438. 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f,
  17439. 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa,
  17440. 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8,
  17441. 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36,
  17442. 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c,
  17443. 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742,
  17444. 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea,
  17445. 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4,
  17446. 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e,
  17447. 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360,
  17448. 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502,
  17449. 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87,
  17450. 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd,
  17451. 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3,
  17452. 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621,
  17453. 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f,
  17454. 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55,
  17455. 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26,
  17456. 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844,
  17457. 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba,
  17458. 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480,
  17459. 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce,
  17460. 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67,
  17461. 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929,
  17462. 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713,
  17463. 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed,
  17464. 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f,
  17465. 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]);
  17466. function expandKey128(cipherKey) {
  17467. var b = 176, result = new Uint8Array(b);
  17468. result.set(cipherKey);
  17469. for (var j = 16, i = 1; j < b; ++i) {
  17470. // RotWord
  17471. var t1 = result[j - 3], t2 = result[j - 2],
  17472. t3 = result[j - 1], t4 = result[j - 4];
  17473. // SubWord
  17474. t1 = s[t1]; t2 = s[t2]; t3 = s[t3]; t4 = s[t4];
  17475. // Rcon
  17476. t1 = t1 ^ rcon[i];
  17477. for (var n = 0; n < 4; ++n) {
  17478. result[j] = (t1 ^= result[j - 16]); j++;
  17479. result[j] = (t2 ^= result[j - 16]); j++;
  17480. result[j] = (t3 ^= result[j - 16]); j++;
  17481. result[j] = (t4 ^= result[j - 16]); j++;
  17482. }
  17483. }
  17484. return result;
  17485. }
  17486. function decrypt128(input, key) {
  17487. var state = new Uint8Array(16);
  17488. state.set(input);
  17489. var i, j, k;
  17490. var t, u, v;
  17491. // AddRoundKey
  17492. for (j = 0, k = 160; j < 16; ++j, ++k) {
  17493. state[j] ^= key[k];
  17494. }
  17495. for (i = 9; i >= 1; --i) {
  17496. // InvShiftRows
  17497. t = state[13]; state[13] = state[9]; state[9] = state[5];
  17498. state[5] = state[1]; state[1] = t;
  17499. t = state[14]; u = state[10]; state[14] = state[6];
  17500. state[10] = state[2]; state[6] = t; state[2] = u;
  17501. t = state[15]; u = state[11]; v = state[7]; state[15] = state[3];
  17502. state[11] = t; state[7] = u; state[3] = v;
  17503. // InvSubBytes
  17504. for (j = 0; j < 16; ++j) {
  17505. state[j] = inv_s[state[j]];
  17506. }
  17507. // AddRoundKey
  17508. for (j = 0, k = i * 16; j < 16; ++j, ++k) {
  17509. state[j] ^= key[k];
  17510. }
  17511. // InvMixColumns
  17512. for (j = 0; j < 16; j += 4) {
  17513. var s0 = mix[state[j]], s1 = mix[state[j + 1]],
  17514. s2 = mix[state[j + 2]], s3 = mix[state[j + 3]];
  17515. t = (s0 ^ (s1 >>> 8) ^ (s1 << 24) ^ (s2 >>> 16) ^ (s2 << 16) ^
  17516. (s3 >>> 24) ^ (s3 << 8));
  17517. state[j] = (t >>> 24) & 0xFF;
  17518. state[j + 1] = (t >> 16) & 0xFF;
  17519. state[j + 2] = (t >> 8) & 0xFF;
  17520. state[j + 3] = t & 0xFF;
  17521. }
  17522. }
  17523. // InvShiftRows
  17524. t = state[13]; state[13] = state[9]; state[9] = state[5];
  17525. state[5] = state[1]; state[1] = t;
  17526. t = state[14]; u = state[10]; state[14] = state[6];
  17527. state[10] = state[2]; state[6] = t; state[2] = u;
  17528. t = state[15]; u = state[11]; v = state[7]; state[15] = state[3];
  17529. state[11] = t; state[7] = u; state[3] = v;
  17530. for (j = 0; j < 16; ++j) {
  17531. // InvSubBytes
  17532. state[j] = inv_s[state[j]];
  17533. // AddRoundKey
  17534. state[j] ^= key[j];
  17535. }
  17536. return state;
  17537. }
  17538. function AES128Cipher(key) {
  17539. this.key = expandKey128(key);
  17540. this.buffer = new Uint8Array(16);
  17541. this.bufferPosition = 0;
  17542. }
  17543. function decryptBlock2(data, finalize) {
  17544. var i, j, ii, sourceLength = data.length,
  17545. buffer = this.buffer, bufferLength = this.bufferPosition,
  17546. result = [], iv = this.iv;
  17547. for (i = 0; i < sourceLength; ++i) {
  17548. buffer[bufferLength] = data[i];
  17549. ++bufferLength;
  17550. if (bufferLength < 16) {
  17551. continue;
  17552. }
  17553. // buffer is full, decrypting
  17554. var plain = decrypt128(buffer, this.key);
  17555. // xor-ing the IV vector to get plain text
  17556. for (j = 0; j < 16; ++j) {
  17557. plain[j] ^= iv[j];
  17558. }
  17559. iv = buffer;
  17560. result.push(plain);
  17561. buffer = new Uint8Array(16);
  17562. bufferLength = 0;
  17563. }
  17564. // saving incomplete buffer
  17565. this.buffer = buffer;
  17566. this.bufferLength = bufferLength;
  17567. this.iv = iv;
  17568. if (result.length === 0) {
  17569. return new Uint8Array([]);
  17570. }
  17571. // combining plain text blocks into one
  17572. var outputLength = 16 * result.length;
  17573. if (finalize) {
  17574. // undo a padding that is described in RFC 2898
  17575. var lastBlock = result[result.length - 1];
  17576. outputLength -= lastBlock[15];
  17577. result[result.length - 1] = lastBlock.subarray(0, 16 - lastBlock[15]);
  17578. }
  17579. var output = new Uint8Array(outputLength);
  17580. for (i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) {
  17581. output.set(result[i], j);
  17582. }
  17583. return output;
  17584. }
  17585. AES128Cipher.prototype = {
  17586. decryptBlock: function AES128Cipher_decryptBlock(data, finalize) {
  17587. var i, sourceLength = data.length;
  17588. var buffer = this.buffer, bufferLength = this.bufferPosition;
  17589. // waiting for IV values -- they are at the start of the stream
  17590. for (i = 0; bufferLength < 16 && i < sourceLength; ++i, ++bufferLength) {
  17591. buffer[bufferLength] = data[i];
  17592. }
  17593. if (bufferLength < 16) {
  17594. // need more data
  17595. this.bufferLength = bufferLength;
  17596. return new Uint8Array([]);
  17597. }
  17598. this.iv = buffer;
  17599. this.buffer = new Uint8Array(16);
  17600. this.bufferLength = 0;
  17601. // starting decryption
  17602. this.decryptBlock = decryptBlock2;
  17603. return this.decryptBlock(data.subarray(16), finalize);
  17604. }
  17605. };
  17606. return AES128Cipher;
  17607. })();
  17608. var CipherTransform = (function CipherTransformClosure() {
  17609. function CipherTransform(stringCipherConstructor, streamCipherConstructor) {
  17610. this.stringCipherConstructor = stringCipherConstructor;
  17611. this.streamCipherConstructor = streamCipherConstructor;
  17612. }
  17613. CipherTransform.prototype = {
  17614. createStream: function CipherTransform_createStream(stream, length) {
  17615. var cipher = new this.streamCipherConstructor();
  17616. return new DecryptStream(stream, length,
  17617. function cipherTransformDecryptStream(data, finalize) {
  17618. return cipher.decryptBlock(data, finalize);
  17619. }
  17620. );
  17621. },
  17622. decryptString: function CipherTransform_decryptString(s) {
  17623. var cipher = new this.stringCipherConstructor();
  17624. var data = stringToBytes(s);
  17625. data = cipher.decryptBlock(data, true);
  17626. return bytesToString(data);
  17627. }
  17628. };
  17629. return CipherTransform;
  17630. })();
  17631. var CipherTransformFactory = (function CipherTransformFactoryClosure() {
  17632. var defaultPasswordBytes = new Uint8Array([
  17633. 0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41,
  17634. 0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08,
  17635. 0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80,
  17636. 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A]);
  17637. function prepareKeyData(fileId, password, ownerPassword, userPassword,
  17638. flags, revision, keyLength, encryptMetadata) {
  17639. var hashDataSize = 40 + ownerPassword.length + fileId.length;
  17640. var hashData = new Uint8Array(hashDataSize), i = 0, j, n;
  17641. if (password) {
  17642. n = Math.min(32, password.length);
  17643. for (; i < n; ++i) {
  17644. hashData[i] = password[i];
  17645. }
  17646. }
  17647. j = 0;
  17648. while (i < 32) {
  17649. hashData[i++] = defaultPasswordBytes[j++];
  17650. }
  17651. // as now the padded password in the hashData[0..i]
  17652. for (j = 0, n = ownerPassword.length; j < n; ++j) {
  17653. hashData[i++] = ownerPassword[j];
  17654. }
  17655. hashData[i++] = flags & 0xFF;
  17656. hashData[i++] = (flags >> 8) & 0xFF;
  17657. hashData[i++] = (flags >> 16) & 0xFF;
  17658. hashData[i++] = (flags >>> 24) & 0xFF;
  17659. for (j = 0, n = fileId.length; j < n; ++j) {
  17660. hashData[i++] = fileId[j];
  17661. }
  17662. if (revision >= 4 && !encryptMetadata) {
  17663. hashData[i++] = 0xFF;
  17664. hashData[i++] = 0xFF;
  17665. hashData[i++] = 0xFF;
  17666. hashData[i++] = 0xFF;
  17667. }
  17668. var hash = calculateMD5(hashData, 0, i);
  17669. var keyLengthInBytes = keyLength >> 3;
  17670. if (revision >= 3) {
  17671. for (j = 0; j < 50; ++j) {
  17672. hash = calculateMD5(hash, 0, keyLengthInBytes);
  17673. }
  17674. }
  17675. var encryptionKey = hash.subarray(0, keyLengthInBytes);
  17676. var cipher, checkData;
  17677. if (revision >= 3) {
  17678. for (i = 0; i < 32; ++i) {
  17679. hashData[i] = defaultPasswordBytes[i];
  17680. }
  17681. for (j = 0, n = fileId.length; j < n; ++j) {
  17682. hashData[i++] = fileId[j];
  17683. }
  17684. cipher = new ARCFourCipher(encryptionKey);
  17685. checkData = cipher.encryptBlock(calculateMD5(hashData, 0, i));
  17686. n = encryptionKey.length;
  17687. var derivedKey = new Uint8Array(n), k;
  17688. for (j = 1; j <= 19; ++j) {
  17689. for (k = 0; k < n; ++k) {
  17690. derivedKey[k] = encryptionKey[k] ^ j;
  17691. }
  17692. cipher = new ARCFourCipher(derivedKey);
  17693. checkData = cipher.encryptBlock(checkData);
  17694. }
  17695. for (j = 0, n = checkData.length; j < n; ++j) {
  17696. if (userPassword[j] != checkData[j]) {
  17697. return null;
  17698. }
  17699. }
  17700. } else {
  17701. cipher = new ARCFourCipher(encryptionKey);
  17702. checkData = cipher.encryptBlock(defaultPasswordBytes);
  17703. for (j = 0, n = checkData.length; j < n; ++j) {
  17704. if (userPassword[j] != checkData[j]) {
  17705. return null;
  17706. }
  17707. }
  17708. }
  17709. return encryptionKey;
  17710. }
  17711. function decodeUserPassword(password, ownerPassword, revision, keyLength) {
  17712. var hashData = new Uint8Array(32), i = 0, j, n;
  17713. n = Math.min(32, password.length);
  17714. for (; i < n; ++i) {
  17715. hashData[i] = password[i];
  17716. }
  17717. j = 0;
  17718. while (i < 32) {
  17719. hashData[i++] = defaultPasswordBytes[j++];
  17720. }
  17721. var hash = calculateMD5(hashData, 0, i);
  17722. var keyLengthInBytes = keyLength >> 3;
  17723. if (revision >= 3) {
  17724. for (j = 0; j < 50; ++j) {
  17725. hash = calculateMD5(hash, 0, hash.length);
  17726. }
  17727. }
  17728. var cipher, userPassword;
  17729. if (revision >= 3) {
  17730. userPassword = ownerPassword;
  17731. var derivedKey = new Uint8Array(keyLengthInBytes), k;
  17732. for (j = 19; j >= 0; j--) {
  17733. for (k = 0; k < keyLengthInBytes; ++k) {
  17734. derivedKey[k] = hash[k] ^ j;
  17735. }
  17736. cipher = new ARCFourCipher(derivedKey);
  17737. userPassword = cipher.encryptBlock(userPassword);
  17738. }
  17739. } else {
  17740. cipher = new ARCFourCipher(hash.subarray(0, keyLengthInBytes));
  17741. userPassword = cipher.encryptBlock(ownerPassword);
  17742. }
  17743. return userPassword;
  17744. }
  17745. var identityName = Name.get('Identity');
  17746. function CipherTransformFactory(dict, fileId, password) {
  17747. var filter = dict.get('Filter');
  17748. if (!isName(filter) || filter.name != 'Standard') {
  17749. error('unknown encryption method');
  17750. }
  17751. this.dict = dict;
  17752. var algorithm = dict.get('V');
  17753. if (!isInt(algorithm) ||
  17754. (algorithm != 1 && algorithm != 2 && algorithm != 4)) {
  17755. error('unsupported encryption algorithm');
  17756. }
  17757. this.algorithm = algorithm;
  17758. var keyLength = dict.get('Length') || 40;
  17759. if (!isInt(keyLength) ||
  17760. keyLength < 40 || (keyLength % 8) !== 0) {
  17761. error('invalid key length');
  17762. }
  17763. // prepare keys
  17764. var ownerPassword = stringToBytes(dict.get('O')).subarray(0, 32);
  17765. var userPassword = stringToBytes(dict.get('U')).subarray(0, 32);
  17766. var flags = dict.get('P');
  17767. var revision = dict.get('R');
  17768. var encryptMetadata = (algorithm == 4 && // meaningful when V is 4
  17769. dict.get('EncryptMetadata') !== false); // makes true as default value
  17770. this.encryptMetadata = encryptMetadata;
  17771. var fileIdBytes = stringToBytes(fileId);
  17772. var passwordBytes;
  17773. if (password) {
  17774. passwordBytes = stringToBytes(password);
  17775. }
  17776. var encryptionKey = prepareKeyData(fileIdBytes, passwordBytes,
  17777. ownerPassword, userPassword, flags,
  17778. revision, keyLength, encryptMetadata);
  17779. if (!encryptionKey && !password) {
  17780. throw new PasswordException('No password given',
  17781. PasswordResponses.NEED_PASSWORD);
  17782. } else if (!encryptionKey && password) {
  17783. // Attempting use the password as an owner password
  17784. var decodedPassword = decodeUserPassword(passwordBytes, ownerPassword,
  17785. revision, keyLength);
  17786. encryptionKey = prepareKeyData(fileIdBytes, decodedPassword,
  17787. ownerPassword, userPassword, flags,
  17788. revision, keyLength, encryptMetadata);
  17789. }
  17790. if (!encryptionKey) {
  17791. throw new PasswordException('Incorrect Password',
  17792. PasswordResponses.INCORRECT_PASSWORD);
  17793. }
  17794. this.encryptionKey = encryptionKey;
  17795. if (algorithm == 4) {
  17796. this.cf = dict.get('CF');
  17797. this.stmf = dict.get('StmF') || identityName;
  17798. this.strf = dict.get('StrF') || identityName;
  17799. this.eff = dict.get('EFF') || this.strf;
  17800. }
  17801. }
  17802. function buildObjectKey(num, gen, encryptionKey, isAes) {
  17803. var key = new Uint8Array(encryptionKey.length + 9), i, n;
  17804. for (i = 0, n = encryptionKey.length; i < n; ++i) {
  17805. key[i] = encryptionKey[i];
  17806. }
  17807. key[i++] = num & 0xFF;
  17808. key[i++] = (num >> 8) & 0xFF;
  17809. key[i++] = (num >> 16) & 0xFF;
  17810. key[i++] = gen & 0xFF;
  17811. key[i++] = (gen >> 8) & 0xFF;
  17812. if (isAes) {
  17813. key[i++] = 0x73;
  17814. key[i++] = 0x41;
  17815. key[i++] = 0x6C;
  17816. key[i++] = 0x54;
  17817. }
  17818. var hash = calculateMD5(key, 0, i);
  17819. return hash.subarray(0, Math.min(encryptionKey.length + 5, 16));
  17820. }
  17821. function buildCipherConstructor(cf, name, num, gen, key) {
  17822. var cryptFilter = cf.get(name.name);
  17823. var cfm;
  17824. if (cryptFilter !== null && cryptFilter !== undefined) {
  17825. cfm = cryptFilter.get('CFM');
  17826. }
  17827. if (!cfm || cfm.name == 'None') {
  17828. return function cipherTransformFactoryBuildCipherConstructorNone() {
  17829. return new NullCipher();
  17830. };
  17831. }
  17832. if ('V2' == cfm.name) {
  17833. return function cipherTransformFactoryBuildCipherConstructorV2() {
  17834. return new ARCFourCipher(buildObjectKey(num, gen, key, false));
  17835. };
  17836. }
  17837. if ('AESV2' == cfm.name) {
  17838. return function cipherTransformFactoryBuildCipherConstructorAESV2() {
  17839. return new AES128Cipher(buildObjectKey(num, gen, key, true));
  17840. };
  17841. }
  17842. error('Unknown crypto method');
  17843. }
  17844. CipherTransformFactory.prototype = {
  17845. createCipherTransform:
  17846. function CipherTransformFactory_createCipherTransform(num, gen) {
  17847. if (this.algorithm == 4) {
  17848. return new CipherTransform(
  17849. buildCipherConstructor(this.cf, this.stmf,
  17850. num, gen, this.encryptionKey),
  17851. buildCipherConstructor(this.cf, this.strf,
  17852. num, gen, this.encryptionKey));
  17853. }
  17854. // algorithms 1 and 2
  17855. var key = buildObjectKey(num, gen, this.encryptionKey, false);
  17856. var cipherConstructor = function buildCipherCipherConstructor() {
  17857. return new ARCFourCipher(key);
  17858. };
  17859. return new CipherTransform(cipherConstructor, cipherConstructor);
  17860. }
  17861. };
  17862. return CipherTransformFactory;
  17863. })();
  17864. var PatternType = {
  17865. FUNCTION_BASED: 1,
  17866. AXIAL: 2,
  17867. RADIAL: 3,
  17868. FREE_FORM_MESH: 4,
  17869. LATTICE_FORM_MESH: 5,
  17870. COONS_PATCH_MESH: 6,
  17871. TENSOR_PATCH_MESH: 7
  17872. };
  17873. var Pattern = (function PatternClosure() {
  17874. // Constructor should define this.getPattern
  17875. function Pattern() {
  17876. error('should not call Pattern constructor');
  17877. }
  17878. Pattern.prototype = {
  17879. // Input: current Canvas context
  17880. // Output: the appropriate fillStyle or strokeStyle
  17881. getPattern: function Pattern_getPattern(ctx) {
  17882. error('Should not call Pattern.getStyle: ' + ctx);
  17883. }
  17884. };
  17885. Pattern.parseShading = function Pattern_parseShading(shading, matrix, xref,
  17886. res) {
  17887. var dict = isStream(shading) ? shading.dict : shading;
  17888. var type = dict.get('ShadingType');
  17889. switch (type) {
  17890. case PatternType.AXIAL:
  17891. case PatternType.RADIAL:
  17892. // Both radial and axial shadings are handled by RadialAxial shading.
  17893. return new Shadings.RadialAxial(dict, matrix, xref, res);
  17894. case PatternType.FREE_FORM_MESH:
  17895. case PatternType.LATTICE_FORM_MESH:
  17896. case PatternType.COONS_PATCH_MESH:
  17897. case PatternType.TENSOR_PATCH_MESH:
  17898. return new Shadings.Mesh(shading, matrix, xref, res);
  17899. default:
  17900. UnsupportedManager.notify(UNSUPPORTED_FEATURES.shadingPattern);
  17901. return new Shadings.Dummy();
  17902. }
  17903. };
  17904. return Pattern;
  17905. })();
  17906. var Shadings = {};
  17907. // A small number to offset the first/last color stops so we can insert ones to
  17908. // support extend. Number.MIN_VALUE appears to be too small and breaks the
  17909. // extend. 1e-7 works in FF but chrome seems to use an even smaller sized number
  17910. // internally so we have to go bigger.
  17911. Shadings.SMALL_NUMBER = 1e-2;
  17912. // Radial and axial shading have very similar implementations
  17913. // If needed, the implementations can be broken into two classes
  17914. Shadings.RadialAxial = (function RadialAxialClosure() {
  17915. function RadialAxial(dict, matrix, xref, res) {
  17916. this.matrix = matrix;
  17917. this.coordsArr = dict.get('Coords');
  17918. this.shadingType = dict.get('ShadingType');
  17919. this.type = 'Pattern';
  17920. var cs = dict.get('ColorSpace', 'CS');
  17921. cs = ColorSpace.parse(cs, xref, res);
  17922. this.cs = cs;
  17923. var t0 = 0.0, t1 = 1.0;
  17924. if (dict.has('Domain')) {
  17925. var domainArr = dict.get('Domain');
  17926. t0 = domainArr[0];
  17927. t1 = domainArr[1];
  17928. }
  17929. var extendStart = false, extendEnd = false;
  17930. if (dict.has('Extend')) {
  17931. var extendArr = dict.get('Extend');
  17932. extendStart = extendArr[0];
  17933. extendEnd = extendArr[1];
  17934. }
  17935. if (this.shadingType === PatternType.RADIAL &&
  17936. (!extendStart || !extendEnd)) {
  17937. // Radial gradient only currently works if either circle is fully within
  17938. // the other circle.
  17939. var x1 = this.coordsArr[0];
  17940. var y1 = this.coordsArr[1];
  17941. var r1 = this.coordsArr[2];
  17942. var x2 = this.coordsArr[3];
  17943. var y2 = this.coordsArr[4];
  17944. var r2 = this.coordsArr[5];
  17945. var distance = Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  17946. if (r1 <= r2 + distance &&
  17947. r2 <= r1 + distance) {
  17948. warn('Unsupported radial gradient.');
  17949. }
  17950. }
  17951. this.extendStart = extendStart;
  17952. this.extendEnd = extendEnd;
  17953. var fnObj = dict.get('Function');
  17954. var fn;
  17955. if (isArray(fnObj)) {
  17956. var fnArray = [];
  17957. for (var j = 0, jj = fnObj.length; j < jj; j++) {
  17958. var obj = xref.fetchIfRef(fnObj[j]);
  17959. if (!isPDFFunction(obj)) {
  17960. error('Invalid function');
  17961. }
  17962. fnArray.push(PDFFunction.parse(xref, obj));
  17963. }
  17964. fn = function radialAxialColorFunction(arg) {
  17965. var out = [];
  17966. for (var i = 0, ii = fnArray.length; i < ii; i++) {
  17967. out.push(fnArray[i](arg)[0]);
  17968. }
  17969. return out;
  17970. };
  17971. } else {
  17972. if (!isPDFFunction(fnObj)) {
  17973. error('Invalid function');
  17974. }
  17975. fn = PDFFunction.parse(xref, fnObj);
  17976. }
  17977. // 10 samples seems good enough for now, but probably won't work
  17978. // if there are sharp color changes. Ideally, we would implement
  17979. // the spec faithfully and add lossless optimizations.
  17980. var diff = t1 - t0;
  17981. var step = diff / 10;
  17982. var colorStops = this.colorStops = [];
  17983. // Protect against bad domains so we don't end up in an infinte loop below.
  17984. if (t0 >= t1 || step <= 0) {
  17985. // Acrobat doesn't seem to handle these cases so we'll ignore for
  17986. // now.
  17987. info('Bad shading domain.');
  17988. return;
  17989. }
  17990. var rgbColor;
  17991. for (var i = t0; i <= t1; i += step) {
  17992. rgbColor = cs.getRgb(fn([i]), 0);
  17993. var cssColor = Util.makeCssRgb(rgbColor);
  17994. colorStops.push([(i - t0) / diff, cssColor]);
  17995. }
  17996. var background = 'transparent';
  17997. if (dict.has('Background')) {
  17998. rgbColor = cs.getRgb(dict.get('Background'), 0);
  17999. background = Util.makeCssRgb(rgbColor);
  18000. }
  18001. if (!extendStart) {
  18002. // Insert a color stop at the front and offset the first real color stop
  18003. // so it doesn't conflict with the one we insert.
  18004. colorStops.unshift([0, background]);
  18005. colorStops[1][0] += Shadings.SMALL_NUMBER;
  18006. }
  18007. if (!extendEnd) {
  18008. // Same idea as above in extendStart but for the end.
  18009. colorStops[colorStops.length - 1][0] -= Shadings.SMALL_NUMBER;
  18010. colorStops.push([1, background]);
  18011. }
  18012. this.colorStops = colorStops;
  18013. }
  18014. RadialAxial.prototype = {
  18015. getIR: function RadialAxial_getIR() {
  18016. var coordsArr = this.coordsArr;
  18017. var shadingType = this.shadingType;
  18018. var type, p0, p1, r0, r1;
  18019. if (shadingType == PatternType.AXIAL) {
  18020. p0 = [coordsArr[0], coordsArr[1]];
  18021. p1 = [coordsArr[2], coordsArr[3]];
  18022. r0 = null;
  18023. r1 = null;
  18024. type = 'axial';
  18025. } else if (shadingType == PatternType.RADIAL) {
  18026. p0 = [coordsArr[0], coordsArr[1]];
  18027. p1 = [coordsArr[3], coordsArr[4]];
  18028. r0 = coordsArr[2];
  18029. r1 = coordsArr[5];
  18030. type = 'radial';
  18031. } else {
  18032. error('getPattern type unknown: ' + shadingType);
  18033. }
  18034. var matrix = this.matrix;
  18035. if (matrix) {
  18036. p0 = Util.applyTransform(p0, matrix);
  18037. p1 = Util.applyTransform(p1, matrix);
  18038. }
  18039. return ['RadialAxial', type, this.colorStops, p0, p1, r0, r1];
  18040. }
  18041. };
  18042. return RadialAxial;
  18043. })();
  18044. // All mesh shading. For now, they will be presented as set of the triangles
  18045. // to be drawn on the canvas and rgb color for each vertex.
  18046. Shadings.Mesh = (function MeshClosure() {
  18047. function MeshStreamReader(stream, context) {
  18048. this.stream = stream;
  18049. this.context = context;
  18050. this.buffer = 0;
  18051. this.bufferLength = 0;
  18052. }
  18053. MeshStreamReader.prototype = {
  18054. get hasData() {
  18055. if (this.stream.end) {
  18056. return this.stream.pos < this.stream.end;
  18057. }
  18058. if (this.bufferLength > 0) {
  18059. return true;
  18060. }
  18061. var nextByte = this.stream.getByte();
  18062. if (nextByte < 0) {
  18063. return false;
  18064. }
  18065. this.buffer = nextByte;
  18066. this.bufferLength = 8;
  18067. return true;
  18068. },
  18069. readBits: function MeshStreamReader_readBits(n) {
  18070. var buffer = this.buffer;
  18071. var bufferLength = this.bufferLength;
  18072. if (n === 32) {
  18073. if (bufferLength === 0) {
  18074. return ((this.stream.getByte() << 24) |
  18075. (this.stream.getByte() << 16) | (this.stream.getByte() << 8) |
  18076. this.stream.getByte()) >>> 0;
  18077. }
  18078. buffer = (buffer << 24) | (this.stream.getByte() << 16) |
  18079. (this.stream.getByte() << 8) | this.stream.getByte();
  18080. var nextByte = this.stream.getByte();
  18081. this.buffer = nextByte & ((1 << bufferLength) - 1);
  18082. return ((buffer << (8 - bufferLength)) |
  18083. ((nextByte & 0xFF) >> bufferLength)) >>> 0;
  18084. }
  18085. if (n === 8 && bufferLength === 0) {
  18086. return this.stream.getByte();
  18087. }
  18088. while (bufferLength < n) {
  18089. buffer = (buffer << 8) | this.stream.getByte();
  18090. bufferLength += 8;
  18091. }
  18092. bufferLength -= n;
  18093. this.bufferLength = bufferLength;
  18094. this.buffer = buffer & ((1 << bufferLength) - 1);
  18095. return buffer >> bufferLength;
  18096. },
  18097. align: function MeshStreamReader_align() {
  18098. this.buffer = 0;
  18099. this.bufferLength = 0;
  18100. },
  18101. readFlag: function MeshStreamReader_readFlag() {
  18102. return this.readBits(this.context.bitsPerFlag);
  18103. },
  18104. readCoordinate: function MeshStreamReader_readCoordinate() {
  18105. var bitsPerCoordinate = this.context.bitsPerCoordinate;
  18106. var xi = this.readBits(bitsPerCoordinate);
  18107. var yi = this.readBits(bitsPerCoordinate);
  18108. var decode = this.context.decode;
  18109. var scale = bitsPerCoordinate < 32 ? 1 / ((1 << bitsPerCoordinate) - 1) :
  18110. 2.3283064365386963e-10; // 2 ^ -32
  18111. return [
  18112. xi * scale * (decode[1] - decode[0]) + decode[0],
  18113. yi * scale * (decode[3] - decode[2]) + decode[2]
  18114. ];
  18115. },
  18116. readComponents: function MeshStreamReader_readComponents() {
  18117. var numComps = this.context.numComps;
  18118. var bitsPerComponent = this.context.bitsPerComponent;
  18119. var scale = bitsPerComponent < 32 ? 1 / ((1 << bitsPerComponent) - 1) :
  18120. 2.3283064365386963e-10; // 2 ^ -32
  18121. var decode = this.context.decode;
  18122. var components = [];
  18123. for (var i = 0, j = 4; i < numComps; i++, j += 2) {
  18124. var ci = this.readBits(bitsPerComponent);
  18125. components.push(ci * scale * (decode[j + 1] - decode[j]) + decode[j]);
  18126. }
  18127. if (this.context.colorFn) {
  18128. components = this.context.colorFn(components);
  18129. }
  18130. return this.context.colorSpace.getRgb(components, 0);
  18131. }
  18132. };
  18133. function decodeType4Shading(mesh, reader) {
  18134. var coords = mesh.coords;
  18135. var colors = mesh.colors;
  18136. var operators = [];
  18137. var ps = []; // not maintaining cs since that will match ps
  18138. var verticesLeft = 0; // assuming we have all data to start a new triangle
  18139. while (reader.hasData) {
  18140. var f = reader.readFlag();
  18141. var coord = reader.readCoordinate();
  18142. var color = reader.readComponents();
  18143. if (verticesLeft === 0) { // ignoring flags if we started a triangle
  18144. assert(0 <= f && f <= 2, 'Unknown type4 flag');
  18145. switch (f) {
  18146. case 0:
  18147. verticesLeft = 3;
  18148. break;
  18149. case 1:
  18150. ps.push(ps[ps.length - 2], ps[ps.length - 1]);
  18151. verticesLeft = 1;
  18152. break;
  18153. case 2:
  18154. ps.push(ps[ps.length - 3], ps[ps.length - 1]);
  18155. verticesLeft = 1;
  18156. break;
  18157. }
  18158. operators.push(f);
  18159. }
  18160. ps.push(coords.length);
  18161. coords.push(coord);
  18162. colors.push(color);
  18163. verticesLeft--;
  18164. reader.align();
  18165. }
  18166. var psPacked = new Int32Array(ps);
  18167. mesh.figures.push({
  18168. type: 'triangles',
  18169. coords: psPacked,
  18170. colors: psPacked
  18171. });
  18172. }
  18173. function decodeType5Shading(mesh, reader, verticesPerRow) {
  18174. var coords = mesh.coords;
  18175. var colors = mesh.colors;
  18176. var ps = []; // not maintaining cs since that will match ps
  18177. while (reader.hasData) {
  18178. var coord = reader.readCoordinate();
  18179. var color = reader.readComponents();
  18180. ps.push(coords.length);
  18181. coords.push(coord);
  18182. colors.push(color);
  18183. }
  18184. var psPacked = new Int32Array(ps);
  18185. mesh.figures.push({
  18186. type: 'lattice',
  18187. coords: psPacked,
  18188. colors: psPacked,
  18189. verticesPerRow: verticesPerRow
  18190. });
  18191. }
  18192. var MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3;
  18193. var MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20;
  18194. var TRIANGLE_DENSITY = 20; // count of triangles per entire mesh bounds
  18195. var getB = (function getBClosure() {
  18196. function buildB(count) {
  18197. var lut = [];
  18198. for (var i = 0; i <= count; i++) {
  18199. var t = i / count, t_ = 1 - t;
  18200. lut.push(new Float32Array([t_ * t_ * t_, 3 * t * t_ * t_,
  18201. 3 * t * t * t_, t * t * t]));
  18202. }
  18203. return lut;
  18204. }
  18205. var cache = [];
  18206. return function getB(count) {
  18207. if (!cache[count]) {
  18208. cache[count] = buildB(count);
  18209. }
  18210. return cache[count];
  18211. };
  18212. })();
  18213. function buildFigureFromPatch(mesh, index) {
  18214. var figure = mesh.figures[index];
  18215. assert(figure.type === 'patch', 'Unexpected patch mesh figure');
  18216. var coords = mesh.coords, colors = mesh.colors;
  18217. var pi = figure.coords;
  18218. var ci = figure.colors;
  18219. var figureMinX = Math.min(coords[pi[0]][0], coords[pi[3]][0],
  18220. coords[pi[12]][0], coords[pi[15]][0]);
  18221. var figureMinY = Math.min(coords[pi[0]][1], coords[pi[3]][1],
  18222. coords[pi[12]][1], coords[pi[15]][1]);
  18223. var figureMaxX = Math.max(coords[pi[0]][0], coords[pi[3]][0],
  18224. coords[pi[12]][0], coords[pi[15]][0]);
  18225. var figureMaxY = Math.max(coords[pi[0]][1], coords[pi[3]][1],
  18226. coords[pi[12]][1], coords[pi[15]][1]);
  18227. var splitXBy = Math.ceil((figureMaxX - figureMinX) * TRIANGLE_DENSITY /
  18228. (mesh.bounds[2] - mesh.bounds[0]));
  18229. splitXBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT,
  18230. Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitXBy));
  18231. var splitYBy = Math.ceil((figureMaxY - figureMinY) * TRIANGLE_DENSITY /
  18232. (mesh.bounds[3] - mesh.bounds[1]));
  18233. splitYBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT,
  18234. Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitYBy));
  18235. var verticesPerRow = splitXBy + 1;
  18236. var figureCoords = new Int32Array((splitYBy + 1) * verticesPerRow);
  18237. var figureColors = new Int32Array((splitYBy + 1) * verticesPerRow);
  18238. var k = 0;
  18239. var cl = new Uint8Array(3), cr = new Uint8Array(3);
  18240. var c0 = colors[ci[0]], c1 = colors[ci[1]],
  18241. c2 = colors[ci[2]], c3 = colors[ci[3]];
  18242. var bRow = getB(splitYBy), bCol = getB(splitXBy);
  18243. for (var row = 0; row <= splitYBy; row++) {
  18244. cl[0] = ((c0[0] * (splitYBy - row) + c2[0] * row) / splitYBy) | 0;
  18245. cl[1] = ((c0[1] * (splitYBy - row) + c2[1] * row) / splitYBy) | 0;
  18246. cl[2] = ((c0[2] * (splitYBy - row) + c2[2] * row) / splitYBy) | 0;
  18247. cr[0] = ((c1[0] * (splitYBy - row) + c3[0] * row) / splitYBy) | 0;
  18248. cr[1] = ((c1[1] * (splitYBy - row) + c3[1] * row) / splitYBy) | 0;
  18249. cr[2] = ((c1[2] * (splitYBy - row) + c3[2] * row) / splitYBy) | 0;
  18250. for (var col = 0; col <= splitXBy; col++, k++) {
  18251. if ((row === 0 || row === splitYBy) &&
  18252. (col === 0 || col === splitXBy)) {
  18253. continue;
  18254. }
  18255. var x = 0, y = 0;
  18256. var q = 0;
  18257. for (var i = 0; i <= 3; i++) {
  18258. for (var j = 0; j <= 3; j++, q++) {
  18259. var m = bRow[row][i] * bCol[col][j];
  18260. x += coords[pi[q]][0] * m;
  18261. y += coords[pi[q]][1] * m;
  18262. }
  18263. }
  18264. figureCoords[k] = coords.length;
  18265. coords.push([x, y]);
  18266. figureColors[k] = colors.length;
  18267. var newColor = new Uint8Array(3);
  18268. newColor[0] = ((cl[0] * (splitXBy - col) + cr[0] * col) / splitXBy) | 0;
  18269. newColor[1] = ((cl[1] * (splitXBy - col) + cr[1] * col) / splitXBy) | 0;
  18270. newColor[2] = ((cl[2] * (splitXBy - col) + cr[2] * col) / splitXBy) | 0;
  18271. colors.push(newColor);
  18272. }
  18273. }
  18274. figureCoords[0] = pi[0];
  18275. figureColors[0] = ci[0];
  18276. figureCoords[splitXBy] = pi[3];
  18277. figureColors[splitXBy] = ci[1];
  18278. figureCoords[verticesPerRow * splitYBy] = pi[12];
  18279. figureColors[verticesPerRow * splitYBy] = ci[2];
  18280. figureCoords[verticesPerRow * splitYBy + splitXBy] = pi[15];
  18281. figureColors[verticesPerRow * splitYBy + splitXBy] = ci[3];
  18282. mesh.figures[index] = {
  18283. type: 'lattice',
  18284. coords: figureCoords,
  18285. colors: figureColors,
  18286. verticesPerRow: verticesPerRow
  18287. };
  18288. }
  18289. function decodeType6Shading(mesh, reader) {
  18290. // A special case of Type 7. The p11, p12, p21, p22 automatically filled
  18291. var coords = mesh.coords;
  18292. var colors = mesh.colors;
  18293. var ps = new Int32Array(16); // p00, p10, ..., p30, p01, ..., p33
  18294. var cs = new Int32Array(4); // c00, c30, c03, c33
  18295. while (reader.hasData) {
  18296. var f = reader.readFlag();
  18297. assert(0 <= f && f <= 3, 'Unknown type6 flag');
  18298. var i, ii;
  18299. var pi = coords.length;
  18300. for (i = 0, ii = (f !== 0 ? 8 : 12); i < ii; i++) {
  18301. coords.push(reader.readCoordinate());
  18302. }
  18303. var ci = colors.length;
  18304. for (i = 0, ii = (f !== 0 ? 2 : 4); i < ii; i++) {
  18305. colors.push(reader.readComponents());
  18306. }
  18307. var tmp1, tmp2, tmp3, tmp4;
  18308. switch (f) {
  18309. case 0:
  18310. ps[12] = pi + 3; ps[13] = pi + 4; ps[14] = pi + 5; ps[15] = pi + 6;
  18311. ps[ 8] = pi + 2; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 7;
  18312. ps[ 4] = pi + 1; /* calculated below */ ps[ 7] = pi + 8;
  18313. ps[ 0] = pi; ps[ 1] = pi + 11; ps[ 2] = pi + 10; ps[ 3] = pi + 9;
  18314. cs[2] = ci + 1; cs[3] = ci + 2;
  18315. cs[0] = ci; cs[1] = ci + 3;
  18316. break;
  18317. case 1:
  18318. tmp1 = ps[12]; tmp2 = ps[13]; tmp3 = ps[14]; tmp4 = ps[15];
  18319. ps[12] = pi + 5; ps[13] = pi + 4; ps[14] = pi + 3; ps[15] = pi + 2;
  18320. ps[ 8] = pi + 6; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 1;
  18321. ps[ 4] = pi + 7; /* calculated below */ ps[ 7] = pi;
  18322. ps[ 0] = tmp1; ps[ 1] = tmp2; ps[ 2] = tmp3; ps[ 3] = tmp4;
  18323. tmp1 = cs[2]; tmp2 = cs[3];
  18324. cs[2] = ci + 1; cs[3] = ci;
  18325. cs[0] = tmp1; cs[1] = tmp2;
  18326. break;
  18327. case 2:
  18328. ps[12] = ps[15]; ps[13] = pi + 7; ps[14] = pi + 6; ps[15] = pi + 5;
  18329. ps[ 8] = ps[11]; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 4;
  18330. ps[ 4] = ps[7]; /* calculated below */ ps[ 7] = pi + 3;
  18331. ps[ 0] = ps[3]; ps[ 1] = pi; ps[ 2] = pi + 1; ps[ 3] = pi + 2;
  18332. cs[2] = cs[3]; cs[3] = ci + 1;
  18333. cs[0] = cs[1]; cs[1] = ci;
  18334. break;
  18335. case 3:
  18336. ps[12] = ps[0]; ps[13] = ps[1]; ps[14] = ps[2]; ps[15] = ps[3];
  18337. ps[ 8] = pi; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 7;
  18338. ps[ 4] = pi + 1; /* calculated below */ ps[ 7] = pi + 6;
  18339. ps[ 0] = pi + 2; ps[ 1] = pi + 3; ps[ 2] = pi + 4; ps[ 3] = pi + 5;
  18340. cs[2] = cs[0]; cs[3] = cs[1];
  18341. cs[0] = ci; cs[1] = ci + 1;
  18342. break;
  18343. }
  18344. // set p11, p12, p21, p22
  18345. ps[5] = coords.length;
  18346. coords.push([
  18347. (-4 * coords[ps[0]][0] - coords[ps[15]][0] +
  18348. 6 * (coords[ps[4]][0] + coords[ps[1]][0]) -
  18349. 2 * (coords[ps[12]][0] + coords[ps[3]][0]) +
  18350. 3 * (coords[ps[13]][0] + coords[ps[7]][0])) / 9,
  18351. (-4 * coords[ps[0]][1] - coords[ps[15]][1] +
  18352. 6 * (coords[ps[4]][1] + coords[ps[1]][1]) -
  18353. 2 * (coords[ps[12]][1] + coords[ps[3]][1]) +
  18354. 3 * (coords[ps[13]][1] + coords[ps[7]][1])) / 9
  18355. ]);
  18356. ps[6] = coords.length;
  18357. coords.push([
  18358. (-4 * coords[ps[3]][0] - coords[ps[12]][0] +
  18359. 6 * (coords[ps[2]][0] + coords[ps[7]][0]) -
  18360. 2 * (coords[ps[0]][0] + coords[ps[15]][0]) +
  18361. 3 * (coords[ps[4]][0] + coords[ps[14]][0])) / 9,
  18362. (-4 * coords[ps[3]][1] - coords[ps[12]][1] +
  18363. 6 * (coords[ps[2]][1] + coords[ps[7]][1]) -
  18364. 2 * (coords[ps[0]][1] + coords[ps[15]][1]) +
  18365. 3 * (coords[ps[4]][1] + coords[ps[14]][1])) / 9
  18366. ]);
  18367. ps[9] = coords.length;
  18368. coords.push([
  18369. (-4 * coords[ps[12]][0] - coords[ps[3]][0] +
  18370. 6 * (coords[ps[8]][0] + coords[ps[13]][0]) -
  18371. 2 * (coords[ps[0]][0] + coords[ps[15]][0]) +
  18372. 3 * (coords[ps[11]][0] + coords[ps[1]][0])) / 9,
  18373. (-4 * coords[ps[12]][1] - coords[ps[3]][1] +
  18374. 6 * (coords[ps[8]][1] + coords[ps[13]][1]) -
  18375. 2 * (coords[ps[0]][1] + coords[ps[15]][1]) +
  18376. 3 * (coords[ps[11]][1] + coords[ps[1]][1])) / 9
  18377. ]);
  18378. ps[10] = coords.length;
  18379. coords.push([
  18380. (-4 * coords[ps[15]][0] - coords[ps[0]][0] +
  18381. 6 * (coords[ps[11]][0] + coords[ps[14]][0]) -
  18382. 2 * (coords[ps[12]][0] + coords[ps[3]][0]) +
  18383. 3 * (coords[ps[2]][0] + coords[ps[8]][0])) / 9,
  18384. (-4 * coords[ps[15]][1] - coords[ps[0]][1] +
  18385. 6 * (coords[ps[11]][1] + coords[ps[14]][1]) -
  18386. 2 * (coords[ps[12]][1] + coords[ps[3]][1]) +
  18387. 3 * (coords[ps[2]][1] + coords[ps[8]][1])) / 9
  18388. ]);
  18389. mesh.figures.push({
  18390. type: 'patch',
  18391. coords: new Int32Array(ps), // making copies of ps and cs
  18392. colors: new Int32Array(cs)
  18393. });
  18394. }
  18395. }
  18396. function decodeType7Shading(mesh, reader) {
  18397. var coords = mesh.coords;
  18398. var colors = mesh.colors;
  18399. var ps = new Int32Array(16); // p00, p10, ..., p30, p01, ..., p33
  18400. var cs = new Int32Array(4); // c00, c30, c03, c33
  18401. while (reader.hasData) {
  18402. var f = reader.readFlag();
  18403. assert(0 <= f && f <= 3, 'Unknown type7 flag');
  18404. var i, ii;
  18405. var pi = coords.length;
  18406. for (i = 0, ii = (f !== 0 ? 12 : 16); i < ii; i++) {
  18407. coords.push(reader.readCoordinate());
  18408. }
  18409. var ci = colors.length;
  18410. for (i = 0, ii = (f !== 0 ? 2 : 4); i < ii; i++) {
  18411. colors.push(reader.readComponents());
  18412. }
  18413. var tmp1, tmp2, tmp3, tmp4;
  18414. switch (f) {
  18415. case 0:
  18416. ps[12] = pi + 3; ps[13] = pi + 4; ps[14] = pi + 5; ps[15] = pi + 6;
  18417. ps[ 8] = pi + 2; ps[ 9] = pi + 13; ps[10] = pi + 14; ps[11] = pi + 7;
  18418. ps[ 4] = pi + 1; ps[ 5] = pi + 12; ps[ 6] = pi + 15; ps[ 7] = pi + 8;
  18419. ps[ 0] = pi; ps[ 1] = pi + 11; ps[ 2] = pi + 10; ps[ 3] = pi + 9;
  18420. cs[2] = ci + 1; cs[3] = ci + 2;
  18421. cs[0] = ci; cs[1] = ci + 3;
  18422. break;
  18423. case 1:
  18424. tmp1 = ps[12]; tmp2 = ps[13]; tmp3 = ps[14]; tmp4 = ps[15];
  18425. ps[12] = pi + 5; ps[13] = pi + 4; ps[14] = pi + 3; ps[15] = pi + 2;
  18426. ps[ 8] = pi + 6; ps[ 9] = pi + 11; ps[10] = pi + 10; ps[11] = pi + 1;
  18427. ps[ 4] = pi + 7; ps[ 5] = pi + 8; ps[ 6] = pi + 9; ps[ 7] = pi;
  18428. ps[ 0] = tmp1; ps[ 1] = tmp2; ps[ 2] = tmp3; ps[ 3] = tmp4;
  18429. tmp1 = cs[2]; tmp2 = cs[3];
  18430. cs[2] = ci + 1; cs[3] = ci;
  18431. cs[0] = tmp1; cs[1] = tmp2;
  18432. break;
  18433. case 2:
  18434. ps[12] = ps[15]; ps[13] = pi + 7; ps[14] = pi + 6; ps[15] = pi + 5;
  18435. ps[ 8] = ps[11]; ps[ 9] = pi + 8; ps[10] = pi + 11; ps[11] = pi + 4;
  18436. ps[ 4] = ps[7]; ps[ 5] = pi + 9; ps[ 6] = pi + 10; ps[ 7] = pi + 3;
  18437. ps[ 0] = ps[3]; ps[ 1] = pi; ps[ 2] = pi + 1; ps[ 3] = pi + 2;
  18438. cs[2] = cs[3]; cs[3] = ci + 1;
  18439. cs[0] = cs[1]; cs[1] = ci;
  18440. break;
  18441. case 3:
  18442. ps[12] = ps[0]; ps[13] = ps[1]; ps[14] = ps[2]; ps[15] = ps[3];
  18443. ps[ 8] = pi; ps[ 9] = pi + 9; ps[10] = pi + 8; ps[11] = pi + 7;
  18444. ps[ 4] = pi + 1; ps[ 5] = pi + 10; ps[ 6] = pi + 11; ps[ 7] = pi + 6;
  18445. ps[ 0] = pi + 2; ps[ 1] = pi + 3; ps[ 2] = pi + 4; ps[ 3] = pi + 5;
  18446. cs[2] = cs[0]; cs[3] = cs[1];
  18447. cs[0] = ci; cs[1] = ci + 1;
  18448. break;
  18449. }
  18450. mesh.figures.push({
  18451. type: 'patch',
  18452. coords: new Int32Array(ps), // making copies of ps and cs
  18453. colors: new Int32Array(cs)
  18454. });
  18455. }
  18456. }
  18457. function updateBounds(mesh) {
  18458. var minX = mesh.coords[0][0], minY = mesh.coords[0][1],
  18459. maxX = minX, maxY = minY;
  18460. for (var i = 1, ii = mesh.coords.length; i < ii; i++) {
  18461. var x = mesh.coords[i][0], y = mesh.coords[i][1];
  18462. minX = minX > x ? x : minX;
  18463. minY = minY > y ? y : minY;
  18464. maxX = maxX < x ? x : maxX;
  18465. maxY = maxY < y ? y : maxY;
  18466. }
  18467. mesh.bounds = [minX, minY, maxX, maxY];
  18468. }
  18469. function packData(mesh) {
  18470. var i, ii, j, jj;
  18471. var coords = mesh.coords;
  18472. var coordsPacked = new Float32Array(coords.length * 2);
  18473. for (i = 0, j = 0, ii = coords.length; i < ii; i++) {
  18474. var xy = coords[i];
  18475. coordsPacked[j++] = xy[0];
  18476. coordsPacked[j++] = xy[1];
  18477. }
  18478. mesh.coords = coordsPacked;
  18479. var colors = mesh.colors;
  18480. var colorsPacked = new Uint8Array(colors.length * 3);
  18481. for (i = 0, j = 0, ii = colors.length; i < ii; i++) {
  18482. var c = colors[i];
  18483. colorsPacked[j++] = c[0];
  18484. colorsPacked[j++] = c[1];
  18485. colorsPacked[j++] = c[2];
  18486. }
  18487. mesh.colors = colorsPacked;
  18488. var figures = mesh.figures;
  18489. for (i = 0, ii = figures.length; i < ii; i++) {
  18490. var figure = figures[i], ps = figure.coords, cs = figure.colors;
  18491. for (j = 0, jj = ps.length; j < jj; j++) {
  18492. ps[j] *= 2;
  18493. cs[j] *= 3;
  18494. }
  18495. }
  18496. }
  18497. function Mesh(stream, matrix, xref, res) {
  18498. assert(isStream(stream), 'Mesh data is not a stream');
  18499. var dict = stream.dict;
  18500. this.matrix = matrix;
  18501. this.shadingType = dict.get('ShadingType');
  18502. this.type = 'Pattern';
  18503. this.bbox = dict.get('BBox');
  18504. var cs = dict.get('ColorSpace', 'CS');
  18505. cs = ColorSpace.parse(cs, xref, res);
  18506. this.cs = cs;
  18507. this.background = dict.has('Background') ?
  18508. cs.getRgb(dict.get('Background'), 0) : null;
  18509. var fnObj = dict.get('Function');
  18510. var fn;
  18511. if (!fnObj) {
  18512. fn = null;
  18513. } else if (isArray(fnObj)) {
  18514. var fnArray = [];
  18515. for (var j = 0, jj = fnObj.length; j < jj; j++) {
  18516. var obj = xref.fetchIfRef(fnObj[j]);
  18517. if (!isPDFFunction(obj)) {
  18518. error('Invalid function');
  18519. }
  18520. fnArray.push(PDFFunction.parse(xref, obj));
  18521. }
  18522. fn = function radialAxialColorFunction(arg) {
  18523. var out = [];
  18524. for (var i = 0, ii = fnArray.length; i < ii; i++) {
  18525. out.push(fnArray[i](arg)[0]);
  18526. }
  18527. return out;
  18528. };
  18529. } else {
  18530. if (!isPDFFunction(fnObj)) {
  18531. error('Invalid function');
  18532. }
  18533. fn = PDFFunction.parse(xref, fnObj);
  18534. }
  18535. this.coords = [];
  18536. this.colors = [];
  18537. this.figures = [];
  18538. var decodeContext = {
  18539. bitsPerCoordinate: dict.get('BitsPerCoordinate'),
  18540. bitsPerComponent: dict.get('BitsPerComponent'),
  18541. bitsPerFlag: dict.get('BitsPerFlag'),
  18542. decode: dict.get('Decode'),
  18543. colorFn: fn,
  18544. colorSpace: cs,
  18545. numComps: fn ? 1 : cs.numComps
  18546. };
  18547. var reader = new MeshStreamReader(stream, decodeContext);
  18548. var patchMesh = false;
  18549. switch (this.shadingType) {
  18550. case PatternType.FREE_FORM_MESH:
  18551. decodeType4Shading(this, reader);
  18552. break;
  18553. case PatternType.LATTICE_FORM_MESH:
  18554. var verticesPerRow = dict.get('VerticesPerRow') | 0;
  18555. assert(verticesPerRow >= 2, 'Invalid VerticesPerRow');
  18556. decodeType5Shading(this, reader, verticesPerRow);
  18557. break;
  18558. case PatternType.COONS_PATCH_MESH:
  18559. decodeType6Shading(this, reader);
  18560. patchMesh = true;
  18561. break;
  18562. case PatternType.TENSOR_PATCH_MESH:
  18563. decodeType7Shading(this, reader);
  18564. patchMesh = true;
  18565. break;
  18566. default:
  18567. error('Unsupported mesh type.');
  18568. break;
  18569. }
  18570. if (patchMesh) {
  18571. // dirty bounds calculation for determining, how dense shall be triangles
  18572. updateBounds(this);
  18573. for (var i = 0, ii = this.figures.length; i < ii; i++) {
  18574. buildFigureFromPatch(this, i);
  18575. }
  18576. }
  18577. // calculate bounds
  18578. updateBounds(this);
  18579. packData(this);
  18580. }
  18581. Mesh.prototype = {
  18582. getIR: function Mesh_getIR() {
  18583. return ['Mesh', this.shadingType, this.coords, this.colors, this.figures,
  18584. this.bounds, this.matrix, this.bbox, this.background];
  18585. }
  18586. };
  18587. return Mesh;
  18588. })();
  18589. Shadings.Dummy = (function DummyClosure() {
  18590. function Dummy() {
  18591. this.type = 'Pattern';
  18592. }
  18593. Dummy.prototype = {
  18594. getIR: function Dummy_getIR() {
  18595. return ['Dummy'];
  18596. }
  18597. };
  18598. return Dummy;
  18599. })();
  18600. function getTilingPatternIR(operatorList, dict, args) {
  18601. var matrix = dict.get('Matrix');
  18602. var bbox = dict.get('BBox');
  18603. var xstep = dict.get('XStep');
  18604. var ystep = dict.get('YStep');
  18605. var paintType = dict.get('PaintType');
  18606. var tilingType = dict.get('TilingType');
  18607. return [
  18608. 'TilingPattern', args, operatorList, matrix, bbox, xstep, ystep,
  18609. paintType, tilingType
  18610. ];
  18611. }
  18612. var PartialEvaluator = (function PartialEvaluatorClosure() {
  18613. function PartialEvaluator(pdfManager, xref, handler, pageIndex,
  18614. uniquePrefix, idCounters, fontCache) {
  18615. this.pdfManager = pdfManager;
  18616. this.xref = xref;
  18617. this.handler = handler;
  18618. this.pageIndex = pageIndex;
  18619. this.uniquePrefix = uniquePrefix;
  18620. this.idCounters = idCounters;
  18621. this.fontCache = fontCache;
  18622. }
  18623. var TILING_PATTERN = 1, SHADING_PATTERN = 2;
  18624. PartialEvaluator.prototype = {
  18625. hasBlendModes: function PartialEvaluator_hasBlendModes(resources) {
  18626. if (!isDict(resources)) {
  18627. return false;
  18628. }
  18629. var processed = Object.create(null);
  18630. if (resources.objId) {
  18631. processed[resources.objId] = true;
  18632. }
  18633. var nodes = [resources];
  18634. while (nodes.length) {
  18635. var key;
  18636. var node = nodes.shift();
  18637. // First check the current resources for blend modes.
  18638. var graphicStates = node.get('ExtGState');
  18639. if (isDict(graphicStates)) {
  18640. graphicStates = graphicStates.getAll();
  18641. for (key in graphicStates) {
  18642. var graphicState = graphicStates[key];
  18643. var bm = graphicState['BM'];
  18644. if (isName(bm) && bm.name !== 'Normal') {
  18645. return true;
  18646. }
  18647. }
  18648. }
  18649. // Descend into the XObjects to look for more resources and blend modes.
  18650. var xObjects = node.get('XObject');
  18651. if (!isDict(xObjects)) {
  18652. continue;
  18653. }
  18654. xObjects = xObjects.getAll();
  18655. for (key in xObjects) {
  18656. var xObject = xObjects[key];
  18657. if (!isStream(xObject)) {
  18658. continue;
  18659. }
  18660. var xResources = xObject.dict.get('Resources');
  18661. // Checking objId to detect an infinite loop.
  18662. if (isDict(xResources) &&
  18663. (!xResources.objId || !processed[xResources.objId])) {
  18664. nodes.push(xResources);
  18665. if (xResources.objId) {
  18666. processed[xResources.objId] = true;
  18667. }
  18668. }
  18669. }
  18670. }
  18671. return false;
  18672. },
  18673. buildFormXObject: function PartialEvaluator_buildFormXObject(resources,
  18674. xobj, smask,
  18675. operatorList,
  18676. initialState) {
  18677. var matrix = xobj.dict.get('Matrix');
  18678. var bbox = xobj.dict.get('BBox');
  18679. var group = xobj.dict.get('Group');
  18680. if (group) {
  18681. var groupOptions = {
  18682. matrix: matrix,
  18683. bbox: bbox,
  18684. smask: smask,
  18685. isolated: false,
  18686. knockout: false
  18687. };
  18688. var groupSubtype = group.get('S');
  18689. if (isName(groupSubtype) && groupSubtype.name === 'Transparency') {
  18690. groupOptions.isolated = (group.get('I') || false);
  18691. groupOptions.knockout = (group.get('K') || false);
  18692. var colorSpace = group.get('CS');
  18693. groupOptions.colorSpace = (colorSpace ?
  18694. ColorSpace.parseToIR(colorSpace, this.xref, resources) : null);
  18695. }
  18696. operatorList.addOp(OPS.beginGroup, [groupOptions]);
  18697. }
  18698. operatorList.addOp(OPS.paintFormXObjectBegin, [matrix, bbox]);
  18699. this.getOperatorList(xobj, (xobj.dict.get('Resources') || resources),
  18700. operatorList, initialState);
  18701. operatorList.addOp(OPS.paintFormXObjectEnd, []);
  18702. if (group) {
  18703. operatorList.addOp(OPS.endGroup, [groupOptions]);
  18704. }
  18705. },
  18706. buildPaintImageXObject:
  18707. function PartialEvaluator_buildPaintImageXObject(resources, image,
  18708. inline, operatorList,
  18709. cacheKey, cache) {
  18710. var self = this;
  18711. var dict = image.dict;
  18712. var w = dict.get('Width', 'W');
  18713. var h = dict.get('Height', 'H');
  18714. if (!(w && isNum(w)) || !(h && isNum(h))) {
  18715. warn('Image dimensions are missing, or not numbers.');
  18716. return;
  18717. }
  18718. if (PDFJS.maxImageSize !== -1 && w * h > PDFJS.maxImageSize) {
  18719. warn('Image exceeded maximum allowed size and was removed.');
  18720. return;
  18721. }
  18722. var imageMask = (dict.get('ImageMask', 'IM') || false);
  18723. var imgData, args;
  18724. if (imageMask) {
  18725. // This depends on a tmpCanvas being filled with the
  18726. // current fillStyle, such that processing the pixel
  18727. // data can't be done here. Instead of creating a
  18728. // complete PDFImage, only read the information needed
  18729. // for later.
  18730. var width = dict.get('Width', 'W');
  18731. var height = dict.get('Height', 'H');
  18732. var bitStrideLength = (width + 7) >> 3;
  18733. var imgArray = image.getBytes(bitStrideLength * height);
  18734. var decode = dict.get('Decode', 'D');
  18735. var canTransfer = image instanceof DecodeStream;
  18736. var inverseDecode = (!!decode && decode[0] > 0);
  18737. imgData = PDFImage.createMask(imgArray, width, height,
  18738. canTransfer, inverseDecode);
  18739. imgData.cached = true;
  18740. args = [imgData];
  18741. operatorList.addOp(OPS.paintImageMaskXObject, args);
  18742. if (cacheKey) {
  18743. cache.key = cacheKey;
  18744. cache.fn = OPS.paintImageMaskXObject;
  18745. cache.args = args;
  18746. }
  18747. return;
  18748. }
  18749. var softMask = (dict.get('SMask', 'SM') || false);
  18750. var mask = (dict.get('Mask') || false);
  18751. var SMALL_IMAGE_DIMENSIONS = 200;
  18752. // Inlining small images into the queue as RGB data
  18753. if (inline && !softMask && !mask && !(image instanceof JpegStream) &&
  18754. (w + h) < SMALL_IMAGE_DIMENSIONS) {
  18755. var imageObj = new PDFImage(this.xref, resources, image,
  18756. inline, null, null);
  18757. // We force the use of RGBA_32BPP images here, because we can't handle
  18758. // any other kind.
  18759. imgData = imageObj.createImageData(/* forceRGBA = */ true);
  18760. operatorList.addOp(OPS.paintInlineImageXObject, [imgData]);
  18761. return;
  18762. }
  18763. // If there is no imageMask, create the PDFImage and a lot
  18764. // of image processing can be done here.
  18765. var uniquePrefix = (this.uniquePrefix || '');
  18766. var objId = 'img_' + uniquePrefix + (++this.idCounters.obj);
  18767. operatorList.addDependency(objId);
  18768. args = [objId, w, h];
  18769. if (!softMask && !mask && image instanceof JpegStream &&
  18770. image.isNativelySupported(this.xref, resources)) {
  18771. // These JPEGs don't need any more processing so we can just send it.
  18772. operatorList.addOp(OPS.paintJpegXObject, args);
  18773. this.handler.send('obj',
  18774. [objId, this.pageIndex, 'JpegStream', image.getIR()]);
  18775. return;
  18776. }
  18777. PDFImage.buildImage(self.handler, self.xref, resources, image, inline).
  18778. then(function(imageObj) {
  18779. var imgData = imageObj.createImageData(/* forceRGBA = */ false);
  18780. self.handler.send('obj', [objId, self.pageIndex, 'Image', imgData],
  18781. null, [imgData.data.buffer]);
  18782. }).then(null, function (reason) {
  18783. warn('Unable to decode image: ' + reason);
  18784. self.handler.send('obj', [objId, self.pageIndex, 'Image', null]);
  18785. });
  18786. operatorList.addOp(OPS.paintImageXObject, args);
  18787. if (cacheKey) {
  18788. cache.key = cacheKey;
  18789. cache.fn = OPS.paintImageXObject;
  18790. cache.args = args;
  18791. }
  18792. },
  18793. handleSMask: function PartialEvaluator_handleSmask(smask, resources,
  18794. operatorList,
  18795. stateManager) {
  18796. var smaskContent = smask.get('G');
  18797. var smaskOptions = {
  18798. subtype: smask.get('S').name,
  18799. backdrop: smask.get('BC')
  18800. };
  18801. this.buildFormXObject(resources, smaskContent, smaskOptions,
  18802. operatorList, stateManager.state.clone());
  18803. },
  18804. handleTilingType:
  18805. function PartialEvaluator_handleTilingType(fn, args, resources,
  18806. pattern, patternDict,
  18807. operatorList) {
  18808. // Create an IR of the pattern code.
  18809. var tilingOpList = this.getOperatorList(pattern,
  18810. (patternDict.get('Resources') || resources));
  18811. // Add the dependencies to the parent operator list so they are resolved
  18812. // before sub operator list is executed synchronously.
  18813. operatorList.addDependencies(tilingOpList.dependencies);
  18814. operatorList.addOp(fn, getTilingPatternIR({
  18815. fnArray: tilingOpList.fnArray,
  18816. argsArray: tilingOpList.argsArray
  18817. }, patternDict, args));
  18818. },
  18819. handleSetFont:
  18820. function PartialEvaluator_handleSetFont(resources, fontArgs, fontRef,
  18821. operatorList, state) {
  18822. // TODO(mack): Not needed?
  18823. var fontName;
  18824. if (fontArgs) {
  18825. fontArgs = fontArgs.slice();
  18826. fontName = fontArgs[0].name;
  18827. }
  18828. var self = this;
  18829. var font = this.loadFont(fontName, fontRef, this.xref, resources,
  18830. operatorList);
  18831. state.font = font;
  18832. var loadedName = font.loadedName;
  18833. if (!font.sent) {
  18834. var fontData = font.translated.exportData();
  18835. self.handler.send('commonobj', [
  18836. loadedName,
  18837. 'Font',
  18838. fontData
  18839. ]);
  18840. font.sent = true;
  18841. }
  18842. return loadedName;
  18843. },
  18844. handleText: function PartialEvaluator_handleText(chars, state) {
  18845. var font = state.font.translated;
  18846. var glyphs = font.charsToGlyphs(chars);
  18847. var isAddToPathSet = !!(state.textRenderingMode &
  18848. TextRenderingMode.ADD_TO_PATH_FLAG);
  18849. if (font.data && (isAddToPathSet || PDFJS.disableFontFace)) {
  18850. for (var i = 0; i < glyphs.length; i++) {
  18851. if (glyphs[i] === null) {
  18852. continue;
  18853. }
  18854. var fontChar = glyphs[i].fontChar;
  18855. if (!font.renderer.hasBuiltPath(fontChar)) {
  18856. var path = font.renderer.getPathJs(fontChar);
  18857. this.handler.send('commonobj', [
  18858. font.loadedName + '_path_' + fontChar,
  18859. 'FontPath',
  18860. path
  18861. ]);
  18862. }
  18863. }
  18864. }
  18865. return glyphs;
  18866. },
  18867. setGState: function PartialEvaluator_setGState(resources, gState,
  18868. operatorList, xref,
  18869. stateManager) {
  18870. var self = this;
  18871. // TODO(mack): This should be rewritten so that this function returns
  18872. // what should be added to the queue during each iteration
  18873. function setGStateForKey(gStateObj, key, value) {
  18874. switch (key) {
  18875. case 'Type':
  18876. break;
  18877. case 'LW':
  18878. case 'LC':
  18879. case 'LJ':
  18880. case 'ML':
  18881. case 'D':
  18882. case 'RI':
  18883. case 'FL':
  18884. case 'CA':
  18885. case 'ca':
  18886. gStateObj.push([key, value]);
  18887. break;
  18888. case 'Font':
  18889. var loadedName = self.handleSetFont(resources, null, value[0],
  18890. operatorList,
  18891. stateManager.state);
  18892. operatorList.addDependency(loadedName);
  18893. gStateObj.push([key, [loadedName, value[1]]]);
  18894. break;
  18895. case 'BM':
  18896. gStateObj.push([key, value]);
  18897. break;
  18898. case 'SMask':
  18899. if (isName(value) && value.name === 'None') {
  18900. gStateObj.push([key, false]);
  18901. break;
  18902. }
  18903. var dict = xref.fetchIfRef(value);
  18904. if (isDict(dict)) {
  18905. self.handleSMask(dict, resources, operatorList, stateManager);
  18906. gStateObj.push([key, true]);
  18907. } else {
  18908. warn('Unsupported SMask type');
  18909. }
  18910. break;
  18911. // Only generate info log messages for the following since
  18912. // they are unlikey to have a big impact on the rendering.
  18913. case 'OP':
  18914. case 'op':
  18915. case 'OPM':
  18916. case 'BG':
  18917. case 'BG2':
  18918. case 'UCR':
  18919. case 'UCR2':
  18920. case 'TR':
  18921. case 'TR2':
  18922. case 'HT':
  18923. case 'SM':
  18924. case 'SA':
  18925. case 'AIS':
  18926. case 'TK':
  18927. // TODO implement these operators.
  18928. info('graphic state operator ' + key);
  18929. break;
  18930. default:
  18931. info('Unknown graphic state operator ' + key);
  18932. break;
  18933. }
  18934. }
  18935. // This array holds the converted/processed state data.
  18936. var gStateObj = [];
  18937. var gStateMap = gState.map;
  18938. for (var key in gStateMap) {
  18939. var value = gStateMap[key];
  18940. setGStateForKey(gStateObj, key, value);
  18941. }
  18942. operatorList.addOp(OPS.setGState, [gStateObj]);
  18943. },
  18944. loadFont: function PartialEvaluator_loadFont(fontName, font, xref,
  18945. resources,
  18946. parentOperatorList) {
  18947. function errorFont() {
  18948. return {
  18949. translated: new ErrorFont('Font ' + fontName + ' is not available'),
  18950. loadedName: 'g_font_error'
  18951. };
  18952. }
  18953. var fontRef;
  18954. if (font) { // Loading by ref.
  18955. assert(isRef(font));
  18956. fontRef = font;
  18957. } else { // Loading by name.
  18958. var fontRes = resources.get('Font');
  18959. if (fontRes) {
  18960. fontRef = fontRes.getRaw(fontName);
  18961. } else {
  18962. warn('fontRes not available');
  18963. return errorFont();
  18964. }
  18965. }
  18966. if (this.fontCache.has(fontRef)) {
  18967. return this.fontCache.get(fontRef);
  18968. }
  18969. font = xref.fetchIfRef(fontRef);
  18970. if (!isDict(font)) {
  18971. return errorFont();
  18972. }
  18973. var preEvaluatedFont = this.preEvaluateFont(font, xref);
  18974. var descriptor = preEvaluatedFont.descriptor;
  18975. var fontID = fontRef.num + '_' + fontRef.gen;
  18976. if (isDict(descriptor)) {
  18977. if (!descriptor.fontAliases) {
  18978. descriptor.fontAliases = Object.create(null);
  18979. }
  18980. var fontAliases = descriptor.fontAliases;
  18981. var hash = preEvaluatedFont.hash;
  18982. if (fontAliases[hash]) {
  18983. var aliasFontRef = fontAliases[hash].aliasRef;
  18984. if (aliasFontRef && this.fontCache.has(aliasFontRef)) {
  18985. this.fontCache.putAlias(fontRef, aliasFontRef);
  18986. var cachedFont = this.fontCache.get(fontRef);
  18987. return cachedFont;
  18988. }
  18989. }
  18990. if (!fontAliases[hash]) {
  18991. fontAliases[hash] = {
  18992. fontID: Font.getFontID()
  18993. };
  18994. }
  18995. fontAliases[hash].aliasRef = fontRef;
  18996. fontID = fontAliases[hash].fontID;
  18997. }
  18998. // Workaround for bad PDF generators that don't reference fonts
  18999. // properly, i.e. by not using an object identifier.
  19000. // Check if the fontRef is a Dict (as opposed to a standard object),
  19001. // in which case we don't cache the font and instead reference it by
  19002. // fontName in font.loadedName below.
  19003. var fontRefIsDict = isDict(fontRef);
  19004. if (!fontRefIsDict) {
  19005. this.fontCache.put(fontRef, font);
  19006. }
  19007. // Keep track of each font we translated so the caller can
  19008. // load them asynchronously before calling display on a page.
  19009. font.loadedName = 'g_font_' + (fontRefIsDict ?
  19010. fontName.replace(/\W/g, '') : fontID);
  19011. if (!font.translated) {
  19012. var translated;
  19013. try {
  19014. translated = this.translateFont(preEvaluatedFont, xref);
  19015. } catch (e) {
  19016. UnsupportedManager.notify(UNSUPPORTED_FEATURES.font);
  19017. translated = new ErrorFont(e instanceof Error ? e.message : e);
  19018. }
  19019. font.translated = translated;
  19020. }
  19021. if (font.translated.loadCharProcs) {
  19022. var charProcs = font.get('CharProcs').getAll();
  19023. var fontResources = (font.get('Resources') || resources);
  19024. var charProcKeys = Object.keys(charProcs);
  19025. var charProcOperatorList = {};
  19026. for (var i = 0, n = charProcKeys.length; i < n; ++i) {
  19027. var key = charProcKeys[i];
  19028. var glyphStream = charProcs[key];
  19029. var operatorList = this.getOperatorList(glyphStream, fontResources);
  19030. charProcOperatorList[key] = operatorList.getIR();
  19031. if (!parentOperatorList) {
  19032. continue;
  19033. }
  19034. // Add the dependencies to the parent operator list so they are
  19035. // resolved before sub operator list is executed synchronously.
  19036. parentOperatorList.addDependencies(charProcOperatorList.dependencies);
  19037. }
  19038. font.translated.charProcOperatorList = charProcOperatorList;
  19039. }
  19040. font.loaded = true;
  19041. return font;
  19042. },
  19043. getOperatorList: function PartialEvaluator_getOperatorList(stream,
  19044. resources,
  19045. operatorList,
  19046. initialState) {
  19047. var self = this;
  19048. var xref = this.xref;
  19049. var imageCache = {};
  19050. operatorList = (operatorList || new OperatorList());
  19051. resources = (resources || Dict.empty);
  19052. var xobjs = (resources.get('XObject') || Dict.empty);
  19053. var patterns = (resources.get('Pattern') || Dict.empty);
  19054. var stateManager = new StateManager(initialState || new EvalState());
  19055. var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager);
  19056. var operation, i, ii;
  19057. while ((operation = preprocessor.read())) {
  19058. var args = operation.args;
  19059. var fn = operation.fn;
  19060. var shading;
  19061. switch (fn) {
  19062. case OPS.setStrokeColorN:
  19063. case OPS.setFillColorN:
  19064. if (args[args.length - 1].code) {
  19065. break;
  19066. }
  19067. // compile tiling patterns
  19068. var patternName = args[args.length - 1];
  19069. // SCN/scn applies patterns along with normal colors
  19070. var pattern;
  19071. if (isName(patternName) &&
  19072. (pattern = patterns.get(patternName.name))) {
  19073. var dict = (isStream(pattern) ? pattern.dict : pattern);
  19074. var typeNum = dict.get('PatternType');
  19075. if (typeNum == TILING_PATTERN) {
  19076. self.handleTilingType(fn, args, resources, pattern, dict,
  19077. operatorList);
  19078. args = [];
  19079. continue;
  19080. } else if (typeNum == SHADING_PATTERN) {
  19081. shading = dict.get('Shading');
  19082. var matrix = dict.get('Matrix');
  19083. pattern = Pattern.parseShading(shading, matrix, xref,
  19084. resources);
  19085. args = pattern.getIR();
  19086. } else {
  19087. error('Unkown PatternType ' + typeNum);
  19088. }
  19089. }
  19090. break;
  19091. case OPS.paintXObject:
  19092. if (args[0].code) {
  19093. break;
  19094. }
  19095. // eagerly compile XForm objects
  19096. var name = args[0].name;
  19097. if (imageCache.key === name) {
  19098. operatorList.addOp(imageCache.fn, imageCache.args);
  19099. args = [];
  19100. continue;
  19101. }
  19102. var xobj = xobjs.get(name);
  19103. if (xobj) {
  19104. assert(isStream(xobj), 'XObject should be a stream');
  19105. var type = xobj.dict.get('Subtype');
  19106. assert(isName(type),
  19107. 'XObject should have a Name subtype');
  19108. if ('Form' == type.name) {
  19109. stateManager.save();
  19110. self.buildFormXObject(resources, xobj, null, operatorList,
  19111. stateManager.state.clone());
  19112. args = [];
  19113. stateManager.restore();
  19114. continue;
  19115. } else if ('Image' == type.name) {
  19116. self.buildPaintImageXObject(resources, xobj, false,
  19117. operatorList, name, imageCache);
  19118. args = [];
  19119. continue;
  19120. } else {
  19121. error('Unhandled XObject subtype ' + type.name);
  19122. }
  19123. }
  19124. break;
  19125. case OPS.setFont:
  19126. // eagerly collect all fonts
  19127. var loadedName = self.handleSetFont(resources, args, null,
  19128. operatorList,
  19129. stateManager.state);
  19130. operatorList.addDependency(loadedName);
  19131. args[0] = loadedName;
  19132. break;
  19133. case OPS.endInlineImage:
  19134. var cacheKey = args[0].cacheKey;
  19135. if (cacheKey && imageCache.key === cacheKey) {
  19136. operatorList.addOp(imageCache.fn, imageCache.args);
  19137. args = [];
  19138. continue;
  19139. }
  19140. self.buildPaintImageXObject(resources, args[0], true,
  19141. operatorList, cacheKey, imageCache);
  19142. args = [];
  19143. continue;
  19144. case OPS.showText:
  19145. args[0] = this.handleText(args[0], stateManager.state);
  19146. break;
  19147. case OPS.showSpacedText:
  19148. var arr = args[0];
  19149. var arrLength = arr.length;
  19150. for (i = 0; i < arrLength; ++i) {
  19151. if (isString(arr[i])) {
  19152. arr[i] = this.handleText(arr[i], stateManager.state);
  19153. }
  19154. }
  19155. break;
  19156. case OPS.nextLineShowText:
  19157. args[0] = this.handleText(args[0], stateManager.state);
  19158. break;
  19159. case OPS.nextLineSetSpacingShowText:
  19160. args[2] = this.handleText(args[2], stateManager.state);
  19161. break;
  19162. case OPS.setTextRenderingMode:
  19163. stateManager.state.textRenderingMode = args[0];
  19164. break;
  19165. // Parse the ColorSpace data to a raw format.
  19166. case OPS.setFillColorSpace:
  19167. case OPS.setStrokeColorSpace:
  19168. args = [ColorSpace.parseToIR(args[0], xref, resources)];
  19169. break;
  19170. case OPS.shadingFill:
  19171. var shadingRes = resources.get('Shading');
  19172. if (!shadingRes) {
  19173. error('No shading resource found');
  19174. }
  19175. shading = shadingRes.get(args[0].name);
  19176. if (!shading) {
  19177. error('No shading object found');
  19178. }
  19179. var shadingFill = Pattern.parseShading(shading, null, xref,
  19180. resources);
  19181. var patternIR = shadingFill.getIR();
  19182. args = [patternIR];
  19183. fn = OPS.shadingFill;
  19184. break;
  19185. case OPS.setGState:
  19186. var dictName = args[0];
  19187. var extGState = resources.get('ExtGState');
  19188. if (!isDict(extGState) || !extGState.has(dictName.name)) {
  19189. break;
  19190. }
  19191. var gState = extGState.get(dictName.name);
  19192. self.setGState(resources, gState, operatorList, xref,
  19193. stateManager);
  19194. args = [];
  19195. continue;
  19196. }
  19197. operatorList.addOp(fn, args);
  19198. }
  19199. // Some PDFs don't close all restores inside object/form.
  19200. // Closing those for them.
  19201. for (i = 0, ii = preprocessor.savedStatesDepth; i < ii; i++) {
  19202. operatorList.addOp(OPS.restore, []);
  19203. }
  19204. return operatorList;
  19205. },
  19206. getTextContent: function PartialEvaluator_getTextContent(stream, resources,
  19207. stateManager) {
  19208. stateManager = (stateManager || new StateManager(new TextState()));
  19209. var textContent = {
  19210. items: [],
  19211. styles: Object.create(null)
  19212. };
  19213. var bidiTexts = textContent.items;
  19214. var SPACE_FACTOR = 0.35;
  19215. var MULTI_SPACE_FACTOR = 1.5;
  19216. var self = this;
  19217. var xref = this.xref;
  19218. resources = (xref.fetchIfRef(resources) || Dict.empty);
  19219. // The xobj is parsed iff it's needed, e.g. if there is a `DO` cmd.
  19220. var xobjs = null;
  19221. var xobjsCache = {};
  19222. var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager);
  19223. var operation;
  19224. var textState;
  19225. function newTextChunk() {
  19226. var font = textState.font;
  19227. if (!(font.loadedName in textContent.styles)) {
  19228. textContent.styles[font.loadedName] = {
  19229. fontFamily: font.fallbackName,
  19230. ascent: font.ascent,
  19231. descent: font.descent,
  19232. vertical: font.vertical
  19233. };
  19234. }
  19235. return {
  19236. str: '',
  19237. dir: null,
  19238. width: 0,
  19239. height: 0,
  19240. transform: null,
  19241. fontName: font.loadedName
  19242. };
  19243. }
  19244. function runBidi(textChunk) {
  19245. var bidiResult = PDFJS.bidi(textChunk.str, -1, textState.font.vertical);
  19246. textChunk.str = bidiResult.str;
  19247. textChunk.dir = bidiResult.dir;
  19248. return textChunk;
  19249. }
  19250. function handleSetFont(fontName, fontRef) {
  19251. var font = textState.font = self.loadFont(fontName, fontRef, xref,
  19252. resources, null).translated;
  19253. textState.fontMatrix = font.fontMatrix ? font.fontMatrix :
  19254. FONT_IDENTITY_MATRIX;
  19255. }
  19256. function buildTextGeometry(chars, textChunk) {
  19257. var font = textState.font;
  19258. textChunk = textChunk || newTextChunk();
  19259. if (!textChunk.transform) {
  19260. // 9.4.4 Text Space Details
  19261. var tsm = [textState.fontSize * textState.textHScale, 0,
  19262. 0, textState.fontSize,
  19263. 0, textState.textRise];
  19264. var trm = textChunk.transform = Util.transform(textState.ctm,
  19265. Util.transform(textState.textMatrix, tsm));
  19266. if (!font.vertical) {
  19267. textChunk.height = Math.sqrt(trm[2] * trm[2] + trm[3] * trm[3]);
  19268. } else {
  19269. textChunk.width = Math.sqrt(trm[0] * trm[0] + trm[1] * trm[1]);
  19270. }
  19271. }
  19272. var width = 0;
  19273. var height = 0;
  19274. var glyphs = font.charsToGlyphs(chars);
  19275. var defaultVMetrics = font.defaultVMetrics;
  19276. for (var i = 0; i < glyphs.length; i++) {
  19277. var glyph = glyphs[i];
  19278. if (!glyph) { // Previous glyph was a space.
  19279. width += textState.wordSpacing * textState.textHScale;
  19280. continue;
  19281. }
  19282. var vMetricX = null;
  19283. var vMetricY = null;
  19284. var glyphWidth = null;
  19285. if (font.vertical) {
  19286. if (glyph.vmetric) {
  19287. glyphWidth = glyph.vmetric[0];
  19288. vMetricX = glyph.vmetric[1];
  19289. vMetricY = glyph.vmetric[2];
  19290. } else {
  19291. glyphWidth = glyph.width;
  19292. vMetricX = glyph.width * 0.5;
  19293. vMetricY = defaultVMetrics[2];
  19294. }
  19295. } else {
  19296. glyphWidth = glyph.width;
  19297. }
  19298. var glyphUnicode = glyph.unicode;
  19299. if (glyphUnicode in NormalizedUnicodes) {
  19300. glyphUnicode = NormalizedUnicodes[glyphUnicode];
  19301. }
  19302. glyphUnicode = reverseIfRtl(glyphUnicode);
  19303. // The following will calculate the x and y of the individual glyphs.
  19304. // if (font.vertical) {
  19305. // tsm[4] -= vMetricX * Math.abs(textState.fontSize) *
  19306. // textState.fontMatrix[0];
  19307. // tsm[5] -= vMetricY * textState.fontSize *
  19308. // textState.fontMatrix[0];
  19309. // }
  19310. // var trm = Util.transform(textState.textMatrix, tsm);
  19311. // var pt = Util.applyTransform([trm[4], trm[5]], textState.ctm);
  19312. // var x = pt[0];
  19313. // var y = pt[1];
  19314. var tx = 0;
  19315. var ty = 0;
  19316. if (!font.vertical) {
  19317. var w0 = glyphWidth * textState.fontMatrix[0];
  19318. tx = (w0 * textState.fontSize + textState.charSpacing) *
  19319. textState.textHScale;
  19320. width += tx;
  19321. } else {
  19322. var w1 = glyphWidth * textState.fontMatrix[0];
  19323. ty = w1 * textState.fontSize + textState.charSpacing;
  19324. height += ty;
  19325. }
  19326. textState.translateTextMatrix(tx, ty);
  19327. textChunk.str += glyphUnicode;
  19328. }
  19329. var a = textState.textLineMatrix[0];
  19330. var b = textState.textLineMatrix[1];
  19331. var scaleLineX = Math.sqrt(a * a + b * b);
  19332. a = textState.ctm[0];
  19333. b = textState.ctm[1];
  19334. var scaleCtmX = Math.sqrt(a * a + b * b);
  19335. if (!font.vertical) {
  19336. textChunk.width += width * scaleCtmX * scaleLineX;
  19337. } else {
  19338. textChunk.height += Math.abs(height * scaleCtmX * scaleLineX);
  19339. }
  19340. return textChunk;
  19341. }
  19342. while ((operation = preprocessor.read())) {
  19343. textState = stateManager.state;
  19344. var fn = operation.fn;
  19345. var args = operation.args;
  19346. switch (fn) {
  19347. case OPS.setFont:
  19348. handleSetFont(args[0].name);
  19349. textState.fontSize = args[1];
  19350. break;
  19351. case OPS.setTextRise:
  19352. textState.textRise = args[0];
  19353. break;
  19354. case OPS.setHScale:
  19355. textState.textHScale = args[0] / 100;
  19356. break;
  19357. case OPS.setLeading:
  19358. textState.leading = args[0];
  19359. break;
  19360. case OPS.moveText:
  19361. textState.translateTextLineMatrix(args[0], args[1]);
  19362. textState.textMatrix = textState.textLineMatrix.slice();
  19363. break;
  19364. case OPS.setLeadingMoveText:
  19365. textState.leading = -args[1];
  19366. textState.translateTextLineMatrix(args[0], args[1]);
  19367. textState.textMatrix = textState.textLineMatrix.slice();
  19368. break;
  19369. case OPS.nextLine:
  19370. textState.carriageReturn();
  19371. break;
  19372. case OPS.setTextMatrix:
  19373. textState.setTextMatrix(args[0], args[1], args[2], args[3],
  19374. args[4], args[5]);
  19375. textState.setTextLineMatrix(args[0], args[1], args[2], args[3],
  19376. args[4], args[5]);
  19377. break;
  19378. case OPS.setCharSpacing:
  19379. textState.charSpacing = args[0];
  19380. break;
  19381. case OPS.setWordSpacing:
  19382. textState.wordSpacing = args[0];
  19383. break;
  19384. case OPS.beginText:
  19385. textState.textMatrix = IDENTITY_MATRIX.slice();
  19386. textState.textLineMatrix = IDENTITY_MATRIX.slice();
  19387. break;
  19388. case OPS.showSpacedText:
  19389. var items = args[0];
  19390. var textChunk = newTextChunk();
  19391. var offset;
  19392. for (var j = 0, jj = items.length; j < jj; j++) {
  19393. if (typeof items[j] === 'string') {
  19394. buildTextGeometry(items[j], textChunk);
  19395. } else {
  19396. var val = items[j] / 1000;
  19397. if (!textState.font.vertical) {
  19398. offset = -val * textState.fontSize * textState.textHScale *
  19399. textState.textMatrix[0];
  19400. textState.translateTextMatrix(offset, 0);
  19401. textChunk.width += offset;
  19402. } else {
  19403. offset = -val * textState.fontSize * textState.textMatrix[3];
  19404. textState.translateTextMatrix(0, offset);
  19405. textChunk.height += offset;
  19406. }
  19407. if (items[j] < 0 && textState.font.spaceWidth > 0) {
  19408. var fakeSpaces = -items[j] / textState.font.spaceWidth;
  19409. if (fakeSpaces > MULTI_SPACE_FACTOR) {
  19410. fakeSpaces = Math.round(fakeSpaces);
  19411. while (fakeSpaces--) {
  19412. textChunk.str += ' ';
  19413. }
  19414. } else if (fakeSpaces > SPACE_FACTOR) {
  19415. textChunk.str += ' ';
  19416. }
  19417. }
  19418. }
  19419. }
  19420. bidiTexts.push(runBidi(textChunk));
  19421. break;
  19422. case OPS.showText:
  19423. bidiTexts.push(runBidi(buildTextGeometry(args[0])));
  19424. break;
  19425. case OPS.nextLineShowText:
  19426. textState.carriageReturn();
  19427. bidiTexts.push(runBidi(buildTextGeometry(args[0])));
  19428. break;
  19429. case OPS.nextLineSetSpacingShowText:
  19430. textState.wordSpacing = args[0];
  19431. textState.charSpacing = args[1];
  19432. textState.carriageReturn();
  19433. bidiTexts.push(runBidi(buildTextGeometry(args[2])));
  19434. break;
  19435. case OPS.paintXObject:
  19436. if (args[0].code) {
  19437. break;
  19438. }
  19439. if (!xobjs) {
  19440. xobjs = (resources.get('XObject') || Dict.empty);
  19441. }
  19442. var name = args[0].name;
  19443. if (xobjsCache.key === name) {
  19444. if (xobjsCache.texts) {
  19445. Util.concatenateToArray(bidiTexts, xobjsCache.texts.items);
  19446. Util.extendObj(textContent.styles, xobjsCache.texts.styles);
  19447. }
  19448. break;
  19449. }
  19450. var xobj = xobjs.get(name);
  19451. if (!xobj) {
  19452. break;
  19453. }
  19454. assert(isStream(xobj), 'XObject should be a stream');
  19455. var type = xobj.dict.get('Subtype');
  19456. assert(isName(type),
  19457. 'XObject should have a Name subtype');
  19458. if ('Form' !== type.name) {
  19459. xobjsCache.key = name;
  19460. xobjsCache.texts = null;
  19461. break;
  19462. }
  19463. stateManager.save();
  19464. var matrix = xobj.dict.get('Matrix');
  19465. if (isArray(matrix) && matrix.length === 6) {
  19466. stateManager.transform(matrix);
  19467. }
  19468. var formTextContent = this.getTextContent(
  19469. xobj,
  19470. xobj.dict.get('Resources') || resources,
  19471. stateManager
  19472. );
  19473. Util.concatenateToArray(bidiTexts, formTextContent.items);
  19474. Util.extendObj(textContent.styles, formTextContent.styles);
  19475. stateManager.restore();
  19476. xobjsCache.key = name;
  19477. xobjsCache.texts = formTextContent;
  19478. break;
  19479. case OPS.setGState:
  19480. var dictName = args[0];
  19481. var extGState = resources.get('ExtGState');
  19482. if (!isDict(extGState) || !extGState.has(dictName.name)) {
  19483. break;
  19484. }
  19485. var gsState = extGState.get(dictName.name);
  19486. for (var i = 0; i < gsState.length; i++) {
  19487. if (gsState[i] === 'Font') {
  19488. handleSetFont(args[0].name);
  19489. }
  19490. }
  19491. break;
  19492. } // switch
  19493. } // while
  19494. return textContent;
  19495. },
  19496. extractDataStructures: function
  19497. partialEvaluatorExtractDataStructures(dict, baseDict,
  19498. xref, properties) {
  19499. // 9.10.2
  19500. var toUnicode = (dict.get('ToUnicode') || baseDict.get('ToUnicode'));
  19501. if (toUnicode) {
  19502. properties.toUnicode = this.readToUnicode(toUnicode, xref, properties);
  19503. }
  19504. if (properties.composite) {
  19505. // CIDSystemInfo helps to match CID to glyphs
  19506. var cidSystemInfo = dict.get('CIDSystemInfo');
  19507. if (isDict(cidSystemInfo)) {
  19508. properties.cidSystemInfo = {
  19509. registry: cidSystemInfo.get('Registry'),
  19510. ordering: cidSystemInfo.get('Ordering'),
  19511. supplement: cidSystemInfo.get('Supplement')
  19512. };
  19513. }
  19514. var cidToGidMap = dict.get('CIDToGIDMap');
  19515. if (isStream(cidToGidMap)) {
  19516. properties.cidToGidMap = this.readCidToGidMap(cidToGidMap);
  19517. }
  19518. }
  19519. // Based on 9.6.6 of the spec the encoding can come from multiple places
  19520. // and depends on the font type. The base encoding and differences are
  19521. // read here, but the encoding that is actually used is chosen during
  19522. // glyph mapping in the font.
  19523. // TODO: Loading the built in encoding in the font would allow the
  19524. // differences to be merged in here not require us to hold on to it.
  19525. var differences = [];
  19526. var baseEncodingName = null;
  19527. var encoding;
  19528. if (dict.has('Encoding')) {
  19529. encoding = dict.get('Encoding');
  19530. if (isDict(encoding)) {
  19531. baseEncodingName = encoding.get('BaseEncoding');
  19532. baseEncodingName = (isName(baseEncodingName) ?
  19533. baseEncodingName.name : null);
  19534. // Load the differences between the base and original
  19535. if (encoding.has('Differences')) {
  19536. var diffEncoding = encoding.get('Differences');
  19537. var index = 0;
  19538. for (var j = 0, jj = diffEncoding.length; j < jj; j++) {
  19539. var data = diffEncoding[j];
  19540. if (isNum(data)) {
  19541. index = data;
  19542. } else {
  19543. differences[index++] = data.name;
  19544. }
  19545. }
  19546. }
  19547. } else if (isName(encoding)) {
  19548. baseEncodingName = encoding.name;
  19549. } else {
  19550. error('Encoding is not a Name nor a Dict');
  19551. }
  19552. // According to table 114 if the encoding is a named encoding it must be
  19553. // one of these predefined encodings.
  19554. if ((baseEncodingName !== 'MacRomanEncoding' &&
  19555. baseEncodingName !== 'MacExpertEncoding' &&
  19556. baseEncodingName !== 'WinAnsiEncoding')) {
  19557. baseEncodingName = null;
  19558. }
  19559. }
  19560. if (baseEncodingName) {
  19561. properties.defaultEncoding = Encodings[baseEncodingName].slice();
  19562. } else {
  19563. encoding = (properties.type === 'TrueType' ?
  19564. Encodings.WinAnsiEncoding : Encodings.StandardEncoding);
  19565. // The Symbolic attribute can be misused for regular fonts
  19566. // Heuristic: we have to check if the font is a standard one also
  19567. if (!!(properties.flags & FontFlags.Symbolic)) {
  19568. encoding = (!properties.file && /Symbol/i.test(properties.name) ?
  19569. Encodings.SymbolSetEncoding :
  19570. Encodings.MacRomanEncoding);
  19571. }
  19572. properties.defaultEncoding = encoding;
  19573. }
  19574. properties.differences = differences;
  19575. properties.baseEncodingName = baseEncodingName;
  19576. properties.dict = dict;
  19577. },
  19578. readToUnicode: function PartialEvaluator_readToUnicode(toUnicode) {
  19579. var cmapObj = toUnicode;
  19580. if (isName(cmapObj)) {
  19581. return CMapFactory.create(cmapObj).map;
  19582. } else if (isStream(cmapObj)) {
  19583. var cmap = CMapFactory.create(cmapObj).map;
  19584. // Convert UTF-16BE
  19585. // NOTE: cmap can be a sparse array, so use forEach instead of for(;;)
  19586. // to iterate over all keys.
  19587. cmap.forEach(function(token, i) {
  19588. var str = [];
  19589. for (var k = 0; k < token.length; k += 2) {
  19590. var w1 = (token.charCodeAt(k) << 8) | token.charCodeAt(k + 1);
  19591. if ((w1 & 0xF800) !== 0xD800) { // w1 < 0xD800 || w1 > 0xDFFF
  19592. str.push(w1);
  19593. continue;
  19594. }
  19595. k += 2;
  19596. var w2 = (token.charCodeAt(k) << 8) | token.charCodeAt(k + 1);
  19597. str.push(((w1 & 0x3ff) << 10) + (w2 & 0x3ff) + 0x10000);
  19598. }
  19599. cmap[i] = String.fromCharCode.apply(String, str);
  19600. });
  19601. return cmap;
  19602. }
  19603. return null;
  19604. },
  19605. readCidToGidMap: function PartialEvaluator_readCidToGidMap(cidToGidStream) {
  19606. // Extract the encoding from the CIDToGIDMap
  19607. var glyphsData = cidToGidStream.getBytes();
  19608. // Set encoding 0 to later verify the font has an encoding
  19609. var result = [];
  19610. for (var j = 0, jj = glyphsData.length; j < jj; j++) {
  19611. var glyphID = (glyphsData[j++] << 8) | glyphsData[j];
  19612. if (glyphID === 0) {
  19613. continue;
  19614. }
  19615. var code = j >> 1;
  19616. result[code] = glyphID;
  19617. }
  19618. return result;
  19619. },
  19620. extractWidths: function PartialEvaluator_extractWidths(dict, xref,
  19621. descriptor,
  19622. properties) {
  19623. var glyphsWidths = [];
  19624. var defaultWidth = 0;
  19625. var glyphsVMetrics = [];
  19626. var defaultVMetrics;
  19627. var i, ii, j, jj, start, code, widths;
  19628. if (properties.composite) {
  19629. defaultWidth = dict.get('DW') || 1000;
  19630. widths = dict.get('W');
  19631. if (widths) {
  19632. for (i = 0, ii = widths.length; i < ii; i++) {
  19633. start = widths[i++];
  19634. code = xref.fetchIfRef(widths[i]);
  19635. if (isArray(code)) {
  19636. for (j = 0, jj = code.length; j < jj; j++) {
  19637. glyphsWidths[start++] = code[j];
  19638. }
  19639. } else {
  19640. var width = widths[++i];
  19641. for (j = start; j <= code; j++) {
  19642. glyphsWidths[j] = width;
  19643. }
  19644. }
  19645. }
  19646. }
  19647. if (properties.vertical) {
  19648. var vmetrics = (dict.get('DW2') || [880, -1000]);
  19649. defaultVMetrics = [vmetrics[1], defaultWidth * 0.5, vmetrics[0]];
  19650. vmetrics = dict.get('W2');
  19651. if (vmetrics) {
  19652. for (i = 0, ii = vmetrics.length; i < ii; i++) {
  19653. start = vmetrics[i++];
  19654. code = xref.fetchIfRef(vmetrics[i]);
  19655. if (isArray(code)) {
  19656. for (j = 0, jj = code.length; j < jj; j++) {
  19657. glyphsVMetrics[start++] = [code[j++], code[j++], code[j]];
  19658. }
  19659. } else {
  19660. var vmetric = [vmetrics[++i], vmetrics[++i], vmetrics[++i]];
  19661. for (j = start; j <= code; j++) {
  19662. glyphsVMetrics[j] = vmetric;
  19663. }
  19664. }
  19665. }
  19666. }
  19667. }
  19668. } else {
  19669. var firstChar = properties.firstChar;
  19670. widths = dict.get('Widths');
  19671. if (widths) {
  19672. j = firstChar;
  19673. for (i = 0, ii = widths.length; i < ii; i++) {
  19674. glyphsWidths[j++] = widths[i];
  19675. }
  19676. defaultWidth = (parseFloat(descriptor.get('MissingWidth')) || 0);
  19677. } else {
  19678. // Trying get the BaseFont metrics (see comment above).
  19679. var baseFontName = dict.get('BaseFont');
  19680. if (isName(baseFontName)) {
  19681. var metrics = this.getBaseFontMetrics(baseFontName.name);
  19682. glyphsWidths = this.buildCharCodeToWidth(metrics.widths,
  19683. properties);
  19684. defaultWidth = metrics.defaultWidth;
  19685. }
  19686. }
  19687. }
  19688. // Heuristic: detection of monospace font by checking all non-zero widths
  19689. var isMonospace = true;
  19690. var firstWidth = defaultWidth;
  19691. for (var glyph in glyphsWidths) {
  19692. var glyphWidth = glyphsWidths[glyph];
  19693. if (!glyphWidth) {
  19694. continue;
  19695. }
  19696. if (!firstWidth) {
  19697. firstWidth = glyphWidth;
  19698. continue;
  19699. }
  19700. if (firstWidth != glyphWidth) {
  19701. isMonospace = false;
  19702. break;
  19703. }
  19704. }
  19705. if (isMonospace) {
  19706. properties.flags |= FontFlags.FixedPitch;
  19707. }
  19708. properties.defaultWidth = defaultWidth;
  19709. properties.widths = glyphsWidths;
  19710. properties.defaultVMetrics = defaultVMetrics;
  19711. properties.vmetrics = glyphsVMetrics;
  19712. },
  19713. isSerifFont: function PartialEvaluator_isSerifFont(baseFontName) {
  19714. // Simulating descriptor flags attribute
  19715. var fontNameWoStyle = baseFontName.split('-')[0];
  19716. return (fontNameWoStyle in serifFonts) ||
  19717. (fontNameWoStyle.search(/serif/gi) !== -1);
  19718. },
  19719. getBaseFontMetrics: function PartialEvaluator_getBaseFontMetrics(name) {
  19720. var defaultWidth = 0;
  19721. var widths = [];
  19722. var monospace = false;
  19723. var lookupName = (stdFontMap[name] || name);
  19724. if (!(lookupName in Metrics)) {
  19725. // Use default fonts for looking up font metrics if the passed
  19726. // font is not a base font
  19727. if (this.isSerifFont(name)) {
  19728. lookupName = 'Times-Roman';
  19729. } else {
  19730. lookupName = 'Helvetica';
  19731. }
  19732. }
  19733. var glyphWidths = Metrics[lookupName];
  19734. if (isNum(glyphWidths)) {
  19735. defaultWidth = glyphWidths;
  19736. monospace = true;
  19737. } else {
  19738. widths = glyphWidths;
  19739. }
  19740. return {
  19741. defaultWidth: defaultWidth,
  19742. monospace: monospace,
  19743. widths: widths
  19744. };
  19745. },
  19746. buildCharCodeToWidth:
  19747. function PartialEvaluator_bulildCharCodeToWidth(widthsByGlyphName,
  19748. properties) {
  19749. var widths = Object.create(null);
  19750. var differences = properties.differences;
  19751. var encoding = properties.defaultEncoding;
  19752. for (var charCode = 0; charCode < 256; charCode++) {
  19753. if (charCode in differences &&
  19754. widthsByGlyphName[differences[charCode]]) {
  19755. widths[charCode] = widthsByGlyphName[differences[charCode]];
  19756. continue;
  19757. }
  19758. if (charCode in encoding && widthsByGlyphName[encoding[charCode]]) {
  19759. widths[charCode] = widthsByGlyphName[encoding[charCode]];
  19760. continue;
  19761. }
  19762. }
  19763. return widths;
  19764. },
  19765. preEvaluateFont: function PartialEvaluator_preEvaluateFont(dict, xref) {
  19766. var baseDict = dict;
  19767. var type = dict.get('Subtype');
  19768. assert(isName(type), 'invalid font Subtype');
  19769. var composite = false;
  19770. var uint8array;
  19771. if (type.name == 'Type0') {
  19772. // If font is a composite
  19773. // - get the descendant font
  19774. // - set the type according to the descendant font
  19775. // - get the FontDescriptor from the descendant font
  19776. var df = dict.get('DescendantFonts');
  19777. if (!df) {
  19778. error('Descendant fonts are not specified');
  19779. }
  19780. dict = (isArray(df) ? xref.fetchIfRef(df[0]) : df);
  19781. type = dict.get('Subtype');
  19782. assert(isName(type), 'invalid font Subtype');
  19783. composite = true;
  19784. }
  19785. var descriptor = dict.get('FontDescriptor');
  19786. if (descriptor) {
  19787. var hash = new MurmurHash3_64();
  19788. var encoding = baseDict.getRaw('Encoding');
  19789. if (isName(encoding)) {
  19790. hash.update(encoding.name);
  19791. } else if (isRef(encoding)) {
  19792. hash.update(encoding.num + '_' + encoding.gen);
  19793. }
  19794. var toUnicode = dict.get('ToUnicode') || baseDict.get('ToUnicode');
  19795. if (isStream(toUnicode)) {
  19796. var stream = toUnicode.str || toUnicode;
  19797. uint8array = stream.buffer ?
  19798. new Uint8Array(stream.buffer.buffer, 0, stream.bufferLength) :
  19799. new Uint8Array(stream.bytes.buffer,
  19800. stream.start, stream.end - stream.start);
  19801. hash.update(uint8array);
  19802. } else if (isName(toUnicode)) {
  19803. hash.update(toUnicode.name);
  19804. }
  19805. var widths = dict.get('Widths') || baseDict.get('Widths');
  19806. if (widths) {
  19807. uint8array = new Uint8Array(new Uint32Array(widths).buffer);
  19808. hash.update(uint8array);
  19809. }
  19810. }
  19811. return {
  19812. descriptor: descriptor,
  19813. dict: dict,
  19814. baseDict: baseDict,
  19815. composite: composite,
  19816. hash: hash ? hash.hexdigest() : ''
  19817. };
  19818. },
  19819. translateFont: function PartialEvaluator_translateFont(preEvaluatedFont,
  19820. xref) {
  19821. var baseDict = preEvaluatedFont.baseDict;
  19822. var dict = preEvaluatedFont.dict;
  19823. var composite = preEvaluatedFont.composite;
  19824. var descriptor = preEvaluatedFont.descriptor;
  19825. var type = dict.get('Subtype');
  19826. var maxCharIndex = (composite ? 0xFFFF : 0xFF);
  19827. var properties;
  19828. if (!descriptor) {
  19829. if (type.name == 'Type3') {
  19830. // FontDescriptor is only required for Type3 fonts when the document
  19831. // is a tagged pdf. Create a barbebones one to get by.
  19832. descriptor = new Dict(null);
  19833. descriptor.set('FontName', Name.get(type.name));
  19834. } else {
  19835. // Before PDF 1.5 if the font was one of the base 14 fonts, having a
  19836. // FontDescriptor was not required.
  19837. // This case is here for compatibility.
  19838. var baseFontName = dict.get('BaseFont');
  19839. if (!isName(baseFontName)) {
  19840. error('Base font is not specified');
  19841. }
  19842. // Using base font name as a font name.
  19843. baseFontName = baseFontName.name.replace(/[,_]/g, '-');
  19844. var metrics = this.getBaseFontMetrics(baseFontName);
  19845. // Simulating descriptor flags attribute
  19846. var fontNameWoStyle = baseFontName.split('-')[0];
  19847. var flags =
  19848. (this.isSerifFont(fontNameWoStyle) ? FontFlags.Serif : 0) |
  19849. (metrics.monospace ? FontFlags.FixedPitch : 0) |
  19850. (symbolsFonts[fontNameWoStyle] ? FontFlags.Symbolic :
  19851. FontFlags.Nonsymbolic);
  19852. properties = {
  19853. type: type.name,
  19854. name: baseFontName,
  19855. widths: metrics.widths,
  19856. defaultWidth: metrics.defaultWidth,
  19857. flags: flags,
  19858. firstChar: 0,
  19859. lastChar: maxCharIndex
  19860. };
  19861. this.extractDataStructures(dict, dict, xref, properties);
  19862. properties.widths = this.buildCharCodeToWidth(metrics.widths,
  19863. properties);
  19864. return new Font(baseFontName, null, properties);
  19865. }
  19866. }
  19867. // According to the spec if 'FontDescriptor' is declared, 'FirstChar',
  19868. // 'LastChar' and 'Widths' should exist too, but some PDF encoders seem
  19869. // to ignore this rule when a variant of a standart font is used.
  19870. // TODO Fill the width array depending on which of the base font this is
  19871. // a variant.
  19872. var firstChar = (dict.get('FirstChar') || 0);
  19873. var lastChar = (dict.get('LastChar') || maxCharIndex);
  19874. var fontName = descriptor.get('FontName');
  19875. var baseFont = dict.get('BaseFont');
  19876. // Some bad PDFs have a string as the font name.
  19877. if (isString(fontName)) {
  19878. fontName = Name.get(fontName);
  19879. }
  19880. if (isString(baseFont)) {
  19881. baseFont = Name.get(baseFont);
  19882. }
  19883. if (type.name !== 'Type3') {
  19884. var fontNameStr = fontName && fontName.name;
  19885. var baseFontStr = baseFont && baseFont.name;
  19886. if (fontNameStr !== baseFontStr) {
  19887. info('The FontDescriptor\'s FontName is "' + fontNameStr +
  19888. '" but should be the same as the Font\'s BaseFont "' +
  19889. baseFontStr + '"');
  19890. // Workaround for cases where e.g. fontNameStr = 'Arial' and
  19891. // baseFontStr = 'Arial,Bold' (needed when no font file is embedded).
  19892. if (fontNameStr && baseFontStr &&
  19893. baseFontStr.search(fontNameStr) === 0) {
  19894. fontName = baseFont;
  19895. }
  19896. }
  19897. }
  19898. fontName = (fontName || baseFont);
  19899. assert(isName(fontName), 'invalid font name');
  19900. var fontFile = descriptor.get('FontFile', 'FontFile2', 'FontFile3');
  19901. if (fontFile) {
  19902. if (fontFile.dict) {
  19903. var subtype = fontFile.dict.get('Subtype');
  19904. if (subtype) {
  19905. subtype = subtype.name;
  19906. }
  19907. var length1 = fontFile.dict.get('Length1');
  19908. var length2 = fontFile.dict.get('Length2');
  19909. }
  19910. }
  19911. properties = {
  19912. type: type.name,
  19913. name: fontName.name,
  19914. subtype: subtype,
  19915. file: fontFile,
  19916. length1: length1,
  19917. length2: length2,
  19918. loadedName: baseDict.loadedName,
  19919. composite: composite,
  19920. wideChars: composite,
  19921. fixedPitch: false,
  19922. fontMatrix: (dict.get('FontMatrix') || FONT_IDENTITY_MATRIX),
  19923. firstChar: firstChar || 0,
  19924. lastChar: (lastChar || maxCharIndex),
  19925. bbox: descriptor.get('FontBBox'),
  19926. ascent: descriptor.get('Ascent'),
  19927. descent: descriptor.get('Descent'),
  19928. xHeight: descriptor.get('XHeight'),
  19929. capHeight: descriptor.get('CapHeight'),
  19930. flags: descriptor.get('Flags'),
  19931. italicAngle: descriptor.get('ItalicAngle'),
  19932. coded: false
  19933. };
  19934. if (composite) {
  19935. var cidEncoding = baseDict.get('Encoding');
  19936. if (isName(cidEncoding)) {
  19937. properties.cidEncoding = cidEncoding.name;
  19938. }
  19939. properties.cMap = CMapFactory.create(cidEncoding,
  19940. { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null);
  19941. properties.vertical = properties.cMap.vertical;
  19942. }
  19943. this.extractDataStructures(dict, baseDict, xref, properties);
  19944. this.extractWidths(dict, xref, descriptor, properties);
  19945. if (type.name === 'Type3') {
  19946. properties.coded = true;
  19947. }
  19948. return new Font(fontName.name, fontFile, properties);
  19949. }
  19950. };
  19951. return PartialEvaluator;
  19952. })();
  19953. var OperatorList = (function OperatorListClosure() {
  19954. var CHUNK_SIZE = 1000;
  19955. var CHUNK_SIZE_ABOUT = CHUNK_SIZE - 5; // close to chunk size
  19956. function getTransfers(queue) {
  19957. var transfers = [];
  19958. var fnArray = queue.fnArray, argsArray = queue.argsArray;
  19959. for (var i = 0, ii = queue.length; i < ii; i++) {
  19960. switch (fnArray[i]) {
  19961. case OPS.paintInlineImageXObject:
  19962. case OPS.paintInlineImageXObjectGroup:
  19963. case OPS.paintImageMaskXObject:
  19964. var arg = argsArray[i][0]; // first param in imgData
  19965. if (!arg.cached) {
  19966. transfers.push(arg.data.buffer);
  19967. }
  19968. break;
  19969. }
  19970. }
  19971. return transfers;
  19972. }
  19973. function OperatorList(intent, messageHandler, pageIndex) {
  19974. this.messageHandler = messageHandler;
  19975. this.fnArray = [];
  19976. this.argsArray = [];
  19977. this.dependencies = {};
  19978. this.pageIndex = pageIndex;
  19979. this.intent = intent;
  19980. }
  19981. OperatorList.prototype = {
  19982. get length() {
  19983. return this.argsArray.length;
  19984. },
  19985. addOp: function(fn, args) {
  19986. this.fnArray.push(fn);
  19987. this.argsArray.push(args);
  19988. if (this.messageHandler) {
  19989. if (this.fnArray.length >= CHUNK_SIZE) {
  19990. this.flush();
  19991. } else if (this.fnArray.length >= CHUNK_SIZE_ABOUT &&
  19992. (fn === OPS.restore || fn === OPS.endText)) {
  19993. // heuristic to flush on boundary of restore or endText
  19994. this.flush();
  19995. }
  19996. }
  19997. },
  19998. addDependency: function(dependency) {
  19999. if (dependency in this.dependencies) {
  20000. return;
  20001. }
  20002. this.dependencies[dependency] = true;
  20003. this.addOp(OPS.dependency, [dependency]);
  20004. },
  20005. addDependencies: function(dependencies) {
  20006. for (var key in dependencies) {
  20007. this.addDependency(key);
  20008. }
  20009. },
  20010. addOpList: function(opList) {
  20011. Util.extendObj(this.dependencies, opList.dependencies);
  20012. for (var i = 0, ii = opList.length; i < ii; i++) {
  20013. this.addOp(opList.fnArray[i], opList.argsArray[i]);
  20014. }
  20015. },
  20016. getIR: function() {
  20017. return {
  20018. fnArray: this.fnArray,
  20019. argsArray: this.argsArray,
  20020. length: this.length
  20021. };
  20022. },
  20023. flush: function(lastChunk) {
  20024. new QueueOptimizer().optimize(this);
  20025. var transfers = getTransfers(this);
  20026. this.messageHandler.send('RenderPageChunk', {
  20027. operatorList: {
  20028. fnArray: this.fnArray,
  20029. argsArray: this.argsArray,
  20030. lastChunk: lastChunk,
  20031. length: this.length
  20032. },
  20033. pageIndex: this.pageIndex,
  20034. intent: this.intent
  20035. }, null, transfers);
  20036. this.dependencies = {};
  20037. this.fnArray.length = 0;
  20038. this.argsArray.length = 0;
  20039. }
  20040. };
  20041. return OperatorList;
  20042. })();
  20043. var StateManager = (function StateManagerClosure() {
  20044. function StateManager(initialState) {
  20045. this.state = initialState;
  20046. this.stateStack = [];
  20047. }
  20048. StateManager.prototype = {
  20049. save: function () {
  20050. var old = this.state;
  20051. this.stateStack.push(this.state);
  20052. this.state = old.clone();
  20053. },
  20054. restore: function () {
  20055. var prev = this.stateStack.pop();
  20056. if (prev) {
  20057. this.state = prev;
  20058. }
  20059. },
  20060. transform: function (args) {
  20061. this.state.ctm = Util.transform(this.state.ctm, args);
  20062. }
  20063. };
  20064. return StateManager;
  20065. })();
  20066. var TextState = (function TextStateClosure() {
  20067. function TextState() {
  20068. this.ctm = new Float32Array(IDENTITY_MATRIX);
  20069. this.fontSize = 0;
  20070. this.font = null;
  20071. this.fontMatrix = FONT_IDENTITY_MATRIX;
  20072. this.textMatrix = IDENTITY_MATRIX.slice();
  20073. this.textLineMatrix = IDENTITY_MATRIX.slice();
  20074. this.charSpacing = 0;
  20075. this.wordSpacing = 0;
  20076. this.leading = 0;
  20077. this.textHScale = 1;
  20078. this.textRise = 0;
  20079. }
  20080. TextState.prototype = {
  20081. setTextMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) {
  20082. var m = this.textMatrix;
  20083. m[0] = a; m[1] = b; m[2] = c; m[3] = d; m[4] = e; m[5] = f;
  20084. },
  20085. setTextLineMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) {
  20086. var m = this.textLineMatrix;
  20087. m[0] = a; m[1] = b; m[2] = c; m[3] = d; m[4] = e; m[5] = f;
  20088. },
  20089. translateTextMatrix: function TextState_translateTextMatrix(x, y) {
  20090. var m = this.textMatrix;
  20091. m[4] = m[0] * x + m[2] * y + m[4];
  20092. m[5] = m[1] * x + m[3] * y + m[5];
  20093. },
  20094. translateTextLineMatrix: function TextState_translateTextMatrix(x, y) {
  20095. var m = this.textLineMatrix;
  20096. m[4] = m[0] * x + m[2] * y + m[4];
  20097. m[5] = m[1] * x + m[3] * y + m[5];
  20098. },
  20099. calcRenderMatrix: function TextState_calcRendeMatrix(ctm) {
  20100. // 9.4.4 Text Space Details
  20101. var tsm = [this.fontSize * this.textHScale, 0,
  20102. 0, this.fontSize,
  20103. 0, this.textRise];
  20104. return Util.transform(ctm, Util.transform(this.textMatrix, tsm));
  20105. },
  20106. carriageReturn: function TextState_carriageReturn() {
  20107. this.translateTextLineMatrix(0, -this.leading);
  20108. this.textMatrix = this.textLineMatrix.slice();
  20109. },
  20110. clone: function TextState_clone() {
  20111. var clone = Object.create(this);
  20112. clone.textMatrix = this.textMatrix.slice();
  20113. clone.textLineMatrix = this.textLineMatrix.slice();
  20114. clone.fontMatrix = this.fontMatrix.slice();
  20115. return clone;
  20116. }
  20117. };
  20118. return TextState;
  20119. })();
  20120. var EvalState = (function EvalStateClosure() {
  20121. function EvalState() {
  20122. this.ctm = new Float32Array(IDENTITY_MATRIX);
  20123. this.font = null;
  20124. this.textRenderingMode = TextRenderingMode.FILL;
  20125. }
  20126. EvalState.prototype = {
  20127. clone: function CanvasExtraState_clone() {
  20128. return Object.create(this);
  20129. },
  20130. };
  20131. return EvalState;
  20132. })();
  20133. var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() {
  20134. // Specifies properties for each command
  20135. //
  20136. // If variableArgs === true: [0, `numArgs`] expected
  20137. // If variableArgs === false: exactly `numArgs` expected
  20138. var OP_MAP = {
  20139. // Graphic state
  20140. w: { id: OPS.setLineWidth, numArgs: 1, variableArgs: false },
  20141. J: { id: OPS.setLineCap, numArgs: 1, variableArgs: false },
  20142. j: { id: OPS.setLineJoin, numArgs: 1, variableArgs: false },
  20143. M: { id: OPS.setMiterLimit, numArgs: 1, variableArgs: false },
  20144. d: { id: OPS.setDash, numArgs: 2, variableArgs: false },
  20145. ri: { id: OPS.setRenderingIntent, numArgs: 1, variableArgs: false },
  20146. i: { id: OPS.setFlatness, numArgs: 1, variableArgs: false },
  20147. gs: { id: OPS.setGState, numArgs: 1, variableArgs: false },
  20148. q: { id: OPS.save, numArgs: 0, variableArgs: false },
  20149. Q: { id: OPS.restore, numArgs: 0, variableArgs: false },
  20150. cm: { id: OPS.transform, numArgs: 6, variableArgs: false },
  20151. // Path
  20152. m: { id: OPS.moveTo, numArgs: 2, variableArgs: false },
  20153. l: { id: OPS.lineTo, numArgs: 2, variableArgs: false },
  20154. c: { id: OPS.curveTo, numArgs: 6, variableArgs: false },
  20155. v: { id: OPS.curveTo2, numArgs: 4, variableArgs: false },
  20156. y: { id: OPS.curveTo3, numArgs: 4, variableArgs: false },
  20157. h: { id: OPS.closePath, numArgs: 0, variableArgs: false },
  20158. re: { id: OPS.rectangle, numArgs: 4, variableArgs: false },
  20159. S: { id: OPS.stroke, numArgs: 0, variableArgs: false },
  20160. s: { id: OPS.closeStroke, numArgs: 0, variableArgs: false },
  20161. f: { id: OPS.fill, numArgs: 0, variableArgs: false },
  20162. F: { id: OPS.fill, numArgs: 0, variableArgs: false },
  20163. 'f*': { id: OPS.eoFill, numArgs: 0, variableArgs: false },
  20164. B: { id: OPS.fillStroke, numArgs: 0, variableArgs: false },
  20165. 'B*': { id: OPS.eoFillStroke, numArgs: 0, variableArgs: false },
  20166. b: { id: OPS.closeFillStroke, numArgs: 0, variableArgs: false },
  20167. 'b*': { id: OPS.closeEOFillStroke, numArgs: 0, variableArgs: false },
  20168. n: { id: OPS.endPath, numArgs: 0, variableArgs: false },
  20169. // Clipping
  20170. W: { id: OPS.clip, numArgs: 0, variableArgs: false },
  20171. 'W*': { id: OPS.eoClip, numArgs: 0, variableArgs: false },
  20172. // Text
  20173. BT: { id: OPS.beginText, numArgs: 0, variableArgs: false },
  20174. ET: { id: OPS.endText, numArgs: 0, variableArgs: false },
  20175. Tc: { id: OPS.setCharSpacing, numArgs: 1, variableArgs: false },
  20176. Tw: { id: OPS.setWordSpacing, numArgs: 1, variableArgs: false },
  20177. Tz: { id: OPS.setHScale, numArgs: 1, variableArgs: false },
  20178. TL: { id: OPS.setLeading, numArgs: 1, variableArgs: false },
  20179. Tf: { id: OPS.setFont, numArgs: 2, variableArgs: false },
  20180. Tr: { id: OPS.setTextRenderingMode, numArgs: 1, variableArgs: false },
  20181. Ts: { id: OPS.setTextRise, numArgs: 1, variableArgs: false },
  20182. Td: { id: OPS.moveText, numArgs: 2, variableArgs: false },
  20183. TD: { id: OPS.setLeadingMoveText, numArgs: 2, variableArgs: false },
  20184. Tm: { id: OPS.setTextMatrix, numArgs: 6, variableArgs: false },
  20185. 'T*': { id: OPS.nextLine, numArgs: 0, variableArgs: false },
  20186. Tj: { id: OPS.showText, numArgs: 1, variableArgs: false },
  20187. TJ: { id: OPS.showSpacedText, numArgs: 1, variableArgs: false },
  20188. '\'': { id: OPS.nextLineShowText, numArgs: 1, variableArgs: false },
  20189. '"': { id: OPS.nextLineSetSpacingShowText, numArgs: 3,
  20190. variableArgs: false },
  20191. // Type3 fonts
  20192. d0: { id: OPS.setCharWidth, numArgs: 2, variableArgs: false },
  20193. d1: { id: OPS.setCharWidthAndBounds, numArgs: 6, variableArgs: false },
  20194. // Color
  20195. CS: { id: OPS.setStrokeColorSpace, numArgs: 1, variableArgs: false },
  20196. cs: { id: OPS.setFillColorSpace, numArgs: 1, variableArgs: false },
  20197. SC: { id: OPS.setStrokeColor, numArgs: 4, variableArgs: true },
  20198. SCN: { id: OPS.setStrokeColorN, numArgs: 33, variableArgs: true },
  20199. sc: { id: OPS.setFillColor, numArgs: 4, variableArgs: true },
  20200. scn: { id: OPS.setFillColorN, numArgs: 33, variableArgs: true },
  20201. G: { id: OPS.setStrokeGray, numArgs: 1, variableArgs: false },
  20202. g: { id: OPS.setFillGray, numArgs: 1, variableArgs: false },
  20203. RG: { id: OPS.setStrokeRGBColor, numArgs: 3, variableArgs: false },
  20204. rg: { id: OPS.setFillRGBColor, numArgs: 3, variableArgs: false },
  20205. K: { id: OPS.setStrokeCMYKColor, numArgs: 4, variableArgs: false },
  20206. k: { id: OPS.setFillCMYKColor, numArgs: 4, variableArgs: false },
  20207. // Shading
  20208. sh: { id: OPS.shadingFill, numArgs: 1, variableArgs: false },
  20209. // Images
  20210. BI: { id: OPS.beginInlineImage, numArgs: 0, variableArgs: false },
  20211. ID: { id: OPS.beginImageData, numArgs: 0, variableArgs: false },
  20212. EI: { id: OPS.endInlineImage, numArgs: 1, variableArgs: false },
  20213. // XObjects
  20214. Do: { id: OPS.paintXObject, numArgs: 1, variableArgs: false },
  20215. MP: { id: OPS.markPoint, numArgs: 1, variableArgs: false },
  20216. DP: { id: OPS.markPointProps, numArgs: 2, variableArgs: false },
  20217. BMC: { id: OPS.beginMarkedContent, numArgs: 1, variableArgs: false },
  20218. BDC: { id: OPS.beginMarkedContentProps, numArgs: 2,
  20219. variableArgs: false },
  20220. EMC: { id: OPS.endMarkedContent, numArgs: 0, variableArgs: false },
  20221. // Compatibility
  20222. BX: { id: OPS.beginCompat, numArgs: 0, variableArgs: false },
  20223. EX: { id: OPS.endCompat, numArgs: 0, variableArgs: false },
  20224. // (reserved partial commands for the lexer)
  20225. BM: null,
  20226. BD: null,
  20227. 'true': null,
  20228. fa: null,
  20229. fal: null,
  20230. fals: null,
  20231. 'false': null,
  20232. nu: null,
  20233. nul: null,
  20234. 'null': null
  20235. };
  20236. function EvaluatorPreprocessor(stream, xref, stateManager) {
  20237. // TODO(mduan): pass array of knownCommands rather than OP_MAP
  20238. // dictionary
  20239. this.parser = new Parser(new Lexer(stream, OP_MAP), false, xref);
  20240. this.stateManager = stateManager;
  20241. }
  20242. EvaluatorPreprocessor.prototype = {
  20243. get savedStatesDepth() {
  20244. return this.stateManager.stateStack.length;
  20245. },
  20246. read: function EvaluatorPreprocessor_read() {
  20247. var args = [];
  20248. while (true) {
  20249. var obj = this.parser.getObj();
  20250. if (isEOF(obj)) {
  20251. return null; // no more commands
  20252. }
  20253. if (!isCmd(obj)) {
  20254. // argument
  20255. if (obj !== null && obj !== undefined) {
  20256. args.push((obj instanceof Dict ? obj.getAll() : obj));
  20257. assert(args.length <= 33, 'Too many arguments');
  20258. }
  20259. continue;
  20260. }
  20261. var cmd = obj.cmd;
  20262. // Check that the command is valid
  20263. var opSpec = OP_MAP[cmd];
  20264. if (!opSpec) {
  20265. warn('Unknown command "' + cmd + '"');
  20266. continue;
  20267. }
  20268. var fn = opSpec.id;
  20269. // Validate the number of arguments for the command
  20270. if (opSpec.variableArgs) {
  20271. if (args.length > opSpec.numArgs) {
  20272. info('Command ' + fn + ': expected [0,' + opSpec.numArgs +
  20273. '] args, but received ' + args.length + ' args');
  20274. }
  20275. } else {
  20276. if (args.length < opSpec.numArgs) {
  20277. // If we receive too few args, it's not possible to possible
  20278. // to execute the command, so skip the command
  20279. info('Command ' + fn + ': because expected ' +
  20280. opSpec.numArgs + ' args, but received ' + args.length +
  20281. ' args; skipping');
  20282. args = [];
  20283. continue;
  20284. } else if (args.length > opSpec.numArgs) {
  20285. info('Command ' + fn + ': expected ' + opSpec.numArgs +
  20286. ' args, but received ' + args.length + ' args');
  20287. }
  20288. }
  20289. // TODO figure out how to type-check vararg functions
  20290. this.preprocessCommand(fn, args);
  20291. return { fn: fn, args: args };
  20292. }
  20293. },
  20294. preprocessCommand:
  20295. function EvaluatorPreprocessor_preprocessCommand(fn, args) {
  20296. switch (fn | 0) {
  20297. case OPS.save:
  20298. this.stateManager.save();
  20299. break;
  20300. case OPS.restore:
  20301. this.stateManager.restore();
  20302. break;
  20303. case OPS.transform:
  20304. this.stateManager.transform(args);
  20305. break;
  20306. }
  20307. }
  20308. };
  20309. return EvaluatorPreprocessor;
  20310. })();
  20311. var QueueOptimizer = (function QueueOptimizerClosure() {
  20312. function addState(parentState, pattern, fn) {
  20313. var state = parentState;
  20314. for (var i = 0, ii = pattern.length - 1; i < ii; i++) {
  20315. var item = pattern[i];
  20316. state = (state[item] || (state[item] = []));
  20317. }
  20318. state[pattern[pattern.length - 1]] = fn;
  20319. }
  20320. function handlePaintSolidColorImageMask(index, count, fnArray, argsArray) {
  20321. // Handles special case of mainly LaTeX documents which
  20322. // use image masks to draw lines with the current fill style.
  20323. // 'count' groups of (save, transform, paintImageMaskXObject, restore)+
  20324. // have been found at index.
  20325. for (var i = 0; i < count; i++) {
  20326. var arg = argsArray[index + 4 * i + 2];
  20327. var imageMask = arg.length == 1 && arg[0];
  20328. if (imageMask && imageMask.width == 1 && imageMask.height == 1 &&
  20329. (!imageMask.data.length || (imageMask.data.length == 1 &&
  20330. imageMask.data[0] === 0))) {
  20331. fnArray[index + 4 * i + 2] = OPS.paintSolidColorImageMask;
  20332. continue;
  20333. }
  20334. break;
  20335. }
  20336. return count - i;
  20337. }
  20338. var InitialState = [];
  20339. addState(InitialState,
  20340. [OPS.save, OPS.transform, OPS.paintInlineImageXObject, OPS.restore],
  20341. function foundInlineImageGroup(context) {
  20342. // grouping paintInlineImageXObject's into paintInlineImageXObjectGroup
  20343. // searching for (save, transform, paintInlineImageXObject, restore)+
  20344. var MIN_IMAGES_IN_INLINE_IMAGES_BLOCK = 10;
  20345. var MAX_IMAGES_IN_INLINE_IMAGES_BLOCK = 200;
  20346. var MAX_WIDTH = 1000;
  20347. var IMAGE_PADDING = 1;
  20348. var fnArray = context.fnArray, argsArray = context.argsArray;
  20349. var j = context.currentOperation - 3, i = j + 4;
  20350. var ii = fnArray.length;
  20351. for (; i < ii && fnArray[i - 4] === fnArray[i]; i++) {}
  20352. var count = Math.min((i - j) >> 2, MAX_IMAGES_IN_INLINE_IMAGES_BLOCK);
  20353. if (count < MIN_IMAGES_IN_INLINE_IMAGES_BLOCK) {
  20354. context.currentOperation = i - 1;
  20355. return;
  20356. }
  20357. // assuming that heights of those image is too small (~1 pixel)
  20358. // packing as much as possible by lines
  20359. var maxX = 0;
  20360. var map = [], maxLineHeight = 0;
  20361. var currentX = IMAGE_PADDING, currentY = IMAGE_PADDING;
  20362. var q;
  20363. for (q = 0; q < count; q++) {
  20364. var transform = argsArray[j + (q << 2) + 1];
  20365. var img = argsArray[j + (q << 2) + 2][0];
  20366. if (currentX + img.width > MAX_WIDTH) {
  20367. // starting new line
  20368. maxX = Math.max(maxX, currentX);
  20369. currentY += maxLineHeight + 2 * IMAGE_PADDING;
  20370. currentX = 0;
  20371. maxLineHeight = 0;
  20372. }
  20373. map.push({
  20374. transform: transform,
  20375. x: currentX, y: currentY,
  20376. w: img.width, h: img.height
  20377. });
  20378. currentX += img.width + 2 * IMAGE_PADDING;
  20379. maxLineHeight = Math.max(maxLineHeight, img.height);
  20380. }
  20381. var imgWidth = Math.max(maxX, currentX) + IMAGE_PADDING;
  20382. var imgHeight = currentY + maxLineHeight + IMAGE_PADDING;
  20383. var imgData = new Uint8Array(imgWidth * imgHeight * 4);
  20384. var imgRowSize = imgWidth << 2;
  20385. for (q = 0; q < count; q++) {
  20386. var data = argsArray[j + (q << 2) + 2][0].data;
  20387. // copy image by lines and extends pixels into padding
  20388. var rowSize = map[q].w << 2;
  20389. var dataOffset = 0;
  20390. var offset = (map[q].x + map[q].y * imgWidth) << 2;
  20391. imgData.set(data.subarray(0, rowSize), offset - imgRowSize);
  20392. for (var k = 0, kk = map[q].h; k < kk; k++) {
  20393. imgData.set(data.subarray(dataOffset, dataOffset + rowSize), offset);
  20394. dataOffset += rowSize;
  20395. offset += imgRowSize;
  20396. }
  20397. imgData.set(data.subarray(dataOffset - rowSize, dataOffset), offset);
  20398. while (offset >= 0) {
  20399. data[offset - 4] = data[offset];
  20400. data[offset - 3] = data[offset + 1];
  20401. data[offset - 2] = data[offset + 2];
  20402. data[offset - 1] = data[offset + 3];
  20403. data[offset + rowSize] = data[offset + rowSize - 4];
  20404. data[offset + rowSize + 1] = data[offset + rowSize - 3];
  20405. data[offset + rowSize + 2] = data[offset + rowSize - 2];
  20406. data[offset + rowSize + 3] = data[offset + rowSize - 1];
  20407. offset -= imgRowSize;
  20408. }
  20409. }
  20410. // replacing queue items
  20411. fnArray.splice(j, count * 4, OPS.paintInlineImageXObjectGroup);
  20412. argsArray.splice(j, count * 4,
  20413. [{ width: imgWidth, height: imgHeight, kind: ImageKind.RGBA_32BPP,
  20414. data: imgData }, map]);
  20415. context.currentOperation = j;
  20416. });
  20417. addState(InitialState,
  20418. [OPS.save, OPS.transform, OPS.paintImageMaskXObject, OPS.restore],
  20419. function foundImageMaskGroup(context) {
  20420. // grouping paintImageMaskXObject's into paintImageMaskXObjectGroup
  20421. // searching for (save, transform, paintImageMaskXObject, restore)+
  20422. var MIN_IMAGES_IN_MASKS_BLOCK = 10;
  20423. var MAX_IMAGES_IN_MASKS_BLOCK = 100;
  20424. var MAX_SAME_IMAGES_IN_MASKS_BLOCK = 1000;
  20425. var fnArray = context.fnArray, argsArray = context.argsArray;
  20426. var j = context.currentOperation - 3, i = j + 4;
  20427. var ii = fnArray.length, q;
  20428. for (; i < ii && fnArray[i - 4] === fnArray[i]; i++) {}
  20429. var count = (i - j) >> 2;
  20430. count = handlePaintSolidColorImageMask(j, count, fnArray, argsArray);
  20431. if (count < MIN_IMAGES_IN_MASKS_BLOCK) {
  20432. context.currentOperation = i - 1;
  20433. return;
  20434. }
  20435. var isSameImage = false;
  20436. var transformArgs;
  20437. if (argsArray[j + 1][1] === 0 && argsArray[j + 1][2] === 0) {
  20438. i = j + 4;
  20439. isSameImage = true;
  20440. for (q = 1; q < count; q++, i += 4) {
  20441. var prevTransformArgs = argsArray[i - 3];
  20442. transformArgs = argsArray[i + 1];
  20443. if (argsArray[i - 2][0] !== argsArray[i + 2][0] ||
  20444. prevTransformArgs[0] !== transformArgs[0] ||
  20445. prevTransformArgs[1] !== transformArgs[1] ||
  20446. prevTransformArgs[2] !== transformArgs[2] ||
  20447. prevTransformArgs[3] !== transformArgs[3]) {
  20448. if (q < MIN_IMAGES_IN_MASKS_BLOCK) {
  20449. isSameImage = false;
  20450. } else {
  20451. count = q;
  20452. }
  20453. break; // different image or transform
  20454. }
  20455. }
  20456. }
  20457. if (isSameImage) {
  20458. count = Math.min(count, MAX_SAME_IMAGES_IN_MASKS_BLOCK);
  20459. var positions = new Float32Array(count * 2);
  20460. i = j + 1;
  20461. for (q = 0; q < count; q++) {
  20462. transformArgs = argsArray[i];
  20463. positions[(q << 1)] = transformArgs[4];
  20464. positions[(q << 1) + 1] = transformArgs[5];
  20465. i += 4;
  20466. }
  20467. // replacing queue items
  20468. fnArray.splice(j, count * 4, OPS.paintImageMaskXObjectRepeat);
  20469. argsArray.splice(j, count * 4, [argsArray[j + 2][0],
  20470. argsArray[j + 1][0], argsArray[j + 1][3], positions]);
  20471. context.currentOperation = j;
  20472. } else {
  20473. count = Math.min(count, MAX_IMAGES_IN_MASKS_BLOCK);
  20474. var images = [];
  20475. for (q = 0; q < count; q++) {
  20476. transformArgs = argsArray[j + (q << 2) + 1];
  20477. var maskParams = argsArray[j + (q << 2) + 2][0];
  20478. images.push({ data: maskParams.data, width: maskParams.width,
  20479. height: maskParams.height,
  20480. transform: transformArgs });
  20481. }
  20482. // replacing queue items
  20483. fnArray.splice(j, count * 4, OPS.paintImageMaskXObjectGroup);
  20484. argsArray.splice(j, count * 4, [images]);
  20485. context.currentOperation = j;
  20486. }
  20487. });
  20488. addState(InitialState,
  20489. [OPS.save, OPS.transform, OPS.paintImageXObject, OPS.restore],
  20490. function (context) {
  20491. var MIN_IMAGES_IN_BLOCK = 3;
  20492. var MAX_IMAGES_IN_BLOCK = 1000;
  20493. var fnArray = context.fnArray, argsArray = context.argsArray;
  20494. var j = context.currentOperation - 3, i = j + 4;
  20495. if (argsArray[j + 1][1] !== 0 || argsArray[j + 1][2] !== 0) {
  20496. return;
  20497. }
  20498. var ii = fnArray.length;
  20499. var transformArgs;
  20500. for (; i + 3 < ii && fnArray[i - 4] === fnArray[i]; i += 4) {
  20501. if (fnArray[i - 3] !== fnArray[i + 1] ||
  20502. fnArray[i - 2] !== fnArray[i + 2] ||
  20503. fnArray[i - 1] !== fnArray[i + 3]) {
  20504. break;
  20505. }
  20506. if (argsArray[i - 2][0] !== argsArray[i + 2][0]) {
  20507. break; // different image
  20508. }
  20509. var prevTransformArgs = argsArray[i - 3];
  20510. transformArgs = argsArray[i + 1];
  20511. if (prevTransformArgs[0] !== transformArgs[0] ||
  20512. prevTransformArgs[1] !== transformArgs[1] ||
  20513. prevTransformArgs[2] !== transformArgs[2] ||
  20514. prevTransformArgs[3] !== transformArgs[3]) {
  20515. break; // different transform
  20516. }
  20517. }
  20518. var count = Math.min((i - j) >> 2, MAX_IMAGES_IN_BLOCK);
  20519. if (count < MIN_IMAGES_IN_BLOCK) {
  20520. context.currentOperation = i - 1;
  20521. return;
  20522. }
  20523. var positions = new Float32Array(count * 2);
  20524. i = j + 1;
  20525. for (var q = 0; q < count; q++) {
  20526. transformArgs = argsArray[i];
  20527. positions[(q << 1)] = transformArgs[4];
  20528. positions[(q << 1) + 1] = transformArgs[5];
  20529. i += 4;
  20530. }
  20531. var args = [argsArray[j + 2][0], argsArray[j + 1][0],
  20532. argsArray[j + 1][3], positions];
  20533. // replacing queue items
  20534. fnArray.splice(j, count * 4, OPS.paintImageXObjectRepeat);
  20535. argsArray.splice(j, count * 4, args);
  20536. context.currentOperation = j;
  20537. });
  20538. addState(InitialState,
  20539. [OPS.beginText, OPS.setFont, OPS.setTextMatrix, OPS.showText, OPS.endText],
  20540. function (context) {
  20541. // moving single chars with same font into beginText/endText groups
  20542. // searching for (beginText, setFont, setTextMatrix, showText, endText)+
  20543. var MIN_CHARS_IN_BLOCK = 3;
  20544. var MAX_CHARS_IN_BLOCK = 1000;
  20545. var fnArray = context.fnArray, argsArray = context.argsArray;
  20546. var j = context.currentOperation - 4, i = j + 5;
  20547. var ii = fnArray.length;
  20548. for (; i < ii && fnArray[i - 5] === fnArray[i]; i++) {
  20549. if (fnArray[i] === OPS.setFont) {
  20550. if (argsArray[i - 5][0] !== argsArray[i][0] ||
  20551. argsArray[i - 5][1] !== argsArray[i][1]) {
  20552. break;
  20553. }
  20554. }
  20555. }
  20556. var count = Math.min(((i - j) / 5) | 0, MAX_CHARS_IN_BLOCK);
  20557. if (count < MIN_CHARS_IN_BLOCK) {
  20558. context.currentOperation = i - 1;
  20559. return;
  20560. }
  20561. if (j >= 4 && fnArray[j - 4] === fnArray[j + 1] &&
  20562. fnArray[j - 3] === fnArray[j + 2] &&
  20563. fnArray[j - 2] === fnArray[j + 3] &&
  20564. fnArray[j - 1] === fnArray[j + 4] &&
  20565. argsArray[j - 4][0] === argsArray[j + 1][0] &&
  20566. argsArray[j - 4][1] === argsArray[j + 1][1]) {
  20567. // extending one block ahead (very first block might have 'dependency')
  20568. count++;
  20569. j -= 5;
  20570. }
  20571. var k = j + 7;
  20572. i = j + 4;
  20573. for (var q = 1; q < count; q++) {
  20574. fnArray[i] = fnArray[k];
  20575. argsArray[i] = argsArray[k];
  20576. fnArray[i + 1] = fnArray[k + 1];
  20577. argsArray[i + 1] = argsArray[k + 1];
  20578. i += 2;
  20579. k += 5;
  20580. }
  20581. var removed = (count - 1) * 3;
  20582. fnArray.splice(i, removed);
  20583. argsArray.splice(i, removed);
  20584. context.currentOperation = i;
  20585. });
  20586. function QueueOptimizer() {}
  20587. QueueOptimizer.prototype = {
  20588. optimize: function QueueOptimizer_optimize(queue) {
  20589. var fnArray = queue.fnArray, argsArray = queue.argsArray;
  20590. var context = {
  20591. currentOperation: 0,
  20592. fnArray: fnArray,
  20593. argsArray: argsArray
  20594. };
  20595. var i, ii = argsArray.length;
  20596. var state;
  20597. for (i = 0; i < ii; i++) {
  20598. state = (state || InitialState)[fnArray[i]];
  20599. if (typeof state === 'function') { // we found some handler
  20600. context.currentOperation = i;
  20601. state = state(context);
  20602. i = context.currentOperation;
  20603. ii = context.fnArray.length;
  20604. }
  20605. }
  20606. }
  20607. };
  20608. return QueueOptimizer;
  20609. })();
  20610. var BUILT_IN_CMAPS = [
  20611. // << Start unicode maps.
  20612. 'Adobe-GB1-UCS2',
  20613. 'Adobe-CNS1-UCS2',
  20614. 'Adobe-Japan1-UCS2',
  20615. 'Adobe-Korea1-UCS2',
  20616. // >> End unicode maps.
  20617. '78-EUC-H',
  20618. '78-EUC-V',
  20619. '78-H',
  20620. '78-RKSJ-H',
  20621. '78-RKSJ-V',
  20622. '78-V',
  20623. '78ms-RKSJ-H',
  20624. '78ms-RKSJ-V',
  20625. '83pv-RKSJ-H',
  20626. '90ms-RKSJ-H',
  20627. '90ms-RKSJ-V',
  20628. '90msp-RKSJ-H',
  20629. '90msp-RKSJ-V',
  20630. '90pv-RKSJ-H',
  20631. '90pv-RKSJ-V',
  20632. 'Add-H',
  20633. 'Add-RKSJ-H',
  20634. 'Add-RKSJ-V',
  20635. 'Add-V',
  20636. 'Adobe-CNS1-0',
  20637. 'Adobe-CNS1-1',
  20638. 'Adobe-CNS1-2',
  20639. 'Adobe-CNS1-3',
  20640. 'Adobe-CNS1-4',
  20641. 'Adobe-CNS1-5',
  20642. 'Adobe-CNS1-6',
  20643. 'Adobe-GB1-0',
  20644. 'Adobe-GB1-1',
  20645. 'Adobe-GB1-2',
  20646. 'Adobe-GB1-3',
  20647. 'Adobe-GB1-4',
  20648. 'Adobe-GB1-5',
  20649. 'Adobe-Japan1-0',
  20650. 'Adobe-Japan1-1',
  20651. 'Adobe-Japan1-2',
  20652. 'Adobe-Japan1-3',
  20653. 'Adobe-Japan1-4',
  20654. 'Adobe-Japan1-5',
  20655. 'Adobe-Japan1-6',
  20656. 'Adobe-Korea1-0',
  20657. 'Adobe-Korea1-1',
  20658. 'Adobe-Korea1-2',
  20659. 'B5-H',
  20660. 'B5-V',
  20661. 'B5pc-H',
  20662. 'B5pc-V',
  20663. 'CNS-EUC-H',
  20664. 'CNS-EUC-V',
  20665. 'CNS1-H',
  20666. 'CNS1-V',
  20667. 'CNS2-H',
  20668. 'CNS2-V',
  20669. 'ETHK-B5-H',
  20670. 'ETHK-B5-V',
  20671. 'ETen-B5-H',
  20672. 'ETen-B5-V',
  20673. 'ETenms-B5-H',
  20674. 'ETenms-B5-V',
  20675. 'EUC-H',
  20676. 'EUC-V',
  20677. 'Ext-H',
  20678. 'Ext-RKSJ-H',
  20679. 'Ext-RKSJ-V',
  20680. 'Ext-V',
  20681. 'GB-EUC-H',
  20682. 'GB-EUC-V',
  20683. 'GB-H',
  20684. 'GB-V',
  20685. 'GBK-EUC-H',
  20686. 'GBK-EUC-V',
  20687. 'GBK2K-H',
  20688. 'GBK2K-V',
  20689. 'GBKp-EUC-H',
  20690. 'GBKp-EUC-V',
  20691. 'GBT-EUC-H',
  20692. 'GBT-EUC-V',
  20693. 'GBT-H',
  20694. 'GBT-V',
  20695. 'GBTpc-EUC-H',
  20696. 'GBTpc-EUC-V',
  20697. 'GBpc-EUC-H',
  20698. 'GBpc-EUC-V',
  20699. 'H',
  20700. 'HKdla-B5-H',
  20701. 'HKdla-B5-V',
  20702. 'HKdlb-B5-H',
  20703. 'HKdlb-B5-V',
  20704. 'HKgccs-B5-H',
  20705. 'HKgccs-B5-V',
  20706. 'HKm314-B5-H',
  20707. 'HKm314-B5-V',
  20708. 'HKm471-B5-H',
  20709. 'HKm471-B5-V',
  20710. 'HKscs-B5-H',
  20711. 'HKscs-B5-V',
  20712. 'Hankaku',
  20713. 'Hiragana',
  20714. 'KSC-EUC-H',
  20715. 'KSC-EUC-V',
  20716. 'KSC-H',
  20717. 'KSC-Johab-H',
  20718. 'KSC-Johab-V',
  20719. 'KSC-V',
  20720. 'KSCms-UHC-H',
  20721. 'KSCms-UHC-HW-H',
  20722. 'KSCms-UHC-HW-V',
  20723. 'KSCms-UHC-V',
  20724. 'KSCpc-EUC-H',
  20725. 'KSCpc-EUC-V',
  20726. 'Katakana',
  20727. 'NWP-H',
  20728. 'NWP-V',
  20729. 'RKSJ-H',
  20730. 'RKSJ-V',
  20731. 'Roman',
  20732. 'UniCNS-UCS2-H',
  20733. 'UniCNS-UCS2-V',
  20734. 'UniCNS-UTF16-H',
  20735. 'UniCNS-UTF16-V',
  20736. 'UniCNS-UTF32-H',
  20737. 'UniCNS-UTF32-V',
  20738. 'UniCNS-UTF8-H',
  20739. 'UniCNS-UTF8-V',
  20740. 'UniGB-UCS2-H',
  20741. 'UniGB-UCS2-V',
  20742. 'UniGB-UTF16-H',
  20743. 'UniGB-UTF16-V',
  20744. 'UniGB-UTF32-H',
  20745. 'UniGB-UTF32-V',
  20746. 'UniGB-UTF8-H',
  20747. 'UniGB-UTF8-V',
  20748. 'UniJIS-UCS2-H',
  20749. 'UniJIS-UCS2-HW-H',
  20750. 'UniJIS-UCS2-HW-V',
  20751. 'UniJIS-UCS2-V',
  20752. 'UniJIS-UTF16-H',
  20753. 'UniJIS-UTF16-V',
  20754. 'UniJIS-UTF32-H',
  20755. 'UniJIS-UTF32-V',
  20756. 'UniJIS-UTF8-H',
  20757. 'UniJIS-UTF8-V',
  20758. 'UniJIS2004-UTF16-H',
  20759. 'UniJIS2004-UTF16-V',
  20760. 'UniJIS2004-UTF32-H',
  20761. 'UniJIS2004-UTF32-V',
  20762. 'UniJIS2004-UTF8-H',
  20763. 'UniJIS2004-UTF8-V',
  20764. 'UniJISPro-UCS2-HW-V',
  20765. 'UniJISPro-UCS2-V',
  20766. 'UniJISPro-UTF8-V',
  20767. 'UniJISX0213-UTF32-H',
  20768. 'UniJISX0213-UTF32-V',
  20769. 'UniJISX02132004-UTF32-H',
  20770. 'UniJISX02132004-UTF32-V',
  20771. 'UniKS-UCS2-H',
  20772. 'UniKS-UCS2-V',
  20773. 'UniKS-UTF16-H',
  20774. 'UniKS-UTF16-V',
  20775. 'UniKS-UTF32-H',
  20776. 'UniKS-UTF32-V',
  20777. 'UniKS-UTF8-H',
  20778. 'UniKS-UTF8-V',
  20779. 'V',
  20780. 'WP-Symbol'];
  20781. // CMap, not to be confused with TrueType's cmap.
  20782. var CMap = (function CMapClosure() {
  20783. function CMap(builtInCMap) {
  20784. // Codespace ranges are stored as follows:
  20785. // [[1BytePairs], [2BytePairs], [3BytePairs], [4BytePairs]]
  20786. // where nBytePairs are ranges e.g. [low1, high1, low2, high2, ...]
  20787. this.codespaceRanges = [[], [], [], []];
  20788. this.numCodespaceRanges = 0;
  20789. this.map = [];
  20790. this.vertical = false;
  20791. this.useCMap = null;
  20792. this.builtInCMap = builtInCMap;
  20793. }
  20794. CMap.prototype = {
  20795. addCodespaceRange: function(n, low, high) {
  20796. this.codespaceRanges[n - 1].push(low, high);
  20797. this.numCodespaceRanges++;
  20798. },
  20799. mapRange: function(low, high, dstLow) {
  20800. var lastByte = dstLow.length - 1;
  20801. while (low <= high) {
  20802. this.map[low] = dstLow;
  20803. // Only the last byte has to be incremented.
  20804. dstLow = dstLow.substr(0, lastByte) +
  20805. String.fromCharCode(dstLow.charCodeAt(lastByte) + 1);
  20806. ++low;
  20807. }
  20808. },
  20809. mapRangeToArray: function(low, high, array) {
  20810. var i = 0;
  20811. while (low <= high) {
  20812. this.map[low] = array[i++];
  20813. ++low;
  20814. }
  20815. },
  20816. mapOne: function(src, dst) {
  20817. this.map[src] = dst;
  20818. },
  20819. lookup: function(code) {
  20820. return this.map[code];
  20821. },
  20822. readCharCode: function(str, offset) {
  20823. var c = 0;
  20824. var codespaceRanges = this.codespaceRanges;
  20825. var codespaceRangesLen = this.codespaceRanges.length;
  20826. // 9.7.6.2 CMap Mapping
  20827. // The code length is at most 4.
  20828. for (var n = 0; n < codespaceRangesLen; n++) {
  20829. c = ((c << 8) | str.charCodeAt(offset + n)) >>> 0;
  20830. // Check each codespace range to see if it falls within.
  20831. var codespaceRange = codespaceRanges[n];
  20832. for (var k = 0, kk = codespaceRange.length; k < kk;) {
  20833. var low = codespaceRange[k++];
  20834. var high = codespaceRange[k++];
  20835. if (c >= low && c <= high) {
  20836. return [c, n + 1];
  20837. }
  20838. }
  20839. }
  20840. return [0, 1];
  20841. }
  20842. };
  20843. return CMap;
  20844. })();
  20845. var IdentityCMap = (function IdentityCMapClosure() {
  20846. function IdentityCMap(vertical, n) {
  20847. CMap.call(this);
  20848. this.vertical = vertical;
  20849. this.addCodespaceRange(n, 0, 0xffff);
  20850. this.mapRange(0, 0xffff, '\u0000');
  20851. }
  20852. Util.inherit(IdentityCMap, CMap, {});
  20853. return IdentityCMap;
  20854. })();
  20855. var BinaryCMapReader = (function BinaryCMapReaderClosure() {
  20856. function fetchBinaryData(url) {
  20857. var nonBinaryRequest = PDFJS.disableWorker;
  20858. var request = new XMLHttpRequest();
  20859. request.open('GET', url, false);
  20860. if (!nonBinaryRequest) {
  20861. try {
  20862. request.responseType = 'arraybuffer';
  20863. nonBinaryRequest = request.responseType !== 'arraybuffer';
  20864. } catch (e) {
  20865. nonBinaryRequest = true;
  20866. }
  20867. }
  20868. if (nonBinaryRequest && request.overrideMimeType) {
  20869. request.overrideMimeType('text/plain; charset=x-user-defined');
  20870. }
  20871. request.send(null);
  20872. if (request.status === 0 && /^https?:/i.test(url)) {
  20873. error('Unable to get binary cMap at: ' + url);
  20874. }
  20875. if (nonBinaryRequest) {
  20876. var data = Array.prototype.map.call(request.responseText, function (ch) {
  20877. return ch.charCodeAt(0) & 255;
  20878. });
  20879. return new Uint8Array(data);
  20880. }
  20881. return new Uint8Array(request.response);
  20882. }
  20883. function hexToInt(a, size) {
  20884. var n = 0;
  20885. for (var i = 0; i <= size; i++) {
  20886. n = (n << 8) | a[i];
  20887. }
  20888. return n >>> 0;
  20889. }
  20890. function hexToStr(a, size) {
  20891. return String.fromCharCode.apply(null, a.subarray(0, size + 1));
  20892. }
  20893. function addHex(a, b, size) {
  20894. var c = 0;
  20895. for (var i = size; i >= 0; i--) {
  20896. c += a[i] + b[i];
  20897. a[i] = c & 255;
  20898. c >>= 8;
  20899. }
  20900. }
  20901. function incHex(a, size) {
  20902. var c = 1;
  20903. for (var i = size; i >= 0 && c > 0; i--) {
  20904. c += a[i];
  20905. a[i] = c & 255;
  20906. c >>= 8;
  20907. }
  20908. }
  20909. var MAX_NUM_SIZE = 16;
  20910. var MAX_ENCODED_NUM_SIZE = 19; // ceil(MAX_NUM_SIZE * 7 / 8)
  20911. function BinaryCMapStream(data) {
  20912. this.buffer = data;
  20913. this.pos = 0;
  20914. this.end = data.length;
  20915. this.tmpBuf = new Uint8Array(MAX_ENCODED_NUM_SIZE);
  20916. }
  20917. BinaryCMapStream.prototype = {
  20918. readByte: function () {
  20919. if (this.pos >= this.end) {
  20920. return -1;
  20921. }
  20922. return this.buffer[this.pos++];
  20923. },
  20924. readNumber: function () {
  20925. var n = 0;
  20926. var last;
  20927. do {
  20928. var b = this.readByte();
  20929. if (b < 0) {
  20930. error('unexpected EOF in bcmap');
  20931. }
  20932. last = !(b & 0x80);
  20933. n = (n << 7) | (b & 0x7F);
  20934. } while (!last);
  20935. return n;
  20936. },
  20937. readSigned: function () {
  20938. var n = this.readNumber();
  20939. return (n & 1) ? ~(n >>> 1) : n >>> 1;
  20940. },
  20941. readHex: function (num, size) {
  20942. num.set(this.buffer.subarray(this.pos,
  20943. this.pos + size + 1));
  20944. this.pos += size + 1;
  20945. },
  20946. readHexNumber: function (num, size) {
  20947. var last;
  20948. var stack = this.tmpBuf, sp = 0;
  20949. do {
  20950. var b = this.readByte();
  20951. if (b < 0) {
  20952. error('unexpected EOF in bcmap');
  20953. }
  20954. last = !(b & 0x80);
  20955. stack[sp++] = b & 0x7F;
  20956. } while (!last);
  20957. var i = size, buffer = 0, bufferSize = 0;
  20958. while (i >= 0) {
  20959. while (bufferSize < 8 && stack.length > 0) {
  20960. buffer = (stack[--sp] << bufferSize) | buffer;
  20961. bufferSize += 7;
  20962. }
  20963. num[i] = buffer & 255;
  20964. i--;
  20965. buffer >>= 8;
  20966. bufferSize -= 8;
  20967. }
  20968. },
  20969. readHexSigned: function (num, size) {
  20970. this.readHexNumber(num, size);
  20971. var sign = num[size] & 1 ? 255 : 0;
  20972. var c = 0;
  20973. for (var i = 0; i <= size; i++) {
  20974. c = ((c & 1) << 8) | num[i];
  20975. num[i] = (c >> 1) ^ sign;
  20976. }
  20977. },
  20978. readString: function () {
  20979. var len = this.readNumber();
  20980. var s = '';
  20981. for (var i = 0; i < len; i++) {
  20982. s += String.fromCharCode(this.readNumber());
  20983. }
  20984. return s;
  20985. }
  20986. };
  20987. function processBinaryCMap(url, cMap, extend) {
  20988. var data = fetchBinaryData(url);
  20989. var stream = new BinaryCMapStream(data);
  20990. var header = stream.readByte();
  20991. cMap.vertical = !!(header & 1);
  20992. var useCMap = null;
  20993. var start = new Uint8Array(MAX_NUM_SIZE);
  20994. var end = new Uint8Array(MAX_NUM_SIZE);
  20995. var char = new Uint8Array(MAX_NUM_SIZE);
  20996. var charCode = new Uint8Array(MAX_NUM_SIZE);
  20997. var tmp = new Uint8Array(MAX_NUM_SIZE);
  20998. var code;
  20999. var b;
  21000. while ((b = stream.readByte()) >= 0) {
  21001. var type = b >> 5;
  21002. if (type === 7) { // metadata, e.g. comment or usecmap
  21003. switch (b & 0x1F) {
  21004. case 0:
  21005. stream.readString(); // skipping comment
  21006. break;
  21007. case 1:
  21008. useCMap = stream.readString();
  21009. break;
  21010. }
  21011. continue;
  21012. }
  21013. var sequence = !!(b & 0x10);
  21014. var dataSize = b & 15;
  21015. assert(dataSize + 1 <= MAX_NUM_SIZE);
  21016. var ucs2DataSize = 1;
  21017. var subitemsCount = stream.readNumber();
  21018. var i;
  21019. switch (type) {
  21020. case 0: // codespacerange
  21021. stream.readHex(start, dataSize);
  21022. stream.readHexNumber(end, dataSize);
  21023. addHex(end, start, dataSize);
  21024. cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize),
  21025. hexToInt(end, dataSize));
  21026. for (i = 1; i < subitemsCount; i++) {
  21027. incHex(end, dataSize);
  21028. stream.readHexNumber(start, dataSize);
  21029. addHex(start, end, dataSize);
  21030. stream.readHexNumber(end, dataSize);
  21031. addHex(end, start, dataSize);
  21032. cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize),
  21033. hexToInt(end, dataSize));
  21034. }
  21035. break;
  21036. case 1: // notdefrange
  21037. stream.readHex(start, dataSize);
  21038. stream.readHexNumber(end, dataSize);
  21039. addHex(end, start, dataSize);
  21040. code = stream.readNumber();
  21041. // undefined range, skipping
  21042. for (i = 1; i < subitemsCount; i++) {
  21043. incHex(end, dataSize);
  21044. stream.readHexNumber(start, dataSize);
  21045. addHex(start, end, dataSize);
  21046. stream.readHexNumber(end, dataSize);
  21047. addHex(end, start, dataSize);
  21048. code = stream.readNumber();
  21049. // nop
  21050. }
  21051. break;
  21052. case 2: // cidchar
  21053. stream.readHex(char, dataSize);
  21054. code = stream.readNumber();
  21055. cMap.mapOne(hexToInt(char, dataSize), String.fromCharCode(code));
  21056. for (i = 1; i < subitemsCount; i++) {
  21057. incHex(char, dataSize);
  21058. if (!sequence) {
  21059. stream.readHexNumber(tmp, dataSize);
  21060. addHex(char, tmp, dataSize);
  21061. }
  21062. code = stream.readSigned() + (code + 1);
  21063. cMap.mapOne(hexToInt(char, dataSize), String.fromCharCode(code));
  21064. }
  21065. break;
  21066. case 3: // cidrange
  21067. stream.readHex(start, dataSize);
  21068. stream.readHexNumber(end, dataSize);
  21069. addHex(end, start, dataSize);
  21070. code = stream.readNumber();
  21071. cMap.mapRange(hexToInt(start, dataSize), hexToInt(end, dataSize),
  21072. String.fromCharCode(code));
  21073. for (i = 1; i < subitemsCount; i++) {
  21074. incHex(end, dataSize);
  21075. if (!sequence) {
  21076. stream.readHexNumber(start, dataSize);
  21077. addHex(start, end, dataSize);
  21078. } else {
  21079. start.set(end);
  21080. }
  21081. stream.readHexNumber(end, dataSize);
  21082. addHex(end, start, dataSize);
  21083. code = stream.readNumber();
  21084. cMap.mapRange(hexToInt(start, dataSize), hexToInt(end, dataSize),
  21085. String.fromCharCode(code));
  21086. }
  21087. break;
  21088. case 4: // bfchar
  21089. stream.readHex(char, ucs2DataSize);
  21090. stream.readHex(charCode, dataSize);
  21091. cMap.mapOne(hexToInt(char, ucs2DataSize),
  21092. hexToStr(charCode, dataSize));
  21093. for (i = 1; i < subitemsCount; i++) {
  21094. incHex(char, ucs2DataSize);
  21095. if (!sequence) {
  21096. stream.readHexNumber(tmp, ucs2DataSize);
  21097. addHex(char, tmp, ucs2DataSize);
  21098. }
  21099. incHex(charCode, dataSize);
  21100. stream.readHexSigned(tmp, dataSize);
  21101. addHex(charCode, tmp, dataSize);
  21102. cMap.mapOne(hexToInt(char, ucs2DataSize),
  21103. hexToStr(charCode, dataSize));
  21104. }
  21105. break;
  21106. case 5: // bfrange
  21107. stream.readHex(start, ucs2DataSize);
  21108. stream.readHexNumber(end, ucs2DataSize);
  21109. addHex(end, start, ucs2DataSize);
  21110. stream.readHex(charCode, dataSize);
  21111. cMap.mapRange(hexToInt(start, ucs2DataSize),
  21112. hexToInt(end, ucs2DataSize),
  21113. hexToStr(charCode, dataSize));
  21114. for (i = 1; i < subitemsCount; i++) {
  21115. incHex(end, ucs2DataSize);
  21116. if (!sequence) {
  21117. stream.readHexNumber(start, ucs2DataSize);
  21118. addHex(start, end, ucs2DataSize);
  21119. } else {
  21120. start.set(end);
  21121. }
  21122. stream.readHexNumber(end, ucs2DataSize);
  21123. addHex(end, start, ucs2DataSize);
  21124. stream.readHex(charCode, dataSize);
  21125. cMap.mapRange(hexToInt(start, ucs2DataSize),
  21126. hexToInt(end, ucs2DataSize),
  21127. hexToStr(charCode, dataSize));
  21128. }
  21129. break;
  21130. default:
  21131. error('Unknown type: ' + type);
  21132. break;
  21133. }
  21134. }
  21135. if (useCMap) {
  21136. extend(useCMap);
  21137. }
  21138. return cMap;
  21139. }
  21140. function BinaryCMapReader() {}
  21141. BinaryCMapReader.prototype = {
  21142. read: processBinaryCMap
  21143. };
  21144. return BinaryCMapReader;
  21145. })();
  21146. var CMapFactory = (function CMapFactoryClosure() {
  21147. function strToInt(str) {
  21148. var a = 0;
  21149. for (var i = 0; i < str.length; i++) {
  21150. a = (a << 8) | str.charCodeAt(i);
  21151. }
  21152. return a >>> 0;
  21153. }
  21154. function expectString(obj) {
  21155. if (!isString(obj)) {
  21156. error('Malformed CMap: expected string.');
  21157. }
  21158. }
  21159. function expectInt(obj) {
  21160. if (!isInt(obj)) {
  21161. error('Malformed CMap: expected int.');
  21162. }
  21163. }
  21164. function parseBfChar(cMap, lexer) {
  21165. while (true) {
  21166. var obj = lexer.getObj();
  21167. if (isEOF(obj)) {
  21168. break;
  21169. }
  21170. if (isCmd(obj, 'endbfchar')) {
  21171. return;
  21172. }
  21173. expectString(obj);
  21174. var src = strToInt(obj);
  21175. obj = lexer.getObj();
  21176. // TODO are /dstName used?
  21177. expectString(obj);
  21178. var dst = obj;
  21179. cMap.mapOne(src, dst);
  21180. }
  21181. }
  21182. function parseBfRange(cMap, lexer) {
  21183. while (true) {
  21184. var obj = lexer.getObj();
  21185. if (isEOF(obj)) {
  21186. break;
  21187. }
  21188. if (isCmd(obj, 'endbfrange')) {
  21189. return;
  21190. }
  21191. expectString(obj);
  21192. var low = strToInt(obj);
  21193. obj = lexer.getObj();
  21194. expectString(obj);
  21195. var high = strToInt(obj);
  21196. obj = lexer.getObj();
  21197. if (isInt(obj) || isString(obj)) {
  21198. var dstLow = isInt(obj) ? String.fromCharCode(obj) : obj;
  21199. cMap.mapRange(low, high, dstLow);
  21200. } else if (isCmd(obj, '[')) {
  21201. obj = lexer.getObj();
  21202. var array = [];
  21203. while (!isCmd(obj, ']') && !isEOF(obj)) {
  21204. array.push(obj);
  21205. obj = lexer.getObj();
  21206. }
  21207. cMap.mapRangeToArray(low, high, array);
  21208. } else {
  21209. break;
  21210. }
  21211. }
  21212. error('Invalid bf range.');
  21213. }
  21214. function parseCidChar(cMap, lexer) {
  21215. while (true) {
  21216. var obj = lexer.getObj();
  21217. if (isEOF(obj)) {
  21218. break;
  21219. }
  21220. if (isCmd(obj, 'endcidchar')) {
  21221. return;
  21222. }
  21223. expectString(obj);
  21224. var src = strToInt(obj);
  21225. obj = lexer.getObj();
  21226. expectInt(obj);
  21227. var dst = String.fromCharCode(obj);
  21228. cMap.mapOne(src, dst);
  21229. }
  21230. }
  21231. function parseCidRange(cMap, lexer) {
  21232. while (true) {
  21233. var obj = lexer.getObj();
  21234. if (isEOF(obj)) {
  21235. break;
  21236. }
  21237. if (isCmd(obj, 'endcidrange')) {
  21238. return;
  21239. }
  21240. expectString(obj);
  21241. var low = strToInt(obj);
  21242. obj = lexer.getObj();
  21243. expectString(obj);
  21244. var high = strToInt(obj);
  21245. obj = lexer.getObj();
  21246. expectInt(obj);
  21247. var dstLow = String.fromCharCode(obj);
  21248. cMap.mapRange(low, high, dstLow);
  21249. }
  21250. }
  21251. function parseCodespaceRange(cMap, lexer) {
  21252. while (true) {
  21253. var obj = lexer.getObj();
  21254. if (isEOF(obj)) {
  21255. break;
  21256. }
  21257. if (isCmd(obj, 'endcodespacerange')) {
  21258. return;
  21259. }
  21260. if (!isString(obj)) {
  21261. break;
  21262. }
  21263. var low = strToInt(obj);
  21264. obj = lexer.getObj();
  21265. if (!isString(obj)) {
  21266. break;
  21267. }
  21268. var high = strToInt(obj);
  21269. cMap.addCodespaceRange(obj.length, low, high);
  21270. }
  21271. error('Invalid codespace range.');
  21272. }
  21273. function parseWMode(cMap, lexer) {
  21274. var obj = lexer.getObj();
  21275. if (isInt(obj)) {
  21276. cMap.vertical = !!obj;
  21277. }
  21278. }
  21279. function parseCMap(cMap, lexer, builtInCMapParams, useCMap) {
  21280. var previous;
  21281. var embededUseCMap;
  21282. objLoop: while (true) {
  21283. var obj = lexer.getObj();
  21284. if (isEOF(obj)) {
  21285. break;
  21286. } else if (isName(obj)) {
  21287. if (obj.name === 'WMode') {
  21288. parseWMode(cMap, lexer);
  21289. }
  21290. previous = obj;
  21291. } else if (isCmd(obj)) {
  21292. switch (obj.cmd) {
  21293. case 'endcmap':
  21294. break objLoop;
  21295. case 'usecmap':
  21296. if (isName(previous)) {
  21297. embededUseCMap = previous.name;
  21298. }
  21299. break;
  21300. case 'begincodespacerange':
  21301. parseCodespaceRange(cMap, lexer);
  21302. break;
  21303. case 'beginbfchar':
  21304. parseBfChar(cMap, lexer);
  21305. break;
  21306. case 'begincidchar':
  21307. parseCidChar(cMap, lexer);
  21308. break;
  21309. case 'beginbfrange':
  21310. parseBfRange(cMap, lexer);
  21311. break;
  21312. case 'begincidrange':
  21313. parseCidRange(cMap, lexer);
  21314. break;
  21315. }
  21316. }
  21317. }
  21318. if (!useCMap && embededUseCMap) {
  21319. // Load the usecmap definition from the file only if there wasn't one
  21320. // specified.
  21321. useCMap = embededUseCMap;
  21322. }
  21323. if (useCMap) {
  21324. extendCMap(cMap, builtInCMapParams, useCMap);
  21325. }
  21326. }
  21327. function extendCMap(cMap, builtInCMapParams, useCMap) {
  21328. cMap.useCMap = createBuiltInCMap(useCMap, builtInCMapParams);
  21329. // If there aren't any code space ranges defined clone all the parent ones
  21330. // into this cMap.
  21331. if (cMap.numCodespaceRanges === 0) {
  21332. var useCodespaceRanges = cMap.useCMap.codespaceRanges;
  21333. for (var i = 0; i < useCodespaceRanges.length; i++) {
  21334. cMap.codespaceRanges[i] = useCodespaceRanges[i].slice();
  21335. }
  21336. cMap.numCodespaceRanges = cMap.useCMap.numCodespaceRanges;
  21337. }
  21338. // Merge the map into the current one, making sure not to override
  21339. // any previously defined entries.
  21340. for (var key in cMap.useCMap.map) {
  21341. if (key in cMap.map) {
  21342. continue;
  21343. }
  21344. cMap.map[key] = cMap.useCMap.map[key];
  21345. }
  21346. }
  21347. function parseBinaryCMap(name, builtInCMapParams) {
  21348. var url = builtInCMapParams.url + name + '.bcmap';
  21349. var cMap = new CMap(true);
  21350. new BinaryCMapReader().read(url, cMap, function (useCMap) {
  21351. extendCMap(cMap, builtInCMapParams, useCMap);
  21352. });
  21353. return cMap;
  21354. }
  21355. function createBuiltInCMap(name, builtInCMapParams) {
  21356. if (name === 'Identity-H') {
  21357. return new IdentityCMap(false, 2);
  21358. } else if (name === 'Identity-V') {
  21359. return new IdentityCMap(true, 2);
  21360. }
  21361. if (BUILT_IN_CMAPS.indexOf(name) === -1) {
  21362. error('Unknown cMap name: ' + name);
  21363. }
  21364. assert (builtInCMapParams, 'buildin cmap parameters are not provided');
  21365. if (builtInCMapParams.packed) {
  21366. return parseBinaryCMap(name, builtInCMapParams);
  21367. }
  21368. var request = new XMLHttpRequest();
  21369. var url = builtInCMapParams.url + name;
  21370. request.open('GET', url, false);
  21371. request.send(null);
  21372. if (request.status === 0 && /^https?:/i.test(url)) {
  21373. error('Unable to get cMap at: ' + url);
  21374. }
  21375. var cMap = new CMap(true);
  21376. var lexer = new Lexer(new StringStream(request.responseText));
  21377. parseCMap(cMap, lexer, builtInCMapParams, null);
  21378. return cMap;
  21379. }
  21380. return {
  21381. create: function (encoding, builtInCMapParams, useCMap) {
  21382. if (isName(encoding)) {
  21383. return createBuiltInCMap(encoding.name, builtInCMapParams);
  21384. } else if (isStream(encoding)) {
  21385. var cMap = new CMap();
  21386. var lexer = new Lexer(encoding);
  21387. try {
  21388. parseCMap(cMap, lexer, builtInCMapParams, useCMap);
  21389. } catch (e) {
  21390. warn('Invalid CMap data. ' + e);
  21391. }
  21392. return cMap;
  21393. }
  21394. error('Encoding required.');
  21395. }
  21396. };
  21397. })();
  21398. // Unicode Private Use Area
  21399. var PRIVATE_USE_OFFSET_START = 0xE000;
  21400. var PRIVATE_USE_OFFSET_END = 0xF8FF;
  21401. var SKIP_PRIVATE_USE_RANGE_F000_TO_F01F = false;
  21402. // PDF Glyph Space Units are one Thousandth of a TextSpace Unit
  21403. // except for Type 3 fonts
  21404. var PDF_GLYPH_SPACE_UNITS = 1000;
  21405. // Hinting is currently disabled due to unknown problems on windows
  21406. // in tracemonkey and various other pdfs with type1 fonts.
  21407. var HINTING_ENABLED = false;
  21408. // Accented charactars are not displayed properly on windows, using this flag
  21409. // to control analysis of seac charstrings.
  21410. var SEAC_ANALYSIS_ENABLED = false;
  21411. var FontFlags = {
  21412. FixedPitch: 1,
  21413. Serif: 2,
  21414. Symbolic: 4,
  21415. Script: 8,
  21416. Nonsymbolic: 32,
  21417. Italic: 64,
  21418. AllCap: 65536,
  21419. SmallCap: 131072,
  21420. ForceBold: 262144
  21421. };
  21422. var Encodings = {
  21423. ExpertEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21424. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21425. 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle',
  21426. 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',
  21427. 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',
  21428. 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',
  21429. 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',
  21430. 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon',
  21431. 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior',
  21432. 'questionsmall', '', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior',
  21433. 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior',
  21434. 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior',
  21435. '', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '',
  21436. 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',
  21437. 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',
  21438. 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',
  21439. 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',
  21440. 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',
  21441. 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '', '', '',
  21442. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21443. '', '', '', '', '', '', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall',
  21444. '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall',
  21445. 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '',
  21446. 'figuredash', 'hypheninferior', '', '', 'Ogoneksmall', 'Ringsmall',
  21447. 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters',
  21448. 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',
  21449. 'seveneighths', 'onethird', 'twothirds', '', '', 'zerosuperior',
  21450. 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior',
  21451. 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior',
  21452. 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior',
  21453. 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior',
  21454. 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior',
  21455. 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall',
  21456. 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall',
  21457. 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',
  21458. 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',
  21459. 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',
  21460. 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',
  21461. 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',
  21462. 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',
  21463. 'Ydieresissmall'],
  21464. MacExpertEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21465. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21466. 'space', 'exclamsmall', 'Hungarumlautsmall', 'centoldstyle',
  21467. 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall',
  21468. 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
  21469. 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle',
  21470. 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle',
  21471. 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle',
  21472. 'nineoldstyle', 'colon', 'semicolon', '', 'threequartersemdash', '',
  21473. 'questionsmall', '', '', '', '', 'Ethsmall', '', '', 'onequarter',
  21474. 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',
  21475. 'seveneighths', 'onethird', 'twothirds', '', '', '', '', '', '', 'ff',
  21476. 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '', 'parenrightinferior',
  21477. 'Circumflexsmall', 'hypheninferior', 'Gravesmall', 'Asmall', 'Bsmall',
  21478. 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall',
  21479. 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall',
  21480. 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',
  21481. 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah',
  21482. 'Tildesmall', '', '', 'asuperior', 'centsuperior', '', '', '', '',
  21483. 'Aacutesmall', 'Agravesmall', 'Acircumflexsmall', 'Adieresissmall',
  21484. 'Atildesmall', 'Aringsmall', 'Ccedillasmall', 'Eacutesmall', 'Egravesmall',
  21485. 'Ecircumflexsmall', 'Edieresissmall', 'Iacutesmall', 'Igravesmall',
  21486. 'Icircumflexsmall', 'Idieresissmall', 'Ntildesmall', 'Oacutesmall',
  21487. 'Ogravesmall', 'Ocircumflexsmall', 'Odieresissmall', 'Otildesmall',
  21488. 'Uacutesmall', 'Ugravesmall', 'Ucircumflexsmall', 'Udieresissmall', '',
  21489. 'eightsuperior', 'fourinferior', 'threeinferior', 'sixinferior',
  21490. 'eightinferior', 'seveninferior', 'Scaronsmall', '', 'centinferior',
  21491. 'twoinferior', '', 'Dieresissmall', '', 'Caronsmall', 'osuperior',
  21492. 'fiveinferior', '', 'commainferior', 'periodinferior', 'Yacutesmall', '',
  21493. 'dollarinferior', '', 'Thornsmall', '', 'nineinferior', 'zeroinferior',
  21494. 'Zcaronsmall', 'AEsmall', 'Oslashsmall', 'questiondownsmall',
  21495. 'oneinferior', 'Lslashsmall', '', '', '', '', '', '', 'Cedillasmall', '',
  21496. '', '', '', '', 'OEsmall', 'figuredash', 'hyphensuperior', '', '', '', '',
  21497. 'exclamdownsmall', '', 'Ydieresissmall', '', 'onesuperior', 'twosuperior',
  21498. 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior',
  21499. 'sevensuperior', 'ninesuperior', 'zerosuperior', '', 'esuperior',
  21500. 'rsuperior', 'tsuperior', '', '', 'isuperior', 'ssuperior', 'dsuperior',
  21501. '', '', '', '', '', 'lsuperior', 'Ogoneksmall', 'Brevesmall',
  21502. 'Macronsmall', 'bsuperior', 'nsuperior', 'msuperior', 'commasuperior',
  21503. 'periodsuperior', 'Dotaccentsmall', 'Ringsmall'],
  21504. MacRomanEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21505. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21506. 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  21507. 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus',
  21508. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three',
  21509. 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon',
  21510. 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F',
  21511. 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
  21512. 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',
  21513. 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
  21514. 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
  21515. 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '',
  21516. 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis',
  21517. 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis', 'atilde',
  21518. 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',
  21519. 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute',
  21520. 'ograve', 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave',
  21521. 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling',
  21522. 'section', 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright',
  21523. 'trademark', 'acute', 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity',
  21524. 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff',
  21525. 'summation', 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine',
  21526. 'Omega', 'ae', 'oslash', 'questiondown', 'exclamdown', 'logicalnot',
  21527. 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft',
  21528. 'guillemotright', 'ellipsis', 'space', 'Agrave', 'Atilde', 'Otilde', 'OE',
  21529. 'oe', 'endash', 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft',
  21530. 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction',
  21531. 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl',
  21532. 'periodcentered', 'quotesinglbase', 'quotedblbase', 'perthousand',
  21533. 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute',
  21534. 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple',
  21535. 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex',
  21536. 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',
  21537. 'ogonek', 'caron'],
  21538. StandardEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21539. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21540. 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  21541. 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus',
  21542. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three',
  21543. 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon',
  21544. 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F',
  21545. 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
  21546. 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',
  21547. 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f',
  21548. 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u',
  21549. 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',
  21550. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21551. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdown',
  21552. 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',
  21553. 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',
  21554. 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger', 'daggerdbl',
  21555. 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase',
  21556. 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',
  21557. 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex',
  21558. 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla',
  21559. '', 'hungarumlaut', 'ogonek', 'caron', 'emdash', '', '', '', '', '', '',
  21560. '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '',
  21561. '', '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae',
  21562. '', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls'],
  21563. WinAnsiEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21564. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21565. 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  21566. 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus',
  21567. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three',
  21568. 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon',
  21569. 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F',
  21570. 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
  21571. 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',
  21572. 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
  21573. 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
  21574. 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',
  21575. 'bullet', 'Euro', 'bullet', 'quotesinglbase', 'florin', 'quotedblbase',
  21576. 'ellipsis', 'dagger', 'daggerdbl', 'circumflex', 'perthousand', 'Scaron',
  21577. 'guilsinglleft', 'OE', 'bullet', 'Zcaron', 'bullet', 'bullet', 'quoteleft',
  21578. 'quoteright', 'quotedblleft', 'quotedblright', 'bullet', 'endash',
  21579. 'emdash', 'tilde', 'trademark', 'scaron', 'guilsinglright', 'oe', 'bullet',
  21580. 'zcaron', 'Ydieresis', 'space', 'exclamdown', 'cent', 'sterling',
  21581. 'currency', 'yen', 'brokenbar', 'section', 'dieresis', 'copyright',
  21582. 'ordfeminine', 'guillemotleft', 'logicalnot', 'hyphen', 'registered',
  21583. 'macron', 'degree', 'plusminus', 'twosuperior', 'threesuperior', 'acute',
  21584. 'mu', 'paragraph', 'periodcentered', 'cedilla', 'onesuperior',
  21585. 'ordmasculine', 'guillemotright', 'onequarter', 'onehalf', 'threequarters',
  21586. 'questiondown', 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', 'Adieresis',
  21587. 'Aring', 'AE', 'Ccedilla', 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis',
  21588. 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Eth', 'Ntilde', 'Ograve',
  21589. 'Oacute', 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', 'Oslash',
  21590. 'Ugrave', 'Uacute', 'Ucircumflex', 'Udieresis', 'Yacute', 'Thorn',
  21591. 'germandbls', 'agrave', 'aacute', 'acircumflex', 'atilde', 'adieresis',
  21592. 'aring', 'ae', 'ccedilla', 'egrave', 'eacute', 'ecircumflex', 'edieresis',
  21593. 'igrave', 'iacute', 'icircumflex', 'idieresis', 'eth', 'ntilde', 'ograve',
  21594. 'oacute', 'ocircumflex', 'otilde', 'odieresis', 'divide', 'oslash',
  21595. 'ugrave', 'uacute', 'ucircumflex', 'udieresis', 'yacute', 'thorn',
  21596. 'ydieresis'],
  21597. SymbolSetEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21598. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21599. 'space', 'exclam', 'universal', 'numbersign', 'existential', 'percent',
  21600. 'ampersand', 'suchthat', 'parenleft', 'parenright', 'asteriskmath', 'plus',
  21601. 'comma', 'minus', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four',
  21602. 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',
  21603. 'equal', 'greater', 'question', 'congruent', 'Alpha', 'Beta', 'Chi',
  21604. 'Delta', 'Epsilon', 'Phi', 'Gamma', 'Eta', 'Iota', 'theta1', 'Kappa',
  21605. 'Lambda', 'Mu', 'Nu', 'Omicron', 'Pi', 'Theta', 'Rho', 'Sigma', 'Tau',
  21606. 'Upsilon', 'sigma1', 'Omega', 'Xi', 'Psi', 'Zeta', 'bracketleft',
  21607. 'therefore', 'bracketright', 'perpendicular', 'underscore', 'radicalex',
  21608. 'alpha', 'beta', 'chi', 'delta', 'epsilon', 'phi', 'gamma', 'eta', 'iota',
  21609. 'phi1', 'kappa', 'lambda', 'mu', 'nu', 'omicron', 'pi', 'theta', 'rho',
  21610. 'sigma', 'tau', 'upsilon', 'omega1', 'omega', 'xi', 'psi', 'zeta',
  21611. 'braceleft', 'bar', 'braceright', 'similar', '', '', '', '', '', '', '',
  21612. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21613. '', '', '', '', '', '', '', 'Euro', 'Upsilon1', 'minute', 'lessequal',
  21614. 'fraction', 'infinity', 'florin', 'club', 'diamond', 'heart', 'spade',
  21615. 'arrowboth', 'arrowleft', 'arrowup', 'arrowright', 'arrowdown', 'degree',
  21616. 'plusminus', 'second', 'greaterequal', 'multiply', 'proportional',
  21617. 'partialdiff', 'bullet', 'divide', 'notequal', 'equivalence',
  21618. 'approxequal', 'ellipsis', 'arrowvertex', 'arrowhorizex', 'carriagereturn',
  21619. 'aleph', 'Ifraktur', 'Rfraktur', 'weierstrass', 'circlemultiply',
  21620. 'circleplus', 'emptyset', 'intersection', 'union', 'propersuperset',
  21621. 'reflexsuperset', 'notsubset', 'propersubset', 'reflexsubset', 'element',
  21622. 'notelement', 'angle', 'gradient', 'registerserif', 'copyrightserif',
  21623. 'trademarkserif', 'product', 'radical', 'dotmath', 'logicalnot',
  21624. 'logicaland', 'logicalor', 'arrowdblboth', 'arrowdblleft', 'arrowdblup',
  21625. 'arrowdblright', 'arrowdbldown', 'lozenge', 'angleleft', 'registersans',
  21626. 'copyrightsans', 'trademarksans', 'summation', 'parenlefttp',
  21627. 'parenleftex', 'parenleftbt', 'bracketlefttp', 'bracketleftex',
  21628. 'bracketleftbt', 'bracelefttp', 'braceleftmid', 'braceleftbt', 'braceex',
  21629. '', 'angleright', 'integral', 'integraltp', 'integralex', 'integralbt',
  21630. 'parenrighttp', 'parenrightex', 'parenrightbt', 'bracketrighttp',
  21631. 'bracketrightex', 'bracketrightbt', 'bracerighttp', 'bracerightmid',
  21632. 'bracerightbt'],
  21633. zapfDingbatsEncoding: ['', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21634. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21635. 'space', 'a1', 'a2', 'a202', 'a3', 'a4', 'a5', 'a119', 'a118', 'a117',
  21636. 'a11', 'a12', 'a13', 'a14', 'a15', 'a16', 'a105', 'a17', 'a18', 'a19',
  21637. 'a20', 'a21', 'a22', 'a23', 'a24', 'a25', 'a26', 'a27', 'a28', 'a6', 'a7',
  21638. 'a8', 'a9', 'a10', 'a29', 'a30', 'a31', 'a32', 'a33', 'a34', 'a35', 'a36',
  21639. 'a37', 'a38', 'a39', 'a40', 'a41', 'a42', 'a43', 'a44', 'a45', 'a46',
  21640. 'a47', 'a48', 'a49', 'a50', 'a51', 'a52', 'a53', 'a54', 'a55', 'a56',
  21641. 'a57', 'a58', 'a59', 'a60', 'a61', 'a62', 'a63', 'a64', 'a65', 'a66',
  21642. 'a67', 'a68', 'a69', 'a70', 'a71', 'a72', 'a73', 'a74', 'a203', 'a75',
  21643. 'a204', 'a76', 'a77', 'a78', 'a79', 'a81', 'a82', 'a83', 'a84', 'a97',
  21644. 'a98', 'a99', 'a100', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21645. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  21646. '', '', 'a101', 'a102', 'a103', 'a104', 'a106', 'a107', 'a108', 'a112',
  21647. 'a111', 'a110', 'a109', 'a120', 'a121', 'a122', 'a123', 'a124', 'a125',
  21648. 'a126', 'a127', 'a128', 'a129', 'a130', 'a131', 'a132', 'a133', 'a134',
  21649. 'a135', 'a136', 'a137', 'a138', 'a139', 'a140', 'a141', 'a142', 'a143',
  21650. 'a144', 'a145', 'a146', 'a147', 'a148', 'a149', 'a150', 'a151', 'a152',
  21651. 'a153', 'a154', 'a155', 'a156', 'a157', 'a158', 'a159', 'a160', 'a161',
  21652. 'a163', 'a164', 'a196', 'a165', 'a192', 'a166', 'a167', 'a168', 'a169',
  21653. 'a170', 'a171', 'a172', 'a173', 'a162', 'a174', 'a175', 'a176', 'a177',
  21654. 'a178', 'a179', 'a193', 'a180', 'a199', 'a181', 'a200', 'a182', '', 'a201',
  21655. 'a183', 'a184', 'a197', 'a185', 'a194', 'a198', 'a186', 'a195', 'a187',
  21656. 'a188', 'a189', 'a190', 'a191']
  21657. };
  21658. /**
  21659. * Hold a map of decoded fonts and of the standard fourteen Type1
  21660. * fonts and their acronyms.
  21661. */
  21662. var stdFontMap = {
  21663. 'ArialNarrow': 'Helvetica',
  21664. 'ArialNarrow-Bold': 'Helvetica-Bold',
  21665. 'ArialNarrow-BoldItalic': 'Helvetica-BoldOblique',
  21666. 'ArialNarrow-Italic': 'Helvetica-Oblique',
  21667. 'ArialBlack': 'Helvetica',
  21668. 'ArialBlack-Bold': 'Helvetica-Bold',
  21669. 'ArialBlack-BoldItalic': 'Helvetica-BoldOblique',
  21670. 'ArialBlack-Italic': 'Helvetica-Oblique',
  21671. 'Arial': 'Helvetica',
  21672. 'Arial-Bold': 'Helvetica-Bold',
  21673. 'Arial-BoldItalic': 'Helvetica-BoldOblique',
  21674. 'Arial-Italic': 'Helvetica-Oblique',
  21675. 'Arial-BoldItalicMT': 'Helvetica-BoldOblique',
  21676. 'Arial-BoldMT': 'Helvetica-Bold',
  21677. 'Arial-ItalicMT': 'Helvetica-Oblique',
  21678. 'ArialMT': 'Helvetica',
  21679. 'Courier-Bold': 'Courier-Bold',
  21680. 'Courier-BoldItalic': 'Courier-BoldOblique',
  21681. 'Courier-Italic': 'Courier-Oblique',
  21682. 'CourierNew': 'Courier',
  21683. 'CourierNew-Bold': 'Courier-Bold',
  21684. 'CourierNew-BoldItalic': 'Courier-BoldOblique',
  21685. 'CourierNew-Italic': 'Courier-Oblique',
  21686. 'CourierNewPS-BoldItalicMT': 'Courier-BoldOblique',
  21687. 'CourierNewPS-BoldMT': 'Courier-Bold',
  21688. 'CourierNewPS-ItalicMT': 'Courier-Oblique',
  21689. 'CourierNewPSMT': 'Courier',
  21690. 'Helvetica-Bold': 'Helvetica-Bold',
  21691. 'Helvetica-BoldItalic': 'Helvetica-BoldOblique',
  21692. 'Helvetica-Italic': 'Helvetica-Oblique',
  21693. 'Symbol-Bold': 'Symbol',
  21694. 'Symbol-BoldItalic': 'Symbol',
  21695. 'Symbol-Italic': 'Symbol',
  21696. 'TimesNewRoman': 'Times-Roman',
  21697. 'TimesNewRoman-Bold': 'Times-Bold',
  21698. 'TimesNewRoman-BoldItalic': 'Times-BoldItalic',
  21699. 'TimesNewRoman-Italic': 'Times-Italic',
  21700. 'TimesNewRomanPS': 'Times-Roman',
  21701. 'TimesNewRomanPS-Bold': 'Times-Bold',
  21702. 'TimesNewRomanPS-BoldItalic': 'Times-BoldItalic',
  21703. 'TimesNewRomanPS-BoldItalicMT': 'Times-BoldItalic',
  21704. 'TimesNewRomanPS-BoldMT': 'Times-Bold',
  21705. 'TimesNewRomanPS-Italic': 'Times-Italic',
  21706. 'TimesNewRomanPS-ItalicMT': 'Times-Italic',
  21707. 'TimesNewRomanPSMT': 'Times-Roman',
  21708. 'TimesNewRomanPSMT-Bold': 'Times-Bold',
  21709. 'TimesNewRomanPSMT-BoldItalic': 'Times-BoldItalic',
  21710. 'TimesNewRomanPSMT-Italic': 'Times-Italic'
  21711. };
  21712. /**
  21713. * Holds the map of the non-standard fonts that might be included as a standard
  21714. * fonts without glyph data.
  21715. */
  21716. var nonStdFontMap = {
  21717. 'ComicSansMS': 'Comic Sans MS',
  21718. 'ComicSansMS-Bold': 'Comic Sans MS-Bold',
  21719. 'ComicSansMS-BoldItalic': 'Comic Sans MS-BoldItalic',
  21720. 'ComicSansMS-Italic': 'Comic Sans MS-Italic',
  21721. 'LucidaConsole': 'Courier',
  21722. 'LucidaConsole-Bold': 'Courier-Bold',
  21723. 'LucidaConsole-BoldItalic': 'Courier-BoldOblique',
  21724. 'LucidaConsole-Italic': 'Courier-Oblique',
  21725. 'MS-Gothic': 'MS Gothic',
  21726. 'MS-Gothic-Bold': 'MS Gothic-Bold',
  21727. 'MS-Gothic-BoldItalic': 'MS Gothic-BoldItalic',
  21728. 'MS-Gothic-Italic': 'MS Gothic-Italic',
  21729. 'MS-Mincho': 'MS Mincho',
  21730. 'MS-Mincho-Bold': 'MS Mincho-Bold',
  21731. 'MS-Mincho-BoldItalic': 'MS Mincho-BoldItalic',
  21732. 'MS-Mincho-Italic': 'MS Mincho-Italic',
  21733. 'MS-PGothic': 'MS PGothic',
  21734. 'MS-PGothic-Bold': 'MS PGothic-Bold',
  21735. 'MS-PGothic-BoldItalic': 'MS PGothic-BoldItalic',
  21736. 'MS-PGothic-Italic': 'MS PGothic-Italic',
  21737. 'MS-PMincho': 'MS PMincho',
  21738. 'MS-PMincho-Bold': 'MS PMincho-Bold',
  21739. 'MS-PMincho-BoldItalic': 'MS PMincho-BoldItalic',
  21740. 'MS-PMincho-Italic': 'MS PMincho-Italic'
  21741. };
  21742. var serifFonts = {
  21743. 'Adobe Jenson': true, 'Adobe Text': true, 'Albertus': true,
  21744. 'Aldus': true, 'Alexandria': true, 'Algerian': true,
  21745. 'American Typewriter': true, 'Antiqua': true, 'Apex': true,
  21746. 'Arno': true, 'Aster': true, 'Aurora': true,
  21747. 'Baskerville': true, 'Bell': true, 'Bembo': true,
  21748. 'Bembo Schoolbook': true, 'Benguiat': true, 'Berkeley Old Style': true,
  21749. 'Bernhard Modern': true, 'Berthold City': true, 'Bodoni': true,
  21750. 'Bauer Bodoni': true, 'Book Antiqua': true, 'Bookman': true,
  21751. 'Bordeaux Roman': true, 'Californian FB': true, 'Calisto': true,
  21752. 'Calvert': true, 'Capitals': true, 'Cambria': true,
  21753. 'Cartier': true, 'Caslon': true, 'Catull': true,
  21754. 'Centaur': true, 'Century Old Style': true, 'Century Schoolbook': true,
  21755. 'Chaparral': true, 'Charis SIL': true, 'Cheltenham': true,
  21756. 'Cholla Slab': true, 'Clarendon': true, 'Clearface': true,
  21757. 'Cochin': true, 'Colonna': true, 'Computer Modern': true,
  21758. 'Concrete Roman': true, 'Constantia': true, 'Cooper Black': true,
  21759. 'Corona': true, 'Ecotype': true, 'Egyptienne': true,
  21760. 'Elephant': true, 'Excelsior': true, 'Fairfield': true,
  21761. 'FF Scala': true, 'Folkard': true, 'Footlight': true,
  21762. 'FreeSerif': true, 'Friz Quadrata': true, 'Garamond': true,
  21763. 'Gentium': true, 'Georgia': true, 'Gloucester': true,
  21764. 'Goudy Old Style': true, 'Goudy Schoolbook': true, 'Goudy Pro Font': true,
  21765. 'Granjon': true, 'Guardian Egyptian': true, 'Heather': true,
  21766. 'Hercules': true, 'High Tower Text': true, 'Hiroshige': true,
  21767. 'Hoefler Text': true, 'Humana Serif': true, 'Imprint': true,
  21768. 'Ionic No. 5': true, 'Janson': true, 'Joanna': true,
  21769. 'Korinna': true, 'Lexicon': true, 'Liberation Serif': true,
  21770. 'Linux Libertine': true, 'Literaturnaya': true, 'Lucida': true,
  21771. 'Lucida Bright': true, 'Melior': true, 'Memphis': true,
  21772. 'Miller': true, 'Minion': true, 'Modern': true,
  21773. 'Mona Lisa': true, 'Mrs Eaves': true, 'MS Serif': true,
  21774. 'Museo Slab': true, 'New York': true, 'Nimbus Roman': true,
  21775. 'NPS Rawlinson Roadway': true, 'Palatino': true, 'Perpetua': true,
  21776. 'Plantin': true, 'Plantin Schoolbook': true, 'Playbill': true,
  21777. 'Poor Richard': true, 'Rawlinson Roadway': true, 'Renault': true,
  21778. 'Requiem': true, 'Rockwell': true, 'Roman': true,
  21779. 'Rotis Serif': true, 'Sabon': true, 'Scala': true,
  21780. 'Seagull': true, 'Sistina': true, 'Souvenir': true,
  21781. 'STIX': true, 'Stone Informal': true, 'Stone Serif': true,
  21782. 'Sylfaen': true, 'Times': true, 'Trajan': true,
  21783. 'Trinité': true, 'Trump Mediaeval': true, 'Utopia': true,
  21784. 'Vale Type': true, 'Bitstream Vera': true, 'Vera Serif': true,
  21785. 'Versailles': true, 'Wanted': true, 'Weiss': true,
  21786. 'Wide Latin': true, 'Windsor': true, 'XITS': true
  21787. };
  21788. var symbolsFonts = {
  21789. 'Dingbats': true, 'Symbol': true, 'ZapfDingbats': true
  21790. };
  21791. // Glyph map for well-known standard fonts. Sometimes Ghostscript uses CID fonts
  21792. // but does not embed the CID to GID mapping. The mapping is incomplete for all
  21793. // glyphs, but common for some set of the standard fonts.
  21794. var GlyphMapForStandardFonts = {
  21795. '2': 10, '3': 32, '4': 33, '5': 34, '6': 35, '7': 36, '8': 37, '9': 38,
  21796. '10': 39, '11': 40, '12': 41, '13': 42, '14': 43, '15': 44, '16': 173,
  21797. '17': 46, '18': 47, '19': 48, '20': 49, '21': 50, '22': 51, '23': 52,
  21798. '24': 53, '25': 54, '26': 55, '27': 56, '28': 57, '29': 58, '30': 894,
  21799. '31': 60, '32': 61, '33': 62, '34': 63, '35': 64, '36': 65, '37': 66,
  21800. '38': 67, '39': 68, '40': 69, '41': 70, '42': 71, '43': 72, '44': 73,
  21801. '45': 74, '46': 75, '47': 76, '48': 77, '49': 78, '50': 79, '51': 80,
  21802. '52': 81, '53': 82, '54': 83, '55': 84, '56': 85, '57': 86, '58': 87,
  21803. '59': 88, '60': 89, '61': 90, '62': 91, '63': 92, '64': 93, '65': 94,
  21804. '66': 95, '67': 96, '68': 97, '69': 98, '70': 99, '71': 100, '72': 101,
  21805. '73': 102, '74': 103, '75': 104, '76': 105, '77': 106, '78': 107, '79': 108,
  21806. '80': 109, '81': 110, '82': 111, '83': 112, '84': 113, '85': 114, '86': 115,
  21807. '87': 116, '88': 117, '89': 118, '90': 119, '91': 120, '92': 121, '93': 122,
  21808. '94': 123, '95': 124, '96': 125, '97': 126, '98': 196, '99': 197, '100': 199,
  21809. '101': 201, '102': 209, '103': 214, '104': 220, '105': 225, '106': 224,
  21810. '107': 226, '108': 228, '109': 227, '110': 229, '111': 231, '112': 233,
  21811. '113': 232, '114': 234, '115': 235, '116': 237, '117': 236, '118': 238,
  21812. '119': 239, '120': 241, '121': 243, '122': 242, '123': 244, '124': 246,
  21813. '125': 245, '126': 250, '127': 249, '128': 251, '129': 252, '130': 8224,
  21814. '131': 176, '132': 162, '133': 163, '134': 167, '135': 8226, '136': 182,
  21815. '137': 223, '138': 174, '139': 169, '140': 8482, '141': 180, '142': 168,
  21816. '143': 8800, '144': 198, '145': 216, '146': 8734, '147': 177, '148': 8804,
  21817. '149': 8805, '150': 165, '151': 181, '152': 8706, '153': 8721, '154': 8719,
  21818. '156': 8747, '157': 170, '158': 186, '159': 8486, '160': 230, '161': 248,
  21819. '162': 191, '163': 161, '164': 172, '165': 8730, '166': 402, '167': 8776,
  21820. '168': 8710, '169': 171, '170': 187, '171': 8230, '210': 218, '305': 963,
  21821. '306': 964, '307': 966, '308': 8215, '309': 8252, '310': 8319, '311': 8359,
  21822. '312': 8592, '313': 8593, '337': 9552, '493': 1039, '494': 1040, '705': 1524,
  21823. '706': 8362, '710': 64288, '711': 64298, '759': 1617, '761': 1776,
  21824. '763': 1778, '775': 1652, '777': 1764, '778': 1780, '779': 1781, '780': 1782,
  21825. '782': 771, '783': 64726, '786': 8363, '788': 8532, '790': 768, '791': 769,
  21826. '792': 768, '795': 803, '797': 64336, '798': 64337, '799': 64342,
  21827. '800': 64343, '801': 64344, '802': 64345, '803': 64362, '804': 64363,
  21828. '805': 64364, '2424': 7821, '2425': 7822, '2426': 7823, '2427': 7824,
  21829. '2428': 7825, '2429': 7826, '2430': 7827, '2433': 7682, '2678': 8045,
  21830. '2679': 8046, '2830': 1552, '2838': 686, '2840': 751, '2842': 753,
  21831. '2843': 754, '2844': 755, '2846': 757, '2856': 767, '2857': 848, '2858': 849,
  21832. '2862': 853, '2863': 854, '2864': 855, '2865': 861, '2866': 862, '2906': 7460,
  21833. '2908': 7462, '2909': 7463, '2910': 7464, '2912': 7466, '2913': 7467,
  21834. '2914': 7468, '2916': 7470, '2917': 7471, '2918': 7472, '2920': 7474,
  21835. '2921': 7475, '2922': 7476, '2924': 7478, '2925': 7479, '2926': 7480,
  21836. '2928': 7482, '2929': 7483, '2930': 7484, '2932': 7486, '2933': 7487,
  21837. '2934': 7488, '2936': 7490, '2937': 7491, '2938': 7492, '2940': 7494,
  21838. '2941': 7495, '2942': 7496, '2944': 7498, '2946': 7500, '2948': 7502,
  21839. '2950': 7504, '2951': 7505, '2952': 7506, '2954': 7508, '2955': 7509,
  21840. '2956': 7510, '2958': 7512, '2959': 7513, '2960': 7514, '2962': 7516,
  21841. '2963': 7517, '2964': 7518, '2966': 7520, '2967': 7521, '2968': 7522,
  21842. '2970': 7524, '2971': 7525, '2972': 7526, '2974': 7528, '2975': 7529,
  21843. '2976': 7530, '2978': 1537, '2979': 1538, '2980': 1539, '2982': 1549,
  21844. '2983': 1551, '2984': 1552, '2986': 1554, '2987': 1555, '2988': 1556,
  21845. '2990': 1623, '2991': 1624, '2995': 1775, '2999': 1791, '3002': 64290,
  21846. '3003': 64291, '3004': 64292, '3006': 64294, '3007': 64295, '3008': 64296,
  21847. '3011': 1900, '3014': 8223, '3015': 8244, '3017': 7532, '3018': 7533,
  21848. '3019': 7534, '3075': 7590, '3076': 7591, '3079': 7594, '3080': 7595,
  21849. '3083': 7598, '3084': 7599, '3087': 7602, '3088': 7603, '3091': 7606,
  21850. '3092': 7607, '3095': 7610, '3096': 7611, '3099': 7614, '3100': 7615,
  21851. '3103': 7618, '3104': 7619, '3107': 8337, '3108': 8338, '3116': 1884,
  21852. '3119': 1885, '3120': 1885, '3123': 1886, '3124': 1886, '3127': 1887,
  21853. '3128': 1887, '3131': 1888, '3132': 1888, '3135': 1889, '3136': 1889,
  21854. '3139': 1890, '3140': 1890, '3143': 1891, '3144': 1891, '3147': 1892,
  21855. '3148': 1892, '3153': 580, '3154': 581, '3157': 584, '3158': 585, '3161': 588,
  21856. '3162': 589, '3165': 891, '3166': 892, '3169': 1274, '3170': 1275,
  21857. '3173': 1278, '3174': 1279, '3181': 7622, '3182': 7623, '3282': 11799,
  21858. '3316': 578, '3379': 42785, '3393': 1159, '3416': 8377
  21859. };
  21860. // Some characters, e.g. copyrightserif, mapped to the private use area and
  21861. // might not be displayed using standard fonts. Mapping/hacking well-known chars
  21862. // to the similar equivalents in the normal characters range.
  21863. function mapSpecialUnicodeValues(code) {
  21864. if (code >= 0xFFF0 && code <= 0xFFFF) { // Specials unicode block.
  21865. return 0;
  21866. }
  21867. switch (code) {
  21868. case 0xF8E9: // copyrightsans
  21869. case 0xF6D9: // copyrightserif
  21870. return 0x00A9; // copyright
  21871. case 0xF8E8: // registersans
  21872. case 0xF6DA: // registerserif
  21873. return 0x00AE; // registered
  21874. case 0xF8EA: // trademarksans
  21875. case 0xF6DB: // trademarkserif
  21876. return 0x2122; // trademark
  21877. default:
  21878. return code;
  21879. }
  21880. }
  21881. var UnicodeRanges = [
  21882. { 'begin': 0x0000, 'end': 0x007F }, // Basic Latin
  21883. { 'begin': 0x0080, 'end': 0x00FF }, // Latin-1 Supplement
  21884. { 'begin': 0x0100, 'end': 0x017F }, // Latin Extended-A
  21885. { 'begin': 0x0180, 'end': 0x024F }, // Latin Extended-B
  21886. { 'begin': 0x0250, 'end': 0x02AF }, // IPA Extensions
  21887. { 'begin': 0x02B0, 'end': 0x02FF }, // Spacing Modifier Letters
  21888. { 'begin': 0x0300, 'end': 0x036F }, // Combining Diacritical Marks
  21889. { 'begin': 0x0370, 'end': 0x03FF }, // Greek and Coptic
  21890. { 'begin': 0x2C80, 'end': 0x2CFF }, // Coptic
  21891. { 'begin': 0x0400, 'end': 0x04FF }, // Cyrillic
  21892. { 'begin': 0x0530, 'end': 0x058F }, // Armenian
  21893. { 'begin': 0x0590, 'end': 0x05FF }, // Hebrew
  21894. { 'begin': 0xA500, 'end': 0xA63F }, // Vai
  21895. { 'begin': 0x0600, 'end': 0x06FF }, // Arabic
  21896. { 'begin': 0x07C0, 'end': 0x07FF }, // NKo
  21897. { 'begin': 0x0900, 'end': 0x097F }, // Devanagari
  21898. { 'begin': 0x0980, 'end': 0x09FF }, // Bengali
  21899. { 'begin': 0x0A00, 'end': 0x0A7F }, // Gurmukhi
  21900. { 'begin': 0x0A80, 'end': 0x0AFF }, // Gujarati
  21901. { 'begin': 0x0B00, 'end': 0x0B7F }, // Oriya
  21902. { 'begin': 0x0B80, 'end': 0x0BFF }, // Tamil
  21903. { 'begin': 0x0C00, 'end': 0x0C7F }, // Telugu
  21904. { 'begin': 0x0C80, 'end': 0x0CFF }, // Kannada
  21905. { 'begin': 0x0D00, 'end': 0x0D7F }, // Malayalam
  21906. { 'begin': 0x0E00, 'end': 0x0E7F }, // Thai
  21907. { 'begin': 0x0E80, 'end': 0x0EFF }, // Lao
  21908. { 'begin': 0x10A0, 'end': 0x10FF }, // Georgian
  21909. { 'begin': 0x1B00, 'end': 0x1B7F }, // Balinese
  21910. { 'begin': 0x1100, 'end': 0x11FF }, // Hangul Jamo
  21911. { 'begin': 0x1E00, 'end': 0x1EFF }, // Latin Extended Additional
  21912. { 'begin': 0x1F00, 'end': 0x1FFF }, // Greek Extended
  21913. { 'begin': 0x2000, 'end': 0x206F }, // General Punctuation
  21914. { 'begin': 0x2070, 'end': 0x209F }, // Superscripts And Subscripts
  21915. { 'begin': 0x20A0, 'end': 0x20CF }, // Currency Symbol
  21916. { 'begin': 0x20D0, 'end': 0x20FF }, // Combining Diacritical Marks For Symbols
  21917. { 'begin': 0x2100, 'end': 0x214F }, // Letterlike Symbols
  21918. { 'begin': 0x2150, 'end': 0x218F }, // Number Forms
  21919. { 'begin': 0x2190, 'end': 0x21FF }, // Arrows
  21920. { 'begin': 0x2200, 'end': 0x22FF }, // Mathematical Operators
  21921. { 'begin': 0x2300, 'end': 0x23FF }, // Miscellaneous Technical
  21922. { 'begin': 0x2400, 'end': 0x243F }, // Control Pictures
  21923. { 'begin': 0x2440, 'end': 0x245F }, // Optical Character Recognition
  21924. { 'begin': 0x2460, 'end': 0x24FF }, // Enclosed Alphanumerics
  21925. { 'begin': 0x2500, 'end': 0x257F }, // Box Drawing
  21926. { 'begin': 0x2580, 'end': 0x259F }, // Block Elements
  21927. { 'begin': 0x25A0, 'end': 0x25FF }, // Geometric Shapes
  21928. { 'begin': 0x2600, 'end': 0x26FF }, // Miscellaneous Symbols
  21929. { 'begin': 0x2700, 'end': 0x27BF }, // Dingbats
  21930. { 'begin': 0x3000, 'end': 0x303F }, // CJK Symbols And Punctuation
  21931. { 'begin': 0x3040, 'end': 0x309F }, // Hiragana
  21932. { 'begin': 0x30A0, 'end': 0x30FF }, // Katakana
  21933. { 'begin': 0x3100, 'end': 0x312F }, // Bopomofo
  21934. { 'begin': 0x3130, 'end': 0x318F }, // Hangul Compatibility Jamo
  21935. { 'begin': 0xA840, 'end': 0xA87F }, // Phags-pa
  21936. { 'begin': 0x3200, 'end': 0x32FF }, // Enclosed CJK Letters And Months
  21937. { 'begin': 0x3300, 'end': 0x33FF }, // CJK Compatibility
  21938. { 'begin': 0xAC00, 'end': 0xD7AF }, // Hangul Syllables
  21939. { 'begin': 0xD800, 'end': 0xDFFF }, // Non-Plane 0 *
  21940. { 'begin': 0x10900, 'end': 0x1091F }, // Phoenicia
  21941. { 'begin': 0x4E00, 'end': 0x9FFF }, // CJK Unified Ideographs
  21942. { 'begin': 0xE000, 'end': 0xF8FF }, // Private Use Area (plane 0)
  21943. { 'begin': 0x31C0, 'end': 0x31EF }, // CJK Strokes
  21944. { 'begin': 0xFB00, 'end': 0xFB4F }, // Alphabetic Presentation Forms
  21945. { 'begin': 0xFB50, 'end': 0xFDFF }, // Arabic Presentation Forms-A
  21946. { 'begin': 0xFE20, 'end': 0xFE2F }, // Combining Half Marks
  21947. { 'begin': 0xFE10, 'end': 0xFE1F }, // Vertical Forms
  21948. { 'begin': 0xFE50, 'end': 0xFE6F }, // Small Form Variants
  21949. { 'begin': 0xFE70, 'end': 0xFEFF }, // Arabic Presentation Forms-B
  21950. { 'begin': 0xFF00, 'end': 0xFFEF }, // Halfwidth And Fullwidth Forms
  21951. { 'begin': 0xFFF0, 'end': 0xFFFF }, // Specials
  21952. { 'begin': 0x0F00, 'end': 0x0FFF }, // Tibetan
  21953. { 'begin': 0x0700, 'end': 0x074F }, // Syriac
  21954. { 'begin': 0x0780, 'end': 0x07BF }, // Thaana
  21955. { 'begin': 0x0D80, 'end': 0x0DFF }, // Sinhala
  21956. { 'begin': 0x1000, 'end': 0x109F }, // Myanmar
  21957. { 'begin': 0x1200, 'end': 0x137F }, // Ethiopic
  21958. { 'begin': 0x13A0, 'end': 0x13FF }, // Cherokee
  21959. { 'begin': 0x1400, 'end': 0x167F }, // Unified Canadian Aboriginal Syllabics
  21960. { 'begin': 0x1680, 'end': 0x169F }, // Ogham
  21961. { 'begin': 0x16A0, 'end': 0x16FF }, // Runic
  21962. { 'begin': 0x1780, 'end': 0x17FF }, // Khmer
  21963. { 'begin': 0x1800, 'end': 0x18AF }, // Mongolian
  21964. { 'begin': 0x2800, 'end': 0x28FF }, // Braille Patterns
  21965. { 'begin': 0xA000, 'end': 0xA48F }, // Yi Syllables
  21966. { 'begin': 0x1700, 'end': 0x171F }, // Tagalog
  21967. { 'begin': 0x10300, 'end': 0x1032F }, // Old Italic
  21968. { 'begin': 0x10330, 'end': 0x1034F }, // Gothic
  21969. { 'begin': 0x10400, 'end': 0x1044F }, // Deseret
  21970. { 'begin': 0x1D000, 'end': 0x1D0FF }, // Byzantine Musical Symbols
  21971. { 'begin': 0x1D400, 'end': 0x1D7FF }, // Mathematical Alphanumeric Symbols
  21972. { 'begin': 0xFF000, 'end': 0xFFFFD }, // Private Use (plane 15)
  21973. { 'begin': 0xFE00, 'end': 0xFE0F }, // Variation Selectors
  21974. { 'begin': 0xE0000, 'end': 0xE007F }, // Tags
  21975. { 'begin': 0x1900, 'end': 0x194F }, // Limbu
  21976. { 'begin': 0x1950, 'end': 0x197F }, // Tai Le
  21977. { 'begin': 0x1980, 'end': 0x19DF }, // New Tai Lue
  21978. { 'begin': 0x1A00, 'end': 0x1A1F }, // Buginese
  21979. { 'begin': 0x2C00, 'end': 0x2C5F }, // Glagolitic
  21980. { 'begin': 0x2D30, 'end': 0x2D7F }, // Tifinagh
  21981. { 'begin': 0x4DC0, 'end': 0x4DFF }, // Yijing Hexagram Symbols
  21982. { 'begin': 0xA800, 'end': 0xA82F }, // Syloti Nagri
  21983. { 'begin': 0x10000, 'end': 0x1007F }, // Linear B Syllabary
  21984. { 'begin': 0x10140, 'end': 0x1018F }, // Ancient Greek Numbers
  21985. { 'begin': 0x10380, 'end': 0x1039F }, // Ugaritic
  21986. { 'begin': 0x103A0, 'end': 0x103DF }, // Old Persian
  21987. { 'begin': 0x10450, 'end': 0x1047F }, // Shavian
  21988. { 'begin': 0x10480, 'end': 0x104AF }, // Osmanya
  21989. { 'begin': 0x10800, 'end': 0x1083F }, // Cypriot Syllabary
  21990. { 'begin': 0x10A00, 'end': 0x10A5F }, // Kharoshthi
  21991. { 'begin': 0x1D300, 'end': 0x1D35F }, // Tai Xuan Jing Symbols
  21992. { 'begin': 0x12000, 'end': 0x123FF }, // Cuneiform
  21993. { 'begin': 0x1D360, 'end': 0x1D37F }, // Counting Rod Numerals
  21994. { 'begin': 0x1B80, 'end': 0x1BBF }, // Sundanese
  21995. { 'begin': 0x1C00, 'end': 0x1C4F }, // Lepcha
  21996. { 'begin': 0x1C50, 'end': 0x1C7F }, // Ol Chiki
  21997. { 'begin': 0xA880, 'end': 0xA8DF }, // Saurashtra
  21998. { 'begin': 0xA900, 'end': 0xA92F }, // Kayah Li
  21999. { 'begin': 0xA930, 'end': 0xA95F }, // Rejang
  22000. { 'begin': 0xAA00, 'end': 0xAA5F }, // Cham
  22001. { 'begin': 0x10190, 'end': 0x101CF }, // Ancient Symbols
  22002. { 'begin': 0x101D0, 'end': 0x101FF }, // Phaistos Disc
  22003. { 'begin': 0x102A0, 'end': 0x102DF }, // Carian
  22004. { 'begin': 0x1F030, 'end': 0x1F09F } // Domino Tiles
  22005. ];
  22006. var MacStandardGlyphOrdering = [
  22007. '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl',
  22008. 'numbersign', 'dollar', 'percent', 'ampersand', 'quotesingle', 'parenleft',
  22009. 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash',
  22010. 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',
  22011. 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at',
  22012. 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
  22013. 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft',
  22014. 'backslash', 'bracketright', 'asciicircum', 'underscore', 'grave', 'a', 'b',
  22015. 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
  22016. 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright',
  22017. 'asciitilde', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde',
  22018. 'Odieresis', 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis',
  22019. 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',
  22020. 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve',
  22021. 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave', 'ucircumflex',
  22022. 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', 'bullet',
  22023. 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute',
  22024. 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal',
  22025. 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', 'product', 'pi',
  22026. 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash',
  22027. 'questiondown', 'exclamdown', 'logicalnot', 'radical', 'florin',
  22028. 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', 'ellipsis',
  22029. 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash',
  22030. 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft', 'quoteright',
  22031. 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', 'currency',
  22032. 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered',
  22033. 'quotesinglbase', 'quotedblbase', 'perthousand', 'Acircumflex',
  22034. 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex',
  22035. 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute',
  22036. 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron',
  22037. 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron',
  22038. 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar',
  22039. 'Eth', 'eth', 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply',
  22040. 'onesuperior', 'twosuperior', 'threesuperior', 'onehalf', 'onequarter',
  22041. 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla',
  22042. 'scedilla', 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat'];
  22043. function getUnicodeRangeFor(value) {
  22044. for (var i = 0, ii = UnicodeRanges.length; i < ii; i++) {
  22045. var range = UnicodeRanges[i];
  22046. if (value >= range.begin && value < range.end) {
  22047. return i;
  22048. }
  22049. }
  22050. return -1;
  22051. }
  22052. function isRTLRangeFor(value) {
  22053. var range = UnicodeRanges[13];
  22054. if (value >= range.begin && value < range.end) {
  22055. return true;
  22056. }
  22057. range = UnicodeRanges[11];
  22058. if (value >= range.begin && value < range.end) {
  22059. return true;
  22060. }
  22061. return false;
  22062. }
  22063. // The normalization table is obtained by filtering the Unicode characters
  22064. // database with <compat> entries.
  22065. var NormalizedUnicodes = {
  22066. '\u00A8': '\u0020\u0308',
  22067. '\u00AF': '\u0020\u0304',
  22068. '\u00B4': '\u0020\u0301',
  22069. '\u00B5': '\u03BC',
  22070. '\u00B8': '\u0020\u0327',
  22071. '\u0132': '\u0049\u004A',
  22072. '\u0133': '\u0069\u006A',
  22073. '\u013F': '\u004C\u00B7',
  22074. '\u0140': '\u006C\u00B7',
  22075. '\u0149': '\u02BC\u006E',
  22076. '\u017F': '\u0073',
  22077. '\u01C4': '\u0044\u017D',
  22078. '\u01C5': '\u0044\u017E',
  22079. '\u01C6': '\u0064\u017E',
  22080. '\u01C7': '\u004C\u004A',
  22081. '\u01C8': '\u004C\u006A',
  22082. '\u01C9': '\u006C\u006A',
  22083. '\u01CA': '\u004E\u004A',
  22084. '\u01CB': '\u004E\u006A',
  22085. '\u01CC': '\u006E\u006A',
  22086. '\u01F1': '\u0044\u005A',
  22087. '\u01F2': '\u0044\u007A',
  22088. '\u01F3': '\u0064\u007A',
  22089. '\u02D8': '\u0020\u0306',
  22090. '\u02D9': '\u0020\u0307',
  22091. '\u02DA': '\u0020\u030A',
  22092. '\u02DB': '\u0020\u0328',
  22093. '\u02DC': '\u0020\u0303',
  22094. '\u02DD': '\u0020\u030B',
  22095. '\u037A': '\u0020\u0345',
  22096. '\u0384': '\u0020\u0301',
  22097. '\u03D0': '\u03B2',
  22098. '\u03D1': '\u03B8',
  22099. '\u03D2': '\u03A5',
  22100. '\u03D5': '\u03C6',
  22101. '\u03D6': '\u03C0',
  22102. '\u03F0': '\u03BA',
  22103. '\u03F1': '\u03C1',
  22104. '\u03F2': '\u03C2',
  22105. '\u03F4': '\u0398',
  22106. '\u03F5': '\u03B5',
  22107. '\u03F9': '\u03A3',
  22108. '\u0587': '\u0565\u0582',
  22109. '\u0675': '\u0627\u0674',
  22110. '\u0676': '\u0648\u0674',
  22111. '\u0677': '\u06C7\u0674',
  22112. '\u0678': '\u064A\u0674',
  22113. '\u0E33': '\u0E4D\u0E32',
  22114. '\u0EB3': '\u0ECD\u0EB2',
  22115. '\u0EDC': '\u0EAB\u0E99',
  22116. '\u0EDD': '\u0EAB\u0EA1',
  22117. '\u0F77': '\u0FB2\u0F81',
  22118. '\u0F79': '\u0FB3\u0F81',
  22119. '\u1E9A': '\u0061\u02BE',
  22120. '\u1FBD': '\u0020\u0313',
  22121. '\u1FBF': '\u0020\u0313',
  22122. '\u1FC0': '\u0020\u0342',
  22123. '\u1FFE': '\u0020\u0314',
  22124. '\u2002': '\u0020',
  22125. '\u2003': '\u0020',
  22126. '\u2004': '\u0020',
  22127. '\u2005': '\u0020',
  22128. '\u2006': '\u0020',
  22129. '\u2008': '\u0020',
  22130. '\u2009': '\u0020',
  22131. '\u200A': '\u0020',
  22132. '\u2017': '\u0020\u0333',
  22133. '\u2024': '\u002E',
  22134. '\u2025': '\u002E\u002E',
  22135. '\u2026': '\u002E\u002E\u002E',
  22136. '\u2033': '\u2032\u2032',
  22137. '\u2034': '\u2032\u2032\u2032',
  22138. '\u2036': '\u2035\u2035',
  22139. '\u2037': '\u2035\u2035\u2035',
  22140. '\u203C': '\u0021\u0021',
  22141. '\u203E': '\u0020\u0305',
  22142. '\u2047': '\u003F\u003F',
  22143. '\u2048': '\u003F\u0021',
  22144. '\u2049': '\u0021\u003F',
  22145. '\u2057': '\u2032\u2032\u2032\u2032',
  22146. '\u205F': '\u0020',
  22147. '\u20A8': '\u0052\u0073',
  22148. '\u2100': '\u0061\u002F\u0063',
  22149. '\u2101': '\u0061\u002F\u0073',
  22150. '\u2103': '\u00B0\u0043',
  22151. '\u2105': '\u0063\u002F\u006F',
  22152. '\u2106': '\u0063\u002F\u0075',
  22153. '\u2107': '\u0190',
  22154. '\u2109': '\u00B0\u0046',
  22155. '\u2116': '\u004E\u006F',
  22156. '\u2121': '\u0054\u0045\u004C',
  22157. '\u2135': '\u05D0',
  22158. '\u2136': '\u05D1',
  22159. '\u2137': '\u05D2',
  22160. '\u2138': '\u05D3',
  22161. '\u213B': '\u0046\u0041\u0058',
  22162. '\u2160': '\u0049',
  22163. '\u2161': '\u0049\u0049',
  22164. '\u2162': '\u0049\u0049\u0049',
  22165. '\u2163': '\u0049\u0056',
  22166. '\u2164': '\u0056',
  22167. '\u2165': '\u0056\u0049',
  22168. '\u2166': '\u0056\u0049\u0049',
  22169. '\u2167': '\u0056\u0049\u0049\u0049',
  22170. '\u2168': '\u0049\u0058',
  22171. '\u2169': '\u0058',
  22172. '\u216A': '\u0058\u0049',
  22173. '\u216B': '\u0058\u0049\u0049',
  22174. '\u216C': '\u004C',
  22175. '\u216D': '\u0043',
  22176. '\u216E': '\u0044',
  22177. '\u216F': '\u004D',
  22178. '\u2170': '\u0069',
  22179. '\u2171': '\u0069\u0069',
  22180. '\u2172': '\u0069\u0069\u0069',
  22181. '\u2173': '\u0069\u0076',
  22182. '\u2174': '\u0076',
  22183. '\u2175': '\u0076\u0069',
  22184. '\u2176': '\u0076\u0069\u0069',
  22185. '\u2177': '\u0076\u0069\u0069\u0069',
  22186. '\u2178': '\u0069\u0078',
  22187. '\u2179': '\u0078',
  22188. '\u217A': '\u0078\u0069',
  22189. '\u217B': '\u0078\u0069\u0069',
  22190. '\u217C': '\u006C',
  22191. '\u217D': '\u0063',
  22192. '\u217E': '\u0064',
  22193. '\u217F': '\u006D',
  22194. '\u222C': '\u222B\u222B',
  22195. '\u222D': '\u222B\u222B\u222B',
  22196. '\u222F': '\u222E\u222E',
  22197. '\u2230': '\u222E\u222E\u222E',
  22198. '\u2474': '\u0028\u0031\u0029',
  22199. '\u2475': '\u0028\u0032\u0029',
  22200. '\u2476': '\u0028\u0033\u0029',
  22201. '\u2477': '\u0028\u0034\u0029',
  22202. '\u2478': '\u0028\u0035\u0029',
  22203. '\u2479': '\u0028\u0036\u0029',
  22204. '\u247A': '\u0028\u0037\u0029',
  22205. '\u247B': '\u0028\u0038\u0029',
  22206. '\u247C': '\u0028\u0039\u0029',
  22207. '\u247D': '\u0028\u0031\u0030\u0029',
  22208. '\u247E': '\u0028\u0031\u0031\u0029',
  22209. '\u247F': '\u0028\u0031\u0032\u0029',
  22210. '\u2480': '\u0028\u0031\u0033\u0029',
  22211. '\u2481': '\u0028\u0031\u0034\u0029',
  22212. '\u2482': '\u0028\u0031\u0035\u0029',
  22213. '\u2483': '\u0028\u0031\u0036\u0029',
  22214. '\u2484': '\u0028\u0031\u0037\u0029',
  22215. '\u2485': '\u0028\u0031\u0038\u0029',
  22216. '\u2486': '\u0028\u0031\u0039\u0029',
  22217. '\u2487': '\u0028\u0032\u0030\u0029',
  22218. '\u2488': '\u0031\u002E',
  22219. '\u2489': '\u0032\u002E',
  22220. '\u248A': '\u0033\u002E',
  22221. '\u248B': '\u0034\u002E',
  22222. '\u248C': '\u0035\u002E',
  22223. '\u248D': '\u0036\u002E',
  22224. '\u248E': '\u0037\u002E',
  22225. '\u248F': '\u0038\u002E',
  22226. '\u2490': '\u0039\u002E',
  22227. '\u2491': '\u0031\u0030\u002E',
  22228. '\u2492': '\u0031\u0031\u002E',
  22229. '\u2493': '\u0031\u0032\u002E',
  22230. '\u2494': '\u0031\u0033\u002E',
  22231. '\u2495': '\u0031\u0034\u002E',
  22232. '\u2496': '\u0031\u0035\u002E',
  22233. '\u2497': '\u0031\u0036\u002E',
  22234. '\u2498': '\u0031\u0037\u002E',
  22235. '\u2499': '\u0031\u0038\u002E',
  22236. '\u249A': '\u0031\u0039\u002E',
  22237. '\u249B': '\u0032\u0030\u002E',
  22238. '\u249C': '\u0028\u0061\u0029',
  22239. '\u249D': '\u0028\u0062\u0029',
  22240. '\u249E': '\u0028\u0063\u0029',
  22241. '\u249F': '\u0028\u0064\u0029',
  22242. '\u24A0': '\u0028\u0065\u0029',
  22243. '\u24A1': '\u0028\u0066\u0029',
  22244. '\u24A2': '\u0028\u0067\u0029',
  22245. '\u24A3': '\u0028\u0068\u0029',
  22246. '\u24A4': '\u0028\u0069\u0029',
  22247. '\u24A5': '\u0028\u006A\u0029',
  22248. '\u24A6': '\u0028\u006B\u0029',
  22249. '\u24A7': '\u0028\u006C\u0029',
  22250. '\u24A8': '\u0028\u006D\u0029',
  22251. '\u24A9': '\u0028\u006E\u0029',
  22252. '\u24AA': '\u0028\u006F\u0029',
  22253. '\u24AB': '\u0028\u0070\u0029',
  22254. '\u24AC': '\u0028\u0071\u0029',
  22255. '\u24AD': '\u0028\u0072\u0029',
  22256. '\u24AE': '\u0028\u0073\u0029',
  22257. '\u24AF': '\u0028\u0074\u0029',
  22258. '\u24B0': '\u0028\u0075\u0029',
  22259. '\u24B1': '\u0028\u0076\u0029',
  22260. '\u24B2': '\u0028\u0077\u0029',
  22261. '\u24B3': '\u0028\u0078\u0029',
  22262. '\u24B4': '\u0028\u0079\u0029',
  22263. '\u24B5': '\u0028\u007A\u0029',
  22264. '\u2A0C': '\u222B\u222B\u222B\u222B',
  22265. '\u2A74': '\u003A\u003A\u003D',
  22266. '\u2A75': '\u003D\u003D',
  22267. '\u2A76': '\u003D\u003D\u003D',
  22268. '\u2E9F': '\u6BCD',
  22269. '\u2EF3': '\u9F9F',
  22270. '\u2F00': '\u4E00',
  22271. '\u2F01': '\u4E28',
  22272. '\u2F02': '\u4E36',
  22273. '\u2F03': '\u4E3F',
  22274. '\u2F04': '\u4E59',
  22275. '\u2F05': '\u4E85',
  22276. '\u2F06': '\u4E8C',
  22277. '\u2F07': '\u4EA0',
  22278. '\u2F08': '\u4EBA',
  22279. '\u2F09': '\u513F',
  22280. '\u2F0A': '\u5165',
  22281. '\u2F0B': '\u516B',
  22282. '\u2F0C': '\u5182',
  22283. '\u2F0D': '\u5196',
  22284. '\u2F0E': '\u51AB',
  22285. '\u2F0F': '\u51E0',
  22286. '\u2F10': '\u51F5',
  22287. '\u2F11': '\u5200',
  22288. '\u2F12': '\u529B',
  22289. '\u2F13': '\u52F9',
  22290. '\u2F14': '\u5315',
  22291. '\u2F15': '\u531A',
  22292. '\u2F16': '\u5338',
  22293. '\u2F17': '\u5341',
  22294. '\u2F18': '\u535C',
  22295. '\u2F19': '\u5369',
  22296. '\u2F1A': '\u5382',
  22297. '\u2F1B': '\u53B6',
  22298. '\u2F1C': '\u53C8',
  22299. '\u2F1D': '\u53E3',
  22300. '\u2F1E': '\u56D7',
  22301. '\u2F1F': '\u571F',
  22302. '\u2F20': '\u58EB',
  22303. '\u2F21': '\u5902',
  22304. '\u2F22': '\u590A',
  22305. '\u2F23': '\u5915',
  22306. '\u2F24': '\u5927',
  22307. '\u2F25': '\u5973',
  22308. '\u2F26': '\u5B50',
  22309. '\u2F27': '\u5B80',
  22310. '\u2F28': '\u5BF8',
  22311. '\u2F29': '\u5C0F',
  22312. '\u2F2A': '\u5C22',
  22313. '\u2F2B': '\u5C38',
  22314. '\u2F2C': '\u5C6E',
  22315. '\u2F2D': '\u5C71',
  22316. '\u2F2E': '\u5DDB',
  22317. '\u2F2F': '\u5DE5',
  22318. '\u2F30': '\u5DF1',
  22319. '\u2F31': '\u5DFE',
  22320. '\u2F32': '\u5E72',
  22321. '\u2F33': '\u5E7A',
  22322. '\u2F34': '\u5E7F',
  22323. '\u2F35': '\u5EF4',
  22324. '\u2F36': '\u5EFE',
  22325. '\u2F37': '\u5F0B',
  22326. '\u2F38': '\u5F13',
  22327. '\u2F39': '\u5F50',
  22328. '\u2F3A': '\u5F61',
  22329. '\u2F3B': '\u5F73',
  22330. '\u2F3C': '\u5FC3',
  22331. '\u2F3D': '\u6208',
  22332. '\u2F3E': '\u6236',
  22333. '\u2F3F': '\u624B',
  22334. '\u2F40': '\u652F',
  22335. '\u2F41': '\u6534',
  22336. '\u2F42': '\u6587',
  22337. '\u2F43': '\u6597',
  22338. '\u2F44': '\u65A4',
  22339. '\u2F45': '\u65B9',
  22340. '\u2F46': '\u65E0',
  22341. '\u2F47': '\u65E5',
  22342. '\u2F48': '\u66F0',
  22343. '\u2F49': '\u6708',
  22344. '\u2F4A': '\u6728',
  22345. '\u2F4B': '\u6B20',
  22346. '\u2F4C': '\u6B62',
  22347. '\u2F4D': '\u6B79',
  22348. '\u2F4E': '\u6BB3',
  22349. '\u2F4F': '\u6BCB',
  22350. '\u2F50': '\u6BD4',
  22351. '\u2F51': '\u6BDB',
  22352. '\u2F52': '\u6C0F',
  22353. '\u2F53': '\u6C14',
  22354. '\u2F54': '\u6C34',
  22355. '\u2F55': '\u706B',
  22356. '\u2F56': '\u722A',
  22357. '\u2F57': '\u7236',
  22358. '\u2F58': '\u723B',
  22359. '\u2F59': '\u723F',
  22360. '\u2F5A': '\u7247',
  22361. '\u2F5B': '\u7259',
  22362. '\u2F5C': '\u725B',
  22363. '\u2F5D': '\u72AC',
  22364. '\u2F5E': '\u7384',
  22365. '\u2F5F': '\u7389',
  22366. '\u2F60': '\u74DC',
  22367. '\u2F61': '\u74E6',
  22368. '\u2F62': '\u7518',
  22369. '\u2F63': '\u751F',
  22370. '\u2F64': '\u7528',
  22371. '\u2F65': '\u7530',
  22372. '\u2F66': '\u758B',
  22373. '\u2F67': '\u7592',
  22374. '\u2F68': '\u7676',
  22375. '\u2F69': '\u767D',
  22376. '\u2F6A': '\u76AE',
  22377. '\u2F6B': '\u76BF',
  22378. '\u2F6C': '\u76EE',
  22379. '\u2F6D': '\u77DB',
  22380. '\u2F6E': '\u77E2',
  22381. '\u2F6F': '\u77F3',
  22382. '\u2F70': '\u793A',
  22383. '\u2F71': '\u79B8',
  22384. '\u2F72': '\u79BE',
  22385. '\u2F73': '\u7A74',
  22386. '\u2F74': '\u7ACB',
  22387. '\u2F75': '\u7AF9',
  22388. '\u2F76': '\u7C73',
  22389. '\u2F77': '\u7CF8',
  22390. '\u2F78': '\u7F36',
  22391. '\u2F79': '\u7F51',
  22392. '\u2F7A': '\u7F8A',
  22393. '\u2F7B': '\u7FBD',
  22394. '\u2F7C': '\u8001',
  22395. '\u2F7D': '\u800C',
  22396. '\u2F7E': '\u8012',
  22397. '\u2F7F': '\u8033',
  22398. '\u2F80': '\u807F',
  22399. '\u2F81': '\u8089',
  22400. '\u2F82': '\u81E3',
  22401. '\u2F83': '\u81EA',
  22402. '\u2F84': '\u81F3',
  22403. '\u2F85': '\u81FC',
  22404. '\u2F86': '\u820C',
  22405. '\u2F87': '\u821B',
  22406. '\u2F88': '\u821F',
  22407. '\u2F89': '\u826E',
  22408. '\u2F8A': '\u8272',
  22409. '\u2F8B': '\u8278',
  22410. '\u2F8C': '\u864D',
  22411. '\u2F8D': '\u866B',
  22412. '\u2F8E': '\u8840',
  22413. '\u2F8F': '\u884C',
  22414. '\u2F90': '\u8863',
  22415. '\u2F91': '\u897E',
  22416. '\u2F92': '\u898B',
  22417. '\u2F93': '\u89D2',
  22418. '\u2F94': '\u8A00',
  22419. '\u2F95': '\u8C37',
  22420. '\u2F96': '\u8C46',
  22421. '\u2F97': '\u8C55',
  22422. '\u2F98': '\u8C78',
  22423. '\u2F99': '\u8C9D',
  22424. '\u2F9A': '\u8D64',
  22425. '\u2F9B': '\u8D70',
  22426. '\u2F9C': '\u8DB3',
  22427. '\u2F9D': '\u8EAB',
  22428. '\u2F9E': '\u8ECA',
  22429. '\u2F9F': '\u8F9B',
  22430. '\u2FA0': '\u8FB0',
  22431. '\u2FA1': '\u8FB5',
  22432. '\u2FA2': '\u9091',
  22433. '\u2FA3': '\u9149',
  22434. '\u2FA4': '\u91C6',
  22435. '\u2FA5': '\u91CC',
  22436. '\u2FA6': '\u91D1',
  22437. '\u2FA7': '\u9577',
  22438. '\u2FA8': '\u9580',
  22439. '\u2FA9': '\u961C',
  22440. '\u2FAA': '\u96B6',
  22441. '\u2FAB': '\u96B9',
  22442. '\u2FAC': '\u96E8',
  22443. '\u2FAD': '\u9751',
  22444. '\u2FAE': '\u975E',
  22445. '\u2FAF': '\u9762',
  22446. '\u2FB0': '\u9769',
  22447. '\u2FB1': '\u97CB',
  22448. '\u2FB2': '\u97ED',
  22449. '\u2FB3': '\u97F3',
  22450. '\u2FB4': '\u9801',
  22451. '\u2FB5': '\u98A8',
  22452. '\u2FB6': '\u98DB',
  22453. '\u2FB7': '\u98DF',
  22454. '\u2FB8': '\u9996',
  22455. '\u2FB9': '\u9999',
  22456. '\u2FBA': '\u99AC',
  22457. '\u2FBB': '\u9AA8',
  22458. '\u2FBC': '\u9AD8',
  22459. '\u2FBD': '\u9ADF',
  22460. '\u2FBE': '\u9B25',
  22461. '\u2FBF': '\u9B2F',
  22462. '\u2FC0': '\u9B32',
  22463. '\u2FC1': '\u9B3C',
  22464. '\u2FC2': '\u9B5A',
  22465. '\u2FC3': '\u9CE5',
  22466. '\u2FC4': '\u9E75',
  22467. '\u2FC5': '\u9E7F',
  22468. '\u2FC6': '\u9EA5',
  22469. '\u2FC7': '\u9EBB',
  22470. '\u2FC8': '\u9EC3',
  22471. '\u2FC9': '\u9ECD',
  22472. '\u2FCA': '\u9ED1',
  22473. '\u2FCB': '\u9EF9',
  22474. '\u2FCC': '\u9EFD',
  22475. '\u2FCD': '\u9F0E',
  22476. '\u2FCE': '\u9F13',
  22477. '\u2FCF': '\u9F20',
  22478. '\u2FD0': '\u9F3B',
  22479. '\u2FD1': '\u9F4A',
  22480. '\u2FD2': '\u9F52',
  22481. '\u2FD3': '\u9F8D',
  22482. '\u2FD4': '\u9F9C',
  22483. '\u2FD5': '\u9FA0',
  22484. '\u3036': '\u3012',
  22485. '\u3038': '\u5341',
  22486. '\u3039': '\u5344',
  22487. '\u303A': '\u5345',
  22488. '\u309B': '\u0020\u3099',
  22489. '\u309C': '\u0020\u309A',
  22490. '\u3131': '\u1100',
  22491. '\u3132': '\u1101',
  22492. '\u3133': '\u11AA',
  22493. '\u3134': '\u1102',
  22494. '\u3135': '\u11AC',
  22495. '\u3136': '\u11AD',
  22496. '\u3137': '\u1103',
  22497. '\u3138': '\u1104',
  22498. '\u3139': '\u1105',
  22499. '\u313A': '\u11B0',
  22500. '\u313B': '\u11B1',
  22501. '\u313C': '\u11B2',
  22502. '\u313D': '\u11B3',
  22503. '\u313E': '\u11B4',
  22504. '\u313F': '\u11B5',
  22505. '\u3140': '\u111A',
  22506. '\u3141': '\u1106',
  22507. '\u3142': '\u1107',
  22508. '\u3143': '\u1108',
  22509. '\u3144': '\u1121',
  22510. '\u3145': '\u1109',
  22511. '\u3146': '\u110A',
  22512. '\u3147': '\u110B',
  22513. '\u3148': '\u110C',
  22514. '\u3149': '\u110D',
  22515. '\u314A': '\u110E',
  22516. '\u314B': '\u110F',
  22517. '\u314C': '\u1110',
  22518. '\u314D': '\u1111',
  22519. '\u314E': '\u1112',
  22520. '\u314F': '\u1161',
  22521. '\u3150': '\u1162',
  22522. '\u3151': '\u1163',
  22523. '\u3152': '\u1164',
  22524. '\u3153': '\u1165',
  22525. '\u3154': '\u1166',
  22526. '\u3155': '\u1167',
  22527. '\u3156': '\u1168',
  22528. '\u3157': '\u1169',
  22529. '\u3158': '\u116A',
  22530. '\u3159': '\u116B',
  22531. '\u315A': '\u116C',
  22532. '\u315B': '\u116D',
  22533. '\u315C': '\u116E',
  22534. '\u315D': '\u116F',
  22535. '\u315E': '\u1170',
  22536. '\u315F': '\u1171',
  22537. '\u3160': '\u1172',
  22538. '\u3161': '\u1173',
  22539. '\u3162': '\u1174',
  22540. '\u3163': '\u1175',
  22541. '\u3164': '\u1160',
  22542. '\u3165': '\u1114',
  22543. '\u3166': '\u1115',
  22544. '\u3167': '\u11C7',
  22545. '\u3168': '\u11C8',
  22546. '\u3169': '\u11CC',
  22547. '\u316A': '\u11CE',
  22548. '\u316B': '\u11D3',
  22549. '\u316C': '\u11D7',
  22550. '\u316D': '\u11D9',
  22551. '\u316E': '\u111C',
  22552. '\u316F': '\u11DD',
  22553. '\u3170': '\u11DF',
  22554. '\u3171': '\u111D',
  22555. '\u3172': '\u111E',
  22556. '\u3173': '\u1120',
  22557. '\u3174': '\u1122',
  22558. '\u3175': '\u1123',
  22559. '\u3176': '\u1127',
  22560. '\u3177': '\u1129',
  22561. '\u3178': '\u112B',
  22562. '\u3179': '\u112C',
  22563. '\u317A': '\u112D',
  22564. '\u317B': '\u112E',
  22565. '\u317C': '\u112F',
  22566. '\u317D': '\u1132',
  22567. '\u317E': '\u1136',
  22568. '\u317F': '\u1140',
  22569. '\u3180': '\u1147',
  22570. '\u3181': '\u114C',
  22571. '\u3182': '\u11F1',
  22572. '\u3183': '\u11F2',
  22573. '\u3184': '\u1157',
  22574. '\u3185': '\u1158',
  22575. '\u3186': '\u1159',
  22576. '\u3187': '\u1184',
  22577. '\u3188': '\u1185',
  22578. '\u3189': '\u1188',
  22579. '\u318A': '\u1191',
  22580. '\u318B': '\u1192',
  22581. '\u318C': '\u1194',
  22582. '\u318D': '\u119E',
  22583. '\u318E': '\u11A1',
  22584. '\u3200': '\u0028\u1100\u0029',
  22585. '\u3201': '\u0028\u1102\u0029',
  22586. '\u3202': '\u0028\u1103\u0029',
  22587. '\u3203': '\u0028\u1105\u0029',
  22588. '\u3204': '\u0028\u1106\u0029',
  22589. '\u3205': '\u0028\u1107\u0029',
  22590. '\u3206': '\u0028\u1109\u0029',
  22591. '\u3207': '\u0028\u110B\u0029',
  22592. '\u3208': '\u0028\u110C\u0029',
  22593. '\u3209': '\u0028\u110E\u0029',
  22594. '\u320A': '\u0028\u110F\u0029',
  22595. '\u320B': '\u0028\u1110\u0029',
  22596. '\u320C': '\u0028\u1111\u0029',
  22597. '\u320D': '\u0028\u1112\u0029',
  22598. '\u320E': '\u0028\u1100\u1161\u0029',
  22599. '\u320F': '\u0028\u1102\u1161\u0029',
  22600. '\u3210': '\u0028\u1103\u1161\u0029',
  22601. '\u3211': '\u0028\u1105\u1161\u0029',
  22602. '\u3212': '\u0028\u1106\u1161\u0029',
  22603. '\u3213': '\u0028\u1107\u1161\u0029',
  22604. '\u3214': '\u0028\u1109\u1161\u0029',
  22605. '\u3215': '\u0028\u110B\u1161\u0029',
  22606. '\u3216': '\u0028\u110C\u1161\u0029',
  22607. '\u3217': '\u0028\u110E\u1161\u0029',
  22608. '\u3218': '\u0028\u110F\u1161\u0029',
  22609. '\u3219': '\u0028\u1110\u1161\u0029',
  22610. '\u321A': '\u0028\u1111\u1161\u0029',
  22611. '\u321B': '\u0028\u1112\u1161\u0029',
  22612. '\u321C': '\u0028\u110C\u116E\u0029',
  22613. '\u321D': '\u0028\u110B\u1169\u110C\u1165\u11AB\u0029',
  22614. '\u321E': '\u0028\u110B\u1169\u1112\u116E\u0029',
  22615. '\u3220': '\u0028\u4E00\u0029',
  22616. '\u3221': '\u0028\u4E8C\u0029',
  22617. '\u3222': '\u0028\u4E09\u0029',
  22618. '\u3223': '\u0028\u56DB\u0029',
  22619. '\u3224': '\u0028\u4E94\u0029',
  22620. '\u3225': '\u0028\u516D\u0029',
  22621. '\u3226': '\u0028\u4E03\u0029',
  22622. '\u3227': '\u0028\u516B\u0029',
  22623. '\u3228': '\u0028\u4E5D\u0029',
  22624. '\u3229': '\u0028\u5341\u0029',
  22625. '\u322A': '\u0028\u6708\u0029',
  22626. '\u322B': '\u0028\u706B\u0029',
  22627. '\u322C': '\u0028\u6C34\u0029',
  22628. '\u322D': '\u0028\u6728\u0029',
  22629. '\u322E': '\u0028\u91D1\u0029',
  22630. '\u322F': '\u0028\u571F\u0029',
  22631. '\u3230': '\u0028\u65E5\u0029',
  22632. '\u3231': '\u0028\u682A\u0029',
  22633. '\u3232': '\u0028\u6709\u0029',
  22634. '\u3233': '\u0028\u793E\u0029',
  22635. '\u3234': '\u0028\u540D\u0029',
  22636. '\u3235': '\u0028\u7279\u0029',
  22637. '\u3236': '\u0028\u8CA1\u0029',
  22638. '\u3237': '\u0028\u795D\u0029',
  22639. '\u3238': '\u0028\u52B4\u0029',
  22640. '\u3239': '\u0028\u4EE3\u0029',
  22641. '\u323A': '\u0028\u547C\u0029',
  22642. '\u323B': '\u0028\u5B66\u0029',
  22643. '\u323C': '\u0028\u76E3\u0029',
  22644. '\u323D': '\u0028\u4F01\u0029',
  22645. '\u323E': '\u0028\u8CC7\u0029',
  22646. '\u323F': '\u0028\u5354\u0029',
  22647. '\u3240': '\u0028\u796D\u0029',
  22648. '\u3241': '\u0028\u4F11\u0029',
  22649. '\u3242': '\u0028\u81EA\u0029',
  22650. '\u3243': '\u0028\u81F3\u0029',
  22651. '\u32C0': '\u0031\u6708',
  22652. '\u32C1': '\u0032\u6708',
  22653. '\u32C2': '\u0033\u6708',
  22654. '\u32C3': '\u0034\u6708',
  22655. '\u32C4': '\u0035\u6708',
  22656. '\u32C5': '\u0036\u6708',
  22657. '\u32C6': '\u0037\u6708',
  22658. '\u32C7': '\u0038\u6708',
  22659. '\u32C8': '\u0039\u6708',
  22660. '\u32C9': '\u0031\u0030\u6708',
  22661. '\u32CA': '\u0031\u0031\u6708',
  22662. '\u32CB': '\u0031\u0032\u6708',
  22663. '\u3358': '\u0030\u70B9',
  22664. '\u3359': '\u0031\u70B9',
  22665. '\u335A': '\u0032\u70B9',
  22666. '\u335B': '\u0033\u70B9',
  22667. '\u335C': '\u0034\u70B9',
  22668. '\u335D': '\u0035\u70B9',
  22669. '\u335E': '\u0036\u70B9',
  22670. '\u335F': '\u0037\u70B9',
  22671. '\u3360': '\u0038\u70B9',
  22672. '\u3361': '\u0039\u70B9',
  22673. '\u3362': '\u0031\u0030\u70B9',
  22674. '\u3363': '\u0031\u0031\u70B9',
  22675. '\u3364': '\u0031\u0032\u70B9',
  22676. '\u3365': '\u0031\u0033\u70B9',
  22677. '\u3366': '\u0031\u0034\u70B9',
  22678. '\u3367': '\u0031\u0035\u70B9',
  22679. '\u3368': '\u0031\u0036\u70B9',
  22680. '\u3369': '\u0031\u0037\u70B9',
  22681. '\u336A': '\u0031\u0038\u70B9',
  22682. '\u336B': '\u0031\u0039\u70B9',
  22683. '\u336C': '\u0032\u0030\u70B9',
  22684. '\u336D': '\u0032\u0031\u70B9',
  22685. '\u336E': '\u0032\u0032\u70B9',
  22686. '\u336F': '\u0032\u0033\u70B9',
  22687. '\u3370': '\u0032\u0034\u70B9',
  22688. '\u33E0': '\u0031\u65E5',
  22689. '\u33E1': '\u0032\u65E5',
  22690. '\u33E2': '\u0033\u65E5',
  22691. '\u33E3': '\u0034\u65E5',
  22692. '\u33E4': '\u0035\u65E5',
  22693. '\u33E5': '\u0036\u65E5',
  22694. '\u33E6': '\u0037\u65E5',
  22695. '\u33E7': '\u0038\u65E5',
  22696. '\u33E8': '\u0039\u65E5',
  22697. '\u33E9': '\u0031\u0030\u65E5',
  22698. '\u33EA': '\u0031\u0031\u65E5',
  22699. '\u33EB': '\u0031\u0032\u65E5',
  22700. '\u33EC': '\u0031\u0033\u65E5',
  22701. '\u33ED': '\u0031\u0034\u65E5',
  22702. '\u33EE': '\u0031\u0035\u65E5',
  22703. '\u33EF': '\u0031\u0036\u65E5',
  22704. '\u33F0': '\u0031\u0037\u65E5',
  22705. '\u33F1': '\u0031\u0038\u65E5',
  22706. '\u33F2': '\u0031\u0039\u65E5',
  22707. '\u33F3': '\u0032\u0030\u65E5',
  22708. '\u33F4': '\u0032\u0031\u65E5',
  22709. '\u33F5': '\u0032\u0032\u65E5',
  22710. '\u33F6': '\u0032\u0033\u65E5',
  22711. '\u33F7': '\u0032\u0034\u65E5',
  22712. '\u33F8': '\u0032\u0035\u65E5',
  22713. '\u33F9': '\u0032\u0036\u65E5',
  22714. '\u33FA': '\u0032\u0037\u65E5',
  22715. '\u33FB': '\u0032\u0038\u65E5',
  22716. '\u33FC': '\u0032\u0039\u65E5',
  22717. '\u33FD': '\u0033\u0030\u65E5',
  22718. '\u33FE': '\u0033\u0031\u65E5',
  22719. '\uFB00': '\u0066\u0066',
  22720. '\uFB01': '\u0066\u0069',
  22721. '\uFB02': '\u0066\u006C',
  22722. '\uFB03': '\u0066\u0066\u0069',
  22723. '\uFB04': '\u0066\u0066\u006C',
  22724. '\uFB05': '\u017F\u0074',
  22725. '\uFB06': '\u0073\u0074',
  22726. '\uFB13': '\u0574\u0576',
  22727. '\uFB14': '\u0574\u0565',
  22728. '\uFB15': '\u0574\u056B',
  22729. '\uFB16': '\u057E\u0576',
  22730. '\uFB17': '\u0574\u056D',
  22731. '\uFB4F': '\u05D0\u05DC',
  22732. '\uFB50': '\u0671',
  22733. '\uFB51': '\u0671',
  22734. '\uFB52': '\u067B',
  22735. '\uFB53': '\u067B',
  22736. '\uFB54': '\u067B',
  22737. '\uFB55': '\u067B',
  22738. '\uFB56': '\u067E',
  22739. '\uFB57': '\u067E',
  22740. '\uFB58': '\u067E',
  22741. '\uFB59': '\u067E',
  22742. '\uFB5A': '\u0680',
  22743. '\uFB5B': '\u0680',
  22744. '\uFB5C': '\u0680',
  22745. '\uFB5D': '\u0680',
  22746. '\uFB5E': '\u067A',
  22747. '\uFB5F': '\u067A',
  22748. '\uFB60': '\u067A',
  22749. '\uFB61': '\u067A',
  22750. '\uFB62': '\u067F',
  22751. '\uFB63': '\u067F',
  22752. '\uFB64': '\u067F',
  22753. '\uFB65': '\u067F',
  22754. '\uFB66': '\u0679',
  22755. '\uFB67': '\u0679',
  22756. '\uFB68': '\u0679',
  22757. '\uFB69': '\u0679',
  22758. '\uFB6A': '\u06A4',
  22759. '\uFB6B': '\u06A4',
  22760. '\uFB6C': '\u06A4',
  22761. '\uFB6D': '\u06A4',
  22762. '\uFB6E': '\u06A6',
  22763. '\uFB6F': '\u06A6',
  22764. '\uFB70': '\u06A6',
  22765. '\uFB71': '\u06A6',
  22766. '\uFB72': '\u0684',
  22767. '\uFB73': '\u0684',
  22768. '\uFB74': '\u0684',
  22769. '\uFB75': '\u0684',
  22770. '\uFB76': '\u0683',
  22771. '\uFB77': '\u0683',
  22772. '\uFB78': '\u0683',
  22773. '\uFB79': '\u0683',
  22774. '\uFB7A': '\u0686',
  22775. '\uFB7B': '\u0686',
  22776. '\uFB7C': '\u0686',
  22777. '\uFB7D': '\u0686',
  22778. '\uFB7E': '\u0687',
  22779. '\uFB7F': '\u0687',
  22780. '\uFB80': '\u0687',
  22781. '\uFB81': '\u0687',
  22782. '\uFB82': '\u068D',
  22783. '\uFB83': '\u068D',
  22784. '\uFB84': '\u068C',
  22785. '\uFB85': '\u068C',
  22786. '\uFB86': '\u068E',
  22787. '\uFB87': '\u068E',
  22788. '\uFB88': '\u0688',
  22789. '\uFB89': '\u0688',
  22790. '\uFB8A': '\u0698',
  22791. '\uFB8B': '\u0698',
  22792. '\uFB8C': '\u0691',
  22793. '\uFB8D': '\u0691',
  22794. '\uFB8E': '\u06A9',
  22795. '\uFB8F': '\u06A9',
  22796. '\uFB90': '\u06A9',
  22797. '\uFB91': '\u06A9',
  22798. '\uFB92': '\u06AF',
  22799. '\uFB93': '\u06AF',
  22800. '\uFB94': '\u06AF',
  22801. '\uFB95': '\u06AF',
  22802. '\uFB96': '\u06B3',
  22803. '\uFB97': '\u06B3',
  22804. '\uFB98': '\u06B3',
  22805. '\uFB99': '\u06B3',
  22806. '\uFB9A': '\u06B1',
  22807. '\uFB9B': '\u06B1',
  22808. '\uFB9C': '\u06B1',
  22809. '\uFB9D': '\u06B1',
  22810. '\uFB9E': '\u06BA',
  22811. '\uFB9F': '\u06BA',
  22812. '\uFBA0': '\u06BB',
  22813. '\uFBA1': '\u06BB',
  22814. '\uFBA2': '\u06BB',
  22815. '\uFBA3': '\u06BB',
  22816. '\uFBA4': '\u06C0',
  22817. '\uFBA5': '\u06C0',
  22818. '\uFBA6': '\u06C1',
  22819. '\uFBA7': '\u06C1',
  22820. '\uFBA8': '\u06C1',
  22821. '\uFBA9': '\u06C1',
  22822. '\uFBAA': '\u06BE',
  22823. '\uFBAB': '\u06BE',
  22824. '\uFBAC': '\u06BE',
  22825. '\uFBAD': '\u06BE',
  22826. '\uFBAE': '\u06D2',
  22827. '\uFBAF': '\u06D2',
  22828. '\uFBB0': '\u06D3',
  22829. '\uFBB1': '\u06D3',
  22830. '\uFBD3': '\u06AD',
  22831. '\uFBD4': '\u06AD',
  22832. '\uFBD5': '\u06AD',
  22833. '\uFBD6': '\u06AD',
  22834. '\uFBD7': '\u06C7',
  22835. '\uFBD8': '\u06C7',
  22836. '\uFBD9': '\u06C6',
  22837. '\uFBDA': '\u06C6',
  22838. '\uFBDB': '\u06C8',
  22839. '\uFBDC': '\u06C8',
  22840. '\uFBDD': '\u0677',
  22841. '\uFBDE': '\u06CB',
  22842. '\uFBDF': '\u06CB',
  22843. '\uFBE0': '\u06C5',
  22844. '\uFBE1': '\u06C5',
  22845. '\uFBE2': '\u06C9',
  22846. '\uFBE3': '\u06C9',
  22847. '\uFBE4': '\u06D0',
  22848. '\uFBE5': '\u06D0',
  22849. '\uFBE6': '\u06D0',
  22850. '\uFBE7': '\u06D0',
  22851. '\uFBE8': '\u0649',
  22852. '\uFBE9': '\u0649',
  22853. '\uFBEA': '\u0626\u0627',
  22854. '\uFBEB': '\u0626\u0627',
  22855. '\uFBEC': '\u0626\u06D5',
  22856. '\uFBED': '\u0626\u06D5',
  22857. '\uFBEE': '\u0626\u0648',
  22858. '\uFBEF': '\u0626\u0648',
  22859. '\uFBF0': '\u0626\u06C7',
  22860. '\uFBF1': '\u0626\u06C7',
  22861. '\uFBF2': '\u0626\u06C6',
  22862. '\uFBF3': '\u0626\u06C6',
  22863. '\uFBF4': '\u0626\u06C8',
  22864. '\uFBF5': '\u0626\u06C8',
  22865. '\uFBF6': '\u0626\u06D0',
  22866. '\uFBF7': '\u0626\u06D0',
  22867. '\uFBF8': '\u0626\u06D0',
  22868. '\uFBF9': '\u0626\u0649',
  22869. '\uFBFA': '\u0626\u0649',
  22870. '\uFBFB': '\u0626\u0649',
  22871. '\uFBFC': '\u06CC',
  22872. '\uFBFD': '\u06CC',
  22873. '\uFBFE': '\u06CC',
  22874. '\uFBFF': '\u06CC',
  22875. '\uFC00': '\u0626\u062C',
  22876. '\uFC01': '\u0626\u062D',
  22877. '\uFC02': '\u0626\u0645',
  22878. '\uFC03': '\u0626\u0649',
  22879. '\uFC04': '\u0626\u064A',
  22880. '\uFC05': '\u0628\u062C',
  22881. '\uFC06': '\u0628\u062D',
  22882. '\uFC07': '\u0628\u062E',
  22883. '\uFC08': '\u0628\u0645',
  22884. '\uFC09': '\u0628\u0649',
  22885. '\uFC0A': '\u0628\u064A',
  22886. '\uFC0B': '\u062A\u062C',
  22887. '\uFC0C': '\u062A\u062D',
  22888. '\uFC0D': '\u062A\u062E',
  22889. '\uFC0E': '\u062A\u0645',
  22890. '\uFC0F': '\u062A\u0649',
  22891. '\uFC10': '\u062A\u064A',
  22892. '\uFC11': '\u062B\u062C',
  22893. '\uFC12': '\u062B\u0645',
  22894. '\uFC13': '\u062B\u0649',
  22895. '\uFC14': '\u062B\u064A',
  22896. '\uFC15': '\u062C\u062D',
  22897. '\uFC16': '\u062C\u0645',
  22898. '\uFC17': '\u062D\u062C',
  22899. '\uFC18': '\u062D\u0645',
  22900. '\uFC19': '\u062E\u062C',
  22901. '\uFC1A': '\u062E\u062D',
  22902. '\uFC1B': '\u062E\u0645',
  22903. '\uFC1C': '\u0633\u062C',
  22904. '\uFC1D': '\u0633\u062D',
  22905. '\uFC1E': '\u0633\u062E',
  22906. '\uFC1F': '\u0633\u0645',
  22907. '\uFC20': '\u0635\u062D',
  22908. '\uFC21': '\u0635\u0645',
  22909. '\uFC22': '\u0636\u062C',
  22910. '\uFC23': '\u0636\u062D',
  22911. '\uFC24': '\u0636\u062E',
  22912. '\uFC25': '\u0636\u0645',
  22913. '\uFC26': '\u0637\u062D',
  22914. '\uFC27': '\u0637\u0645',
  22915. '\uFC28': '\u0638\u0645',
  22916. '\uFC29': '\u0639\u062C',
  22917. '\uFC2A': '\u0639\u0645',
  22918. '\uFC2B': '\u063A\u062C',
  22919. '\uFC2C': '\u063A\u0645',
  22920. '\uFC2D': '\u0641\u062C',
  22921. '\uFC2E': '\u0641\u062D',
  22922. '\uFC2F': '\u0641\u062E',
  22923. '\uFC30': '\u0641\u0645',
  22924. '\uFC31': '\u0641\u0649',
  22925. '\uFC32': '\u0641\u064A',
  22926. '\uFC33': '\u0642\u062D',
  22927. '\uFC34': '\u0642\u0645',
  22928. '\uFC35': '\u0642\u0649',
  22929. '\uFC36': '\u0642\u064A',
  22930. '\uFC37': '\u0643\u0627',
  22931. '\uFC38': '\u0643\u062C',
  22932. '\uFC39': '\u0643\u062D',
  22933. '\uFC3A': '\u0643\u062E',
  22934. '\uFC3B': '\u0643\u0644',
  22935. '\uFC3C': '\u0643\u0645',
  22936. '\uFC3D': '\u0643\u0649',
  22937. '\uFC3E': '\u0643\u064A',
  22938. '\uFC3F': '\u0644\u062C',
  22939. '\uFC40': '\u0644\u062D',
  22940. '\uFC41': '\u0644\u062E',
  22941. '\uFC42': '\u0644\u0645',
  22942. '\uFC43': '\u0644\u0649',
  22943. '\uFC44': '\u0644\u064A',
  22944. '\uFC45': '\u0645\u062C',
  22945. '\uFC46': '\u0645\u062D',
  22946. '\uFC47': '\u0645\u062E',
  22947. '\uFC48': '\u0645\u0645',
  22948. '\uFC49': '\u0645\u0649',
  22949. '\uFC4A': '\u0645\u064A',
  22950. '\uFC4B': '\u0646\u062C',
  22951. '\uFC4C': '\u0646\u062D',
  22952. '\uFC4D': '\u0646\u062E',
  22953. '\uFC4E': '\u0646\u0645',
  22954. '\uFC4F': '\u0646\u0649',
  22955. '\uFC50': '\u0646\u064A',
  22956. '\uFC51': '\u0647\u062C',
  22957. '\uFC52': '\u0647\u0645',
  22958. '\uFC53': '\u0647\u0649',
  22959. '\uFC54': '\u0647\u064A',
  22960. '\uFC55': '\u064A\u062C',
  22961. '\uFC56': '\u064A\u062D',
  22962. '\uFC57': '\u064A\u062E',
  22963. '\uFC58': '\u064A\u0645',
  22964. '\uFC59': '\u064A\u0649',
  22965. '\uFC5A': '\u064A\u064A',
  22966. '\uFC5B': '\u0630\u0670',
  22967. '\uFC5C': '\u0631\u0670',
  22968. '\uFC5D': '\u0649\u0670',
  22969. '\uFC5E': '\u0020\u064C\u0651',
  22970. '\uFC5F': '\u0020\u064D\u0651',
  22971. '\uFC60': '\u0020\u064E\u0651',
  22972. '\uFC61': '\u0020\u064F\u0651',
  22973. '\uFC62': '\u0020\u0650\u0651',
  22974. '\uFC63': '\u0020\u0651\u0670',
  22975. '\uFC64': '\u0626\u0631',
  22976. '\uFC65': '\u0626\u0632',
  22977. '\uFC66': '\u0626\u0645',
  22978. '\uFC67': '\u0626\u0646',
  22979. '\uFC68': '\u0626\u0649',
  22980. '\uFC69': '\u0626\u064A',
  22981. '\uFC6A': '\u0628\u0631',
  22982. '\uFC6B': '\u0628\u0632',
  22983. '\uFC6C': '\u0628\u0645',
  22984. '\uFC6D': '\u0628\u0646',
  22985. '\uFC6E': '\u0628\u0649',
  22986. '\uFC6F': '\u0628\u064A',
  22987. '\uFC70': '\u062A\u0631',
  22988. '\uFC71': '\u062A\u0632',
  22989. '\uFC72': '\u062A\u0645',
  22990. '\uFC73': '\u062A\u0646',
  22991. '\uFC74': '\u062A\u0649',
  22992. '\uFC75': '\u062A\u064A',
  22993. '\uFC76': '\u062B\u0631',
  22994. '\uFC77': '\u062B\u0632',
  22995. '\uFC78': '\u062B\u0645',
  22996. '\uFC79': '\u062B\u0646',
  22997. '\uFC7A': '\u062B\u0649',
  22998. '\uFC7B': '\u062B\u064A',
  22999. '\uFC7C': '\u0641\u0649',
  23000. '\uFC7D': '\u0641\u064A',
  23001. '\uFC7E': '\u0642\u0649',
  23002. '\uFC7F': '\u0642\u064A',
  23003. '\uFC80': '\u0643\u0627',
  23004. '\uFC81': '\u0643\u0644',
  23005. '\uFC82': '\u0643\u0645',
  23006. '\uFC83': '\u0643\u0649',
  23007. '\uFC84': '\u0643\u064A',
  23008. '\uFC85': '\u0644\u0645',
  23009. '\uFC86': '\u0644\u0649',
  23010. '\uFC87': '\u0644\u064A',
  23011. '\uFC88': '\u0645\u0627',
  23012. '\uFC89': '\u0645\u0645',
  23013. '\uFC8A': '\u0646\u0631',
  23014. '\uFC8B': '\u0646\u0632',
  23015. '\uFC8C': '\u0646\u0645',
  23016. '\uFC8D': '\u0646\u0646',
  23017. '\uFC8E': '\u0646\u0649',
  23018. '\uFC8F': '\u0646\u064A',
  23019. '\uFC90': '\u0649\u0670',
  23020. '\uFC91': '\u064A\u0631',
  23021. '\uFC92': '\u064A\u0632',
  23022. '\uFC93': '\u064A\u0645',
  23023. '\uFC94': '\u064A\u0646',
  23024. '\uFC95': '\u064A\u0649',
  23025. '\uFC96': '\u064A\u064A',
  23026. '\uFC97': '\u0626\u062C',
  23027. '\uFC98': '\u0626\u062D',
  23028. '\uFC99': '\u0626\u062E',
  23029. '\uFC9A': '\u0626\u0645',
  23030. '\uFC9B': '\u0626\u0647',
  23031. '\uFC9C': '\u0628\u062C',
  23032. '\uFC9D': '\u0628\u062D',
  23033. '\uFC9E': '\u0628\u062E',
  23034. '\uFC9F': '\u0628\u0645',
  23035. '\uFCA0': '\u0628\u0647',
  23036. '\uFCA1': '\u062A\u062C',
  23037. '\uFCA2': '\u062A\u062D',
  23038. '\uFCA3': '\u062A\u062E',
  23039. '\uFCA4': '\u062A\u0645',
  23040. '\uFCA5': '\u062A\u0647',
  23041. '\uFCA6': '\u062B\u0645',
  23042. '\uFCA7': '\u062C\u062D',
  23043. '\uFCA8': '\u062C\u0645',
  23044. '\uFCA9': '\u062D\u062C',
  23045. '\uFCAA': '\u062D\u0645',
  23046. '\uFCAB': '\u062E\u062C',
  23047. '\uFCAC': '\u062E\u0645',
  23048. '\uFCAD': '\u0633\u062C',
  23049. '\uFCAE': '\u0633\u062D',
  23050. '\uFCAF': '\u0633\u062E',
  23051. '\uFCB0': '\u0633\u0645',
  23052. '\uFCB1': '\u0635\u062D',
  23053. '\uFCB2': '\u0635\u062E',
  23054. '\uFCB3': '\u0635\u0645',
  23055. '\uFCB4': '\u0636\u062C',
  23056. '\uFCB5': '\u0636\u062D',
  23057. '\uFCB6': '\u0636\u062E',
  23058. '\uFCB7': '\u0636\u0645',
  23059. '\uFCB8': '\u0637\u062D',
  23060. '\uFCB9': '\u0638\u0645',
  23061. '\uFCBA': '\u0639\u062C',
  23062. '\uFCBB': '\u0639\u0645',
  23063. '\uFCBC': '\u063A\u062C',
  23064. '\uFCBD': '\u063A\u0645',
  23065. '\uFCBE': '\u0641\u062C',
  23066. '\uFCBF': '\u0641\u062D',
  23067. '\uFCC0': '\u0641\u062E',
  23068. '\uFCC1': '\u0641\u0645',
  23069. '\uFCC2': '\u0642\u062D',
  23070. '\uFCC3': '\u0642\u0645',
  23071. '\uFCC4': '\u0643\u062C',
  23072. '\uFCC5': '\u0643\u062D',
  23073. '\uFCC6': '\u0643\u062E',
  23074. '\uFCC7': '\u0643\u0644',
  23075. '\uFCC8': '\u0643\u0645',
  23076. '\uFCC9': '\u0644\u062C',
  23077. '\uFCCA': '\u0644\u062D',
  23078. '\uFCCB': '\u0644\u062E',
  23079. '\uFCCC': '\u0644\u0645',
  23080. '\uFCCD': '\u0644\u0647',
  23081. '\uFCCE': '\u0645\u062C',
  23082. '\uFCCF': '\u0645\u062D',
  23083. '\uFCD0': '\u0645\u062E',
  23084. '\uFCD1': '\u0645\u0645',
  23085. '\uFCD2': '\u0646\u062C',
  23086. '\uFCD3': '\u0646\u062D',
  23087. '\uFCD4': '\u0646\u062E',
  23088. '\uFCD5': '\u0646\u0645',
  23089. '\uFCD6': '\u0646\u0647',
  23090. '\uFCD7': '\u0647\u062C',
  23091. '\uFCD8': '\u0647\u0645',
  23092. '\uFCD9': '\u0647\u0670',
  23093. '\uFCDA': '\u064A\u062C',
  23094. '\uFCDB': '\u064A\u062D',
  23095. '\uFCDC': '\u064A\u062E',
  23096. '\uFCDD': '\u064A\u0645',
  23097. '\uFCDE': '\u064A\u0647',
  23098. '\uFCDF': '\u0626\u0645',
  23099. '\uFCE0': '\u0626\u0647',
  23100. '\uFCE1': '\u0628\u0645',
  23101. '\uFCE2': '\u0628\u0647',
  23102. '\uFCE3': '\u062A\u0645',
  23103. '\uFCE4': '\u062A\u0647',
  23104. '\uFCE5': '\u062B\u0645',
  23105. '\uFCE6': '\u062B\u0647',
  23106. '\uFCE7': '\u0633\u0645',
  23107. '\uFCE8': '\u0633\u0647',
  23108. '\uFCE9': '\u0634\u0645',
  23109. '\uFCEA': '\u0634\u0647',
  23110. '\uFCEB': '\u0643\u0644',
  23111. '\uFCEC': '\u0643\u0645',
  23112. '\uFCED': '\u0644\u0645',
  23113. '\uFCEE': '\u0646\u0645',
  23114. '\uFCEF': '\u0646\u0647',
  23115. '\uFCF0': '\u064A\u0645',
  23116. '\uFCF1': '\u064A\u0647',
  23117. '\uFCF2': '\u0640\u064E\u0651',
  23118. '\uFCF3': '\u0640\u064F\u0651',
  23119. '\uFCF4': '\u0640\u0650\u0651',
  23120. '\uFCF5': '\u0637\u0649',
  23121. '\uFCF6': '\u0637\u064A',
  23122. '\uFCF7': '\u0639\u0649',
  23123. '\uFCF8': '\u0639\u064A',
  23124. '\uFCF9': '\u063A\u0649',
  23125. '\uFCFA': '\u063A\u064A',
  23126. '\uFCFB': '\u0633\u0649',
  23127. '\uFCFC': '\u0633\u064A',
  23128. '\uFCFD': '\u0634\u0649',
  23129. '\uFCFE': '\u0634\u064A',
  23130. '\uFCFF': '\u062D\u0649',
  23131. '\uFD00': '\u062D\u064A',
  23132. '\uFD01': '\u062C\u0649',
  23133. '\uFD02': '\u062C\u064A',
  23134. '\uFD03': '\u062E\u0649',
  23135. '\uFD04': '\u062E\u064A',
  23136. '\uFD05': '\u0635\u0649',
  23137. '\uFD06': '\u0635\u064A',
  23138. '\uFD07': '\u0636\u0649',
  23139. '\uFD08': '\u0636\u064A',
  23140. '\uFD09': '\u0634\u062C',
  23141. '\uFD0A': '\u0634\u062D',
  23142. '\uFD0B': '\u0634\u062E',
  23143. '\uFD0C': '\u0634\u0645',
  23144. '\uFD0D': '\u0634\u0631',
  23145. '\uFD0E': '\u0633\u0631',
  23146. '\uFD0F': '\u0635\u0631',
  23147. '\uFD10': '\u0636\u0631',
  23148. '\uFD11': '\u0637\u0649',
  23149. '\uFD12': '\u0637\u064A',
  23150. '\uFD13': '\u0639\u0649',
  23151. '\uFD14': '\u0639\u064A',
  23152. '\uFD15': '\u063A\u0649',
  23153. '\uFD16': '\u063A\u064A',
  23154. '\uFD17': '\u0633\u0649',
  23155. '\uFD18': '\u0633\u064A',
  23156. '\uFD19': '\u0634\u0649',
  23157. '\uFD1A': '\u0634\u064A',
  23158. '\uFD1B': '\u062D\u0649',
  23159. '\uFD1C': '\u062D\u064A',
  23160. '\uFD1D': '\u062C\u0649',
  23161. '\uFD1E': '\u062C\u064A',
  23162. '\uFD1F': '\u062E\u0649',
  23163. '\uFD20': '\u062E\u064A',
  23164. '\uFD21': '\u0635\u0649',
  23165. '\uFD22': '\u0635\u064A',
  23166. '\uFD23': '\u0636\u0649',
  23167. '\uFD24': '\u0636\u064A',
  23168. '\uFD25': '\u0634\u062C',
  23169. '\uFD26': '\u0634\u062D',
  23170. '\uFD27': '\u0634\u062E',
  23171. '\uFD28': '\u0634\u0645',
  23172. '\uFD29': '\u0634\u0631',
  23173. '\uFD2A': '\u0633\u0631',
  23174. '\uFD2B': '\u0635\u0631',
  23175. '\uFD2C': '\u0636\u0631',
  23176. '\uFD2D': '\u0634\u062C',
  23177. '\uFD2E': '\u0634\u062D',
  23178. '\uFD2F': '\u0634\u062E',
  23179. '\uFD30': '\u0634\u0645',
  23180. '\uFD31': '\u0633\u0647',
  23181. '\uFD32': '\u0634\u0647',
  23182. '\uFD33': '\u0637\u0645',
  23183. '\uFD34': '\u0633\u062C',
  23184. '\uFD35': '\u0633\u062D',
  23185. '\uFD36': '\u0633\u062E',
  23186. '\uFD37': '\u0634\u062C',
  23187. '\uFD38': '\u0634\u062D',
  23188. '\uFD39': '\u0634\u062E',
  23189. '\uFD3A': '\u0637\u0645',
  23190. '\uFD3B': '\u0638\u0645',
  23191. '\uFD3C': '\u0627\u064B',
  23192. '\uFD3D': '\u0627\u064B',
  23193. '\uFD50': '\u062A\u062C\u0645',
  23194. '\uFD51': '\u062A\u062D\u062C',
  23195. '\uFD52': '\u062A\u062D\u062C',
  23196. '\uFD53': '\u062A\u062D\u0645',
  23197. '\uFD54': '\u062A\u062E\u0645',
  23198. '\uFD55': '\u062A\u0645\u062C',
  23199. '\uFD56': '\u062A\u0645\u062D',
  23200. '\uFD57': '\u062A\u0645\u062E',
  23201. '\uFD58': '\u062C\u0645\u062D',
  23202. '\uFD59': '\u062C\u0645\u062D',
  23203. '\uFD5A': '\u062D\u0645\u064A',
  23204. '\uFD5B': '\u062D\u0645\u0649',
  23205. '\uFD5C': '\u0633\u062D\u062C',
  23206. '\uFD5D': '\u0633\u062C\u062D',
  23207. '\uFD5E': '\u0633\u062C\u0649',
  23208. '\uFD5F': '\u0633\u0645\u062D',
  23209. '\uFD60': '\u0633\u0645\u062D',
  23210. '\uFD61': '\u0633\u0645\u062C',
  23211. '\uFD62': '\u0633\u0645\u0645',
  23212. '\uFD63': '\u0633\u0645\u0645',
  23213. '\uFD64': '\u0635\u062D\u062D',
  23214. '\uFD65': '\u0635\u062D\u062D',
  23215. '\uFD66': '\u0635\u0645\u0645',
  23216. '\uFD67': '\u0634\u062D\u0645',
  23217. '\uFD68': '\u0634\u062D\u0645',
  23218. '\uFD69': '\u0634\u062C\u064A',
  23219. '\uFD6A': '\u0634\u0645\u062E',
  23220. '\uFD6B': '\u0634\u0645\u062E',
  23221. '\uFD6C': '\u0634\u0645\u0645',
  23222. '\uFD6D': '\u0634\u0645\u0645',
  23223. '\uFD6E': '\u0636\u062D\u0649',
  23224. '\uFD6F': '\u0636\u062E\u0645',
  23225. '\uFD70': '\u0636\u062E\u0645',
  23226. '\uFD71': '\u0637\u0645\u062D',
  23227. '\uFD72': '\u0637\u0645\u062D',
  23228. '\uFD73': '\u0637\u0645\u0645',
  23229. '\uFD74': '\u0637\u0645\u064A',
  23230. '\uFD75': '\u0639\u062C\u0645',
  23231. '\uFD76': '\u0639\u0645\u0645',
  23232. '\uFD77': '\u0639\u0645\u0645',
  23233. '\uFD78': '\u0639\u0645\u0649',
  23234. '\uFD79': '\u063A\u0645\u0645',
  23235. '\uFD7A': '\u063A\u0645\u064A',
  23236. '\uFD7B': '\u063A\u0645\u0649',
  23237. '\uFD7C': '\u0641\u062E\u0645',
  23238. '\uFD7D': '\u0641\u062E\u0645',
  23239. '\uFD7E': '\u0642\u0645\u062D',
  23240. '\uFD7F': '\u0642\u0645\u0645',
  23241. '\uFD80': '\u0644\u062D\u0645',
  23242. '\uFD81': '\u0644\u062D\u064A',
  23243. '\uFD82': '\u0644\u062D\u0649',
  23244. '\uFD83': '\u0644\u062C\u062C',
  23245. '\uFD84': '\u0644\u062C\u062C',
  23246. '\uFD85': '\u0644\u062E\u0645',
  23247. '\uFD86': '\u0644\u062E\u0645',
  23248. '\uFD87': '\u0644\u0645\u062D',
  23249. '\uFD88': '\u0644\u0645\u062D',
  23250. '\uFD89': '\u0645\u062D\u062C',
  23251. '\uFD8A': '\u0645\u062D\u0645',
  23252. '\uFD8B': '\u0645\u062D\u064A',
  23253. '\uFD8C': '\u0645\u062C\u062D',
  23254. '\uFD8D': '\u0645\u062C\u0645',
  23255. '\uFD8E': '\u0645\u062E\u062C',
  23256. '\uFD8F': '\u0645\u062E\u0645',
  23257. '\uFD92': '\u0645\u062C\u062E',
  23258. '\uFD93': '\u0647\u0645\u062C',
  23259. '\uFD94': '\u0647\u0645\u0645',
  23260. '\uFD95': '\u0646\u062D\u0645',
  23261. '\uFD96': '\u0646\u062D\u0649',
  23262. '\uFD97': '\u0646\u062C\u0645',
  23263. '\uFD98': '\u0646\u062C\u0645',
  23264. '\uFD99': '\u0646\u062C\u0649',
  23265. '\uFD9A': '\u0646\u0645\u064A',
  23266. '\uFD9B': '\u0646\u0645\u0649',
  23267. '\uFD9C': '\u064A\u0645\u0645',
  23268. '\uFD9D': '\u064A\u0645\u0645',
  23269. '\uFD9E': '\u0628\u062E\u064A',
  23270. '\uFD9F': '\u062A\u062C\u064A',
  23271. '\uFDA0': '\u062A\u062C\u0649',
  23272. '\uFDA1': '\u062A\u062E\u064A',
  23273. '\uFDA2': '\u062A\u062E\u0649',
  23274. '\uFDA3': '\u062A\u0645\u064A',
  23275. '\uFDA4': '\u062A\u0645\u0649',
  23276. '\uFDA5': '\u062C\u0645\u064A',
  23277. '\uFDA6': '\u062C\u062D\u0649',
  23278. '\uFDA7': '\u062C\u0645\u0649',
  23279. '\uFDA8': '\u0633\u062E\u0649',
  23280. '\uFDA9': '\u0635\u062D\u064A',
  23281. '\uFDAA': '\u0634\u062D\u064A',
  23282. '\uFDAB': '\u0636\u062D\u064A',
  23283. '\uFDAC': '\u0644\u062C\u064A',
  23284. '\uFDAD': '\u0644\u0645\u064A',
  23285. '\uFDAE': '\u064A\u062D\u064A',
  23286. '\uFDAF': '\u064A\u062C\u064A',
  23287. '\uFDB0': '\u064A\u0645\u064A',
  23288. '\uFDB1': '\u0645\u0645\u064A',
  23289. '\uFDB2': '\u0642\u0645\u064A',
  23290. '\uFDB3': '\u0646\u062D\u064A',
  23291. '\uFDB4': '\u0642\u0645\u062D',
  23292. '\uFDB5': '\u0644\u062D\u0645',
  23293. '\uFDB6': '\u0639\u0645\u064A',
  23294. '\uFDB7': '\u0643\u0645\u064A',
  23295. '\uFDB8': '\u0646\u062C\u062D',
  23296. '\uFDB9': '\u0645\u062E\u064A',
  23297. '\uFDBA': '\u0644\u062C\u0645',
  23298. '\uFDBB': '\u0643\u0645\u0645',
  23299. '\uFDBC': '\u0644\u062C\u0645',
  23300. '\uFDBD': '\u0646\u062C\u062D',
  23301. '\uFDBE': '\u062C\u062D\u064A',
  23302. '\uFDBF': '\u062D\u062C\u064A',
  23303. '\uFDC0': '\u0645\u062C\u064A',
  23304. '\uFDC1': '\u0641\u0645\u064A',
  23305. '\uFDC2': '\u0628\u062D\u064A',
  23306. '\uFDC3': '\u0643\u0645\u0645',
  23307. '\uFDC4': '\u0639\u062C\u0645',
  23308. '\uFDC5': '\u0635\u0645\u0645',
  23309. '\uFDC6': '\u0633\u062E\u064A',
  23310. '\uFDC7': '\u0646\u062C\u064A',
  23311. '\uFE49': '\u203E',
  23312. '\uFE4A': '\u203E',
  23313. '\uFE4B': '\u203E',
  23314. '\uFE4C': '\u203E',
  23315. '\uFE4D': '\u005F',
  23316. '\uFE4E': '\u005F',
  23317. '\uFE4F': '\u005F',
  23318. '\uFE80': '\u0621',
  23319. '\uFE81': '\u0622',
  23320. '\uFE82': '\u0622',
  23321. '\uFE83': '\u0623',
  23322. '\uFE84': '\u0623',
  23323. '\uFE85': '\u0624',
  23324. '\uFE86': '\u0624',
  23325. '\uFE87': '\u0625',
  23326. '\uFE88': '\u0625',
  23327. '\uFE89': '\u0626',
  23328. '\uFE8A': '\u0626',
  23329. '\uFE8B': '\u0626',
  23330. '\uFE8C': '\u0626',
  23331. '\uFE8D': '\u0627',
  23332. '\uFE8E': '\u0627',
  23333. '\uFE8F': '\u0628',
  23334. '\uFE90': '\u0628',
  23335. '\uFE91': '\u0628',
  23336. '\uFE92': '\u0628',
  23337. '\uFE93': '\u0629',
  23338. '\uFE94': '\u0629',
  23339. '\uFE95': '\u062A',
  23340. '\uFE96': '\u062A',
  23341. '\uFE97': '\u062A',
  23342. '\uFE98': '\u062A',
  23343. '\uFE99': '\u062B',
  23344. '\uFE9A': '\u062B',
  23345. '\uFE9B': '\u062B',
  23346. '\uFE9C': '\u062B',
  23347. '\uFE9D': '\u062C',
  23348. '\uFE9E': '\u062C',
  23349. '\uFE9F': '\u062C',
  23350. '\uFEA0': '\u062C',
  23351. '\uFEA1': '\u062D',
  23352. '\uFEA2': '\u062D',
  23353. '\uFEA3': '\u062D',
  23354. '\uFEA4': '\u062D',
  23355. '\uFEA5': '\u062E',
  23356. '\uFEA6': '\u062E',
  23357. '\uFEA7': '\u062E',
  23358. '\uFEA8': '\u062E',
  23359. '\uFEA9': '\u062F',
  23360. '\uFEAA': '\u062F',
  23361. '\uFEAB': '\u0630',
  23362. '\uFEAC': '\u0630',
  23363. '\uFEAD': '\u0631',
  23364. '\uFEAE': '\u0631',
  23365. '\uFEAF': '\u0632',
  23366. '\uFEB0': '\u0632',
  23367. '\uFEB1': '\u0633',
  23368. '\uFEB2': '\u0633',
  23369. '\uFEB3': '\u0633',
  23370. '\uFEB4': '\u0633',
  23371. '\uFEB5': '\u0634',
  23372. '\uFEB6': '\u0634',
  23373. '\uFEB7': '\u0634',
  23374. '\uFEB8': '\u0634',
  23375. '\uFEB9': '\u0635',
  23376. '\uFEBA': '\u0635',
  23377. '\uFEBB': '\u0635',
  23378. '\uFEBC': '\u0635',
  23379. '\uFEBD': '\u0636',
  23380. '\uFEBE': '\u0636',
  23381. '\uFEBF': '\u0636',
  23382. '\uFEC0': '\u0636',
  23383. '\uFEC1': '\u0637',
  23384. '\uFEC2': '\u0637',
  23385. '\uFEC3': '\u0637',
  23386. '\uFEC4': '\u0637',
  23387. '\uFEC5': '\u0638',
  23388. '\uFEC6': '\u0638',
  23389. '\uFEC7': '\u0638',
  23390. '\uFEC8': '\u0638',
  23391. '\uFEC9': '\u0639',
  23392. '\uFECA': '\u0639',
  23393. '\uFECB': '\u0639',
  23394. '\uFECC': '\u0639',
  23395. '\uFECD': '\u063A',
  23396. '\uFECE': '\u063A',
  23397. '\uFECF': '\u063A',
  23398. '\uFED0': '\u063A',
  23399. '\uFED1': '\u0641',
  23400. '\uFED2': '\u0641',
  23401. '\uFED3': '\u0641',
  23402. '\uFED4': '\u0641',
  23403. '\uFED5': '\u0642',
  23404. '\uFED6': '\u0642',
  23405. '\uFED7': '\u0642',
  23406. '\uFED8': '\u0642',
  23407. '\uFED9': '\u0643',
  23408. '\uFEDA': '\u0643',
  23409. '\uFEDB': '\u0643',
  23410. '\uFEDC': '\u0643',
  23411. '\uFEDD': '\u0644',
  23412. '\uFEDE': '\u0644',
  23413. '\uFEDF': '\u0644',
  23414. '\uFEE0': '\u0644',
  23415. '\uFEE1': '\u0645',
  23416. '\uFEE2': '\u0645',
  23417. '\uFEE3': '\u0645',
  23418. '\uFEE4': '\u0645',
  23419. '\uFEE5': '\u0646',
  23420. '\uFEE6': '\u0646',
  23421. '\uFEE7': '\u0646',
  23422. '\uFEE8': '\u0646',
  23423. '\uFEE9': '\u0647',
  23424. '\uFEEA': '\u0647',
  23425. '\uFEEB': '\u0647',
  23426. '\uFEEC': '\u0647',
  23427. '\uFEED': '\u0648',
  23428. '\uFEEE': '\u0648',
  23429. '\uFEEF': '\u0649',
  23430. '\uFEF0': '\u0649',
  23431. '\uFEF1': '\u064A',
  23432. '\uFEF2': '\u064A',
  23433. '\uFEF3': '\u064A',
  23434. '\uFEF4': '\u064A',
  23435. '\uFEF5': '\u0644\u0622',
  23436. '\uFEF6': '\u0644\u0622',
  23437. '\uFEF7': '\u0644\u0623',
  23438. '\uFEF8': '\u0644\u0623',
  23439. '\uFEF9': '\u0644\u0625',
  23440. '\uFEFA': '\u0644\u0625',
  23441. '\uFEFB': '\u0644\u0627',
  23442. '\uFEFC': '\u0644\u0627'
  23443. };
  23444. function reverseIfRtl(chars) {
  23445. var charsLength = chars.length;
  23446. //reverse an arabic ligature
  23447. if (charsLength <= 1 || !isRTLRangeFor(chars.charCodeAt(0))) {
  23448. return chars;
  23449. }
  23450. var s = '';
  23451. for (var ii = charsLength - 1; ii >= 0; ii--) {
  23452. s += chars[ii];
  23453. }
  23454. return s;
  23455. }
  23456. function adjustWidths(properties) {
  23457. if (properties.fontMatrix[0] === FONT_IDENTITY_MATRIX[0]) {
  23458. return;
  23459. }
  23460. // adjusting width to fontMatrix scale
  23461. var scale = 0.001 / properties.fontMatrix[0];
  23462. var glyphsWidths = properties.widths;
  23463. for (var glyph in glyphsWidths) {
  23464. glyphsWidths[glyph] *= scale;
  23465. }
  23466. properties.defaultWidth *= scale;
  23467. }
  23468. var Glyph = (function GlyphClosure() {
  23469. function Glyph(fontChar, unicode, accent, width, vmetric, operatorList) {
  23470. this.fontChar = fontChar;
  23471. this.unicode = unicode;
  23472. this.accent = accent;
  23473. this.width = width;
  23474. this.vmetric = vmetric;
  23475. this.operatorList = operatorList;
  23476. }
  23477. Glyph.prototype.matchesForCache =
  23478. function(fontChar, unicode, accent, width, vmetric, operatorList) {
  23479. return this.fontChar === fontChar &&
  23480. this.unicode === unicode &&
  23481. this.accent === accent &&
  23482. this.width === width &&
  23483. this.vmetric === vmetric &&
  23484. this.operatorList === operatorList;
  23485. };
  23486. return Glyph;
  23487. })();
  23488. /**
  23489. * 'Font' is the class the outside world should use, it encapsulate all the font
  23490. * decoding logics whatever type it is (assuming the font type is supported).
  23491. *
  23492. * For example to read a Type1 font and to attach it to the document:
  23493. * var type1Font = new Font("MyFontName", binaryFile, propertiesObject);
  23494. * type1Font.bind();
  23495. */
  23496. var Font = (function FontClosure() {
  23497. function Font(name, file, properties) {
  23498. var charCode;
  23499. this.name = name;
  23500. this.loadedName = properties.loadedName;
  23501. this.coded = properties.coded;
  23502. this.loadCharProcs = properties.coded;
  23503. this.sizes = [];
  23504. this.glyphCache = {};
  23505. var names = name.split('+');
  23506. names = names.length > 1 ? names[1] : names[0];
  23507. names = names.split(/[-,_]/g)[0];
  23508. this.isSerifFont = !!(properties.flags & FontFlags.Serif);
  23509. this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
  23510. this.isMonospace = !!(properties.flags & FontFlags.FixedPitch);
  23511. var type = properties.type;
  23512. this.type = type;
  23513. this.fallbackName = (this.isMonospace ? 'monospace' :
  23514. (this.isSerifFont ? 'serif' : 'sans-serif'));
  23515. this.differences = properties.differences;
  23516. this.widths = properties.widths;
  23517. this.defaultWidth = properties.defaultWidth;
  23518. this.composite = properties.composite;
  23519. this.wideChars = properties.wideChars;
  23520. this.cMap = properties.cMap;
  23521. this.ascent = properties.ascent / PDF_GLYPH_SPACE_UNITS;
  23522. this.descent = properties.descent / PDF_GLYPH_SPACE_UNITS;
  23523. this.fontMatrix = properties.fontMatrix;
  23524. var unicode = this.buildToUnicode(properties);
  23525. this.toUnicode = properties.toUnicode = unicode.toUnicode;
  23526. this.isIdentityUnicode = properties.isIdentityUnicode = unicode.isIdentity;
  23527. this.toFontChar = [];
  23528. if (properties.type == 'Type3') {
  23529. for (charCode = 0; charCode < 256; charCode++) {
  23530. this.toFontChar[charCode] = (this.differences[charCode] ||
  23531. properties.defaultEncoding[charCode]);
  23532. }
  23533. return;
  23534. }
  23535. this.cidEncoding = properties.cidEncoding;
  23536. this.vertical = properties.vertical;
  23537. if (this.vertical) {
  23538. this.vmetrics = properties.vmetrics;
  23539. this.defaultVMetrics = properties.defaultVMetrics;
  23540. }
  23541. if (!file) {
  23542. this.missingFile = true;
  23543. // The file data is not specified. Trying to fix the font name
  23544. // to be used with the canvas.font.
  23545. var fontName = name.replace(/[,_]/g, '-');
  23546. var isStandardFont = fontName in stdFontMap;
  23547. fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName;
  23548. this.bold = (fontName.search(/bold/gi) != -1);
  23549. this.italic = ((fontName.search(/oblique/gi) != -1) ||
  23550. (fontName.search(/italic/gi) != -1));
  23551. // Use 'name' instead of 'fontName' here because the original
  23552. // name ArialBlack for example will be replaced by Helvetica.
  23553. this.black = (name.search(/Black/g) != -1);
  23554. // if at least one width is present, remeasure all chars when exists
  23555. this.remeasure = Object.keys(this.widths).length > 0;
  23556. if (isStandardFont && type === 'CIDFontType2' &&
  23557. properties.cidEncoding.indexOf('Identity-') === 0) {
  23558. // Standard fonts might be embedded as CID font without glyph mapping.
  23559. // Building one based on GlyphMapForStandardFonts.
  23560. var map = [];
  23561. for (var code in GlyphMapForStandardFonts) {
  23562. map[+code] = GlyphMapForStandardFonts[code];
  23563. }
  23564. this.toFontChar = map;
  23565. this.toUnicode = map;
  23566. } else if (/Symbol/i.test(fontName)) {
  23567. var symbols = Encodings.SymbolSetEncoding;
  23568. for (charCode in symbols) {
  23569. var fontChar = GlyphsUnicode[symbols[charCode]];
  23570. if (!fontChar) {
  23571. continue;
  23572. }
  23573. this.toFontChar[charCode] = fontChar;
  23574. }
  23575. } else if (isStandardFont) {
  23576. this.toFontChar = [];
  23577. for (charCode in properties.defaultEncoding) {
  23578. var glyphName = properties.differences[charCode] ||
  23579. properties.defaultEncoding[charCode];
  23580. this.toFontChar[charCode] = GlyphsUnicode[glyphName];
  23581. }
  23582. } else {
  23583. for (charCode in this.toUnicode) {
  23584. this.toFontChar[charCode] = this.toUnicode[charCode].charCodeAt(0);
  23585. }
  23586. }
  23587. this.loadedName = fontName.split('-')[0];
  23588. this.loading = false;
  23589. return;
  23590. }
  23591. // Some fonts might use wrong font types for Type1C or CIDFontType0C
  23592. var subtype = properties.subtype;
  23593. if (subtype == 'Type1C' && (type != 'Type1' && type != 'MMType1')) {
  23594. // Some TrueType fonts by mistake claim Type1C
  23595. if (isTrueTypeFile(file)) {
  23596. subtype = 'TrueType';
  23597. } else {
  23598. type = 'Type1';
  23599. }
  23600. }
  23601. if (subtype == 'CIDFontType0C' && type != 'CIDFontType0') {
  23602. type = 'CIDFontType0';
  23603. }
  23604. // XXX: Temporarily change the type for open type so we trigger a warning.
  23605. // This should be removed when we add support for open type.
  23606. if (subtype === 'OpenType') {
  23607. type = 'OpenType';
  23608. }
  23609. var data;
  23610. switch (type) {
  23611. case 'Type1':
  23612. case 'CIDFontType0':
  23613. this.mimetype = 'font/opentype';
  23614. var cff = (subtype == 'Type1C' || subtype == 'CIDFontType0C') ?
  23615. new CFFFont(file, properties) : new Type1Font(name, file, properties);
  23616. adjustWidths(properties);
  23617. // Wrap the CFF data inside an OTF font file
  23618. data = this.convert(name, cff, properties);
  23619. break;
  23620. case 'OpenType':
  23621. case 'TrueType':
  23622. case 'CIDFontType2':
  23623. this.mimetype = 'font/opentype';
  23624. // Repair the TrueType file. It is can be damaged in the point of
  23625. // view of the sanitizer
  23626. data = this.checkAndRepair(name, file, properties);
  23627. break;
  23628. default:
  23629. error('Font ' + type + ' is not supported');
  23630. break;
  23631. }
  23632. this.data = data;
  23633. // Transfer some properties again that could change during font conversion
  23634. this.fontMatrix = properties.fontMatrix;
  23635. this.widths = properties.widths;
  23636. this.defaultWidth = properties.defaultWidth;
  23637. this.encoding = properties.baseEncoding;
  23638. this.seacMap = properties.seacMap;
  23639. this.loading = true;
  23640. }
  23641. Font.getFontID = (function () {
  23642. var ID = 1;
  23643. return function Font_getFontID() {
  23644. return String(ID++);
  23645. };
  23646. })();
  23647. function int16(b0, b1) {
  23648. return (b0 << 8) + b1;
  23649. }
  23650. function int32(b0, b1, b2, b3) {
  23651. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  23652. }
  23653. function getMaxPower2(number) {
  23654. var maxPower = 0;
  23655. var value = number;
  23656. while (value >= 2) {
  23657. value /= 2;
  23658. maxPower++;
  23659. }
  23660. value = 2;
  23661. for (var i = 1; i < maxPower; i++) {
  23662. value *= 2;
  23663. }
  23664. return value;
  23665. }
  23666. function string16(value) {
  23667. return String.fromCharCode((value >> 8) & 0xff, value & 0xff);
  23668. }
  23669. function safeString16(value) {
  23670. // clamp value to the 16-bit int range
  23671. value = (value > 0x7FFF ? 0x7FFF : (value < -0x8000 ? -0x8000 : value));
  23672. return String.fromCharCode((value >> 8) & 0xff, value & 0xff);
  23673. }
  23674. function createOpenTypeHeader(sfnt, file, numTables) {
  23675. // Windows hates the Mac TrueType sfnt version number
  23676. if (sfnt == 'true') {
  23677. sfnt = string32(0x00010000);
  23678. }
  23679. // sfnt version (4 bytes)
  23680. var header = sfnt;
  23681. // numTables (2 bytes)
  23682. header += string16(numTables);
  23683. // searchRange (2 bytes)
  23684. var tablesMaxPower2 = getMaxPower2(numTables);
  23685. var searchRange = tablesMaxPower2 * 16;
  23686. header += string16(searchRange);
  23687. // entrySelector (2 bytes)
  23688. header += string16(Math.log(tablesMaxPower2) / Math.log(2));
  23689. // rangeShift (2 bytes)
  23690. header += string16(numTables * 16 - searchRange);
  23691. file.file += header;
  23692. file.virtualOffset += header.length;
  23693. }
  23694. function createTableEntry(file, tag, data) {
  23695. // offset
  23696. var offset = file.virtualOffset;
  23697. // length
  23698. var length = data.length;
  23699. // Per spec tables must be 4-bytes align so add padding as needed
  23700. while (data.length & 3) {
  23701. data.push(0x00);
  23702. }
  23703. while (file.virtualOffset & 3) {
  23704. file.virtualOffset++;
  23705. }
  23706. // checksum
  23707. var checksum = 0, n = data.length;
  23708. for (var i = 0; i < n; i += 4) {
  23709. checksum = (checksum + int32(data[i], data[i + 1], data[i + 2],
  23710. data[i + 3])) | 0;
  23711. }
  23712. var tableEntry = (tag + string32(checksum) +
  23713. string32(offset) + string32(length));
  23714. file.file += tableEntry;
  23715. file.virtualOffset += data.length;
  23716. }
  23717. function isTrueTypeFile(file) {
  23718. var header = file.peekBytes(4);
  23719. return readUint32(header, 0) === 0x00010000;
  23720. }
  23721. /**
  23722. * Rebuilds the char code to glyph ID map by trying to replace the char codes
  23723. * with their unicode value. It also moves char codes that are in known
  23724. * problematic locations.
  23725. * @return {Object} Two properties:
  23726. * 'toFontChar' - maps original char codes(the value that will be read
  23727. * from commands such as show text) to the char codes that will be used in the
  23728. * font that we build
  23729. * 'charCodeToGlyphId' - maps the new font char codes to glyph ids
  23730. */
  23731. function adjustMapping(charCodeToGlyphId, properties) {
  23732. var toUnicode = properties.toUnicode;
  23733. var isSymbolic = !!(properties.flags & FontFlags.Symbolic);
  23734. var isIdentityUnicode = properties.isIdentityUnicode;
  23735. var newMap = Object.create(null);
  23736. var toFontChar = [];
  23737. var usedFontCharCodes = [];
  23738. var nextAvailableFontCharCode = PRIVATE_USE_OFFSET_START;
  23739. for (var originalCharCode in charCodeToGlyphId) {
  23740. originalCharCode |= 0;
  23741. var glyphId = charCodeToGlyphId[originalCharCode];
  23742. var fontCharCode = originalCharCode;
  23743. // First try to map the value to a unicode position if a non identity map
  23744. // was created.
  23745. if (!isIdentityUnicode && originalCharCode in toUnicode) {
  23746. var unicode = toUnicode[fontCharCode];
  23747. // TODO: Try to map ligatures to the correct spot.
  23748. if (unicode.length === 1) {
  23749. fontCharCode = unicode.charCodeAt(0);
  23750. }
  23751. }
  23752. // Try to move control characters, special characters and already mapped
  23753. // characters to the private use area since they will not be drawn by
  23754. // canvas if left in their current position. Also, move characters if the
  23755. // font was symbolic and there is only an identity unicode map since the
  23756. // characters probably aren't in the correct position (fixes an issue
  23757. // with firefox and thuluthfont).
  23758. if ((fontCharCode in usedFontCharCodes ||
  23759. fontCharCode <= 0x1f || // Control chars
  23760. fontCharCode === 0x7F || // Control char
  23761. fontCharCode === 0xAD || // Soft hyphen
  23762. (fontCharCode >= 0x80 && fontCharCode <= 0x9F) || // Control chars
  23763. // Prevent drawing characters in the specials unicode block.
  23764. (fontCharCode >= 0xFFF0 && fontCharCode <= 0xFFFF) ||
  23765. (isSymbolic && isIdentityUnicode)) &&
  23766. nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END) { // Room left.
  23767. // Loop to try and find a free spot in the private use area.
  23768. do {
  23769. fontCharCode = nextAvailableFontCharCode++;
  23770. if (SKIP_PRIVATE_USE_RANGE_F000_TO_F01F && fontCharCode === 0xF000) {
  23771. fontCharCode = 0xF020;
  23772. nextAvailableFontCharCode = fontCharCode + 1;
  23773. }
  23774. } while (fontCharCode in usedFontCharCodes &&
  23775. nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END);
  23776. }
  23777. newMap[fontCharCode] = glyphId;
  23778. toFontChar[originalCharCode] = fontCharCode;
  23779. usedFontCharCodes[fontCharCode] = true;
  23780. }
  23781. return {
  23782. toFontChar: toFontChar,
  23783. charCodeToGlyphId: newMap,
  23784. nextAvailableFontCharCode: nextAvailableFontCharCode
  23785. };
  23786. }
  23787. function getRanges(glyphs) {
  23788. // Array.sort() sorts by characters, not numerically, so convert to an
  23789. // array of characters.
  23790. var codes = [];
  23791. for (var charCode in glyphs) {
  23792. codes.push({ fontCharCode: charCode | 0, glyphId: glyphs[charCode] });
  23793. }
  23794. codes.sort(function fontGetRangesSort(a, b) {
  23795. return a.fontCharCode - b.fontCharCode;
  23796. });
  23797. // Split the sorted codes into ranges.
  23798. var ranges = [];
  23799. var length = codes.length;
  23800. for (var n = 0; n < length; ) {
  23801. var start = codes[n].fontCharCode;
  23802. var codeIndices = [codes[n].glyphId];
  23803. ++n;
  23804. var end = start;
  23805. while (n < length && end + 1 == codes[n].fontCharCode) {
  23806. codeIndices.push(codes[n].glyphId);
  23807. ++end;
  23808. ++n;
  23809. if (end === 0xFFFF) {
  23810. break;
  23811. }
  23812. }
  23813. ranges.push([start, end, codeIndices]);
  23814. }
  23815. return ranges;
  23816. }
  23817. function createCmapTable(glyphs) {
  23818. var ranges = getRanges(glyphs);
  23819. var numTables = ranges[ranges.length - 1][1] > 0xFFFF ? 2 : 1;
  23820. var cmap = '\x00\x00' + // version
  23821. string16(numTables) + // numTables
  23822. '\x00\x03' + // platformID
  23823. '\x00\x01' + // encodingID
  23824. string32(4 + numTables * 8); // start of the table record
  23825. var i, ii, j, jj;
  23826. for (i = ranges.length - 1; i >= 0; --i) {
  23827. if (ranges[i][0] <= 0xFFFF) { break; }
  23828. }
  23829. var bmpLength = i + 1;
  23830. if (ranges[i][0] < 0xFFFF && ranges[i][1] === 0xFFFF) {
  23831. ranges[i][1] = 0xFFFE;
  23832. }
  23833. var trailingRangesCount = ranges[i][1] < 0xFFFF ? 1 : 0;
  23834. var segCount = bmpLength + trailingRangesCount;
  23835. var segCount2 = segCount * 2;
  23836. var searchRange = getMaxPower2(segCount) * 2;
  23837. var searchEntry = Math.log(segCount) / Math.log(2);
  23838. var rangeShift = 2 * segCount - searchRange;
  23839. // Fill up the 4 parallel arrays describing the segments.
  23840. var startCount = '';
  23841. var endCount = '';
  23842. var idDeltas = '';
  23843. var idRangeOffsets = '';
  23844. var glyphsIds = '';
  23845. var bias = 0;
  23846. var range, start, end, codes;
  23847. for (i = 0, ii = bmpLength; i < ii; i++) {
  23848. range = ranges[i];
  23849. start = range[0];
  23850. end = range[1];
  23851. startCount += string16(start);
  23852. endCount += string16(end);
  23853. codes = range[2];
  23854. var contiguous = true;
  23855. for (j = 1, jj = codes.length; j < jj; ++j) {
  23856. if (codes[j] !== codes[j - 1] + 1) {
  23857. contiguous = false;
  23858. break;
  23859. }
  23860. }
  23861. if (!contiguous) {
  23862. var offset = (segCount - i) * 2 + bias * 2;
  23863. bias += (end - start + 1);
  23864. idDeltas += string16(0);
  23865. idRangeOffsets += string16(offset);
  23866. for (j = 0, jj = codes.length; j < jj; ++j) {
  23867. glyphsIds += string16(codes[j]);
  23868. }
  23869. } else {
  23870. var startCode = codes[0];
  23871. idDeltas += string16((startCode - start) & 0xFFFF);
  23872. idRangeOffsets += string16(0);
  23873. }
  23874. }
  23875. if (trailingRangesCount > 0) {
  23876. endCount += '\xFF\xFF';
  23877. startCount += '\xFF\xFF';
  23878. idDeltas += '\x00\x01';
  23879. idRangeOffsets += '\x00\x00';
  23880. }
  23881. var format314 = '\x00\x00' + // language
  23882. string16(segCount2) +
  23883. string16(searchRange) +
  23884. string16(searchEntry) +
  23885. string16(rangeShift) +
  23886. endCount + '\x00\x00' + startCount +
  23887. idDeltas + idRangeOffsets + glyphsIds;
  23888. var format31012 = '';
  23889. var header31012 = '';
  23890. if (numTables > 1) {
  23891. cmap += '\x00\x03' + // platformID
  23892. '\x00\x0A' + // encodingID
  23893. string32(4 + numTables * 8 +
  23894. 4 + format314.length); // start of the table record
  23895. format31012 = '';
  23896. for (i = 0, ii = ranges.length; i < ii; i++) {
  23897. range = ranges[i];
  23898. start = range[0];
  23899. codes = range[2];
  23900. var code = codes[0];
  23901. for (j = 1, jj = codes.length; j < jj; ++j) {
  23902. if (codes[j] !== codes[j - 1] + 1) {
  23903. end = range[0] + j - 1;
  23904. format31012 += string32(start) + // startCharCode
  23905. string32(end) + // endCharCode
  23906. string32(code); // startGlyphID
  23907. start = end + 1;
  23908. code = codes[j];
  23909. }
  23910. }
  23911. format31012 += string32(start) + // startCharCode
  23912. string32(range[1]) + // endCharCode
  23913. string32(code); // startGlyphID
  23914. }
  23915. header31012 = '\x00\x0C' + // format
  23916. '\x00\x00' + // reserved
  23917. string32(format31012.length + 16) + // length
  23918. '\x00\x00\x00\x00' + // language
  23919. string32(format31012.length / 12); // nGroups
  23920. }
  23921. return stringToArray(cmap +
  23922. '\x00\x04' + // format
  23923. string16(format314.length + 4) + // length
  23924. format314 + header31012 + format31012);
  23925. }
  23926. function validateOS2Table(os2) {
  23927. var stream = new Stream(os2.data);
  23928. var version = stream.getUint16();
  23929. // TODO verify all OS/2 tables fields, but currently we validate only those
  23930. // that give us issues
  23931. stream.getBytes(60); // skipping type, misc sizes, panose, unicode ranges
  23932. var selection = stream.getUint16();
  23933. if (version < 4 && (selection & 0x0300)) {
  23934. return false;
  23935. }
  23936. var firstChar = stream.getUint16();
  23937. var lastChar = stream.getUint16();
  23938. if (firstChar > lastChar) {
  23939. return false;
  23940. }
  23941. stream.getBytes(6); // skipping sTypoAscender/Descender/LineGap
  23942. var usWinAscent = stream.getUint16();
  23943. if (usWinAscent === 0) { // makes font unreadable by windows
  23944. return false;
  23945. }
  23946. // OS/2 appears to be valid, resetting some fields
  23947. os2.data[8] = os2.data[9] = 0; // IE rejects fonts if fsType != 0
  23948. return true;
  23949. }
  23950. function createOS2Table(properties, charstrings, override) {
  23951. override = override || {
  23952. unitsPerEm: 0,
  23953. yMax: 0,
  23954. yMin: 0,
  23955. ascent: 0,
  23956. descent: 0
  23957. };
  23958. var ulUnicodeRange1 = 0;
  23959. var ulUnicodeRange2 = 0;
  23960. var ulUnicodeRange3 = 0;
  23961. var ulUnicodeRange4 = 0;
  23962. var firstCharIndex = null;
  23963. var lastCharIndex = 0;
  23964. if (charstrings) {
  23965. for (var code in charstrings) {
  23966. code |= 0;
  23967. if (firstCharIndex > code || !firstCharIndex) {
  23968. firstCharIndex = code;
  23969. }
  23970. if (lastCharIndex < code) {
  23971. lastCharIndex = code;
  23972. }
  23973. var position = getUnicodeRangeFor(code);
  23974. if (position < 32) {
  23975. ulUnicodeRange1 |= 1 << position;
  23976. } else if (position < 64) {
  23977. ulUnicodeRange2 |= 1 << position - 32;
  23978. } else if (position < 96) {
  23979. ulUnicodeRange3 |= 1 << position - 64;
  23980. } else if (position < 123) {
  23981. ulUnicodeRange4 |= 1 << position - 96;
  23982. } else {
  23983. error('Unicode ranges Bits > 123 are reserved for internal usage');
  23984. }
  23985. }
  23986. } else {
  23987. // TODO
  23988. firstCharIndex = 0;
  23989. lastCharIndex = 255;
  23990. }
  23991. var bbox = properties.bbox || [0, 0, 0, 0];
  23992. var unitsPerEm = (override.unitsPerEm ||
  23993. 1 / (properties.fontMatrix || FONT_IDENTITY_MATRIX)[0]);
  23994. // if the font units differ to the PDF glyph space units
  23995. // then scale up the values
  23996. var scale = (properties.ascentScaled ? 1.0 :
  23997. unitsPerEm / PDF_GLYPH_SPACE_UNITS);
  23998. var typoAscent = (override.ascent ||
  23999. Math.round(scale * (properties.ascent || bbox[3])));
  24000. var typoDescent = (override.descent ||
  24001. Math.round(scale * (properties.descent || bbox[1])));
  24002. if (typoDescent > 0 && properties.descent > 0 && bbox[1] < 0) {
  24003. typoDescent = -typoDescent; // fixing incorrect descent
  24004. }
  24005. var winAscent = override.yMax || typoAscent;
  24006. var winDescent = -override.yMin || -typoDescent;
  24007. return '\x00\x03' + // version
  24008. '\x02\x24' + // xAvgCharWidth
  24009. '\x01\xF4' + // usWeightClass
  24010. '\x00\x05' + // usWidthClass
  24011. '\x00\x00' + // fstype (0 to let the font loads via font-face on IE)
  24012. '\x02\x8A' + // ySubscriptXSize
  24013. '\x02\xBB' + // ySubscriptYSize
  24014. '\x00\x00' + // ySubscriptXOffset
  24015. '\x00\x8C' + // ySubscriptYOffset
  24016. '\x02\x8A' + // ySuperScriptXSize
  24017. '\x02\xBB' + // ySuperScriptYSize
  24018. '\x00\x00' + // ySuperScriptXOffset
  24019. '\x01\xDF' + // ySuperScriptYOffset
  24020. '\x00\x31' + // yStrikeOutSize
  24021. '\x01\x02' + // yStrikeOutPosition
  24022. '\x00\x00' + // sFamilyClass
  24023. '\x00\x00\x06' +
  24024. String.fromCharCode(properties.fixedPitch ? 0x09 : 0x00) +
  24025. '\x00\x00\x00\x00\x00\x00' + // Panose
  24026. string32(ulUnicodeRange1) + // ulUnicodeRange1 (Bits 0-31)
  24027. string32(ulUnicodeRange2) + // ulUnicodeRange2 (Bits 32-63)
  24028. string32(ulUnicodeRange3) + // ulUnicodeRange3 (Bits 64-95)
  24029. string32(ulUnicodeRange4) + // ulUnicodeRange4 (Bits 96-127)
  24030. '\x2A\x32\x31\x2A' + // achVendID
  24031. string16(properties.italicAngle ? 1 : 0) + // fsSelection
  24032. string16(firstCharIndex ||
  24033. properties.firstChar) + // usFirstCharIndex
  24034. string16(lastCharIndex || properties.lastChar) + // usLastCharIndex
  24035. string16(typoAscent) + // sTypoAscender
  24036. string16(typoDescent) + // sTypoDescender
  24037. '\x00\x64' + // sTypoLineGap (7%-10% of the unitsPerEM value)
  24038. string16(winAscent) + // usWinAscent
  24039. string16(winDescent) + // usWinDescent
  24040. '\x00\x00\x00\x00' + // ulCodePageRange1 (Bits 0-31)
  24041. '\x00\x00\x00\x00' + // ulCodePageRange2 (Bits 32-63)
  24042. string16(properties.xHeight) + // sxHeight
  24043. string16(properties.capHeight) + // sCapHeight
  24044. string16(0) + // usDefaultChar
  24045. string16(firstCharIndex || properties.firstChar) + // usBreakChar
  24046. '\x00\x03'; // usMaxContext
  24047. }
  24048. function createPostTable(properties) {
  24049. var angle = Math.floor(properties.italicAngle * (Math.pow(2, 16)));
  24050. return ('\x00\x03\x00\x00' + // Version number
  24051. string32(angle) + // italicAngle
  24052. '\x00\x00' + // underlinePosition
  24053. '\x00\x00' + // underlineThickness
  24054. string32(properties.fixedPitch) + // isFixedPitch
  24055. '\x00\x00\x00\x00' + // minMemType42
  24056. '\x00\x00\x00\x00' + // maxMemType42
  24057. '\x00\x00\x00\x00' + // minMemType1
  24058. '\x00\x00\x00\x00'); // maxMemType1
  24059. }
  24060. function createNameTable(name, proto) {
  24061. if (!proto) {
  24062. proto = [[], []]; // no strings and unicode strings
  24063. }
  24064. var strings = [
  24065. proto[0][0] || 'Original licence', // 0.Copyright
  24066. proto[0][1] || name, // 1.Font family
  24067. proto[0][2] || 'Unknown', // 2.Font subfamily (font weight)
  24068. proto[0][3] || 'uniqueID', // 3.Unique ID
  24069. proto[0][4] || name, // 4.Full font name
  24070. proto[0][5] || 'Version 0.11', // 5.Version
  24071. proto[0][6] || '', // 6.Postscript name
  24072. proto[0][7] || 'Unknown', // 7.Trademark
  24073. proto[0][8] || 'Unknown', // 8.Manufacturer
  24074. proto[0][9] || 'Unknown' // 9.Designer
  24075. ];
  24076. // Mac want 1-byte per character strings while Windows want
  24077. // 2-bytes per character, so duplicate the names table
  24078. var stringsUnicode = [];
  24079. var i, ii, j, jj, str;
  24080. for (i = 0, ii = strings.length; i < ii; i++) {
  24081. str = proto[1][i] || strings[i];
  24082. var strBufUnicode = [];
  24083. for (j = 0, jj = str.length; j < jj; j++) {
  24084. strBufUnicode.push(string16(str.charCodeAt(j)));
  24085. }
  24086. stringsUnicode.push(strBufUnicode.join(''));
  24087. }
  24088. var names = [strings, stringsUnicode];
  24089. var platforms = ['\x00\x01', '\x00\x03'];
  24090. var encodings = ['\x00\x00', '\x00\x01'];
  24091. var languages = ['\x00\x00', '\x04\x09'];
  24092. var namesRecordCount = strings.length * platforms.length;
  24093. var nameTable =
  24094. '\x00\x00' + // format
  24095. string16(namesRecordCount) + // Number of names Record
  24096. string16(namesRecordCount * 12 + 6); // Storage
  24097. // Build the name records field
  24098. var strOffset = 0;
  24099. for (i = 0, ii = platforms.length; i < ii; i++) {
  24100. var strs = names[i];
  24101. for (j = 0, jj = strs.length; j < jj; j++) {
  24102. str = strs[j];
  24103. var nameRecord =
  24104. platforms[i] + // platform ID
  24105. encodings[i] + // encoding ID
  24106. languages[i] + // language ID
  24107. string16(j) + // name ID
  24108. string16(str.length) +
  24109. string16(strOffset);
  24110. nameTable += nameRecord;
  24111. strOffset += str.length;
  24112. }
  24113. }
  24114. nameTable += strings.join('') + stringsUnicode.join('');
  24115. return nameTable;
  24116. }
  24117. Font.prototype = {
  24118. name: null,
  24119. font: null,
  24120. mimetype: null,
  24121. encoding: null,
  24122. get renderer() {
  24123. var renderer = FontRendererFactory.create(this);
  24124. return shadow(this, 'renderer', renderer);
  24125. },
  24126. exportData: function Font_exportData() {
  24127. var data = {};
  24128. for (var i in this) {
  24129. if (this.hasOwnProperty(i)) {
  24130. data[i] = this[i];
  24131. }
  24132. }
  24133. return data;
  24134. },
  24135. checkAndRepair: function Font_checkAndRepair(name, font, properties) {
  24136. function readTableEntry(file) {
  24137. var tag = bytesToString(file.getBytes(4));
  24138. var checksum = file.getInt32();
  24139. var offset = file.getInt32() >>> 0;
  24140. var length = file.getInt32() >>> 0;
  24141. // Read the table associated data
  24142. var previousPosition = file.pos;
  24143. file.pos = file.start ? file.start : 0;
  24144. file.skip(offset);
  24145. var data = file.getBytes(length);
  24146. file.pos = previousPosition;
  24147. if (tag == 'head') {
  24148. // clearing checksum adjustment
  24149. data[8] = data[9] = data[10] = data[11] = 0;
  24150. data[17] |= 0x20; //Set font optimized for cleartype flag
  24151. }
  24152. return {
  24153. tag: tag,
  24154. checksum: checksum,
  24155. length: length,
  24156. offset: offset,
  24157. data: data
  24158. };
  24159. }
  24160. function readOpenTypeHeader(ttf) {
  24161. return {
  24162. version: bytesToString(ttf.getBytes(4)),
  24163. numTables: ttf.getUint16(),
  24164. searchRange: ttf.getUint16(),
  24165. entrySelector: ttf.getUint16(),
  24166. rangeShift: ttf.getUint16()
  24167. };
  24168. }
  24169. /**
  24170. * Read the appropriate subtable from the cmap according to 9.6.6.4 from
  24171. * PDF spec
  24172. */
  24173. function readCmapTable(cmap, font, isSymbolicFont) {
  24174. var segment;
  24175. var start = (font.start ? font.start : 0) + cmap.offset;
  24176. font.pos = start;
  24177. var version = font.getUint16();
  24178. var numTables = font.getUint16();
  24179. var potentialTable;
  24180. var canBreak = false;
  24181. // There's an order of preference in terms of which cmap subtable to
  24182. // use:
  24183. // - non-symbolic fonts the preference is a 3,1 table then a 1,0 table
  24184. // - symbolic fonts the preference is a 3,0 table then a 1,0 table
  24185. // The following takes advantage of the fact that the tables are sorted
  24186. // to work.
  24187. for (var i = 0; i < numTables; i++) {
  24188. var platformId = font.getUint16();
  24189. var encodingId = font.getUint16();
  24190. var offset = font.getInt32() >>> 0;
  24191. var useTable = false;
  24192. if (platformId == 1 && encodingId === 0) {
  24193. useTable = true;
  24194. // Continue the loop since there still may be a higher priority
  24195. // table.
  24196. } else if (!isSymbolicFont && platformId === 3 && encodingId === 1) {
  24197. useTable = true;
  24198. canBreak = true;
  24199. } else if (isSymbolicFont && platformId === 3 && encodingId === 0) {
  24200. useTable = true;
  24201. canBreak = true;
  24202. }
  24203. if (useTable) {
  24204. potentialTable = {
  24205. platformId: platformId,
  24206. encodingId: encodingId,
  24207. offset: offset
  24208. };
  24209. }
  24210. if (canBreak) {
  24211. break;
  24212. }
  24213. }
  24214. if (!potentialTable) {
  24215. warn('Could not find a preferred cmap table.');
  24216. return [];
  24217. }
  24218. font.pos = start + potentialTable.offset;
  24219. var format = font.getUint16();
  24220. var length = font.getUint16();
  24221. var language = font.getUint16();
  24222. var hasShortCmap = false;
  24223. var mappings = [];
  24224. var j, glyphId;
  24225. // TODO(mack): refactor this cmap subtable reading logic out
  24226. if (format === 0) {
  24227. for (j = 0; j < 256; j++) {
  24228. var index = font.getByte();
  24229. if (!index) {
  24230. continue;
  24231. }
  24232. mappings.push({
  24233. charCode: j,
  24234. glyphId: index
  24235. });
  24236. }
  24237. hasShortCmap = true;
  24238. } else if (format === 4) {
  24239. // re-creating the table in format 4 since the encoding
  24240. // might be changed
  24241. var segCount = (font.getUint16() >> 1);
  24242. font.getBytes(6); // skipping range fields
  24243. var segIndex, segments = [];
  24244. for (segIndex = 0; segIndex < segCount; segIndex++) {
  24245. segments.push({ end: font.getUint16() });
  24246. }
  24247. font.getUint16();
  24248. for (segIndex = 0; segIndex < segCount; segIndex++) {
  24249. segments[segIndex].start = font.getUint16();
  24250. }
  24251. for (segIndex = 0; segIndex < segCount; segIndex++) {
  24252. segments[segIndex].delta = font.getUint16();
  24253. }
  24254. var offsetsCount = 0;
  24255. for (segIndex = 0; segIndex < segCount; segIndex++) {
  24256. segment = segments[segIndex];
  24257. var rangeOffset = font.getUint16();
  24258. if (!rangeOffset) {
  24259. segment.offsetIndex = -1;
  24260. continue;
  24261. }
  24262. var offsetIndex = (rangeOffset >> 1) - (segCount - segIndex);
  24263. segment.offsetIndex = offsetIndex;
  24264. offsetsCount = Math.max(offsetsCount, offsetIndex +
  24265. segment.end - segment.start + 1);
  24266. }
  24267. var offsets = [];
  24268. for (j = 0; j < offsetsCount; j++) {
  24269. offsets.push(font.getUint16());
  24270. }
  24271. for (segIndex = 0; segIndex < segCount; segIndex++) {
  24272. segment = segments[segIndex];
  24273. start = segment.start;
  24274. var end = segment.end;
  24275. var delta = segment.delta;
  24276. offsetIndex = segment.offsetIndex;
  24277. for (j = start; j <= end; j++) {
  24278. if (j == 0xFFFF) {
  24279. continue;
  24280. }
  24281. glyphId = (offsetIndex < 0 ?
  24282. j : offsets[offsetIndex + j - start]);
  24283. glyphId = (glyphId + delta) & 0xFFFF;
  24284. if (glyphId === 0) {
  24285. continue;
  24286. }
  24287. mappings.push({
  24288. charCode: j,
  24289. glyphId: glyphId
  24290. });
  24291. }
  24292. }
  24293. } else if (format == 6) {
  24294. // Format 6 is a 2-bytes dense mapping, which means the font data
  24295. // lives glue together even if they are pretty far in the unicode
  24296. // table. (This looks weird, so I can have missed something), this
  24297. // works on Linux but seems to fails on Mac so let's rewrite the
  24298. // cmap table to a 3-1-4 style
  24299. var firstCode = font.getUint16();
  24300. var entryCount = font.getUint16();
  24301. for (j = 0; j < entryCount; j++) {
  24302. glyphId = font.getUint16();
  24303. var charCode = firstCode + j;
  24304. mappings.push({
  24305. charCode: charCode,
  24306. glyphId: glyphId
  24307. });
  24308. }
  24309. } else {
  24310. error('cmap table has unsupported format: ' + format);
  24311. }
  24312. // removing duplicate entries
  24313. mappings.sort(function (a, b) {
  24314. return a.charCode - b.charCode;
  24315. });
  24316. for (i = 1; i < mappings.length; i++) {
  24317. if (mappings[i - 1].charCode === mappings[i].charCode) {
  24318. mappings.splice(i, 1);
  24319. i--;
  24320. }
  24321. }
  24322. return {
  24323. platformId: potentialTable.platformId,
  24324. encodingId: potentialTable.encodingId,
  24325. mappings: mappings,
  24326. hasShortCmap: hasShortCmap
  24327. };
  24328. }
  24329. function sanitizeMetrics(font, header, metrics, numGlyphs) {
  24330. if (!header) {
  24331. if (metrics) {
  24332. metrics.data = null;
  24333. }
  24334. return;
  24335. }
  24336. font.pos = (font.start ? font.start : 0) + header.offset;
  24337. font.pos += header.length - 2;
  24338. var numOfMetrics = font.getUint16();
  24339. if (numOfMetrics > numGlyphs) {
  24340. info('The numOfMetrics (' + numOfMetrics + ') should not be ' +
  24341. 'greater than the numGlyphs (' + numGlyphs + ')');
  24342. // Reduce numOfMetrics if it is greater than numGlyphs
  24343. numOfMetrics = numGlyphs;
  24344. header.data[34] = (numOfMetrics & 0xff00) >> 8;
  24345. header.data[35] = numOfMetrics & 0x00ff;
  24346. }
  24347. var numOfSidebearings = numGlyphs - numOfMetrics;
  24348. var numMissing = numOfSidebearings -
  24349. ((metrics.length - numOfMetrics * 4) >> 1);
  24350. var i, ii;
  24351. if (numMissing > 0) {
  24352. font.pos = (font.start ? font.start : 0) + metrics.offset;
  24353. var entries = '';
  24354. for (i = 0, ii = metrics.length; i < ii; i++) {
  24355. entries += String.fromCharCode(font.getByte());
  24356. }
  24357. for (i = 0; i < numMissing; i++) {
  24358. entries += '\x00\x00';
  24359. }
  24360. metrics.data = stringToArray(entries);
  24361. }
  24362. }
  24363. function sanitizeGlyph(source, sourceStart, sourceEnd, dest, destStart,
  24364. hintsValid) {
  24365. if (sourceEnd - sourceStart <= 12) {
  24366. // glyph with data less than 12 is invalid one
  24367. return 0;
  24368. }
  24369. var glyf = source.subarray(sourceStart, sourceEnd);
  24370. var contoursCount = (glyf[0] << 8) | glyf[1];
  24371. if (contoursCount & 0x8000) {
  24372. // complex glyph, writing as is
  24373. dest.set(glyf, destStart);
  24374. return glyf.length;
  24375. }
  24376. var i, j = 10, flagsCount = 0;
  24377. for (i = 0; i < contoursCount; i++) {
  24378. var endPoint = (glyf[j] << 8) | glyf[j + 1];
  24379. flagsCount = endPoint + 1;
  24380. j += 2;
  24381. }
  24382. // skipping instructions
  24383. var instructionsStart = j;
  24384. var instructionsLength = (glyf[j] << 8) | glyf[j + 1];
  24385. j += 2 + instructionsLength;
  24386. var instructionsEnd = j;
  24387. // validating flags
  24388. var coordinatesLength = 0;
  24389. for (i = 0; i < flagsCount; i++) {
  24390. var flag = glyf[j++];
  24391. if (flag & 0xC0) {
  24392. // reserved flags must be zero, cleaning up
  24393. glyf[j - 1] = flag & 0x3F;
  24394. }
  24395. var xyLength = ((flag & 2) ? 1 : (flag & 16) ? 0 : 2) +
  24396. ((flag & 4) ? 1 : (flag & 32) ? 0 : 2);
  24397. coordinatesLength += xyLength;
  24398. if (flag & 8) {
  24399. var repeat = glyf[j++];
  24400. i += repeat;
  24401. coordinatesLength += repeat * xyLength;
  24402. }
  24403. }
  24404. // glyph without coordinates will be rejected
  24405. if (coordinatesLength === 0) {
  24406. return 0;
  24407. }
  24408. var glyphDataLength = j + coordinatesLength;
  24409. if (glyphDataLength > glyf.length) {
  24410. // not enough data for coordinates
  24411. return 0;
  24412. }
  24413. if (!hintsValid && instructionsLength > 0) {
  24414. dest.set(glyf.subarray(0, instructionsStart), destStart);
  24415. dest.set([0, 0], destStart + instructionsStart);
  24416. dest.set(glyf.subarray(instructionsEnd, glyphDataLength),
  24417. destStart + instructionsStart + 2);
  24418. glyphDataLength -= instructionsLength;
  24419. if (glyf.length - glyphDataLength > 3) {
  24420. glyphDataLength = (glyphDataLength + 3) & ~3;
  24421. }
  24422. return glyphDataLength;
  24423. }
  24424. if (glyf.length - glyphDataLength > 3) {
  24425. // truncating and aligning to 4 bytes the long glyph data
  24426. glyphDataLength = (glyphDataLength + 3) & ~3;
  24427. dest.set(glyf.subarray(0, glyphDataLength), destStart);
  24428. return glyphDataLength;
  24429. }
  24430. // glyph data is fine
  24431. dest.set(glyf, destStart);
  24432. return glyf.length;
  24433. }
  24434. function sanitizeHead(head, numGlyphs, locaLength) {
  24435. var data = head.data;
  24436. // Validate version:
  24437. // Should always be 0x00010000
  24438. var version = int32(data[0], data[1], data[2], data[3]);
  24439. if (version >> 16 !== 1) {
  24440. info('Attempting to fix invalid version in head table: ' + version);
  24441. data[0] = 0;
  24442. data[1] = 1;
  24443. data[2] = 0;
  24444. data[3] = 0;
  24445. }
  24446. var indexToLocFormat = int16(data[50], data[51]);
  24447. if (indexToLocFormat < 0 || indexToLocFormat > 1) {
  24448. info('Attempting to fix invalid indexToLocFormat in head table: ' +
  24449. indexToLocFormat);
  24450. // The value of indexToLocFormat should be 0 if the loca table
  24451. // consists of short offsets, and should be 1 if the loca table
  24452. // consists of long offsets.
  24453. //
  24454. // The number of entries in the loca table should be numGlyphs + 1.
  24455. //
  24456. // Using this information, we can work backwards to deduce if the
  24457. // size of each offset in the loca table, and thus figure out the
  24458. // appropriate value for indexToLocFormat.
  24459. var numGlyphsPlusOne = numGlyphs + 1;
  24460. if (locaLength === numGlyphsPlusOne << 1) {
  24461. // 0x0000 indicates the loca table consists of short offsets
  24462. data[50] = 0;
  24463. data[51] = 0;
  24464. } else if (locaLength === numGlyphsPlusOne << 2) {
  24465. // 0x0001 indicates the loca table consists of long offsets
  24466. data[50] = 0;
  24467. data[51] = 1;
  24468. } else {
  24469. warn('Could not fix indexToLocFormat: ' + indexToLocFormat);
  24470. }
  24471. }
  24472. }
  24473. function sanitizeGlyphLocations(loca, glyf, numGlyphs,
  24474. isGlyphLocationsLong, hintsValid,
  24475. dupFirstEntry) {
  24476. var itemSize, itemDecode, itemEncode;
  24477. if (isGlyphLocationsLong) {
  24478. itemSize = 4;
  24479. itemDecode = function fontItemDecodeLong(data, offset) {
  24480. return (data[offset] << 24) | (data[offset + 1] << 16) |
  24481. (data[offset + 2] << 8) | data[offset + 3];
  24482. };
  24483. itemEncode = function fontItemEncodeLong(data, offset, value) {
  24484. data[offset] = (value >>> 24) & 0xFF;
  24485. data[offset + 1] = (value >> 16) & 0xFF;
  24486. data[offset + 2] = (value >> 8) & 0xFF;
  24487. data[offset + 3] = value & 0xFF;
  24488. };
  24489. } else {
  24490. itemSize = 2;
  24491. itemDecode = function fontItemDecode(data, offset) {
  24492. return (data[offset] << 9) | (data[offset + 1] << 1);
  24493. };
  24494. itemEncode = function fontItemEncode(data, offset, value) {
  24495. data[offset] = (value >> 9) & 0xFF;
  24496. data[offset + 1] = (value >> 1) & 0xFF;
  24497. };
  24498. }
  24499. var locaData = loca.data;
  24500. var locaDataSize = itemSize * (1 + numGlyphs);
  24501. // is loca.data too short or long?
  24502. if (locaData.length !== locaDataSize) {
  24503. locaData = new Uint8Array(locaDataSize);
  24504. locaData.set(loca.data.subarray(0, locaDataSize));
  24505. loca.data = locaData;
  24506. }
  24507. // removing the invalid glyphs
  24508. var oldGlyfData = glyf.data;
  24509. var oldGlyfDataLength = oldGlyfData.length;
  24510. var newGlyfData = new Uint8Array(oldGlyfDataLength);
  24511. var startOffset = itemDecode(locaData, 0);
  24512. var writeOffset = 0;
  24513. itemEncode(locaData, 0, writeOffset);
  24514. var i, j;
  24515. for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) {
  24516. var endOffset = itemDecode(locaData, j);
  24517. if (endOffset > oldGlyfDataLength &&
  24518. ((oldGlyfDataLength + 3) & ~3) === endOffset) {
  24519. // Aspose breaks fonts by aligning the glyphs to the qword, but not
  24520. // the glyf table size, which makes last glyph out of range.
  24521. endOffset = oldGlyfDataLength;
  24522. }
  24523. if (endOffset > oldGlyfDataLength) {
  24524. // glyph end offset points outside glyf data, rejecting the glyph
  24525. itemEncode(locaData, j, writeOffset);
  24526. startOffset = endOffset;
  24527. continue;
  24528. }
  24529. var newLength = sanitizeGlyph(oldGlyfData, startOffset, endOffset,
  24530. newGlyfData, writeOffset, hintsValid);
  24531. writeOffset += newLength;
  24532. itemEncode(locaData, j, writeOffset);
  24533. startOffset = endOffset;
  24534. }
  24535. if (writeOffset === 0) {
  24536. // glyf table cannot be empty -- redoing the glyf and loca tables
  24537. // to have single glyph with one point
  24538. var simpleGlyph = new Uint8Array(
  24539. [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0]);
  24540. for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) {
  24541. itemEncode(locaData, j, simpleGlyph.length);
  24542. }
  24543. glyf.data = simpleGlyph;
  24544. return;
  24545. }
  24546. if (dupFirstEntry) {
  24547. var firstEntryLength = itemDecode(locaData, itemSize);
  24548. if (newGlyfData.length > firstEntryLength + writeOffset) {
  24549. glyf.data = newGlyfData.subarray(0, firstEntryLength + writeOffset);
  24550. } else {
  24551. glyf.data = new Uint8Array(firstEntryLength + writeOffset);
  24552. glyf.data.set(newGlyfData.subarray(0, writeOffset));
  24553. }
  24554. glyf.data.set(newGlyfData.subarray(0, firstEntryLength), writeOffset);
  24555. itemEncode(loca.data, locaData.length - itemSize,
  24556. writeOffset + firstEntryLength);
  24557. } else {
  24558. glyf.data = newGlyfData.subarray(0, writeOffset);
  24559. }
  24560. }
  24561. function readPostScriptTable(post, properties, maxpNumGlyphs) {
  24562. var start = (font.start ? font.start : 0) + post.offset;
  24563. font.pos = start;
  24564. var length = post.length, end = start + length;
  24565. var version = font.getInt32();
  24566. // skip rest to the tables
  24567. font.getBytes(28);
  24568. var glyphNames;
  24569. var valid = true;
  24570. var i;
  24571. switch (version) {
  24572. case 0x00010000:
  24573. glyphNames = MacStandardGlyphOrdering;
  24574. break;
  24575. case 0x00020000:
  24576. var numGlyphs = font.getUint16();
  24577. if (numGlyphs != maxpNumGlyphs) {
  24578. valid = false;
  24579. break;
  24580. }
  24581. var glyphNameIndexes = [];
  24582. for (i = 0; i < numGlyphs; ++i) {
  24583. var index = font.getUint16();
  24584. if (index >= 32768) {
  24585. valid = false;
  24586. break;
  24587. }
  24588. glyphNameIndexes.push(index);
  24589. }
  24590. if (!valid) {
  24591. break;
  24592. }
  24593. var customNames = [];
  24594. while (font.pos < end) {
  24595. var stringLength = font.getByte();
  24596. var string = '';
  24597. for (i = 0; i < stringLength; ++i) {
  24598. string += String.fromCharCode(font.getByte());
  24599. }
  24600. customNames.push(string);
  24601. }
  24602. glyphNames = [];
  24603. for (i = 0; i < numGlyphs; ++i) {
  24604. var j = glyphNameIndexes[i];
  24605. if (j < 258) {
  24606. glyphNames.push(MacStandardGlyphOrdering[j]);
  24607. continue;
  24608. }
  24609. glyphNames.push(customNames[j - 258]);
  24610. }
  24611. break;
  24612. case 0x00030000:
  24613. break;
  24614. default:
  24615. warn('Unknown/unsupported post table version ' + version);
  24616. valid = false;
  24617. break;
  24618. }
  24619. properties.glyphNames = glyphNames;
  24620. return valid;
  24621. }
  24622. function readNameTable(nameTable) {
  24623. var start = (font.start ? font.start : 0) + nameTable.offset;
  24624. font.pos = start;
  24625. var names = [[], []];
  24626. var length = nameTable.length, end = start + length;
  24627. var format = font.getUint16();
  24628. var FORMAT_0_HEADER_LENGTH = 6;
  24629. if (format !== 0 || length < FORMAT_0_HEADER_LENGTH) {
  24630. // unsupported name table format or table "too" small
  24631. return names;
  24632. }
  24633. var numRecords = font.getUint16();
  24634. var stringsStart = font.getUint16();
  24635. var records = [];
  24636. var NAME_RECORD_LENGTH = 12;
  24637. var i, ii;
  24638. for (i = 0; i < numRecords &&
  24639. font.pos + NAME_RECORD_LENGTH <= end; i++) {
  24640. var r = {
  24641. platform: font.getUint16(),
  24642. encoding: font.getUint16(),
  24643. language: font.getUint16(),
  24644. name: font.getUint16(),
  24645. length: font.getUint16(),
  24646. offset: font.getUint16()
  24647. };
  24648. // using only Macintosh and Windows platform/encoding names
  24649. if ((r.platform == 1 && r.encoding === 0 && r.language === 0) ||
  24650. (r.platform == 3 && r.encoding == 1 && r.language == 0x409)) {
  24651. records.push(r);
  24652. }
  24653. }
  24654. for (i = 0, ii = records.length; i < ii; i++) {
  24655. var record = records[i];
  24656. var pos = start + stringsStart + record.offset;
  24657. if (pos + record.length > end) {
  24658. continue; // outside of name table, ignoring
  24659. }
  24660. font.pos = pos;
  24661. var nameIndex = record.name;
  24662. if (record.encoding) {
  24663. // unicode
  24664. var str = '';
  24665. for (var j = 0, jj = record.length; j < jj; j += 2) {
  24666. str += String.fromCharCode(font.getUint16());
  24667. }
  24668. names[1][nameIndex] = str;
  24669. } else {
  24670. names[0][nameIndex] = bytesToString(font.getBytes(record.length));
  24671. }
  24672. }
  24673. return names;
  24674. }
  24675. var TTOpsStackDeltas = [
  24676. 0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5,
  24677. -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1,
  24678. 1, -1, -999, 0, 1, 0, -1, -2, 0, -1, -2, -1, -1, 0, -1, -1,
  24679. 0, 0, -999, -999, -1, -1, -1, -1, -2, -999, -2, -2, -999, 0, -2, -2,
  24680. 0, 0, -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1,
  24681. -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1,
  24682. -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  24683. -2, -999, -999, -999, -999, -999, -1, -1, -2, -2, 0, 0, 0, 0, -1, -1,
  24684. -999, -2, -2, 0, 0, -1, -2, -2, 0, 0, 0, -1, -1, -1, -2];
  24685. // 0xC0-DF == -1 and 0xE0-FF == -2
  24686. function sanitizeTTProgram(table, ttContext) {
  24687. var data = table.data;
  24688. var i = 0, j, n, b, funcId, pc, lastEndf = 0, lastDeff = 0;
  24689. var stack = [];
  24690. var callstack = [];
  24691. var functionsCalled = [];
  24692. var tooComplexToFollowFunctions =
  24693. ttContext.tooComplexToFollowFunctions;
  24694. var inFDEF = false, ifLevel = 0, inELSE = 0;
  24695. for (var ii = data.length; i < ii;) {
  24696. var op = data[i++];
  24697. // The TrueType instruction set docs can be found at
  24698. // https://developer.apple.com/fonts/TTRefMan/RM05/Chap5.html
  24699. if (op === 0x40) { // NPUSHB - pushes n bytes
  24700. n = data[i++];
  24701. if (inFDEF || inELSE) {
  24702. i += n;
  24703. } else {
  24704. for (j = 0; j < n; j++) {
  24705. stack.push(data[i++]);
  24706. }
  24707. }
  24708. } else if (op === 0x41) { // NPUSHW - pushes n words
  24709. n = data[i++];
  24710. if (inFDEF || inELSE) {
  24711. i += n * 2;
  24712. } else {
  24713. for (j = 0; j < n; j++) {
  24714. b = data[i++];
  24715. stack.push((b << 8) | data[i++]);
  24716. }
  24717. }
  24718. } else if ((op & 0xF8) === 0xB0) { // PUSHB - pushes bytes
  24719. n = op - 0xB0 + 1;
  24720. if (inFDEF || inELSE) {
  24721. i += n;
  24722. } else {
  24723. for (j = 0; j < n; j++) {
  24724. stack.push(data[i++]);
  24725. }
  24726. }
  24727. } else if ((op & 0xF8) === 0xB8) { // PUSHW - pushes words
  24728. n = op - 0xB8 + 1;
  24729. if (inFDEF || inELSE) {
  24730. i += n * 2;
  24731. } else {
  24732. for (j = 0; j < n; j++) {
  24733. b = data[i++];
  24734. stack.push((b << 8) | data[i++]);
  24735. }
  24736. }
  24737. } else if (op === 0x2B && !tooComplexToFollowFunctions) { // CALL
  24738. if (!inFDEF && !inELSE) {
  24739. // collecting inforamtion about which functions are used
  24740. funcId = stack[stack.length - 1];
  24741. ttContext.functionsUsed[funcId] = true;
  24742. if (funcId in ttContext.functionsStackDeltas) {
  24743. stack.length += ttContext.functionsStackDeltas[funcId];
  24744. } else if (funcId in ttContext.functionsDefined &&
  24745. functionsCalled.indexOf(funcId) < 0) {
  24746. callstack.push({data: data, i: i, stackTop: stack.length - 1});
  24747. functionsCalled.push(funcId);
  24748. pc = ttContext.functionsDefined[funcId];
  24749. if (!pc) {
  24750. warn('TT: CALL non-existent function');
  24751. ttContext.hintsValid = false;
  24752. return;
  24753. }
  24754. data = pc.data;
  24755. i = pc.i;
  24756. }
  24757. }
  24758. } else if (op === 0x2C && !tooComplexToFollowFunctions) { // FDEF
  24759. if (inFDEF || inELSE) {
  24760. warn('TT: nested FDEFs not allowed');
  24761. tooComplexToFollowFunctions = true;
  24762. }
  24763. inFDEF = true;
  24764. // collecting inforamtion about which functions are defined
  24765. lastDeff = i;
  24766. funcId = stack.pop();
  24767. ttContext.functionsDefined[funcId] = {data: data, i: i};
  24768. } else if (op === 0x2D) { // ENDF - end of function
  24769. if (inFDEF) {
  24770. inFDEF = false;
  24771. lastEndf = i;
  24772. } else {
  24773. pc = callstack.pop();
  24774. if (!pc) {
  24775. warn('TT: ENDF bad stack');
  24776. ttContext.hintsValid = false;
  24777. return;
  24778. }
  24779. funcId = functionsCalled.pop();
  24780. data = pc.data;
  24781. i = pc.i;
  24782. ttContext.functionsStackDeltas[funcId] =
  24783. stack.length - pc.stackTop;
  24784. }
  24785. } else if (op === 0x89) { // IDEF - instruction definition
  24786. if (inFDEF || inELSE) {
  24787. warn('TT: nested IDEFs not allowed');
  24788. tooComplexToFollowFunctions = true;
  24789. }
  24790. inFDEF = true;
  24791. // recording it as a function to track ENDF
  24792. lastDeff = i;
  24793. } else if (op === 0x58) { // IF
  24794. ++ifLevel;
  24795. } else if (op === 0x1B) { // ELSE
  24796. inELSE = ifLevel;
  24797. } else if (op === 0x59) { // EIF
  24798. if (inELSE === ifLevel) {
  24799. inELSE = 0;
  24800. }
  24801. --ifLevel;
  24802. } else if (op === 0x1C) { // JMPR
  24803. if (!inFDEF && !inELSE) {
  24804. var offset = stack[stack.length - 1];
  24805. // only jumping forward to prevent infinite loop
  24806. if (offset > 0) {
  24807. i += offset - 1;
  24808. }
  24809. }
  24810. }
  24811. // Adjusting stack not extactly, but just enough to get function id
  24812. if (!inFDEF && !inELSE) {
  24813. var stackDelta = op <= 0x8E ? TTOpsStackDeltas[op] :
  24814. op >= 0xC0 && op <= 0xDF ? -1 : op >= 0xE0 ? -2 : 0;
  24815. if (op >= 0x71 && op <= 0x75) {
  24816. n = stack.pop();
  24817. if (n === n) {
  24818. stackDelta = -n * 2;
  24819. }
  24820. }
  24821. while (stackDelta < 0 && stack.length > 0) {
  24822. stack.pop();
  24823. stackDelta++;
  24824. }
  24825. while (stackDelta > 0) {
  24826. stack.push(NaN); // pushing any number into stack
  24827. stackDelta--;
  24828. }
  24829. }
  24830. }
  24831. ttContext.tooComplexToFollowFunctions = tooComplexToFollowFunctions;
  24832. var content = [data];
  24833. if (i > data.length) {
  24834. content.push(new Uint8Array(i - data.length));
  24835. }
  24836. if (lastDeff > lastEndf) {
  24837. warn('TT: complementing a missing function tail');
  24838. // new function definition started, but not finished
  24839. // complete function by [CLEAR, ENDF]
  24840. content.push(new Uint8Array([0x22, 0x2D]));
  24841. }
  24842. foldTTTable(table, content);
  24843. }
  24844. function checkInvalidFunctions(ttContext, maxFunctionDefs) {
  24845. if (ttContext.tooComplexToFollowFunctions) {
  24846. return;
  24847. }
  24848. if (ttContext.functionsDefined.length > maxFunctionDefs) {
  24849. warn('TT: more functions defined than expected');
  24850. ttContext.hintsValid = false;
  24851. return;
  24852. }
  24853. for (var j = 0, jj = ttContext.functionsUsed.length; j < jj; j++) {
  24854. if (j > maxFunctionDefs) {
  24855. warn('TT: invalid function id: ' + j);
  24856. ttContext.hintsValid = false;
  24857. return;
  24858. }
  24859. if (ttContext.functionsUsed[j] && !ttContext.functionsDefined[j]) {
  24860. warn('TT: undefined function: ' + j);
  24861. ttContext.hintsValid = false;
  24862. return;
  24863. }
  24864. }
  24865. }
  24866. function foldTTTable(table, content) {
  24867. if (content.length > 1) {
  24868. // concatenating the content items
  24869. var newLength = 0;
  24870. var j, jj;
  24871. for (j = 0, jj = content.length; j < jj; j++) {
  24872. newLength += content[j].length;
  24873. }
  24874. newLength = (newLength + 3) & ~3;
  24875. var result = new Uint8Array(newLength);
  24876. var pos = 0;
  24877. for (j = 0, jj = content.length; j < jj; j++) {
  24878. result.set(content[j], pos);
  24879. pos += content[j].length;
  24880. }
  24881. table.data = result;
  24882. table.length = newLength;
  24883. }
  24884. }
  24885. function sanitizeTTPrograms(fpgm, prep, cvt) {
  24886. var ttContext = {
  24887. functionsDefined: [],
  24888. functionsUsed: [],
  24889. functionsStackDeltas: [],
  24890. tooComplexToFollowFunctions: false,
  24891. hintsValid: true
  24892. };
  24893. if (fpgm) {
  24894. sanitizeTTProgram(fpgm, ttContext);
  24895. }
  24896. if (prep) {
  24897. sanitizeTTProgram(prep, ttContext);
  24898. }
  24899. if (fpgm) {
  24900. checkInvalidFunctions(ttContext, maxFunctionDefs);
  24901. }
  24902. if (cvt && (cvt.length & 1)) {
  24903. var cvtData = new Uint8Array(cvt.length + 1);
  24904. cvtData.set(cvt.data);
  24905. cvt.data = cvtData;
  24906. }
  24907. return ttContext.hintsValid;
  24908. }
  24909. // The following steps modify the original font data, making copy
  24910. font = new Stream(new Uint8Array(font.getBytes()));
  24911. var VALID_TABLES = ['OS/2', 'cmap', 'head', 'hhea', 'hmtx', 'maxp',
  24912. 'name', 'post', 'loca', 'glyf', 'fpgm', 'prep', 'cvt ', 'CFF '];
  24913. var header = readOpenTypeHeader(font);
  24914. var numTables = header.numTables;
  24915. var cff, cffFile;
  24916. var tables = { 'OS/2': null, cmap: null, head: null, hhea: null,
  24917. hmtx: null, maxp: null, name: null, post: null };
  24918. var table, tableData;
  24919. for (var i = 0; i < numTables; i++) {
  24920. table = readTableEntry(font);
  24921. if (VALID_TABLES.indexOf(table.tag) < 0) {
  24922. continue; // skipping table if it's not a required or optional table
  24923. }
  24924. if (table.length === 0) {
  24925. continue; // skipping empty tables
  24926. }
  24927. tables[table.tag] = table;
  24928. }
  24929. var isTrueType = !tables['CFF '];
  24930. if (!isTrueType) {
  24931. // OpenType font
  24932. if (!tables.head || !tables.hhea || !tables.maxp || !tables.post) {
  24933. // no major tables: throwing everything at CFFFont
  24934. cffFile = new Stream(tables['CFF '].data);
  24935. cff = new CFFFont(cffFile, properties);
  24936. return this.convert(name, cff, properties);
  24937. }
  24938. delete tables.glyf;
  24939. delete tables.loca;
  24940. delete tables.fpgm;
  24941. delete tables.prep;
  24942. delete tables['cvt '];
  24943. } else {
  24944. if (!tables.glyf || !tables.loca) {
  24945. error('Required "glyf" or "loca" tables are not found');
  24946. }
  24947. }
  24948. if (!tables.maxp) {
  24949. error('Required "maxp" table is not found');
  24950. }
  24951. font.pos = (font.start || 0) + tables.maxp.offset;
  24952. var version = font.getInt32();
  24953. var numGlyphs = font.getUint16();
  24954. var maxFunctionDefs = 0;
  24955. if (version >= 0x00010000 && tables.maxp.length >= 22) {
  24956. // maxZones can be invalid
  24957. font.pos += 8;
  24958. var maxZones = font.getUint16();
  24959. if (maxZones > 2) { // reset to 2 if font has invalid maxZones
  24960. tables.maxp.data[14] = 0;
  24961. tables.maxp.data[15] = 2;
  24962. }
  24963. font.pos += 4;
  24964. maxFunctionDefs = font.getUint16();
  24965. }
  24966. var dupFirstEntry = false;
  24967. if (properties.type == 'CIDFontType2' && properties.toUnicode &&
  24968. properties.toUnicode[0] > '\u0000') {
  24969. // oracle's defect (see 3427), duplicating first entry
  24970. dupFirstEntry = true;
  24971. numGlyphs++;
  24972. tables.maxp.data[4] = numGlyphs >> 8;
  24973. tables.maxp.data[5] = numGlyphs & 255;
  24974. }
  24975. var hintsValid = sanitizeTTPrograms(tables.fpgm, tables.prep,
  24976. tables['cvt '], maxFunctionDefs);
  24977. if (!hintsValid) {
  24978. delete tables.fpgm;
  24979. delete tables.prep;
  24980. delete tables['cvt '];
  24981. }
  24982. // Tables needs to be written by ascendant alphabetic order
  24983. var tablesNames = Object.keys(tables);
  24984. tablesNames.sort();
  24985. numTables = tablesNames.length;
  24986. // header and new offsets. Table entry information is appended to the
  24987. // end of file. The virtualOffset represents where to put the actual
  24988. // data of a particular table;
  24989. var ttf = {
  24990. file: '',
  24991. virtualOffset: numTables * (4 * 4)
  24992. };
  24993. // The new numbers of tables will be the last one plus the num
  24994. // of missing tables
  24995. createOpenTypeHeader(header.version, ttf, numTables);
  24996. // Ensure the hmtx table contains the advance width and
  24997. // sidebearings information for numGlyphs in the maxp table
  24998. sanitizeMetrics(font, tables.hhea, tables.hmtx, numGlyphs);
  24999. if (!tables.head) {
  25000. error('Required "head" table is not found');
  25001. }
  25002. sanitizeHead(tables.head, numGlyphs, isTrueType ? tables.loca.length : 0);
  25003. if (isTrueType) {
  25004. var isGlyphLocationsLong = int16(tables.head.data[50],
  25005. tables.head.data[51]);
  25006. sanitizeGlyphLocations(tables.loca, tables.glyf, numGlyphs,
  25007. isGlyphLocationsLong, hintsValid, dupFirstEntry);
  25008. }
  25009. if (!tables.hhea) {
  25010. error('Required "hhea" table is not found');
  25011. }
  25012. // Sanitizer reduces the glyph advanceWidth to the maxAdvanceWidth
  25013. // Sometimes it's 0. That needs to be fixed
  25014. if (tables.hhea.data[10] === 0 && tables.hhea.data[11] === 0) {
  25015. tables.hhea.data[10] = 0xFF;
  25016. tables.hhea.data[11] = 0xFF;
  25017. }
  25018. // The 'post' table has glyphs names.
  25019. if (tables.post) {
  25020. var valid = readPostScriptTable(tables.post, properties, numGlyphs);
  25021. if (!valid) {
  25022. tables.post = null;
  25023. }
  25024. }
  25025. var charCodeToGlyphId = [], charCode;
  25026. if (properties.type == 'CIDFontType2') {
  25027. var cidToGidMap = properties.cidToGidMap || [];
  25028. var cMap = properties.cMap.map;
  25029. for (charCode in cMap) {
  25030. charCode |= 0;
  25031. var cid = cMap[charCode];
  25032. assert(cid.length === 1, 'Max size of CID is 65,535');
  25033. cid = cid.charCodeAt(0);
  25034. var glyphId = -1;
  25035. if (cidToGidMap.length === 0) {
  25036. glyphId = charCode;
  25037. } else if (cid in cidToGidMap) {
  25038. glyphId = cidToGidMap[cid];
  25039. }
  25040. if (glyphId >= 0 && glyphId < numGlyphs) {
  25041. charCodeToGlyphId[charCode] = glyphId;
  25042. }
  25043. }
  25044. if (dupFirstEntry) {
  25045. charCodeToGlyphId[0] = numGlyphs - 1;
  25046. }
  25047. } else {
  25048. // Most of the following logic in this code branch is based on the
  25049. // 9.6.6.4 of the PDF spec.
  25050. var cmapTable = readCmapTable(tables.cmap, font, this.isSymbolicFont);
  25051. var cmapPlatformId = cmapTable.platformId;
  25052. var cmapEncodingId = cmapTable.encodingId;
  25053. var cmapMappings = cmapTable.mappings;
  25054. var cmapMappingsLength = cmapMappings.length;
  25055. var hasEncoding = properties.differences.length ||
  25056. !!properties.baseEncodingName;
  25057. // The spec seems to imply that if the font is symbolic the encoding
  25058. // should be ignored, this doesn't appear to work for 'preistabelle.pdf'
  25059. // where the the font is symbolic and it has an encoding.
  25060. if (hasEncoding &&
  25061. (cmapPlatformId === 3 && cmapEncodingId === 1 ||
  25062. cmapPlatformId === 1 && cmapEncodingId === 0)) {
  25063. var baseEncoding = [];
  25064. if (properties.baseEncodingName === 'MacRomanEncoding' ||
  25065. properties.baseEncodingName === 'WinAnsiEncoding') {
  25066. baseEncoding = Encodings[properties.baseEncodingName];
  25067. }
  25068. for (charCode = 0; charCode < 256; charCode++) {
  25069. var glyphName;
  25070. if (this.differences && charCode in this.differences) {
  25071. glyphName = this.differences[charCode];
  25072. } else if (charCode in baseEncoding &&
  25073. baseEncoding[charCode] !== '') {
  25074. glyphName = baseEncoding[charCode];
  25075. } else {
  25076. glyphName = Encodings.StandardEncoding[charCode];
  25077. }
  25078. if (!glyphName) {
  25079. continue;
  25080. }
  25081. var unicodeOrCharCode;
  25082. if (cmapPlatformId === 3 && cmapEncodingId === 1) {
  25083. unicodeOrCharCode = GlyphsUnicode[glyphName];
  25084. } else if (cmapPlatformId === 1 && cmapEncodingId === 0) {
  25085. // TODO: the encoding needs to be updated with mac os table.
  25086. unicodeOrCharCode = Encodings.MacRomanEncoding.indexOf(glyphName);
  25087. }
  25088. var found = false;
  25089. for (i = 0; i < cmapMappingsLength; ++i) {
  25090. if (cmapMappings[i].charCode === unicodeOrCharCode) {
  25091. charCodeToGlyphId[charCode] = cmapMappings[i].glyphId;
  25092. found = true;
  25093. break;
  25094. }
  25095. }
  25096. if (!found && properties.glyphNames) {
  25097. // Try to map using the post table. There are currently no known
  25098. // pdfs that this fixes.
  25099. glyphId = properties.glyphNames.indexOf(glyphName);
  25100. if (glyphId > 0) {
  25101. charCodeToGlyphId[charCode] = glyphId;
  25102. }
  25103. }
  25104. }
  25105. } else {
  25106. // For (3, 0) cmap tables:
  25107. // The charcode key being stored in charCodeToGlyphId is the lower
  25108. // byte of the two-byte charcodes of the cmap table since according to
  25109. // the spec: 'each byte from the string shall be prepended with the
  25110. // high byte of the range [of charcodes in the cmap table], to form
  25111. // a two-byte character, which shall be used to select the
  25112. // associated glyph description from the subtable'.
  25113. //
  25114. // For (1, 0) cmap tables:
  25115. // 'single bytes from the string shall be used to look up the
  25116. // associated glyph descriptions from the subtable'. This means
  25117. // charcodes in the cmap will be single bytes, so no-op since
  25118. // glyph.charCode & 0xFF === glyph.charCode
  25119. for (i = 0; i < cmapMappingsLength; ++i) {
  25120. charCode = cmapMappings[i].charCode & 0xFF;
  25121. charCodeToGlyphId[charCode] = cmapMappings[i].glyphId;
  25122. }
  25123. }
  25124. }
  25125. if (charCodeToGlyphId.length === 0) {
  25126. // defines at least one glyph
  25127. charCodeToGlyphId[0] = 0;
  25128. }
  25129. // Converting glyphs and ids into font's cmap table
  25130. var newMapping = adjustMapping(charCodeToGlyphId, properties);
  25131. this.toFontChar = newMapping.toFontChar;
  25132. tables.cmap = {
  25133. tag: 'cmap',
  25134. data: createCmapTable(newMapping.charCodeToGlyphId)
  25135. };
  25136. if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) {
  25137. // extract some more font properties from the OpenType head and
  25138. // hhea tables; yMin and descent value are always negative
  25139. var override = {
  25140. unitsPerEm: int16(tables.head.data[18], tables.head.data[19]),
  25141. yMax: int16(tables.head.data[42], tables.head.data[43]),
  25142. yMin: int16(tables.head.data[38], tables.head.data[39]) - 0x10000,
  25143. ascent: int16(tables.hhea.data[4], tables.hhea.data[5]),
  25144. descent: int16(tables.hhea.data[6], tables.hhea.data[7]) - 0x10000
  25145. };
  25146. tables['OS/2'] = {
  25147. tag: 'OS/2',
  25148. data: stringToArray(createOS2Table(properties,
  25149. newMapping.charCodeToGlyphId,
  25150. override))
  25151. };
  25152. }
  25153. // Rewrite the 'post' table if needed
  25154. if (!tables.post) {
  25155. tables.post = {
  25156. tag: 'post',
  25157. data: stringToArray(createPostTable(properties))
  25158. };
  25159. }
  25160. if (!isTrueType) {
  25161. try {
  25162. // Trying to repair CFF file
  25163. cffFile = new Stream(tables['CFF '].data);
  25164. var parser = new CFFParser(cffFile, properties);
  25165. cff = parser.parse();
  25166. var compiler = new CFFCompiler(cff);
  25167. tables['CFF '].data = compiler.compile();
  25168. } catch (e) {
  25169. warn('Failed to compile font ' + properties.loadedName);
  25170. }
  25171. }
  25172. // Re-creating 'name' table
  25173. if (!tables.name) {
  25174. tables.name = {
  25175. tag: 'name',
  25176. data: stringToArray(createNameTable(this.name))
  25177. };
  25178. } else {
  25179. // ... using existing 'name' table as prototype
  25180. var namePrototype = readNameTable(tables.name);
  25181. tables.name.data = stringToArray(createNameTable(name, namePrototype));
  25182. }
  25183. // rewrite the tables but tweak offsets
  25184. for (i = 0; i < numTables; i++) {
  25185. table = tables[tablesNames[i]];
  25186. var data = [];
  25187. tableData = table.data;
  25188. for (var j = 0, jj = tableData.length; j < jj; j++) {
  25189. data.push(tableData[j]);
  25190. }
  25191. createTableEntry(ttf, table.tag, data);
  25192. }
  25193. // Add the table datas
  25194. for (i = 0; i < numTables; i++) {
  25195. table = tables[tablesNames[i]];
  25196. tableData = table.data;
  25197. ttf.file += bytesToString(new Uint8Array(tableData));
  25198. // 4-byte aligned data
  25199. while (ttf.file.length & 3) {
  25200. ttf.file += String.fromCharCode(0);
  25201. }
  25202. }
  25203. return stringToArray(ttf.file);
  25204. },
  25205. convert: function Font_convert(fontName, font, properties) {
  25206. // The offsets object holds at the same time a representation of where
  25207. // to write the table entry information about a table and another offset
  25208. // representing the offset where to draw the actual data of a particular
  25209. // table
  25210. var otf = {
  25211. file: '',
  25212. virtualOffset: 9 * (4 * 4)
  25213. };
  25214. createOpenTypeHeader('\x4F\x54\x54\x4F', otf, 9);
  25215. // TODO: Check the charstring widths to determine this.
  25216. properties.fixedPitch = false;
  25217. var mapping = font.getGlyphMapping(properties);
  25218. var newMapping = adjustMapping(mapping, properties);
  25219. this.toFontChar = newMapping.toFontChar;
  25220. var numGlyphs = font.numGlyphs;
  25221. function getCharCode(charCodeToGlyphId, glyphId, addMap) {
  25222. for (var charCode in charCodeToGlyphId) {
  25223. if (glyphId === charCodeToGlyphId[charCode]) {
  25224. return charCode | 0;
  25225. }
  25226. }
  25227. if (addMap) {
  25228. newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode] =
  25229. glyphId;
  25230. return newMapping.nextAvailableFontCharCode++;
  25231. }
  25232. return null;
  25233. }
  25234. var seacs = font.seacs;
  25235. if (SEAC_ANALYSIS_ENABLED && seacs && seacs.length) {
  25236. var matrix = properties.fontMatrix || FONT_IDENTITY_MATRIX;
  25237. var charset = font.getCharset();
  25238. var seacMap = Object.create(null);
  25239. for (var glyphId in seacs) {
  25240. glyphId |= 0;
  25241. var seac = seacs[glyphId];
  25242. var baseGlyphName = Encodings.StandardEncoding[seac[2]];
  25243. var accentGlyphName = Encodings.StandardEncoding[seac[3]];
  25244. var baseGlyphId = charset.indexOf(baseGlyphName);
  25245. var accentGlyphId = charset.indexOf(accentGlyphName);
  25246. if (baseGlyphId < 0 || accentGlyphId < 0) {
  25247. continue;
  25248. }
  25249. var accentOffset = {
  25250. x: seac[0] * matrix[0] + seac[1] * matrix[2] + matrix[4],
  25251. y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5]
  25252. };
  25253. var charCode = getCharCode(mapping, glyphId);
  25254. if (charCode === null) {
  25255. // There's no point in mapping it if the char code was never mapped
  25256. // to begin with.
  25257. continue;
  25258. }
  25259. // Find a fontCharCode that maps to the base and accent glyphs. If one
  25260. // doesn't exists, create it.
  25261. var charCodeToGlyphId = newMapping.charCodeToGlyphId;
  25262. var baseFontCharCode = getCharCode(charCodeToGlyphId, baseGlyphId,
  25263. true);
  25264. var accentFontCharCode = getCharCode(charCodeToGlyphId, accentGlyphId,
  25265. true);
  25266. seacMap[charCode] = {
  25267. baseFontCharCode: baseFontCharCode,
  25268. accentFontCharCode: accentFontCharCode,
  25269. accentOffset: accentOffset
  25270. };
  25271. }
  25272. properties.seacMap = seacMap;
  25273. }
  25274. var unitsPerEm = 1 / (properties.fontMatrix || FONT_IDENTITY_MATRIX)[0];
  25275. var fields = {
  25276. // PostScript Font Program
  25277. 'CFF ': font.data,
  25278. // OS/2 and Windows Specific metrics
  25279. 'OS/2': stringToArray(createOS2Table(properties,
  25280. newMapping.charCodeToGlyphId)),
  25281. // Character to glyphs mapping
  25282. 'cmap': createCmapTable(newMapping.charCodeToGlyphId),
  25283. // Font header
  25284. 'head': (function fontFieldsHead() {
  25285. return stringToArray(
  25286. '\x00\x01\x00\x00' + // Version number
  25287. '\x00\x00\x10\x00' + // fontRevision
  25288. '\x00\x00\x00\x00' + // checksumAdjustement
  25289. '\x5F\x0F\x3C\xF5' + // magicNumber
  25290. '\x00\x00' + // Flags
  25291. safeString16(unitsPerEm) + // unitsPerEM
  25292. '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + // creation date
  25293. '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + // modifification date
  25294. '\x00\x00' + // xMin
  25295. safeString16(properties.descent) + // yMin
  25296. '\x0F\xFF' + // xMax
  25297. safeString16(properties.ascent) + // yMax
  25298. string16(properties.italicAngle ? 2 : 0) + // macStyle
  25299. '\x00\x11' + // lowestRecPPEM
  25300. '\x00\x00' + // fontDirectionHint
  25301. '\x00\x00' + // indexToLocFormat
  25302. '\x00\x00'); // glyphDataFormat
  25303. })(),
  25304. // Horizontal header
  25305. 'hhea': (function fontFieldsHhea() {
  25306. return stringToArray(
  25307. '\x00\x01\x00\x00' + // Version number
  25308. safeString16(properties.ascent) + // Typographic Ascent
  25309. safeString16(properties.descent) + // Typographic Descent
  25310. '\x00\x00' + // Line Gap
  25311. '\xFF\xFF' + // advanceWidthMax
  25312. '\x00\x00' + // minLeftSidebearing
  25313. '\x00\x00' + // minRightSidebearing
  25314. '\x00\x00' + // xMaxExtent
  25315. safeString16(properties.capHeight) + // caretSlopeRise
  25316. safeString16(Math.tan(properties.italicAngle) *
  25317. properties.xHeight) + // caretSlopeRun
  25318. '\x00\x00' + // caretOffset
  25319. '\x00\x00' + // -reserved-
  25320. '\x00\x00' + // -reserved-
  25321. '\x00\x00' + // -reserved-
  25322. '\x00\x00' + // -reserved-
  25323. '\x00\x00' + // metricDataFormat
  25324. string16(numGlyphs)); // Number of HMetrics
  25325. })(),
  25326. // Horizontal metrics
  25327. 'hmtx': (function fontFieldsHmtx() {
  25328. var charstrings = font.charstrings;
  25329. var hmtx = '\x00\x00\x00\x00'; // Fake .notdef
  25330. for (var i = 1, ii = numGlyphs; i < ii; i++) {
  25331. // TODO: For CFF fonts the width should technically match th x in
  25332. // the glyph, but it doesn't seem to matter.
  25333. var charstring = charstrings ? charstrings[i - 1] : {};
  25334. var width = 'width' in charstring ? charstring.width : 0;
  25335. hmtx += string16(width) + string16(0);
  25336. }
  25337. return stringToArray(hmtx);
  25338. })(),
  25339. // Maximum profile
  25340. 'maxp': (function fontFieldsMaxp() {
  25341. return stringToArray(
  25342. '\x00\x00\x50\x00' + // Version number
  25343. string16(numGlyphs)); // Num of glyphs
  25344. })(),
  25345. // Naming tables
  25346. 'name': stringToArray(createNameTable(fontName)),
  25347. // PostScript informations
  25348. 'post': stringToArray(createPostTable(properties))
  25349. };
  25350. var field;
  25351. for (field in fields) {
  25352. createTableEntry(otf, field, fields[field]);
  25353. }
  25354. for (field in fields) {
  25355. var table = fields[field];
  25356. otf.file += bytesToString(new Uint8Array(table));
  25357. }
  25358. return stringToArray(otf.file);
  25359. },
  25360. /**
  25361. * Builds a char code to unicode map based on section 9.10 of the spec.
  25362. * @param {Object} properties Font properties object.
  25363. * @return {Object} Has two properties: 'toUnicode' which maps char codes to
  25364. * unicode (string) values and 'isIdentity' which is true if an identity map
  25365. * is used.
  25366. */
  25367. buildToUnicode: function Font_buildToUnicode(properties) {
  25368. var map = {
  25369. isIdentity: false,
  25370. toUnicode: null
  25371. };
  25372. // Section 9.10.2 Mapping Character Codes to Unicode Values
  25373. if (properties.toUnicode && properties.toUnicode.length !== 0) {
  25374. map.toUnicode = properties.toUnicode;
  25375. return map;
  25376. }
  25377. // According to the spec if the font is a simple font we should only map
  25378. // to unicode if the base encoding is MacRoman, MacExpert, or WinAnsi or
  25379. // the differences array only contains adobe standard or symbol set names,
  25380. // in pratice it seems better to always try to create a toUnicode
  25381. // map based of the default encoding.
  25382. var toUnicode, charcode;
  25383. if (!properties.composite /* is simple font */) {
  25384. toUnicode = [];
  25385. var encoding = properties.defaultEncoding.slice();
  25386. // Merge in the differences array.
  25387. var differences = properties.differences;
  25388. for (charcode in differences) {
  25389. encoding[charcode] = differences[charcode];
  25390. }
  25391. for (charcode in encoding) {
  25392. // a) Map the character code to a character name.
  25393. var glyphName = encoding[charcode];
  25394. // b) Look up the character name in the Adobe Glyph List (see the
  25395. // Bibliography) to obtain the corresponding Unicode value.
  25396. if (glyphName === '' || !(glyphName in GlyphsUnicode)) {
  25397. // (undocumented) c) Few heuristics to recognize unknown glyphs
  25398. // NOTE: Adobe Reader does not do this step, but OSX Preview does
  25399. var code;
  25400. // Gxx glyph
  25401. if (glyphName.length === 3 &&
  25402. glyphName[0] === 'G' &&
  25403. (code = parseInt(glyphName.substr(1), 16))) {
  25404. toUnicode[charcode] = String.fromCharCode(code);
  25405. }
  25406. // Cddd glyph
  25407. if (glyphName.length >= 3 &&
  25408. glyphName[0] === 'C' &&
  25409. (code = +glyphName.substr(1))) {
  25410. toUnicode[charcode] = String.fromCharCode(code);
  25411. }
  25412. continue;
  25413. }
  25414. toUnicode[charcode] = String.fromCharCode(GlyphsUnicode[glyphName]);
  25415. }
  25416. map.toUnicode = toUnicode;
  25417. return map;
  25418. }
  25419. // If the font is a composite font that uses one of the predefined CMaps
  25420. // listed in Table 118 (except Identity–H and Identity–V) or whose
  25421. // descendant CIDFont uses the Adobe-GB1, Adobe-CNS1, Adobe-Japan1, or
  25422. // Adobe-Korea1 character collection:
  25423. if (properties.composite && (
  25424. (properties.cMap.builtInCMap &&
  25425. !(properties.cMap instanceof IdentityCMap)) ||
  25426. (properties.cidSystemInfo.registry === 'Adobe' &&
  25427. (properties.cidSystemInfo.ordering === 'GB1' ||
  25428. properties.cidSystemInfo.ordering === 'CNS1' ||
  25429. properties.cidSystemInfo.ordering === 'Japan1' ||
  25430. properties.cidSystemInfo.ordering === 'Korea1')))) {
  25431. // Then:
  25432. // a) Map the character code to a character identifier (CID) according
  25433. // to the font’s CMap.
  25434. // b) Obtain the registry and ordering of the character collection used
  25435. // by the font’s CMap (for example, Adobe and Japan1) from its
  25436. // CIDSystemInfo dictionary.
  25437. var registry = properties.cidSystemInfo.registry;
  25438. var ordering = properties.cidSystemInfo.ordering;
  25439. // c) Construct a second CMap name by concatenating the registry and
  25440. // ordering obtained in step (b) in the format registry–ordering–UCS2
  25441. // (for example, Adobe–Japan1–UCS2).
  25442. var ucs2CMapName = new Name(registry + '-' + ordering + '-UCS2');
  25443. // d) Obtain the CMap with the name constructed in step (c) (available
  25444. // from the ASN Web site; see the Bibliography).
  25445. var ucs2CMap = CMapFactory.create(ucs2CMapName,
  25446. { url: PDFJS.cMapUrl, packed: PDFJS.cMapPacked }, null);
  25447. var cMap = properties.cMap;
  25448. toUnicode = [];
  25449. for (charcode in cMap.map) {
  25450. var cid = cMap.map[charcode];
  25451. assert(cid.length === 1, 'Max size of CID is 65,535');
  25452. // e) Map the CID obtained in step (a) according to the CMap obtained
  25453. // in step (d), producing a Unicode value.
  25454. var ucs2 = ucs2CMap.map[cid.charCodeAt(0)];
  25455. if (!ucs2) {
  25456. continue;
  25457. }
  25458. toUnicode[charcode] = String.fromCharCode((ucs2.charCodeAt(0) << 8) +
  25459. ucs2.charCodeAt(1));
  25460. }
  25461. map.toUnicode = toUnicode;
  25462. return map;
  25463. }
  25464. // The viewer's choice, just use an identity map.
  25465. toUnicode = [];
  25466. var firstChar = properties.firstChar, lastChar = properties.lastChar;
  25467. for (var i = firstChar; i <= lastChar; i++) {
  25468. toUnicode[i] = String.fromCharCode(i);
  25469. }
  25470. map.isIdentity = true;
  25471. map.toUnicode = toUnicode;
  25472. return map;
  25473. },
  25474. get spaceWidth() {
  25475. if ('_shadowWidth' in this) {
  25476. return this._shadowWidth;
  25477. }
  25478. // trying to estimate space character width
  25479. var possibleSpaceReplacements = ['space', 'minus', 'one', 'i'];
  25480. var width;
  25481. for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) {
  25482. var glyphName = possibleSpaceReplacements[i];
  25483. // if possible, getting width by glyph name
  25484. if (glyphName in this.widths) {
  25485. width = this.widths[glyphName];
  25486. break;
  25487. }
  25488. var glyphUnicode = GlyphsUnicode[glyphName];
  25489. // finding the charcode via unicodeToCID map
  25490. var charcode = 0;
  25491. if (this.composite) {
  25492. if (glyphUnicode in this.cMap.map) {
  25493. charcode = this.cMap.lookup(glyphUnicode).charCodeAt(0);
  25494. }
  25495. }
  25496. // ... via toUnicode map
  25497. if (!charcode && 'toUnicode' in this) {
  25498. charcode = this.toUnicode.indexOf(glyphUnicode);
  25499. }
  25500. // setting it to unicode if negative or undefined
  25501. if (charcode <= 0) {
  25502. charcode = glyphUnicode;
  25503. }
  25504. // trying to get width via charcode
  25505. width = this.widths[charcode];
  25506. if (width) {
  25507. break; // the non-zero width found
  25508. }
  25509. }
  25510. width = width || this.defaultWidth;
  25511. // Do not shadow the property here. See discussion:
  25512. // https://github.com/mozilla/pdf.js/pull/2127#discussion_r1662280
  25513. this._shadowWidth = width;
  25514. return width;
  25515. },
  25516. charToGlyph: function Font_charToGlyph(charcode) {
  25517. var fontCharCode, width, operatorList;
  25518. var widthCode = charcode;
  25519. if (this.cMap && charcode in this.cMap.map) {
  25520. widthCode = this.cMap.map[charcode].charCodeAt(0);
  25521. }
  25522. width = this.widths[widthCode];
  25523. width = isNum(width) ? width : this.defaultWidth;
  25524. var vmetric = this.vmetrics && this.vmetrics[widthCode];
  25525. var unicode = this.toUnicode[charcode] || charcode;
  25526. if (typeof unicode === 'number') {
  25527. unicode = String.fromCharCode(unicode);
  25528. }
  25529. // First try the toFontChar map, if it's not there then try falling
  25530. // back to the char code.
  25531. fontCharCode = this.toFontChar[charcode] || charcode;
  25532. if (this.missingFile) {
  25533. fontCharCode = mapSpecialUnicodeValues(fontCharCode);
  25534. }
  25535. if (this.type === 'Type3') {
  25536. // Font char code in this case is actually a glyph name.
  25537. operatorList = this.charProcOperatorList[fontCharCode];
  25538. }
  25539. var accent = null;
  25540. if (this.seacMap && this.seacMap[charcode]) {
  25541. var seac = this.seacMap[charcode];
  25542. fontCharCode = seac.baseFontCharCode;
  25543. accent = {
  25544. fontChar: String.fromCharCode(seac.accentFontCharCode),
  25545. offset: seac.accentOffset
  25546. };
  25547. }
  25548. var fontChar = String.fromCharCode(fontCharCode);
  25549. var glyph = this.glyphCache[charcode];
  25550. if (!glyph ||
  25551. !glyph.matchesForCache(fontChar, unicode, accent, width, vmetric,
  25552. operatorList)) {
  25553. glyph = new Glyph(fontChar, unicode, accent, width, vmetric,
  25554. operatorList);
  25555. this.glyphCache[charcode] = glyph;
  25556. }
  25557. return glyph;
  25558. },
  25559. charsToGlyphs: function Font_charsToGlyphs(chars) {
  25560. var charsCache = this.charsCache;
  25561. var glyphs, glyph, charcode;
  25562. // if we translated this string before, just grab it from the cache
  25563. if (charsCache) {
  25564. glyphs = charsCache[chars];
  25565. if (glyphs) {
  25566. return glyphs;
  25567. }
  25568. }
  25569. // lazily create the translation cache
  25570. if (!charsCache) {
  25571. charsCache = this.charsCache = Object.create(null);
  25572. }
  25573. glyphs = [];
  25574. var charsCacheKey = chars;
  25575. var i = 0, ii;
  25576. if (this.cMap) {
  25577. // composite fonts have multi-byte strings convert the string from
  25578. // single-byte to multi-byte
  25579. while (i < chars.length) {
  25580. var c = this.cMap.readCharCode(chars, i);
  25581. charcode = c[0];
  25582. var length = c[1];
  25583. i += length;
  25584. glyph = this.charToGlyph(charcode);
  25585. glyphs.push(glyph);
  25586. // placing null after each word break charcode (ASCII SPACE)
  25587. // Ignore occurences of 0x20 in multiple-byte codes.
  25588. if (length === 1 && chars.charCodeAt(i - 1) === 0x20) {
  25589. glyphs.push(null);
  25590. }
  25591. }
  25592. } else {
  25593. for (i = 0, ii = chars.length; i < ii; ++i) {
  25594. charcode = chars.charCodeAt(i);
  25595. glyph = this.charToGlyph(charcode);
  25596. glyphs.push(glyph);
  25597. if (charcode == 0x20) {
  25598. glyphs.push(null);
  25599. }
  25600. }
  25601. }
  25602. // Enter the translated string into the cache
  25603. return (charsCache[charsCacheKey] = glyphs);
  25604. }
  25605. };
  25606. return Font;
  25607. })();
  25608. var ErrorFont = (function ErrorFontClosure() {
  25609. function ErrorFont(error) {
  25610. this.error = error;
  25611. }
  25612. ErrorFont.prototype = {
  25613. charsToGlyphs: function ErrorFont_charsToGlyphs() {
  25614. return [];
  25615. },
  25616. exportData: function ErrorFont_exportData() {
  25617. return {error: this.error};
  25618. }
  25619. };
  25620. return ErrorFont;
  25621. })();
  25622. /**
  25623. * Shared logic for building a char code to glyph id mapping for Type1 and
  25624. * simple CFF fonts. See section 9.6.6.2 of the spec.
  25625. * @param {Object} properties Font properties object.
  25626. * @param {Object} builtInEncoding The encoding contained within the actual font
  25627. * data.
  25628. * @param {Array} Array of glyph names where the index is the glyph ID.
  25629. * @returns {Object} A char code to glyph ID map.
  25630. */
  25631. function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
  25632. var charCodeToGlyphId = Object.create(null);
  25633. var glyphId, charCode, baseEncoding;
  25634. if (properties.baseEncodingName) {
  25635. // If a valid base encoding name was used, the mapping is initialized with
  25636. // that.
  25637. baseEncoding = Encodings[properties.baseEncodingName];
  25638. for (charCode = 0; charCode < baseEncoding.length; charCode++) {
  25639. glyphId = glyphNames.indexOf(baseEncoding[charCode]);
  25640. if (glyphId >= 0) {
  25641. charCodeToGlyphId[charCode] = glyphId;
  25642. }
  25643. }
  25644. } else if (!!(properties.flags & FontFlags.Symbolic)) {
  25645. // For a symbolic font the encoding should be the fonts built-in
  25646. // encoding.
  25647. for (charCode in builtInEncoding) {
  25648. charCodeToGlyphId[charCode] = builtInEncoding[charCode];
  25649. }
  25650. } else {
  25651. // For non-symbolic fonts that don't have a base encoding the standard
  25652. // encoding should be used.
  25653. baseEncoding = Encodings.StandardEncoding;
  25654. for (charCode = 0; charCode < baseEncoding.length; charCode++) {
  25655. glyphId = glyphNames.indexOf(baseEncoding[charCode]);
  25656. if (glyphId >= 0) {
  25657. charCodeToGlyphId[charCode] = glyphId;
  25658. }
  25659. }
  25660. }
  25661. // Lastly, merge in the differences.
  25662. var differences = properties.differences;
  25663. if (differences) {
  25664. for (charCode in differences) {
  25665. var glyphName = differences[charCode];
  25666. glyphId = glyphNames.indexOf(glyphName);
  25667. if (glyphId >= 0) {
  25668. charCodeToGlyphId[charCode] = glyphId;
  25669. }
  25670. }
  25671. }
  25672. return charCodeToGlyphId;
  25673. }
  25674. /*
  25675. * CharStrings are encoded following the the CharString Encoding sequence
  25676. * describe in Chapter 6 of the "Adobe Type1 Font Format" specification.
  25677. * The value in a byte indicates a command, a number, or subsequent bytes
  25678. * that are to be interpreted in a special way.
  25679. *
  25680. * CharString Number Encoding:
  25681. * A CharString byte containing the values from 32 through 255 inclusive
  25682. * indicate an integer. These values are decoded in four ranges.
  25683. *
  25684. * 1. A CharString byte containing a value, v, between 32 and 246 inclusive,
  25685. * indicate the integer v - 139. Thus, the integer values from -107 through
  25686. * 107 inclusive may be encoded in single byte.
  25687. *
  25688. * 2. A CharString byte containing a value, v, between 247 and 250 inclusive,
  25689. * indicates an integer involving the next byte, w, according to the formula:
  25690. * [(v - 247) x 256] + w + 108
  25691. *
  25692. * 3. A CharString byte containing a value, v, between 251 and 254 inclusive,
  25693. * indicates an integer involving the next byte, w, according to the formula:
  25694. * -[(v - 251) * 256] - w - 108
  25695. *
  25696. * 4. A CharString containing the value 255 indicates that the next 4 bytes
  25697. * are a two complement signed integer. The first of these bytes contains the
  25698. * highest order bits, the second byte contains the next higher order bits
  25699. * and the fourth byte contain the lowest order bits.
  25700. *
  25701. *
  25702. * CharString Command Encoding:
  25703. * CharStrings commands are encoded in 1 or 2 bytes.
  25704. *
  25705. * Single byte commands are encoded in 1 byte that contains a value between
  25706. * 0 and 31 inclusive.
  25707. * If a command byte contains the value 12, then the value in the next byte
  25708. * indicates a command. This "escape" mechanism allows many extra commands
  25709. * to be encoded and this encoding technique helps to minimize the length of
  25710. * the charStrings.
  25711. */
  25712. var Type1CharString = (function Type1CharStringClosure() {
  25713. var COMMAND_MAP = {
  25714. 'hstem': [1],
  25715. 'vstem': [3],
  25716. 'vmoveto': [4],
  25717. 'rlineto': [5],
  25718. 'hlineto': [6],
  25719. 'vlineto': [7],
  25720. 'rrcurveto': [8],
  25721. 'callsubr': [10],
  25722. 'flex': [12, 35],
  25723. 'drop' : [12, 18],
  25724. 'endchar': [14],
  25725. 'rmoveto': [21],
  25726. 'hmoveto': [22],
  25727. 'vhcurveto': [30],
  25728. 'hvcurveto': [31]
  25729. };
  25730. function Type1CharString() {
  25731. this.width = 0;
  25732. this.lsb = 0;
  25733. this.flexing = false;
  25734. this.output = [];
  25735. this.stack = [];
  25736. }
  25737. Type1CharString.prototype = {
  25738. convert: function Type1CharString_convert(encoded, subrs) {
  25739. var count = encoded.length;
  25740. var error = false;
  25741. var wx, sbx, subrNumber;
  25742. for (var i = 0; i < count; i++) {
  25743. var value = encoded[i];
  25744. if (value < 32) {
  25745. if (value === 12) {
  25746. value = (value << 8) + encoded[++i];
  25747. }
  25748. switch (value) {
  25749. case 1: // hstem
  25750. if (!HINTING_ENABLED) {
  25751. this.stack = [];
  25752. break;
  25753. }
  25754. error = this.executeCommand(2, COMMAND_MAP.hstem);
  25755. break;
  25756. case 3: // vstem
  25757. if (!HINTING_ENABLED) {
  25758. this.stack = [];
  25759. break;
  25760. }
  25761. error = this.executeCommand(2, COMMAND_MAP.vstem);
  25762. break;
  25763. case 4: // vmoveto
  25764. if (this.flexing) {
  25765. if (this.stack.length < 1) {
  25766. error = true;
  25767. break;
  25768. }
  25769. // Add the dx for flex and but also swap the values so they are
  25770. // the right order.
  25771. var dy = this.stack.pop();
  25772. this.stack.push(0, dy);
  25773. break;
  25774. }
  25775. error = this.executeCommand(1, COMMAND_MAP.vmoveto);
  25776. break;
  25777. case 5: // rlineto
  25778. error = this.executeCommand(2, COMMAND_MAP.rlineto);
  25779. break;
  25780. case 6: // hlineto
  25781. error = this.executeCommand(1, COMMAND_MAP.hlineto);
  25782. break;
  25783. case 7: // vlineto
  25784. error = this.executeCommand(1, COMMAND_MAP.vlineto);
  25785. break;
  25786. case 8: // rrcurveto
  25787. error = this.executeCommand(6, COMMAND_MAP.rrcurveto);
  25788. break;
  25789. case 9: // closepath
  25790. // closepath is a Type1 command that does not take argument and is
  25791. // useless in Type2 and it can simply be ignored.
  25792. this.stack = [];
  25793. break;
  25794. case 10: // callsubr
  25795. if (this.stack.length < 1) {
  25796. error = true;
  25797. break;
  25798. }
  25799. subrNumber = this.stack.pop();
  25800. error = this.convert(subrs[subrNumber], subrs);
  25801. break;
  25802. case 11: // return
  25803. return error;
  25804. case 13: // hsbw
  25805. if (this.stack.length < 2) {
  25806. error = true;
  25807. break;
  25808. }
  25809. // To convert to type2 we have to move the width value to the
  25810. // first part of the charstring and then use hmoveto with lsb.
  25811. wx = this.stack.pop();
  25812. sbx = this.stack.pop();
  25813. this.lsb = sbx;
  25814. this.width = wx;
  25815. this.stack.push(sbx);
  25816. error = this.executeCommand(1, COMMAND_MAP.hmoveto);
  25817. break;
  25818. case 14: // endchar
  25819. this.output.push(COMMAND_MAP.endchar[0]);
  25820. break;
  25821. case 21: // rmoveto
  25822. if (this.flexing) {
  25823. break;
  25824. }
  25825. error = this.executeCommand(2, COMMAND_MAP.rmoveto);
  25826. break;
  25827. case 22: // hmoveto
  25828. if (this.flexing) {
  25829. // Add the dy for flex.
  25830. this.stack.push(0);
  25831. break;
  25832. }
  25833. error = this.executeCommand(1, COMMAND_MAP.hmoveto);
  25834. break;
  25835. case 30: // vhcurveto
  25836. error = this.executeCommand(4, COMMAND_MAP.vhcurveto);
  25837. break;
  25838. case 31: // hvcurveto
  25839. error = this.executeCommand(4, COMMAND_MAP.hvcurveto);
  25840. break;
  25841. case (12 << 8) + 0: // dotsection
  25842. // dotsection is a Type1 command to specify some hinting feature
  25843. // for dots that do not take a parameter and it can safely be
  25844. // ignored for Type2.
  25845. this.stack = [];
  25846. break;
  25847. case (12 << 8) + 1: // vstem3
  25848. if (!HINTING_ENABLED) {
  25849. this.stack = [];
  25850. break;
  25851. }
  25852. // [vh]stem3 are Type1 only and Type2 supports [vh]stem with
  25853. // multiple parameters, so instead of returning [vh]stem3 take a
  25854. // shortcut and return [vhstem] instead.
  25855. error = this.executeCommand(2, COMMAND_MAP.vstem);
  25856. break;
  25857. case (12 << 8) + 2: // hstem3
  25858. if (!HINTING_ENABLED) {
  25859. this.stack = [];
  25860. break;
  25861. }
  25862. // See vstem3.
  25863. error = this.executeCommand(2, COMMAND_MAP.hstem);
  25864. break;
  25865. case (12 << 8) + 6: // seac
  25866. // seac is like type 2's special endchar but it doesn't use the
  25867. // first argument asb, so remove it.
  25868. if (SEAC_ANALYSIS_ENABLED) {
  25869. this.seac = this.stack.splice(-4, 4);
  25870. error = this.executeCommand(0, COMMAND_MAP.endchar);
  25871. } else {
  25872. error = this.executeCommand(4, COMMAND_MAP.endchar);
  25873. }
  25874. break;
  25875. case (12 << 8) + 7: // sbw
  25876. if (this.stack.length < 4) {
  25877. error = true;
  25878. break;
  25879. }
  25880. // To convert to type2 we have to move the width value to the
  25881. // first part of the charstring and then use rmoveto with
  25882. // (dx, dy). The height argument will not be used for vmtx and
  25883. // vhea tables reconstruction -- ignoring it.
  25884. var wy = this.stack.pop();
  25885. wx = this.stack.pop();
  25886. var sby = this.stack.pop();
  25887. sbx = this.stack.pop();
  25888. this.lsb = sbx;
  25889. this.width = wx;
  25890. this.stack.push(sbx, sby);
  25891. error = this.executeCommand(2, COMMAND_MAP.rmoveto);
  25892. break;
  25893. case (12 << 8) + 12: // div
  25894. if (this.stack.length < 2) {
  25895. error = true;
  25896. break;
  25897. }
  25898. var num2 = this.stack.pop();
  25899. var num1 = this.stack.pop();
  25900. this.stack.push(num1 / num2);
  25901. break;
  25902. case (12 << 8) + 16: // callothersubr
  25903. if (this.stack.length < 2) {
  25904. error = true;
  25905. break;
  25906. }
  25907. subrNumber = this.stack.pop();
  25908. var numArgs = this.stack.pop();
  25909. if (subrNumber === 0 && numArgs === 3) {
  25910. var flexArgs = this.stack.splice(this.stack.length - 17, 17);
  25911. this.stack.push(
  25912. flexArgs[2] + flexArgs[0], // bcp1x + rpx
  25913. flexArgs[3] + flexArgs[1], // bcp1y + rpy
  25914. flexArgs[4], // bcp2x
  25915. flexArgs[5], // bcp2y
  25916. flexArgs[6], // p2x
  25917. flexArgs[7], // p2y
  25918. flexArgs[8], // bcp3x
  25919. flexArgs[9], // bcp3y
  25920. flexArgs[10], // bcp4x
  25921. flexArgs[11], // bcp4y
  25922. flexArgs[12], // p3x
  25923. flexArgs[13], // p3y
  25924. flexArgs[14] // flexDepth
  25925. // 15 = finalx unused by flex
  25926. // 16 = finaly unused by flex
  25927. );
  25928. error = this.executeCommand(13, COMMAND_MAP.flex, true);
  25929. this.flexing = false;
  25930. this.stack.push(flexArgs[15], flexArgs[16]);
  25931. } else if (subrNumber === 1 && numArgs === 0) {
  25932. this.flexing = true;
  25933. }
  25934. break;
  25935. case (12 << 8) + 17: // pop
  25936. // Ignore this since it is only used with othersubr.
  25937. break;
  25938. case (12 << 8) + 33: // setcurrentpoint
  25939. // Ignore for now.
  25940. this.stack = [];
  25941. break;
  25942. default:
  25943. warn('Unknown type 1 charstring command of "' + value + '"');
  25944. break;
  25945. }
  25946. if (error) {
  25947. break;
  25948. }
  25949. continue;
  25950. } else if (value <= 246) {
  25951. value = value - 139;
  25952. } else if (value <= 250) {
  25953. value = ((value - 247) * 256) + encoded[++i] + 108;
  25954. } else if (value <= 254) {
  25955. value = -((value - 251) * 256) - encoded[++i] - 108;
  25956. } else {
  25957. value = (encoded[++i] & 0xff) << 24 | (encoded[++i] & 0xff) << 16 |
  25958. (encoded[++i] & 0xff) << 8 | (encoded[++i] & 0xff) << 0;
  25959. }
  25960. this.stack.push(value);
  25961. }
  25962. return error;
  25963. },
  25964. executeCommand: function(howManyArgs, command, keepStack) {
  25965. var stackLength = this.stack.length;
  25966. if (howManyArgs > stackLength) {
  25967. return true;
  25968. }
  25969. var start = stackLength - howManyArgs;
  25970. for (var i = start; i < stackLength; i++) {
  25971. var value = this.stack[i];
  25972. if (value === (value | 0)) { // int
  25973. this.output.push(28, (value >> 8) & 0xff, value & 0xff);
  25974. } else { // fixed point
  25975. value = (65536 * value) | 0;
  25976. this.output.push(255,
  25977. (value >> 24) & 0xFF,
  25978. (value >> 16) & 0xFF,
  25979. (value >> 8) & 0xFF,
  25980. value & 0xFF);
  25981. }
  25982. }
  25983. this.output.push.apply(this.output, command);
  25984. if (keepStack) {
  25985. this.stack.splice(start, howManyArgs);
  25986. } else {
  25987. this.stack.length = 0;
  25988. }
  25989. return false;
  25990. }
  25991. };
  25992. return Type1CharString;
  25993. })();
  25994. /*
  25995. * Type1Parser encapsulate the needed code for parsing a Type1 font
  25996. * program. Some of its logic depends on the Type2 charstrings
  25997. * structure.
  25998. * Note: this doesn't really parse the font since that would require evaluation
  25999. * of PostScript, but it is possible in most cases to extract what we need
  26000. * without a full parse.
  26001. */
  26002. var Type1Parser = (function Type1ParserClosure() {
  26003. /*
  26004. * Decrypt a Sequence of Ciphertext Bytes to Produce the Original Sequence
  26005. * of Plaintext Bytes. The function took a key as a parameter which can be
  26006. * for decrypting the eexec block of for decoding charStrings.
  26007. */
  26008. var EEXEC_ENCRYPT_KEY = 55665;
  26009. var CHAR_STRS_ENCRYPT_KEY = 4330;
  26010. function isHexDigit(code) {
  26011. return code >= 48 && code <= 57 || // '0'-'9'
  26012. code >= 65 && code <= 70 || // 'A'-'F'
  26013. code >= 97 && code <= 102; // 'a'-'f'
  26014. }
  26015. function decrypt(data, key, discardNumber) {
  26016. var r = key | 0, c1 = 52845, c2 = 22719;
  26017. var count = data.length;
  26018. var decrypted = new Uint8Array(count);
  26019. for (var i = 0; i < count; i++) {
  26020. var value = data[i];
  26021. decrypted[i] = value ^ (r >> 8);
  26022. r = ((value + r) * c1 + c2) & ((1 << 16) - 1);
  26023. }
  26024. return Array.prototype.slice.call(decrypted, discardNumber);
  26025. }
  26026. function decryptAscii(data, key, discardNumber) {
  26027. var r = key | 0, c1 = 52845, c2 = 22719;
  26028. var count = data.length, maybeLength = count >>> 1;
  26029. var decrypted = new Uint8Array(maybeLength);
  26030. var i, j;
  26031. for (i = 0, j = 0; i < count; i++) {
  26032. var digit1 = data[i];
  26033. if (!isHexDigit(digit1)) {
  26034. continue;
  26035. }
  26036. i++;
  26037. var digit2;
  26038. while (i < count && !isHexDigit(digit2 = data[i])) {
  26039. i++;
  26040. }
  26041. if (i < count) {
  26042. var value = parseInt(String.fromCharCode(digit1, digit2), 16);
  26043. decrypted[j++] = value ^ (r >> 8);
  26044. r = ((value + r) * c1 + c2) & ((1 << 16) - 1);
  26045. }
  26046. }
  26047. return Array.prototype.slice.call(decrypted, discardNumber, j);
  26048. }
  26049. function isSpecial(c) {
  26050. return c === 0x2F || // '/'
  26051. c === 0x5B || c === 0x5D || // '[', ']'
  26052. c === 0x7B || c === 0x7D || // '{', '}'
  26053. c === 0x28 || c === 0x29; // '(', ')'
  26054. }
  26055. function Type1Parser(stream, encrypted) {
  26056. if (encrypted) {
  26057. var data = stream.getBytes();
  26058. var isBinary = !(isHexDigit(data[0]) && isHexDigit(data[1]) &&
  26059. isHexDigit(data[2]) && isHexDigit(data[3]));
  26060. stream = new Stream(isBinary ? decrypt(data, EEXEC_ENCRYPT_KEY, 4) :
  26061. decryptAscii(data, EEXEC_ENCRYPT_KEY, 4));
  26062. }
  26063. this.stream = stream;
  26064. this.nextChar();
  26065. }
  26066. Type1Parser.prototype = {
  26067. readNumberArray: function Type1Parser_readNumberArray() {
  26068. this.getToken(); // read '[' or '{' (arrays can start with either)
  26069. var array = [];
  26070. while (true) {
  26071. var token = this.getToken();
  26072. if (token === null || token === ']' || token === '}') {
  26073. break;
  26074. }
  26075. array.push(parseFloat(token || 0));
  26076. }
  26077. return array;
  26078. },
  26079. readNumber: function Type1Parser_readNumber() {
  26080. var token = this.getToken();
  26081. return parseFloat(token || 0);
  26082. },
  26083. readInt: function Type1Parser_readInt() {
  26084. // Use '| 0' to prevent setting a double into length such as the double
  26085. // does not flow into the loop variable.
  26086. var token = this.getToken();
  26087. return parseInt(token || 0, 10) | 0;
  26088. },
  26089. readBoolean: function Type1Parser_readBoolean() {
  26090. var token = this.getToken();
  26091. // Use 1 and 0 since that's what type2 charstrings use.
  26092. return token === 'true' ? 1 : 0;
  26093. },
  26094. nextChar : function Type1_nextChar() {
  26095. return (this.currentChar = this.stream.getByte());
  26096. },
  26097. getToken: function Type1Parser_getToken() {
  26098. // Eat whitespace and comments.
  26099. var comment = false;
  26100. var ch = this.currentChar;
  26101. while (true) {
  26102. if (ch === -1) {
  26103. return null;
  26104. }
  26105. if (comment) {
  26106. if (ch === 0x0A || ch === 0x0D) {
  26107. comment = false;
  26108. }
  26109. } else if (ch === 0x25) { // '%'
  26110. comment = true;
  26111. } else if (!Lexer.isSpace(ch)) {
  26112. break;
  26113. }
  26114. ch = this.nextChar();
  26115. }
  26116. if (isSpecial(ch)) {
  26117. this.nextChar();
  26118. return String.fromCharCode(ch);
  26119. }
  26120. var token = '';
  26121. do {
  26122. token += String.fromCharCode(ch);
  26123. ch = this.nextChar();
  26124. } while (ch >= 0 && !Lexer.isSpace(ch) && !isSpecial(ch));
  26125. return token;
  26126. },
  26127. /*
  26128. * Returns an object containing a Subrs array and a CharStrings
  26129. * array extracted from and eexec encrypted block of data
  26130. */
  26131. extractFontProgram: function Type1Parser_extractFontProgram() {
  26132. var stream = this.stream;
  26133. var subrs = [], charstrings = [];
  26134. var program = {
  26135. subrs: [],
  26136. charstrings: [],
  26137. properties: {
  26138. 'privateData': {
  26139. 'lenIV': 4
  26140. }
  26141. }
  26142. };
  26143. var token, length, data, lenIV, encoded;
  26144. while ((token = this.getToken()) !== null) {
  26145. if (token !== '/') {
  26146. continue;
  26147. }
  26148. token = this.getToken();
  26149. switch (token) {
  26150. case 'CharStrings':
  26151. // The number immediately following CharStrings must be greater or
  26152. // equal to the number of CharStrings.
  26153. this.getToken();
  26154. this.getToken(); // read in 'dict'
  26155. this.getToken(); // read in 'dup'
  26156. this.getToken(); // read in 'begin'
  26157. while(true) {
  26158. token = this.getToken();
  26159. if (token === null || token === 'end') {
  26160. break;
  26161. }
  26162. if (token !== '/') {
  26163. continue;
  26164. }
  26165. var glyph = this.getToken();
  26166. length = this.readInt();
  26167. this.getToken(); // read in 'RD' or '-|'
  26168. data = stream.makeSubStream(stream.pos, length);
  26169. lenIV = program.properties.privateData['lenIV'];
  26170. encoded = decrypt(data.getBytes(), CHAR_STRS_ENCRYPT_KEY, lenIV);
  26171. // Skip past the required space and binary data.
  26172. stream.skip(length);
  26173. this.nextChar();
  26174. token = this.getToken(); // read in 'ND' or '|-'
  26175. if (token === 'noaccess') {
  26176. this.getToken(); // read in 'def'
  26177. }
  26178. charstrings.push({
  26179. glyph: glyph,
  26180. encoded: encoded
  26181. });
  26182. }
  26183. break;
  26184. case 'Subrs':
  26185. var num = this.readInt();
  26186. this.getToken(); // read in 'array'
  26187. while ((token = this.getToken()) === 'dup') {
  26188. var index = this.readInt();
  26189. length = this.readInt();
  26190. this.getToken(); // read in 'RD' or '-|'
  26191. data = stream.makeSubStream(stream.pos, length);
  26192. lenIV = program.properties.privateData['lenIV'];
  26193. encoded = decrypt(data.getBytes(), CHAR_STRS_ENCRYPT_KEY, lenIV);
  26194. // Skip past the required space and binary data.
  26195. stream.skip(length);
  26196. this.nextChar();
  26197. token = this.getToken(); // read in 'NP' or '|'
  26198. if (token === 'noaccess') {
  26199. this.getToken(); // read in 'put'
  26200. }
  26201. subrs[index] = encoded;
  26202. }
  26203. break;
  26204. case 'BlueValues':
  26205. case 'OtherBlues':
  26206. case 'FamilyBlues':
  26207. case 'FamilyOtherBlues':
  26208. var blueArray = this.readNumberArray();
  26209. // *Blue* values may contain invalid data: disables reading of
  26210. // those values when hinting is disabled.
  26211. if (blueArray.length > 0 && (blueArray.length % 2) === 0 &&
  26212. HINTING_ENABLED) {
  26213. program.properties.privateData[token] = blueArray;
  26214. }
  26215. break;
  26216. case 'StemSnapH':
  26217. case 'StemSnapV':
  26218. program.properties.privateData[token] = this.readNumberArray();
  26219. break;
  26220. case 'StdHW':
  26221. case 'StdVW':
  26222. program.properties.privateData[token] =
  26223. this.readNumberArray()[0];
  26224. break;
  26225. case 'BlueShift':
  26226. case 'lenIV':
  26227. case 'BlueFuzz':
  26228. case 'BlueScale':
  26229. case 'LanguageGroup':
  26230. case 'ExpansionFactor':
  26231. program.properties.privateData[token] = this.readNumber();
  26232. break;
  26233. case 'ForceBold':
  26234. program.properties.privateData[token] = this.readBoolean();
  26235. break;
  26236. }
  26237. }
  26238. for (var i = 0; i < charstrings.length; i++) {
  26239. glyph = charstrings[i].glyph;
  26240. encoded = charstrings[i].encoded;
  26241. var charString = new Type1CharString();
  26242. var error = charString.convert(encoded, subrs);
  26243. var output = charString.output;
  26244. if (error) {
  26245. // It seems when FreeType encounters an error while evaluating a glyph
  26246. // that it completely ignores the glyph so we'll mimic that behaviour
  26247. // here and put an endchar to make the validator happy.
  26248. output = [14];
  26249. }
  26250. program.charstrings.push({
  26251. glyphName: glyph,
  26252. charstring: output,
  26253. width: charString.width,
  26254. lsb: charString.lsb,
  26255. seac: charString.seac
  26256. });
  26257. }
  26258. return program;
  26259. },
  26260. extractFontHeader: function Type1Parser_extractFontHeader(properties) {
  26261. var token;
  26262. while ((token = this.getToken()) !== null) {
  26263. if (token !== '/') {
  26264. continue;
  26265. }
  26266. token = this.getToken();
  26267. switch (token) {
  26268. case 'FontMatrix':
  26269. var matrix = this.readNumberArray();
  26270. properties.fontMatrix = matrix;
  26271. break;
  26272. case 'Encoding':
  26273. var encodingArg = this.getToken();
  26274. var encoding;
  26275. if (!/^\d+$/.test(encodingArg)) {
  26276. // encoding name is specified
  26277. encoding = Encodings[encodingArg];
  26278. } else {
  26279. encoding = [];
  26280. var size = parseInt(encodingArg, 10) | 0;
  26281. this.getToken(); // read in 'array'
  26282. for (var j = 0; j < size; j++) {
  26283. token = this.getToken();
  26284. // skipping till first dup or def (e.g. ignoring for statement)
  26285. while (token !== 'dup' && token !== 'def') {
  26286. token = this.getToken();
  26287. if (token === null) {
  26288. return; // invalid header
  26289. }
  26290. }
  26291. if (token === 'def') {
  26292. break; // read all array data
  26293. }
  26294. var index = this.readInt();
  26295. this.getToken(); // read in '/'
  26296. var glyph = this.getToken();
  26297. encoding[index] = glyph;
  26298. this.getToken(); // read the in 'put'
  26299. }
  26300. }
  26301. properties.builtInEncoding = encoding;
  26302. break;
  26303. case 'FontBBox':
  26304. var fontBBox = this.readNumberArray();
  26305. // adjusting ascent/descent
  26306. properties.ascent = fontBBox[3];
  26307. properties.descent = fontBBox[1];
  26308. properties.ascentScaled = true;
  26309. break;
  26310. }
  26311. }
  26312. }
  26313. };
  26314. return Type1Parser;
  26315. })();
  26316. /**
  26317. * The CFF class takes a Type1 file and wrap it into a
  26318. * 'Compact Font Format' which itself embed Type2 charstrings.
  26319. */
  26320. var CFFStandardStrings = [
  26321. '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
  26322. 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus',
  26323. 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four',
  26324. 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',
  26325. 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
  26326. 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
  26327. 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum',
  26328. 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
  26329. 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y',
  26330. 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',
  26331. 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',
  26332. 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',
  26333. 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',
  26334. 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase',
  26335. 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', 'questiondown',
  26336. 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent',
  26337. 'dieresis', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash',
  26338. 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae',
  26339. 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior',
  26340. 'logicalnot', 'mu', 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn',
  26341. 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters',
  26342. 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior',
  26343. 'copyright', 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring',
  26344. 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave',
  26345. 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute',
  26346. 'Ocircumflex', 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute',
  26347. 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron',
  26348. 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde',
  26349. 'ccedilla', 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute',
  26350. 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex',
  26351. 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex',
  26352. 'udieresis', 'ugrave', 'yacute', 'ydieresis', 'zcaron', 'exclamsmall',
  26353. 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall',
  26354. 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
  26355. 'onedotenleader', 'zerooldstyle', 'oneoldstyle', 'twooldstyle',
  26356. 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle',
  26357. 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'commasuperior',
  26358. 'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior',
  26359. 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior',
  26360. 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',
  26361. 'tsuperior', 'ff', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior',
  26362. 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall',
  26363. 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall',
  26364. 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall',
  26365. 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',
  26366. 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah',
  26367. 'Tildesmall', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall',
  26368. 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall',
  26369. 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior',
  26370. 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', 'questiondownsmall', 'oneeighth',
  26371. 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds',
  26372. 'zerosuperior', 'foursuperior', 'fivesuperior', 'sixsuperior',
  26373. 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior',
  26374. 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior',
  26375. 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior',
  26376. 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior',
  26377. 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall',
  26378. 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall',
  26379. 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall',
  26380. 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall',
  26381. 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall',
  26382. 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall',
  26383. 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall',
  26384. 'Thornsmall', 'Ydieresissmall', '001.000', '001.001', '001.002', '001.003',
  26385. 'Black', 'Bold', 'Book', 'Light', 'Medium', 'Regular', 'Roman', 'Semibold'
  26386. ];
  26387. // Type1Font is also a CIDFontType0.
  26388. var Type1Font = function Type1Font(name, file, properties) {
  26389. // Some bad generators embed pfb file as is, we have to strip 6-byte headers.
  26390. // Also, length1 and length2 might be off by 6 bytes as well.
  26391. // http://www.math.ubc.ca/~cass/piscript/type1.pdf
  26392. var PFB_HEADER_SIZE = 6;
  26393. var headerBlockLength = properties.length1;
  26394. var eexecBlockLength = properties.length2;
  26395. var pfbHeader = file.peekBytes(PFB_HEADER_SIZE);
  26396. var pfbHeaderPresent = pfbHeader[0] == 0x80 && pfbHeader[1] == 0x01;
  26397. if (pfbHeaderPresent) {
  26398. file.skip(PFB_HEADER_SIZE);
  26399. headerBlockLength = (pfbHeader[5] << 24) | (pfbHeader[4] << 16) |
  26400. (pfbHeader[3] << 8) | pfbHeader[2];
  26401. }
  26402. // Get the data block containing glyphs and subrs informations
  26403. var headerBlock = new Stream(file.getBytes(headerBlockLength));
  26404. var headerBlockParser = new Type1Parser(headerBlock);
  26405. headerBlockParser.extractFontHeader(properties);
  26406. if (pfbHeaderPresent) {
  26407. pfbHeader = file.getBytes(PFB_HEADER_SIZE);
  26408. eexecBlockLength = (pfbHeader[5] << 24) | (pfbHeader[4] << 16) |
  26409. (pfbHeader[3] << 8) | pfbHeader[2];
  26410. }
  26411. // Decrypt the data blocks and retrieve it's content
  26412. var eexecBlock = new Stream(file.getBytes(eexecBlockLength));
  26413. var eexecBlockParser = new Type1Parser(eexecBlock, true);
  26414. var data = eexecBlockParser.extractFontProgram();
  26415. for (var info in data.properties) {
  26416. properties[info] = data.properties[info];
  26417. }
  26418. var charstrings = data.charstrings;
  26419. var type2Charstrings = this.getType2Charstrings(charstrings);
  26420. var subrs = this.getType2Subrs(data.subrs);
  26421. this.charstrings = charstrings;
  26422. this.data = this.wrap(name, type2Charstrings, this.charstrings,
  26423. subrs, properties);
  26424. this.seacs = this.getSeacs(data.charstrings);
  26425. };
  26426. Type1Font.prototype = {
  26427. get numGlyphs() {
  26428. return this.charstrings.length + 1;
  26429. },
  26430. getCharset: function Type1Font_getCharset() {
  26431. var charset = ['.notdef'];
  26432. var charstrings = this.charstrings;
  26433. for (var glyphId = 0; glyphId < charstrings.length; glyphId++) {
  26434. charset.push(charstrings[glyphId].glyphName);
  26435. }
  26436. return charset;
  26437. },
  26438. getGlyphMapping: function Type1Font_getGlyphMapping(properties) {
  26439. var charstrings = this.charstrings;
  26440. var glyphNames = ['.notdef'], glyphId;
  26441. for (glyphId = 0; glyphId < charstrings.length; glyphId++) {
  26442. glyphNames.push(charstrings[glyphId].glyphName);
  26443. }
  26444. var encoding = properties.builtInEncoding;
  26445. if (encoding) {
  26446. var builtInEncoding = {};
  26447. for (var charCode in encoding) {
  26448. glyphId = glyphNames.indexOf(encoding[charCode]);
  26449. if (glyphId >= 0) {
  26450. builtInEncoding[charCode] = glyphId;
  26451. }
  26452. }
  26453. }
  26454. return type1FontGlyphMapping(properties, builtInEncoding, glyphNames);
  26455. },
  26456. getSeacs: function Type1Font_getSeacs(charstrings) {
  26457. var i, ii;
  26458. var seacMap = [];
  26459. for (i = 0, ii = charstrings.length; i < ii; i++) {
  26460. var charstring = charstrings[i];
  26461. if (charstring.seac) {
  26462. // Offset by 1 for .notdef
  26463. seacMap[i + 1] = charstring.seac;
  26464. }
  26465. }
  26466. return seacMap;
  26467. },
  26468. getType2Charstrings: function Type1Font_getType2Charstrings(
  26469. type1Charstrings) {
  26470. var type2Charstrings = [];
  26471. for (var i = 0, ii = type1Charstrings.length; i < ii; i++) {
  26472. type2Charstrings.push(type1Charstrings[i].charstring);
  26473. }
  26474. return type2Charstrings;
  26475. },
  26476. getType2Subrs: function Type1Font_getType2Subrs(type1Subrs) {
  26477. var bias = 0;
  26478. var count = type1Subrs.length;
  26479. if (count < 1133) {
  26480. bias = 107;
  26481. } else if (count < 33769) {
  26482. bias = 1131;
  26483. } else {
  26484. bias = 32768;
  26485. }
  26486. // Add a bunch of empty subrs to deal with the Type2 bias
  26487. var type2Subrs = [];
  26488. var i;
  26489. for (i = 0; i < bias; i++) {
  26490. type2Subrs.push([0x0B]);
  26491. }
  26492. for (i = 0; i < count; i++) {
  26493. type2Subrs.push(type1Subrs[i]);
  26494. }
  26495. return type2Subrs;
  26496. },
  26497. wrap: function Type1Font_wrap(name, glyphs, charstrings, subrs, properties) {
  26498. var cff = new CFF();
  26499. cff.header = new CFFHeader(1, 0, 4, 4);
  26500. cff.names = [name];
  26501. var topDict = new CFFTopDict();
  26502. // CFF strings IDs 0...390 are predefined names, so refering
  26503. // to entries in our own String INDEX starts at SID 391.
  26504. topDict.setByName('version', 391);
  26505. topDict.setByName('Notice', 392);
  26506. topDict.setByName('FullName', 393);
  26507. topDict.setByName('FamilyName', 394);
  26508. topDict.setByName('Weight', 395);
  26509. topDict.setByName('Encoding', null); // placeholder
  26510. topDict.setByName('FontMatrix', properties.fontMatrix);
  26511. topDict.setByName('FontBBox', properties.bbox);
  26512. topDict.setByName('charset', null); // placeholder
  26513. topDict.setByName('CharStrings', null); // placeholder
  26514. topDict.setByName('Private', null); // placeholder
  26515. cff.topDict = topDict;
  26516. var strings = new CFFStrings();
  26517. strings.add('Version 0.11'); // Version
  26518. strings.add('See original notice'); // Notice
  26519. strings.add(name); // FullName
  26520. strings.add(name); // FamilyName
  26521. strings.add('Medium'); // Weight
  26522. cff.strings = strings;
  26523. cff.globalSubrIndex = new CFFIndex();
  26524. var count = glyphs.length;
  26525. var charsetArray = [0];
  26526. var i, ii;
  26527. for (i = 0; i < count; i++) {
  26528. var index = CFFStandardStrings.indexOf(charstrings[i].glyphName);
  26529. // TODO: Insert the string and correctly map it. Previously it was
  26530. // thought mapping names that aren't in the standard strings to .notdef
  26531. // was fine, however in issue818 when mapping them all to .notdef the
  26532. // adieresis glyph no longer worked.
  26533. if (index == -1) {
  26534. index = 0;
  26535. }
  26536. charsetArray.push((index >> 8) & 0xff, index & 0xff);
  26537. }
  26538. cff.charset = new CFFCharset(false, 0, [], charsetArray);
  26539. var charStringsIndex = new CFFIndex();
  26540. charStringsIndex.add([0x8B, 0x0E]); // .notdef
  26541. for (i = 0; i < count; i++) {
  26542. charStringsIndex.add(glyphs[i]);
  26543. }
  26544. cff.charStrings = charStringsIndex;
  26545. var privateDict = new CFFPrivateDict();
  26546. privateDict.setByName('Subrs', null); // placeholder
  26547. var fields = [
  26548. 'BlueValues',
  26549. 'OtherBlues',
  26550. 'FamilyBlues',
  26551. 'FamilyOtherBlues',
  26552. 'StemSnapH',
  26553. 'StemSnapV',
  26554. 'BlueShift',
  26555. 'BlueFuzz',
  26556. 'BlueScale',
  26557. 'LanguageGroup',
  26558. 'ExpansionFactor',
  26559. 'ForceBold',
  26560. 'StdHW',
  26561. 'StdVW'
  26562. ];
  26563. for (i = 0, ii = fields.length; i < ii; i++) {
  26564. var field = fields[i];
  26565. if (!properties.privateData.hasOwnProperty(field)) {
  26566. continue;
  26567. }
  26568. var value = properties.privateData[field];
  26569. if (isArray(value)) {
  26570. // All of the private dictionary array data in CFF must be stored as
  26571. // "delta-encoded" numbers.
  26572. for (var j = value.length - 1; j > 0; j--) {
  26573. value[j] -= value[j - 1]; // ... difference from previous value
  26574. }
  26575. }
  26576. privateDict.setByName(field, value);
  26577. }
  26578. cff.topDict.privateDict = privateDict;
  26579. var subrIndex = new CFFIndex();
  26580. for (i = 0, ii = subrs.length; i < ii; i++) {
  26581. subrIndex.add(subrs[i]);
  26582. }
  26583. privateDict.subrsIndex = subrIndex;
  26584. var compiler = new CFFCompiler(cff);
  26585. return compiler.compile();
  26586. }
  26587. };
  26588. var CFFFont = (function CFFFontClosure() {
  26589. function CFFFont(file, properties) {
  26590. this.properties = properties;
  26591. var parser = new CFFParser(file, properties);
  26592. this.cff = parser.parse();
  26593. var compiler = new CFFCompiler(this.cff);
  26594. this.seacs = this.cff.seacs;
  26595. try {
  26596. this.data = compiler.compile();
  26597. } catch (e) {
  26598. warn('Failed to compile font ' + properties.loadedName);
  26599. // There may have just been an issue with the compiler, set the data
  26600. // anyway and hope the font loaded.
  26601. this.data = file;
  26602. }
  26603. }
  26604. CFFFont.prototype = {
  26605. get numGlyphs() {
  26606. return this.cff.charStrings.count;
  26607. },
  26608. getCharset: function CFFFont_getCharset() {
  26609. return this.cff.charset.charset;
  26610. },
  26611. getGlyphMapping: function CFFFont_getGlyphMapping() {
  26612. var cff = this.cff;
  26613. var properties = this.properties;
  26614. var charsets = cff.charset.charset;
  26615. var charCodeToGlyphId;
  26616. var glyphId;
  26617. if (properties.composite) {
  26618. charCodeToGlyphId = Object.create(null);
  26619. if (cff.isCIDFont) {
  26620. // If the font is actually a CID font then we should use the charset
  26621. // to map CIDs to GIDs.
  26622. for (glyphId = 0; glyphId < charsets.length; glyphId++) {
  26623. var cidString = String.fromCharCode(charsets[glyphId]);
  26624. var charCode = properties.cMap.map.indexOf(cidString);
  26625. charCodeToGlyphId[charCode] = glyphId;
  26626. }
  26627. } else {
  26628. // If it is NOT actually a CID font then CIDs should be mapped
  26629. // directly to GIDs.
  26630. for (glyphId = 0; glyphId < cff.charStrings.count; glyphId++) {
  26631. charCodeToGlyphId[glyphId] = glyphId;
  26632. }
  26633. }
  26634. return charCodeToGlyphId;
  26635. }
  26636. var encoding = cff.encoding ? cff.encoding.encoding : null;
  26637. charCodeToGlyphId = type1FontGlyphMapping(properties, encoding, charsets);
  26638. return charCodeToGlyphId;
  26639. }
  26640. };
  26641. return CFFFont;
  26642. })();
  26643. var CFFParser = (function CFFParserClosure() {
  26644. var CharstringValidationData = [
  26645. null,
  26646. { id: 'hstem', min: 2, resetStack: true, stem: true },
  26647. null,
  26648. { id: 'vstem', min: 2, resetStack: true, stem: true },
  26649. { id: 'vmoveto', min: 1, resetStack: true },
  26650. { id: 'rlineto', min: 2, resetStack: true },
  26651. { id: 'hlineto', min: 1, resetStack: true },
  26652. { id: 'vlineto', min: 1, resetStack: true },
  26653. { id: 'rrcurveto', min: 6, resetStack: true },
  26654. null,
  26655. { id: 'callsubr', min: 1, undefStack: true },
  26656. { id: 'return', min: 0, undefStack: true },
  26657. null, // 12
  26658. null,
  26659. null, // endchar
  26660. null,
  26661. null,
  26662. null,
  26663. { id: 'hstemhm', min: 2, resetStack: true, stem: true },
  26664. null, // hintmask
  26665. null, // cntrmask
  26666. { id: 'rmoveto', min: 2, resetStack: true },
  26667. { id: 'hmoveto', min: 1, resetStack: true },
  26668. { id: 'vstemhm', min: 2, resetStack: true, stem: true },
  26669. { id: 'rcurveline', min: 8, resetStack: true },
  26670. { id: 'rlinecurve', min: 8, resetStack: true },
  26671. { id: 'vvcurveto', min: 4, resetStack: true },
  26672. { id: 'hhcurveto', min: 4, resetStack: true },
  26673. null, // shortint
  26674. { id: 'callgsubr', min: 1, undefStack: true },
  26675. { id: 'vhcurveto', min: 4, resetStack: true },
  26676. { id: 'hvcurveto', min: 4, resetStack: true }
  26677. ];
  26678. var CharstringValidationData12 = [
  26679. null,
  26680. null,
  26681. null,
  26682. { id: 'and', min: 2, stackDelta: -1 },
  26683. { id: 'or', min: 2, stackDelta: -1 },
  26684. { id: 'not', min: 1, stackDelta: 0 },
  26685. null,
  26686. null,
  26687. null,
  26688. { id: 'abs', min: 1, stackDelta: 0 },
  26689. { id: 'add', min: 2, stackDelta: -1,
  26690. stackFn: function stack_div(stack, index) {
  26691. stack[index - 2] = stack[index - 2] + stack[index - 1];
  26692. }
  26693. },
  26694. { id: 'sub', min: 2, stackDelta: -1,
  26695. stackFn: function stack_div(stack, index) {
  26696. stack[index - 2] = stack[index - 2] - stack[index - 1];
  26697. }
  26698. },
  26699. { id: 'div', min: 2, stackDelta: -1,
  26700. stackFn: function stack_div(stack, index) {
  26701. stack[index - 2] = stack[index - 2] / stack[index - 1];
  26702. }
  26703. },
  26704. null,
  26705. { id: 'neg', min: 1, stackDelta: 0,
  26706. stackFn: function stack_div(stack, index) {
  26707. stack[index - 1] = -stack[index - 1];
  26708. }
  26709. },
  26710. { id: 'eq', min: 2, stackDelta: -1 },
  26711. null,
  26712. null,
  26713. { id: 'drop', min: 1, stackDelta: -1 },
  26714. null,
  26715. { id: 'put', min: 2, stackDelta: -2 },
  26716. { id: 'get', min: 1, stackDelta: 0 },
  26717. { id: 'ifelse', min: 4, stackDelta: -3 },
  26718. { id: 'random', min: 0, stackDelta: 1 },
  26719. { id: 'mul', min: 2, stackDelta: -1,
  26720. stackFn: function stack_div(stack, index) {
  26721. stack[index - 2] = stack[index - 2] * stack[index - 1];
  26722. }
  26723. },
  26724. null,
  26725. { id: 'sqrt', min: 1, stackDelta: 0 },
  26726. { id: 'dup', min: 1, stackDelta: 1 },
  26727. { id: 'exch', min: 2, stackDelta: 0 },
  26728. { id: 'index', min: 2, stackDelta: 0 },
  26729. { id: 'roll', min: 3, stackDelta: -2 },
  26730. null,
  26731. null,
  26732. null,
  26733. { id: 'hflex', min: 7, resetStack: true },
  26734. { id: 'flex', min: 13, resetStack: true },
  26735. { id: 'hflex1', min: 9, resetStack: true },
  26736. { id: 'flex1', min: 11, resetStack: true }
  26737. ];
  26738. function CFFParser(file, properties) {
  26739. this.bytes = file.getBytes();
  26740. this.properties = properties;
  26741. }
  26742. CFFParser.prototype = {
  26743. parse: function CFFParser_parse() {
  26744. var properties = this.properties;
  26745. var cff = new CFF();
  26746. this.cff = cff;
  26747. // The first five sections must be in order, all the others are reached
  26748. // via offsets contained in one of the below.
  26749. var header = this.parseHeader();
  26750. var nameIndex = this.parseIndex(header.endPos);
  26751. var topDictIndex = this.parseIndex(nameIndex.endPos);
  26752. var stringIndex = this.parseIndex(topDictIndex.endPos);
  26753. var globalSubrIndex = this.parseIndex(stringIndex.endPos);
  26754. var topDictParsed = this.parseDict(topDictIndex.obj.get(0));
  26755. var topDict = this.createDict(CFFTopDict, topDictParsed, cff.strings);
  26756. cff.header = header.obj;
  26757. cff.names = this.parseNameIndex(nameIndex.obj);
  26758. cff.strings = this.parseStringIndex(stringIndex.obj);
  26759. cff.topDict = topDict;
  26760. cff.globalSubrIndex = globalSubrIndex.obj;
  26761. this.parsePrivateDict(cff.topDict);
  26762. cff.isCIDFont = topDict.hasName('ROS');
  26763. var charStringOffset = topDict.getByName('CharStrings');
  26764. var charStringsAndSeacs = this.parseCharStrings(charStringOffset);
  26765. cff.charStrings = charStringsAndSeacs.charStrings;
  26766. cff.seacs = charStringsAndSeacs.seacs;
  26767. var fontMatrix = topDict.getByName('FontMatrix');
  26768. if (fontMatrix) {
  26769. properties.fontMatrix = fontMatrix;
  26770. }
  26771. var fontBBox = topDict.getByName('FontBBox');
  26772. if (fontBBox) {
  26773. // adjusting ascent/descent
  26774. properties.ascent = fontBBox[3];
  26775. properties.descent = fontBBox[1];
  26776. properties.ascentScaled = true;
  26777. }
  26778. var charset, encoding;
  26779. if (cff.isCIDFont) {
  26780. var fdArrayIndex = this.parseIndex(topDict.getByName('FDArray')).obj;
  26781. for (var i = 0, ii = fdArrayIndex.count; i < ii; ++i) {
  26782. var dictRaw = fdArrayIndex.get(i);
  26783. var fontDict = this.createDict(CFFTopDict, this.parseDict(dictRaw),
  26784. cff.strings);
  26785. this.parsePrivateDict(fontDict);
  26786. cff.fdArray.push(fontDict);
  26787. }
  26788. // cid fonts don't have an encoding
  26789. encoding = null;
  26790. charset = this.parseCharsets(topDict.getByName('charset'),
  26791. cff.charStrings.count, cff.strings, true);
  26792. cff.fdSelect = this.parseFDSelect(topDict.getByName('FDSelect'),
  26793. cff.charStrings.count);
  26794. } else {
  26795. charset = this.parseCharsets(topDict.getByName('charset'),
  26796. cff.charStrings.count, cff.strings, false);
  26797. encoding = this.parseEncoding(topDict.getByName('Encoding'),
  26798. properties,
  26799. cff.strings, charset.charset);
  26800. }
  26801. cff.charset = charset;
  26802. cff.encoding = encoding;
  26803. return cff;
  26804. },
  26805. parseHeader: function CFFParser_parseHeader() {
  26806. var bytes = this.bytes;
  26807. var bytesLength = bytes.length;
  26808. var offset = 0;
  26809. // Prevent an infinite loop, by checking that the offset is within the
  26810. // bounds of the bytes array. Necessary in empty, or invalid, font files.
  26811. while (offset < bytesLength && bytes[offset] !== 1) {
  26812. ++offset;
  26813. }
  26814. if (offset >= bytesLength) {
  26815. error('Invalid CFF header');
  26816. } else if (offset !== 0) {
  26817. info('cff data is shifted');
  26818. bytes = bytes.subarray(offset);
  26819. this.bytes = bytes;
  26820. }
  26821. var major = bytes[0];
  26822. var minor = bytes[1];
  26823. var hdrSize = bytes[2];
  26824. var offSize = bytes[3];
  26825. var header = new CFFHeader(major, minor, hdrSize, offSize);
  26826. return { obj: header, endPos: hdrSize };
  26827. },
  26828. parseDict: function CFFParser_parseDict(dict) {
  26829. var pos = 0;
  26830. function parseOperand() {
  26831. var value = dict[pos++];
  26832. if (value === 30) {
  26833. return parseFloatOperand(pos);
  26834. } else if (value === 28) {
  26835. value = dict[pos++];
  26836. value = ((value << 24) | (dict[pos++] << 16)) >> 16;
  26837. return value;
  26838. } else if (value === 29) {
  26839. value = dict[pos++];
  26840. value = (value << 8) | dict[pos++];
  26841. value = (value << 8) | dict[pos++];
  26842. value = (value << 8) | dict[pos++];
  26843. return value;
  26844. } else if (value >= 32 && value <= 246) {
  26845. return value - 139;
  26846. } else if (value >= 247 && value <= 250) {
  26847. return ((value - 247) * 256) + dict[pos++] + 108;
  26848. } else if (value >= 251 && value <= 254) {
  26849. return -((value - 251) * 256) - dict[pos++] - 108;
  26850. } else {
  26851. error('255 is not a valid DICT command');
  26852. }
  26853. return -1;
  26854. }
  26855. function parseFloatOperand() {
  26856. var str = '';
  26857. var eof = 15;
  26858. var lookup = ['0', '1', '2', '3', '4', '5', '6', '7', '8',
  26859. '9', '.', 'E', 'E-', null, '-'];
  26860. var length = dict.length;
  26861. while (pos < length) {
  26862. var b = dict[pos++];
  26863. var b1 = b >> 4;
  26864. var b2 = b & 15;
  26865. if (b1 == eof) {
  26866. break;
  26867. }
  26868. str += lookup[b1];
  26869. if (b2 == eof) {
  26870. break;
  26871. }
  26872. str += lookup[b2];
  26873. }
  26874. return parseFloat(str);
  26875. }
  26876. var operands = [];
  26877. var entries = [];
  26878. pos = 0;
  26879. var end = dict.length;
  26880. while (pos < end) {
  26881. var b = dict[pos];
  26882. if (b <= 21) {
  26883. if (b === 12) {
  26884. b = (b << 8) | dict[++pos];
  26885. }
  26886. entries.push([b, operands]);
  26887. operands = [];
  26888. ++pos;
  26889. } else {
  26890. operands.push(parseOperand());
  26891. }
  26892. }
  26893. return entries;
  26894. },
  26895. parseIndex: function CFFParser_parseIndex(pos) {
  26896. var cffIndex = new CFFIndex();
  26897. var bytes = this.bytes;
  26898. var count = (bytes[pos++] << 8) | bytes[pos++];
  26899. var offsets = [];
  26900. var end = pos;
  26901. var i, ii;
  26902. if (count !== 0) {
  26903. var offsetSize = bytes[pos++];
  26904. // add 1 for offset to determine size of last object
  26905. var startPos = pos + ((count + 1) * offsetSize) - 1;
  26906. for (i = 0, ii = count + 1; i < ii; ++i) {
  26907. var offset = 0;
  26908. for (var j = 0; j < offsetSize; ++j) {
  26909. offset <<= 8;
  26910. offset += bytes[pos++];
  26911. }
  26912. offsets.push(startPos + offset);
  26913. }
  26914. end = offsets[count];
  26915. }
  26916. for (i = 0, ii = offsets.length - 1; i < ii; ++i) {
  26917. var offsetStart = offsets[i];
  26918. var offsetEnd = offsets[i + 1];
  26919. cffIndex.add(bytes.subarray(offsetStart, offsetEnd));
  26920. }
  26921. return {obj: cffIndex, endPos: end};
  26922. },
  26923. parseNameIndex: function CFFParser_parseNameIndex(index) {
  26924. var names = [];
  26925. for (var i = 0, ii = index.count; i < ii; ++i) {
  26926. var name = index.get(i);
  26927. // OTS doesn't allow names to be over 127 characters.
  26928. var length = Math.min(name.length, 127);
  26929. var data = [];
  26930. // OTS also only permits certain characters in the name.
  26931. for (var j = 0; j < length; ++j) {
  26932. var c = name[j];
  26933. if (j === 0 && c === 0) {
  26934. data[j] = c;
  26935. continue;
  26936. }
  26937. if ((c < 33 || c > 126) || c === 91 /* [ */ || c === 93 /* ] */ ||
  26938. c === 40 /* ( */ || c === 41 /* ) */ || c === 123 /* { */ ||
  26939. c === 125 /* } */ || c === 60 /* < */ || c === 62 /* > */ ||
  26940. c === 47 /* / */ || c === 37 /* % */ || c === 35 /* # */) {
  26941. data[j] = 95;
  26942. continue;
  26943. }
  26944. data[j] = c;
  26945. }
  26946. names.push(bytesToString(data));
  26947. }
  26948. return names;
  26949. },
  26950. parseStringIndex: function CFFParser_parseStringIndex(index) {
  26951. var strings = new CFFStrings();
  26952. for (var i = 0, ii = index.count; i < ii; ++i) {
  26953. var data = index.get(i);
  26954. strings.add(bytesToString(data));
  26955. }
  26956. return strings;
  26957. },
  26958. createDict: function CFFParser_createDict(Type, dict, strings) {
  26959. var cffDict = new Type(strings);
  26960. for (var i = 0, ii = dict.length; i < ii; ++i) {
  26961. var pair = dict[i];
  26962. var key = pair[0];
  26963. var value = pair[1];
  26964. cffDict.setByKey(key, value);
  26965. }
  26966. return cffDict;
  26967. },
  26968. parseCharStrings: function CFFParser_parseCharStrings(charStringOffset) {
  26969. var charStrings = this.parseIndex(charStringOffset).obj;
  26970. var seacs = [];
  26971. var count = charStrings.count;
  26972. for (var i = 0; i < count; i++) {
  26973. var charstring = charStrings.get(i);
  26974. var stackSize = 0;
  26975. var stack = [];
  26976. var undefStack = true;
  26977. var hints = 0;
  26978. var valid = true;
  26979. var data = charstring;
  26980. var length = data.length;
  26981. for (var j = 0; j < length;) {
  26982. var value = data[j++];
  26983. var validationCommand = null;
  26984. if (value == 12) {
  26985. var q = data[j++];
  26986. if (q === 0) {
  26987. // The CFF specification state that the 'dotsection' command
  26988. // (12, 0) is deprecated and treated as a no-op, but all Type2
  26989. // charstrings processors should support them. Unfortunately
  26990. // the font sanitizer don't. As a workaround the sequence (12, 0)
  26991. // is replaced by a useless (0, hmoveto).
  26992. data[j - 2] = 139;
  26993. data[j - 1] = 22;
  26994. stackSize = 0;
  26995. } else {
  26996. validationCommand = CharstringValidationData12[q];
  26997. }
  26998. } else if (value === 28) { // number (16 bit)
  26999. stack[stackSize] = ((data[j] << 24) | (data[j + 1] << 16)) >> 16;
  27000. j += 2;
  27001. stackSize++;
  27002. } else if (value == 14) {
  27003. if (stackSize >= 4) {
  27004. stackSize -= 4;
  27005. if (SEAC_ANALYSIS_ENABLED) {
  27006. seacs[i] = stack.slice(stackSize, stackSize + 4);
  27007. valid = false;
  27008. }
  27009. }
  27010. } else if (value >= 32 && value <= 246) { // number
  27011. stack[stackSize] = value - 139;
  27012. stackSize++;
  27013. } else if (value >= 247 && value <= 254) { // number (+1 bytes)
  27014. stack[stackSize] = (value < 251 ?
  27015. ((value - 247) << 8) + data[j] + 108 :
  27016. -((value - 251) << 8) - data[j] - 108);
  27017. j++;
  27018. stackSize++;
  27019. } else if (value == 255) { // number (32 bit)
  27020. stack[stackSize] = ((data[j] << 24) | (data[j + 1] << 16) |
  27021. (data[j + 2] << 8) | data[j + 3]) / 65536;
  27022. j += 4;
  27023. stackSize++;
  27024. } else if (value == 19 || value == 20) {
  27025. hints += stackSize >> 1;
  27026. j += (hints + 7) >> 3; // skipping right amount of hints flag data
  27027. stackSize = 0;
  27028. } else {
  27029. validationCommand = CharstringValidationData[value];
  27030. }
  27031. if (validationCommand) {
  27032. if (validationCommand.stem) {
  27033. hints += stackSize >> 1;
  27034. }
  27035. if ('min' in validationCommand) {
  27036. if (!undefStack && stackSize < validationCommand.min) {
  27037. warn('Not enough parameters for ' + validationCommand.id +
  27038. '; actual: ' + stackSize +
  27039. ', expected: ' + validationCommand.min);
  27040. valid = false;
  27041. break;
  27042. }
  27043. }
  27044. if ('stackDelta' in validationCommand) {
  27045. if ('stackFn' in validationCommand) {
  27046. validationCommand.stackFn(stack, stackSize);
  27047. }
  27048. stackSize += validationCommand.stackDelta;
  27049. } else if (validationCommand.resetStack) {
  27050. stackSize = 0;
  27051. undefStack = false;
  27052. } else if (validationCommand.undefStack) {
  27053. stackSize = 0;
  27054. undefStack = true;
  27055. }
  27056. }
  27057. }
  27058. if (!valid) {
  27059. // resetting invalid charstring to single 'endchar'
  27060. charStrings.set(i, new Uint8Array([14]));
  27061. }
  27062. }
  27063. return { charStrings: charStrings, seacs: seacs };
  27064. },
  27065. emptyPrivateDictionary:
  27066. function CFFParser_emptyPrivateDictionary(parentDict) {
  27067. var privateDict = this.createDict(CFFPrivateDict, [],
  27068. parentDict.strings);
  27069. parentDict.setByKey(18, [0, 0]);
  27070. parentDict.privateDict = privateDict;
  27071. },
  27072. parsePrivateDict: function CFFParser_parsePrivateDict(parentDict) {
  27073. // no private dict, do nothing
  27074. if (!parentDict.hasName('Private')) {
  27075. this.emptyPrivateDictionary(parentDict);
  27076. return;
  27077. }
  27078. var privateOffset = parentDict.getByName('Private');
  27079. // make sure the params are formatted correctly
  27080. if (!isArray(privateOffset) || privateOffset.length !== 2) {
  27081. parentDict.removeByName('Private');
  27082. return;
  27083. }
  27084. var size = privateOffset[0];
  27085. var offset = privateOffset[1];
  27086. // remove empty dicts or ones that refer to invalid location
  27087. if (size === 0 || offset >= this.bytes.length) {
  27088. this.emptyPrivateDictionary(parentDict);
  27089. return;
  27090. }
  27091. var privateDictEnd = offset + size;
  27092. var dictData = this.bytes.subarray(offset, privateDictEnd);
  27093. var dict = this.parseDict(dictData);
  27094. var privateDict = this.createDict(CFFPrivateDict, dict,
  27095. parentDict.strings);
  27096. parentDict.privateDict = privateDict;
  27097. // Parse the Subrs index also since it's relative to the private dict.
  27098. if (!privateDict.getByName('Subrs')) {
  27099. return;
  27100. }
  27101. var subrsOffset = privateDict.getByName('Subrs');
  27102. var relativeOffset = offset + subrsOffset;
  27103. // Validate the offset.
  27104. if (subrsOffset === 0 || relativeOffset >= this.bytes.length) {
  27105. this.emptyPrivateDictionary(parentDict);
  27106. return;
  27107. }
  27108. var subrsIndex = this.parseIndex(relativeOffset);
  27109. privateDict.subrsIndex = subrsIndex.obj;
  27110. },
  27111. parseCharsets: function CFFParser_parseCharsets(pos, length, strings, cid) {
  27112. if (pos === 0) {
  27113. return new CFFCharset(true, CFFCharsetPredefinedTypes.ISO_ADOBE,
  27114. ISOAdobeCharset);
  27115. } else if (pos == 1) {
  27116. return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT,
  27117. ExpertCharset);
  27118. } else if (pos == 2) {
  27119. return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT_SUBSET,
  27120. ExpertSubsetCharset);
  27121. }
  27122. var bytes = this.bytes;
  27123. var start = pos;
  27124. var format = bytes[pos++];
  27125. var charset = ['.notdef'];
  27126. var id, count, i;
  27127. // subtract 1 for the .notdef glyph
  27128. length -= 1;
  27129. switch (format) {
  27130. case 0:
  27131. for (i = 0; i < length; i++) {
  27132. id = (bytes[pos++] << 8) | bytes[pos++];
  27133. charset.push(cid ? id : strings.get(id));
  27134. }
  27135. break;
  27136. case 1:
  27137. while (charset.length <= length) {
  27138. id = (bytes[pos++] << 8) | bytes[pos++];
  27139. count = bytes[pos++];
  27140. for (i = 0; i <= count; i++) {
  27141. charset.push(cid ? id++ : strings.get(id++));
  27142. }
  27143. }
  27144. break;
  27145. case 2:
  27146. while (charset.length <= length) {
  27147. id = (bytes[pos++] << 8) | bytes[pos++];
  27148. count = (bytes[pos++] << 8) | bytes[pos++];
  27149. for (i = 0; i <= count; i++) {
  27150. charset.push(cid ? id++ : strings.get(id++));
  27151. }
  27152. }
  27153. break;
  27154. default:
  27155. error('Unknown charset format');
  27156. }
  27157. // Raw won't be needed if we actually compile the charset.
  27158. var end = pos;
  27159. var raw = bytes.subarray(start, end);
  27160. return new CFFCharset(false, format, charset, raw);
  27161. },
  27162. parseEncoding: function CFFParser_parseEncoding(pos,
  27163. properties,
  27164. strings,
  27165. charset) {
  27166. var encoding = {};
  27167. var bytes = this.bytes;
  27168. var predefined = false;
  27169. var hasSupplement = false;
  27170. var format, i, ii;
  27171. var raw = null;
  27172. function readSupplement() {
  27173. var supplementsCount = bytes[pos++];
  27174. for (i = 0; i < supplementsCount; i++) {
  27175. var code = bytes[pos++];
  27176. var sid = (bytes[pos++] << 8) + (bytes[pos++] & 0xff);
  27177. encoding[code] = charset.indexOf(strings.get(sid));
  27178. }
  27179. }
  27180. if (pos === 0 || pos == 1) {
  27181. predefined = true;
  27182. format = pos;
  27183. var baseEncoding = pos ? Encodings.ExpertEncoding :
  27184. Encodings.StandardEncoding;
  27185. for (i = 0, ii = charset.length; i < ii; i++) {
  27186. var index = baseEncoding.indexOf(charset[i]);
  27187. if (index != -1) {
  27188. encoding[index] = i;
  27189. }
  27190. }
  27191. } else {
  27192. var dataStart = pos;
  27193. format = bytes[pos++];
  27194. switch (format & 0x7f) {
  27195. case 0:
  27196. var glyphsCount = bytes[pos++];
  27197. for (i = 1; i <= glyphsCount; i++) {
  27198. encoding[bytes[pos++]] = i;
  27199. }
  27200. break;
  27201. case 1:
  27202. var rangesCount = bytes[pos++];
  27203. var gid = 1;
  27204. for (i = 0; i < rangesCount; i++) {
  27205. var start = bytes[pos++];
  27206. var left = bytes[pos++];
  27207. for (var j = start; j <= start + left; j++) {
  27208. encoding[j] = gid++;
  27209. }
  27210. }
  27211. break;
  27212. default:
  27213. error('Unknow encoding format: ' + format + ' in CFF');
  27214. break;
  27215. }
  27216. var dataEnd = pos;
  27217. if (format & 0x80) {
  27218. // The font sanitizer does not support CFF encoding with a
  27219. // supplement, since the encoding is not really used to map
  27220. // between gid to glyph, let's overwrite what is declared in
  27221. // the top dictionary to let the sanitizer think the font use
  27222. // StandardEncoding, that's a lie but that's ok.
  27223. bytes[dataStart] &= 0x7f;
  27224. readSupplement();
  27225. hasSupplement = true;
  27226. }
  27227. raw = bytes.subarray(dataStart, dataEnd);
  27228. }
  27229. format = format & 0x7f;
  27230. return new CFFEncoding(predefined, format, encoding, raw);
  27231. },
  27232. parseFDSelect: function CFFParser_parseFDSelect(pos, length) {
  27233. var start = pos;
  27234. var bytes = this.bytes;
  27235. var format = bytes[pos++];
  27236. var fdSelect = [];
  27237. var i;
  27238. switch (format) {
  27239. case 0:
  27240. for (i = 0; i < length; ++i) {
  27241. var id = bytes[pos++];
  27242. fdSelect.push(id);
  27243. }
  27244. break;
  27245. case 3:
  27246. var rangesCount = (bytes[pos++] << 8) | bytes[pos++];
  27247. for (i = 0; i < rangesCount; ++i) {
  27248. var first = (bytes[pos++] << 8) | bytes[pos++];
  27249. var fdIndex = bytes[pos++];
  27250. var next = (bytes[pos] << 8) | bytes[pos + 1];
  27251. for (var j = first; j < next; ++j) {
  27252. fdSelect.push(fdIndex);
  27253. }
  27254. }
  27255. // Advance past the sentinel(next).
  27256. pos += 2;
  27257. break;
  27258. default:
  27259. error('Unknown fdselect format ' + format);
  27260. break;
  27261. }
  27262. var end = pos;
  27263. return new CFFFDSelect(fdSelect, bytes.subarray(start, end));
  27264. }
  27265. };
  27266. return CFFParser;
  27267. })();
  27268. // Compact Font Format
  27269. var CFF = (function CFFClosure() {
  27270. function CFF() {
  27271. this.header = null;
  27272. this.names = [];
  27273. this.topDict = null;
  27274. this.strings = new CFFStrings();
  27275. this.globalSubrIndex = null;
  27276. // The following could really be per font, but since we only have one font
  27277. // store them here.
  27278. this.encoding = null;
  27279. this.charset = null;
  27280. this.charStrings = null;
  27281. this.fdArray = [];
  27282. this.fdSelect = null;
  27283. this.isCIDFont = false;
  27284. }
  27285. return CFF;
  27286. })();
  27287. var CFFHeader = (function CFFHeaderClosure() {
  27288. function CFFHeader(major, minor, hdrSize, offSize) {
  27289. this.major = major;
  27290. this.minor = minor;
  27291. this.hdrSize = hdrSize;
  27292. this.offSize = offSize;
  27293. }
  27294. return CFFHeader;
  27295. })();
  27296. var CFFStrings = (function CFFStringsClosure() {
  27297. function CFFStrings() {
  27298. this.strings = [];
  27299. }
  27300. CFFStrings.prototype = {
  27301. get: function CFFStrings_get(index) {
  27302. if (index >= 0 && index <= 390) {
  27303. return CFFStandardStrings[index];
  27304. }
  27305. if (index - 391 <= this.strings.length) {
  27306. return this.strings[index - 391];
  27307. }
  27308. return CFFStandardStrings[0];
  27309. },
  27310. add: function CFFStrings_add(value) {
  27311. this.strings.push(value);
  27312. },
  27313. get count() {
  27314. return this.strings.length;
  27315. }
  27316. };
  27317. return CFFStrings;
  27318. })();
  27319. var CFFIndex = (function CFFIndexClosure() {
  27320. function CFFIndex() {
  27321. this.objects = [];
  27322. this.length = 0;
  27323. }
  27324. CFFIndex.prototype = {
  27325. add: function CFFIndex_add(data) {
  27326. this.length += data.length;
  27327. this.objects.push(data);
  27328. },
  27329. set: function CFFIndex_set(index, data) {
  27330. this.length += data.length - this.objects[index].length;
  27331. this.objects[index] = data;
  27332. },
  27333. get: function CFFIndex_get(index) {
  27334. return this.objects[index];
  27335. },
  27336. get count() {
  27337. return this.objects.length;
  27338. }
  27339. };
  27340. return CFFIndex;
  27341. })();
  27342. var CFFDict = (function CFFDictClosure() {
  27343. function CFFDict(tables, strings) {
  27344. this.keyToNameMap = tables.keyToNameMap;
  27345. this.nameToKeyMap = tables.nameToKeyMap;
  27346. this.defaults = tables.defaults;
  27347. this.types = tables.types;
  27348. this.opcodes = tables.opcodes;
  27349. this.order = tables.order;
  27350. this.strings = strings;
  27351. this.values = {};
  27352. }
  27353. CFFDict.prototype = {
  27354. // value should always be an array
  27355. setByKey: function CFFDict_setByKey(key, value) {
  27356. if (!(key in this.keyToNameMap)) {
  27357. return false;
  27358. }
  27359. // ignore empty values
  27360. if (value.length === 0) {
  27361. return true;
  27362. }
  27363. var type = this.types[key];
  27364. // remove the array wrapping these types of values
  27365. if (type === 'num' || type === 'sid' || type === 'offset') {
  27366. value = value[0];
  27367. }
  27368. this.values[key] = value;
  27369. return true;
  27370. },
  27371. setByName: function CFFDict_setByName(name, value) {
  27372. if (!(name in this.nameToKeyMap)) {
  27373. error('Invalid dictionary name "' + name + '"');
  27374. }
  27375. this.values[this.nameToKeyMap[name]] = value;
  27376. },
  27377. hasName: function CFFDict_hasName(name) {
  27378. return this.nameToKeyMap[name] in this.values;
  27379. },
  27380. getByName: function CFFDict_getByName(name) {
  27381. if (!(name in this.nameToKeyMap)) {
  27382. error('Invalid dictionary name "' + name + '"');
  27383. }
  27384. var key = this.nameToKeyMap[name];
  27385. if (!(key in this.values)) {
  27386. return this.defaults[key];
  27387. }
  27388. return this.values[key];
  27389. },
  27390. removeByName: function CFFDict_removeByName(name) {
  27391. delete this.values[this.nameToKeyMap[name]];
  27392. }
  27393. };
  27394. CFFDict.createTables = function CFFDict_createTables(layout) {
  27395. var tables = {
  27396. keyToNameMap: {},
  27397. nameToKeyMap: {},
  27398. defaults: {},
  27399. types: {},
  27400. opcodes: {},
  27401. order: []
  27402. };
  27403. for (var i = 0, ii = layout.length; i < ii; ++i) {
  27404. var entry = layout[i];
  27405. var key = isArray(entry[0]) ? (entry[0][0] << 8) + entry[0][1] : entry[0];
  27406. tables.keyToNameMap[key] = entry[1];
  27407. tables.nameToKeyMap[entry[1]] = key;
  27408. tables.types[key] = entry[2];
  27409. tables.defaults[key] = entry[3];
  27410. tables.opcodes[key] = isArray(entry[0]) ? entry[0] : [entry[0]];
  27411. tables.order.push(key);
  27412. }
  27413. return tables;
  27414. };
  27415. return CFFDict;
  27416. })();
  27417. var CFFTopDict = (function CFFTopDictClosure() {
  27418. var layout = [
  27419. [[12, 30], 'ROS', ['sid', 'sid', 'num'], null],
  27420. [[12, 20], 'SyntheticBase', 'num', null],
  27421. [0, 'version', 'sid', null],
  27422. [1, 'Notice', 'sid', null],
  27423. [[12, 0], 'Copyright', 'sid', null],
  27424. [2, 'FullName', 'sid', null],
  27425. [3, 'FamilyName', 'sid', null],
  27426. [4, 'Weight', 'sid', null],
  27427. [[12, 1], 'isFixedPitch', 'num', 0],
  27428. [[12, 2], 'ItalicAngle', 'num', 0],
  27429. [[12, 3], 'UnderlinePosition', 'num', -100],
  27430. [[12, 4], 'UnderlineThickness', 'num', 50],
  27431. [[12, 5], 'PaintType', 'num', 0],
  27432. [[12, 6], 'CharstringType', 'num', 2],
  27433. [[12, 7], 'FontMatrix', ['num', 'num', 'num', 'num', 'num', 'num'],
  27434. [0.001, 0, 0, 0.001, 0, 0]],
  27435. [13, 'UniqueID', 'num', null],
  27436. [5, 'FontBBox', ['num', 'num', 'num', 'num'], [0, 0, 0, 0]],
  27437. [[12, 8], 'StrokeWidth', 'num', 0],
  27438. [14, 'XUID', 'array', null],
  27439. [15, 'charset', 'offset', 0],
  27440. [16, 'Encoding', 'offset', 0],
  27441. [17, 'CharStrings', 'offset', 0],
  27442. [18, 'Private', ['offset', 'offset'], null],
  27443. [[12, 21], 'PostScript', 'sid', null],
  27444. [[12, 22], 'BaseFontName', 'sid', null],
  27445. [[12, 23], 'BaseFontBlend', 'delta', null],
  27446. [[12, 31], 'CIDFontVersion', 'num', 0],
  27447. [[12, 32], 'CIDFontRevision', 'num', 0],
  27448. [[12, 33], 'CIDFontType', 'num', 0],
  27449. [[12, 34], 'CIDCount', 'num', 8720],
  27450. [[12, 35], 'UIDBase', 'num', null],
  27451. // XXX: CID Fonts on DirectWrite 6.1 only seem to work if FDSelect comes
  27452. // before FDArray.
  27453. [[12, 37], 'FDSelect', 'offset', null],
  27454. [[12, 36], 'FDArray', 'offset', null],
  27455. [[12, 38], 'FontName', 'sid', null]
  27456. ];
  27457. var tables = null;
  27458. function CFFTopDict(strings) {
  27459. if (tables === null) {
  27460. tables = CFFDict.createTables(layout);
  27461. }
  27462. CFFDict.call(this, tables, strings);
  27463. this.privateDict = null;
  27464. }
  27465. CFFTopDict.prototype = Object.create(CFFDict.prototype);
  27466. return CFFTopDict;
  27467. })();
  27468. var CFFPrivateDict = (function CFFPrivateDictClosure() {
  27469. var layout = [
  27470. [6, 'BlueValues', 'delta', null],
  27471. [7, 'OtherBlues', 'delta', null],
  27472. [8, 'FamilyBlues', 'delta', null],
  27473. [9, 'FamilyOtherBlues', 'delta', null],
  27474. [[12, 9], 'BlueScale', 'num', 0.039625],
  27475. [[12, 10], 'BlueShift', 'num', 7],
  27476. [[12, 11], 'BlueFuzz', 'num', 1],
  27477. [10, 'StdHW', 'num', null],
  27478. [11, 'StdVW', 'num', null],
  27479. [[12, 12], 'StemSnapH', 'delta', null],
  27480. [[12, 13], 'StemSnapV', 'delta', null],
  27481. [[12, 14], 'ForceBold', 'num', 0],
  27482. [[12, 17], 'LanguageGroup', 'num', 0],
  27483. [[12, 18], 'ExpansionFactor', 'num', 0.06],
  27484. [[12, 19], 'initialRandomSeed', 'num', 0],
  27485. [20, 'defaultWidthX', 'num', 0],
  27486. [21, 'nominalWidthX', 'num', 0],
  27487. [19, 'Subrs', 'offset', null]
  27488. ];
  27489. var tables = null;
  27490. function CFFPrivateDict(strings) {
  27491. if (tables === null) {
  27492. tables = CFFDict.createTables(layout);
  27493. }
  27494. CFFDict.call(this, tables, strings);
  27495. this.subrsIndex = null;
  27496. }
  27497. CFFPrivateDict.prototype = Object.create(CFFDict.prototype);
  27498. return CFFPrivateDict;
  27499. })();
  27500. var CFFCharsetPredefinedTypes = {
  27501. ISO_ADOBE: 0,
  27502. EXPERT: 1,
  27503. EXPERT_SUBSET: 2
  27504. };
  27505. var CFFCharset = (function CFFCharsetClosure() {
  27506. function CFFCharset(predefined, format, charset, raw) {
  27507. this.predefined = predefined;
  27508. this.format = format;
  27509. this.charset = charset;
  27510. this.raw = raw;
  27511. }
  27512. return CFFCharset;
  27513. })();
  27514. var CFFEncoding = (function CFFEncodingClosure() {
  27515. function CFFEncoding(predefined, format, encoding, raw) {
  27516. this.predefined = predefined;
  27517. this.format = format;
  27518. this.encoding = encoding;
  27519. this.raw = raw;
  27520. }
  27521. return CFFEncoding;
  27522. })();
  27523. var CFFFDSelect = (function CFFFDSelectClosure() {
  27524. function CFFFDSelect(fdSelect, raw) {
  27525. this.fdSelect = fdSelect;
  27526. this.raw = raw;
  27527. }
  27528. return CFFFDSelect;
  27529. })();
  27530. // Helper class to keep track of where an offset is within the data and helps
  27531. // filling in that offset once it's known.
  27532. var CFFOffsetTracker = (function CFFOffsetTrackerClosure() {
  27533. function CFFOffsetTracker() {
  27534. this.offsets = {};
  27535. }
  27536. CFFOffsetTracker.prototype = {
  27537. isTracking: function CFFOffsetTracker_isTracking(key) {
  27538. return key in this.offsets;
  27539. },
  27540. track: function CFFOffsetTracker_track(key, location) {
  27541. if (key in this.offsets) {
  27542. error('Already tracking location of ' + key);
  27543. }
  27544. this.offsets[key] = location;
  27545. },
  27546. offset: function CFFOffsetTracker_offset(value) {
  27547. for (var key in this.offsets) {
  27548. this.offsets[key] += value;
  27549. }
  27550. },
  27551. setEntryLocation: function CFFOffsetTracker_setEntryLocation(key,
  27552. values,
  27553. output) {
  27554. if (!(key in this.offsets)) {
  27555. error('Not tracking location of ' + key);
  27556. }
  27557. var data = output.data;
  27558. var dataOffset = this.offsets[key];
  27559. var size = 5;
  27560. for (var i = 0, ii = values.length; i < ii; ++i) {
  27561. var offset0 = i * size + dataOffset;
  27562. var offset1 = offset0 + 1;
  27563. var offset2 = offset0 + 2;
  27564. var offset3 = offset0 + 3;
  27565. var offset4 = offset0 + 4;
  27566. // It's easy to screw up offsets so perform this sanity check.
  27567. if (data[offset0] !== 0x1d || data[offset1] !== 0 ||
  27568. data[offset2] !== 0 || data[offset3] !== 0 || data[offset4] !== 0) {
  27569. error('writing to an offset that is not empty');
  27570. }
  27571. var value = values[i];
  27572. data[offset0] = 0x1d;
  27573. data[offset1] = (value >> 24) & 0xFF;
  27574. data[offset2] = (value >> 16) & 0xFF;
  27575. data[offset3] = (value >> 8) & 0xFF;
  27576. data[offset4] = value & 0xFF;
  27577. }
  27578. }
  27579. };
  27580. return CFFOffsetTracker;
  27581. })();
  27582. // Takes a CFF and converts it to the binary representation.
  27583. var CFFCompiler = (function CFFCompilerClosure() {
  27584. function CFFCompiler(cff) {
  27585. this.cff = cff;
  27586. }
  27587. CFFCompiler.prototype = {
  27588. compile: function CFFCompiler_compile() {
  27589. var cff = this.cff;
  27590. var output = {
  27591. data: [],
  27592. length: 0,
  27593. add: function CFFCompiler_add(data) {
  27594. this.data = this.data.concat(data);
  27595. this.length = this.data.length;
  27596. }
  27597. };
  27598. // Compile the five entries that must be in order.
  27599. var header = this.compileHeader(cff.header);
  27600. output.add(header);
  27601. var nameIndex = this.compileNameIndex(cff.names);
  27602. output.add(nameIndex);
  27603. if (cff.isCIDFont) {
  27604. // The spec is unclear on how font matrices should relate to each other
  27605. // when there is one in the main top dict and the sub top dicts.
  27606. // Windows handles this differently than linux and osx so we have to
  27607. // normalize to work on all.
  27608. // Rules based off of some mailing list discussions:
  27609. // - If main font has a matrix and subfont doesn't, use the main matrix.
  27610. // - If no main font matrix and there is a subfont matrix, use the
  27611. // subfont matrix.
  27612. // - If both have matrices, concat together.
  27613. // - If neither have matrices, use default.
  27614. // To make this work on all platforms we move the top matrix into each
  27615. // sub top dict and concat if necessary.
  27616. if (cff.topDict.hasName('FontMatrix')) {
  27617. var base = cff.topDict.getByName('FontMatrix');
  27618. cff.topDict.removeByName('FontMatrix');
  27619. for (var i = 0, ii = cff.fdArray.length; i < ii; i++) {
  27620. var subDict = cff.fdArray[i];
  27621. var matrix = base.slice(0);
  27622. if (subDict.hasName('FontMatrix')) {
  27623. matrix = Util.transform(matrix, subDict.getByName('FontMatrix'));
  27624. }
  27625. subDict.setByName('FontMatrix', matrix);
  27626. }
  27627. }
  27628. }
  27629. var compiled = this.compileTopDicts([cff.topDict],
  27630. output.length,
  27631. cff.isCIDFont);
  27632. output.add(compiled.output);
  27633. var topDictTracker = compiled.trackers[0];
  27634. var stringIndex = this.compileStringIndex(cff.strings.strings);
  27635. output.add(stringIndex);
  27636. var globalSubrIndex = this.compileIndex(cff.globalSubrIndex);
  27637. output.add(globalSubrIndex);
  27638. // Now start on the other entries that have no specfic order.
  27639. if (cff.encoding && cff.topDict.hasName('Encoding')) {
  27640. if (cff.encoding.predefined) {
  27641. topDictTracker.setEntryLocation('Encoding', [cff.encoding.format],
  27642. output);
  27643. } else {
  27644. var encoding = this.compileEncoding(cff.encoding);
  27645. topDictTracker.setEntryLocation('Encoding', [output.length], output);
  27646. output.add(encoding);
  27647. }
  27648. }
  27649. if (cff.charset && cff.topDict.hasName('charset')) {
  27650. if (cff.charset.predefined) {
  27651. topDictTracker.setEntryLocation('charset', [cff.charset.format],
  27652. output);
  27653. } else {
  27654. var charset = this.compileCharset(cff.charset);
  27655. topDictTracker.setEntryLocation('charset', [output.length], output);
  27656. output.add(charset);
  27657. }
  27658. }
  27659. var charStrings = this.compileCharStrings(cff.charStrings);
  27660. topDictTracker.setEntryLocation('CharStrings', [output.length], output);
  27661. output.add(charStrings);
  27662. if (cff.isCIDFont) {
  27663. // For some reason FDSelect must be in front of FDArray on windows. OSX
  27664. // and linux don't seem to care.
  27665. topDictTracker.setEntryLocation('FDSelect', [output.length], output);
  27666. var fdSelect = this.compileFDSelect(cff.fdSelect.raw);
  27667. output.add(fdSelect);
  27668. // It is unclear if the sub font dictionary can have CID related
  27669. // dictionary keys, but the sanitizer doesn't like them so remove them.
  27670. compiled = this.compileTopDicts(cff.fdArray, output.length, true);
  27671. topDictTracker.setEntryLocation('FDArray', [output.length], output);
  27672. output.add(compiled.output);
  27673. var fontDictTrackers = compiled.trackers;
  27674. this.compilePrivateDicts(cff.fdArray, fontDictTrackers, output);
  27675. }
  27676. this.compilePrivateDicts([cff.topDict], [topDictTracker], output);
  27677. // If the font data ends with INDEX whose object data is zero-length,
  27678. // the sanitizer will bail out. Add a dummy byte to avoid that.
  27679. output.add([0]);
  27680. return output.data;
  27681. },
  27682. encodeNumber: function CFFCompiler_encodeNumber(value) {
  27683. if (parseFloat(value) == parseInt(value, 10) && !isNaN(value)) { // isInt
  27684. return this.encodeInteger(value);
  27685. } else {
  27686. return this.encodeFloat(value);
  27687. }
  27688. },
  27689. encodeFloat: function CFFCompiler_encodeFloat(num) {
  27690. var value = num.toString();
  27691. // rounding inaccurate doubles
  27692. var m = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(value);
  27693. if (m) {
  27694. var epsilon = parseFloat('1e' + ((m[2] ? +m[2] : 0) + m[1].length));
  27695. value = (Math.round(num * epsilon) / epsilon).toString();
  27696. }
  27697. var nibbles = '';
  27698. var i, ii;
  27699. for (i = 0, ii = value.length; i < ii; ++i) {
  27700. var a = value[i];
  27701. if (a === 'e') {
  27702. nibbles += value[++i] === '-' ? 'c' : 'b';
  27703. } else if (a === '.') {
  27704. nibbles += 'a';
  27705. } else if (a === '-') {
  27706. nibbles += 'e';
  27707. } else {
  27708. nibbles += a;
  27709. }
  27710. }
  27711. nibbles += (nibbles.length & 1) ? 'f' : 'ff';
  27712. var out = [30];
  27713. for (i = 0, ii = nibbles.length; i < ii; i += 2) {
  27714. out.push(parseInt(nibbles.substr(i, 2), 16));
  27715. }
  27716. return out;
  27717. },
  27718. encodeInteger: function CFFCompiler_encodeInteger(value) {
  27719. var code;
  27720. if (value >= -107 && value <= 107) {
  27721. code = [value + 139];
  27722. } else if (value >= 108 && value <= 1131) {
  27723. value = [value - 108];
  27724. code = [(value >> 8) + 247, value & 0xFF];
  27725. } else if (value >= -1131 && value <= -108) {
  27726. value = -value - 108;
  27727. code = [(value >> 8) + 251, value & 0xFF];
  27728. } else if (value >= -32768 && value <= 32767) {
  27729. code = [0x1c, (value >> 8) & 0xFF, value & 0xFF];
  27730. } else {
  27731. code = [0x1d,
  27732. (value >> 24) & 0xFF,
  27733. (value >> 16) & 0xFF,
  27734. (value >> 8) & 0xFF,
  27735. value & 0xFF];
  27736. }
  27737. return code;
  27738. },
  27739. compileHeader: function CFFCompiler_compileHeader(header) {
  27740. return [
  27741. header.major,
  27742. header.minor,
  27743. header.hdrSize,
  27744. header.offSize
  27745. ];
  27746. },
  27747. compileNameIndex: function CFFCompiler_compileNameIndex(names) {
  27748. var nameIndex = new CFFIndex();
  27749. for (var i = 0, ii = names.length; i < ii; ++i) {
  27750. nameIndex.add(stringToArray(names[i]));
  27751. }
  27752. return this.compileIndex(nameIndex);
  27753. },
  27754. compileTopDicts: function CFFCompiler_compileTopDicts(dicts,
  27755. length,
  27756. removeCidKeys) {
  27757. var fontDictTrackers = [];
  27758. var fdArrayIndex = new CFFIndex();
  27759. for (var i = 0, ii = dicts.length; i < ii; ++i) {
  27760. var fontDict = dicts[i];
  27761. if (removeCidKeys) {
  27762. fontDict.removeByName('CIDFontVersion');
  27763. fontDict.removeByName('CIDFontRevision');
  27764. fontDict.removeByName('CIDFontType');
  27765. fontDict.removeByName('CIDCount');
  27766. fontDict.removeByName('UIDBase');
  27767. }
  27768. var fontDictTracker = new CFFOffsetTracker();
  27769. var fontDictData = this.compileDict(fontDict, fontDictTracker);
  27770. fontDictTrackers.push(fontDictTracker);
  27771. fdArrayIndex.add(fontDictData);
  27772. fontDictTracker.offset(length);
  27773. }
  27774. fdArrayIndex = this.compileIndex(fdArrayIndex, fontDictTrackers);
  27775. return {
  27776. trackers: fontDictTrackers,
  27777. output: fdArrayIndex
  27778. };
  27779. },
  27780. compilePrivateDicts: function CFFCompiler_compilePrivateDicts(dicts,
  27781. trackers,
  27782. output) {
  27783. for (var i = 0, ii = dicts.length; i < ii; ++i) {
  27784. var fontDict = dicts[i];
  27785. assert(fontDict.privateDict && fontDict.hasName('Private'),
  27786. 'There must be an private dictionary.');
  27787. var privateDict = fontDict.privateDict;
  27788. var privateDictTracker = new CFFOffsetTracker();
  27789. var privateDictData = this.compileDict(privateDict, privateDictTracker);
  27790. var outputLength = output.length;
  27791. privateDictTracker.offset(outputLength);
  27792. if (!privateDictData.length) {
  27793. // The private dictionary was empty, set the output length to zero to
  27794. // ensure the offset length isn't out of bounds in the eyes of the
  27795. // sanitizer.
  27796. outputLength = 0;
  27797. }
  27798. trackers[i].setEntryLocation('Private',
  27799. [privateDictData.length, outputLength],
  27800. output);
  27801. output.add(privateDictData);
  27802. if (privateDict.subrsIndex && privateDict.hasName('Subrs')) {
  27803. var subrs = this.compileIndex(privateDict.subrsIndex);
  27804. privateDictTracker.setEntryLocation('Subrs', [privateDictData.length],
  27805. output);
  27806. output.add(subrs);
  27807. }
  27808. }
  27809. },
  27810. compileDict: function CFFCompiler_compileDict(dict, offsetTracker) {
  27811. var out = [];
  27812. // The dictionary keys must be in a certain order.
  27813. var order = dict.order;
  27814. for (var i = 0; i < order.length; ++i) {
  27815. var key = order[i];
  27816. if (!(key in dict.values)) {
  27817. continue;
  27818. }
  27819. var values = dict.values[key];
  27820. var types = dict.types[key];
  27821. if (!isArray(types)) {
  27822. types = [types];
  27823. }
  27824. if (!isArray(values)) {
  27825. values = [values];
  27826. }
  27827. // Remove any empty dict values.
  27828. if (values.length === 0) {
  27829. continue;
  27830. }
  27831. for (var j = 0, jj = types.length; j < jj; ++j) {
  27832. var type = types[j];
  27833. var value = values[j];
  27834. switch (type) {
  27835. case 'num':
  27836. case 'sid':
  27837. out = out.concat(this.encodeNumber(value));
  27838. break;
  27839. case 'offset':
  27840. // For offsets we just insert a 32bit integer so we don't have to
  27841. // deal with figuring out the length of the offset when it gets
  27842. // replaced later on by the compiler.
  27843. var name = dict.keyToNameMap[key];
  27844. // Some offsets have the offset and the length, so just record the
  27845. // position of the first one.
  27846. if (!offsetTracker.isTracking(name)) {
  27847. offsetTracker.track(name, out.length);
  27848. }
  27849. out = out.concat([0x1d, 0, 0, 0, 0]);
  27850. break;
  27851. case 'array':
  27852. case 'delta':
  27853. out = out.concat(this.encodeNumber(value));
  27854. for (var k = 1, kk = values.length; k < kk; ++k) {
  27855. out = out.concat(this.encodeNumber(values[k]));
  27856. }
  27857. break;
  27858. default:
  27859. error('Unknown data type of ' + type);
  27860. break;
  27861. }
  27862. }
  27863. out = out.concat(dict.opcodes[key]);
  27864. }
  27865. return out;
  27866. },
  27867. compileStringIndex: function CFFCompiler_compileStringIndex(strings) {
  27868. var stringIndex = new CFFIndex();
  27869. for (var i = 0, ii = strings.length; i < ii; ++i) {
  27870. stringIndex.add(stringToArray(strings[i]));
  27871. }
  27872. return this.compileIndex(stringIndex);
  27873. },
  27874. compileGlobalSubrIndex: function CFFCompiler_compileGlobalSubrIndex() {
  27875. var globalSubrIndex = this.cff.globalSubrIndex;
  27876. this.out.writeByteArray(this.compileIndex(globalSubrIndex));
  27877. },
  27878. compileCharStrings: function CFFCompiler_compileCharStrings(charStrings) {
  27879. return this.compileIndex(charStrings);
  27880. },
  27881. compileCharset: function CFFCompiler_compileCharset(charset) {
  27882. return this.compileTypedArray(charset.raw);
  27883. },
  27884. compileEncoding: function CFFCompiler_compileEncoding(encoding) {
  27885. return this.compileTypedArray(encoding.raw);
  27886. },
  27887. compileFDSelect: function CFFCompiler_compileFDSelect(fdSelect) {
  27888. return this.compileTypedArray(fdSelect);
  27889. },
  27890. compileTypedArray: function CFFCompiler_compileTypedArray(data) {
  27891. var out = [];
  27892. for (var i = 0, ii = data.length; i < ii; ++i) {
  27893. out[i] = data[i];
  27894. }
  27895. return out;
  27896. },
  27897. compileIndex: function CFFCompiler_compileIndex(index, trackers) {
  27898. trackers = trackers || [];
  27899. var objects = index.objects;
  27900. // First 2 bytes contains the number of objects contained into this index
  27901. var count = objects.length;
  27902. // If there is no object, just create an index. This technically
  27903. // should just be [0, 0] but OTS has an issue with that.
  27904. if (count === 0) {
  27905. return [0, 0, 0];
  27906. }
  27907. var data = [(count >> 8) & 0xFF, count & 0xff];
  27908. var lastOffset = 1, i;
  27909. for (i = 0; i < count; ++i) {
  27910. lastOffset += objects[i].length;
  27911. }
  27912. var offsetSize;
  27913. if (lastOffset < 0x100) {
  27914. offsetSize = 1;
  27915. } else if (lastOffset < 0x10000) {
  27916. offsetSize = 2;
  27917. } else if (lastOffset < 0x1000000) {
  27918. offsetSize = 3;
  27919. } else {
  27920. offsetSize = 4;
  27921. }
  27922. // Next byte contains the offset size use to reference object in the file
  27923. data.push(offsetSize);
  27924. // Add another offset after this one because we need a new offset
  27925. var relativeOffset = 1;
  27926. for (i = 0; i < count + 1; i++) {
  27927. if (offsetSize === 1) {
  27928. data.push(relativeOffset & 0xFF);
  27929. } else if (offsetSize === 2) {
  27930. data.push((relativeOffset >> 8) & 0xFF,
  27931. relativeOffset & 0xFF);
  27932. } else if (offsetSize === 3) {
  27933. data.push((relativeOffset >> 16) & 0xFF,
  27934. (relativeOffset >> 8) & 0xFF,
  27935. relativeOffset & 0xFF);
  27936. } else {
  27937. data.push((relativeOffset >>> 24) & 0xFF,
  27938. (relativeOffset >> 16) & 0xFF,
  27939. (relativeOffset >> 8) & 0xFF,
  27940. relativeOffset & 0xFF);
  27941. }
  27942. if (objects[i]) {
  27943. relativeOffset += objects[i].length;
  27944. }
  27945. }
  27946. for (i = 0; i < count; i++) {
  27947. // Notify the tracker where the object will be offset in the data.
  27948. if (trackers[i]) {
  27949. trackers[i].offset(data.length);
  27950. }
  27951. for (var j = 0, jj = objects[i].length; j < jj; j++) {
  27952. data.push(objects[i][j]);
  27953. }
  27954. }
  27955. return data;
  27956. }
  27957. };
  27958. return CFFCompiler;
  27959. })();
  27960. // Workaround for seac on Windows.
  27961. (function checkSeacSupport() {
  27962. if (/Windows/.test(navigator.userAgent)) {
  27963. SEAC_ANALYSIS_ENABLED = true;
  27964. }
  27965. })();
  27966. // Workaround for Private Use Area characters in Chrome on Windows
  27967. // http://code.google.com/p/chromium/issues/detail?id=122465
  27968. // https://github.com/mozilla/pdf.js/issues/1689
  27969. (function checkChromeWindows() {
  27970. if (/Windows.*Chrome/.test(navigator.userAgent)) {
  27971. SKIP_PRIVATE_USE_RANGE_F000_TO_F01F = true;
  27972. }
  27973. })();
  27974. var FontRendererFactory = (function FontRendererFactoryClosure() {
  27975. function getLong(data, offset) {
  27976. return (data[offset] << 24) | (data[offset + 1] << 16) |
  27977. (data[offset + 2] << 8) | data[offset + 3];
  27978. }
  27979. function getUshort(data, offset) {
  27980. return (data[offset] << 8) | data[offset + 1];
  27981. }
  27982. function parseCmap(data, start, end) {
  27983. var offset = (getUshort(data, start + 2) === 1 ?
  27984. getLong(data, start + 8) : getLong(data, start + 16));
  27985. var format = getUshort(data, start + offset);
  27986. var length, ranges, p, i;
  27987. if (format === 4) {
  27988. length = getUshort(data, start + offset + 2);
  27989. var segCount = getUshort(data, start + offset + 6) >> 1;
  27990. p = start + offset + 14;
  27991. ranges = [];
  27992. for (i = 0; i < segCount; i++, p += 2) {
  27993. ranges[i] = {end: getUshort(data, p)};
  27994. }
  27995. p += 2;
  27996. for (i = 0; i < segCount; i++, p += 2) {
  27997. ranges[i].start = getUshort(data, p);
  27998. }
  27999. for (i = 0; i < segCount; i++, p += 2) {
  28000. ranges[i].idDelta = getUshort(data, p);
  28001. }
  28002. for (i = 0; i < segCount; i++, p += 2) {
  28003. var idOffset = getUshort(data, p);
  28004. if (idOffset === 0) {
  28005. continue;
  28006. }
  28007. ranges[i].ids = [];
  28008. for (var j = 0, jj = ranges[i].end - ranges[i].start + 1; j < jj; j++) {
  28009. ranges[i].ids[j] = getUshort(data, p + idOffset);
  28010. idOffset += 2;
  28011. }
  28012. }
  28013. return ranges;
  28014. } else if (format === 12) {
  28015. length = getLong(data, start + offset + 4);
  28016. var groups = getLong(data, start + offset + 12);
  28017. p = start + offset + 16;
  28018. ranges = [];
  28019. for (i = 0; i < groups; i++) {
  28020. ranges.push({
  28021. start: getLong(data, p),
  28022. end: getLong(data, p + 4),
  28023. idDelta: getLong(data, p + 8) - getLong(data, p)
  28024. });
  28025. p += 12;
  28026. }
  28027. return ranges;
  28028. }
  28029. error('not supported cmap: ' + format);
  28030. }
  28031. function parseCff(data, start, end) {
  28032. var properties = {};
  28033. var parser = new CFFParser(new Stream(data, start, end - start),
  28034. properties);
  28035. var cff = parser.parse();
  28036. return {
  28037. glyphs: cff.charStrings.objects,
  28038. subrs: (cff.topDict.privateDict && cff.topDict.privateDict.subrsIndex &&
  28039. cff.topDict.privateDict.subrsIndex.objects),
  28040. gsubrs: cff.globalSubrIndex && cff.globalSubrIndex.objects
  28041. };
  28042. }
  28043. function parseGlyfTable(glyf, loca, isGlyphLocationsLong) {
  28044. var itemSize, itemDecode;
  28045. if (isGlyphLocationsLong) {
  28046. itemSize = 4;
  28047. itemDecode = function fontItemDecodeLong(data, offset) {
  28048. return (data[offset] << 24) | (data[offset + 1] << 16) |
  28049. (data[offset + 2] << 8) | data[offset + 3];
  28050. };
  28051. } else {
  28052. itemSize = 2;
  28053. itemDecode = function fontItemDecode(data, offset) {
  28054. return (data[offset] << 9) | (data[offset + 1] << 1);
  28055. };
  28056. }
  28057. var glyphs = [];
  28058. var startOffset = itemDecode(loca, 0);
  28059. for (var j = itemSize; j < loca.length; j += itemSize) {
  28060. var endOffset = itemDecode(loca, j);
  28061. glyphs.push(glyf.subarray(startOffset, endOffset));
  28062. startOffset = endOffset;
  28063. }
  28064. return glyphs;
  28065. }
  28066. function lookupCmap(ranges, unicode) {
  28067. var code = unicode.charCodeAt(0);
  28068. var l = 0, r = ranges.length - 1;
  28069. while (l < r) {
  28070. var c = (l + r + 1) >> 1;
  28071. if (code < ranges[c].start) {
  28072. r = c - 1;
  28073. } else {
  28074. l = c;
  28075. }
  28076. }
  28077. if (ranges[l].start <= code && code <= ranges[l].end) {
  28078. return (ranges[l].idDelta + (ranges[l].ids ?
  28079. ranges[l].ids[code - ranges[l].start] : code)) & 0xFFFF;
  28080. }
  28081. return 0;
  28082. }
  28083. function compileGlyf(code, js, font) {
  28084. function moveTo(x, y) {
  28085. js.push('c.moveTo(' + x + ',' + y + ');');
  28086. }
  28087. function lineTo(x, y) {
  28088. js.push('c.lineTo(' + x + ',' + y + ');');
  28089. }
  28090. function quadraticCurveTo(xa, ya, x, y) {
  28091. js.push('c.quadraticCurveTo(' + xa + ',' + ya + ',' +
  28092. x + ',' + y + ');');
  28093. }
  28094. var i = 0;
  28095. var numberOfContours = ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  28096. var flags;
  28097. var x = 0, y = 0;
  28098. i += 10;
  28099. if (numberOfContours < 0) {
  28100. // composite glyph
  28101. do {
  28102. flags = (code[i] << 8) | code[i + 1];
  28103. var glyphIndex = (code[i + 2] << 8) | code[i + 3];
  28104. i += 4;
  28105. var arg1, arg2;
  28106. if ((flags & 0x01)) {
  28107. arg1 = ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  28108. arg2 = ((code[i + 2] << 24) | (code[i + 3] << 16)) >> 16;
  28109. i += 4;
  28110. } else {
  28111. arg1 = code[i++]; arg2 = code[i++];
  28112. }
  28113. if ((flags & 0x02)) {
  28114. x = arg1;
  28115. y = arg2;
  28116. } else {
  28117. x = 0; y = 0; // TODO "they are points" ?
  28118. }
  28119. var scaleX = 1, scaleY = 1, scale01 = 0, scale10 = 0;
  28120. if ((flags & 0x08)) {
  28121. scaleX =
  28122. scaleY = ((code[i] << 24) | (code[i + 1] << 16)) / 1073741824;
  28123. i += 2;
  28124. } else if ((flags & 0x40)) {
  28125. scaleX = ((code[i] << 24) | (code[i + 1] << 16)) / 1073741824;
  28126. scaleY = ((code[i + 2] << 24) | (code[i + 3] << 16)) / 1073741824;
  28127. i += 4;
  28128. } else if ((flags & 0x80)) {
  28129. scaleX = ((code[i] << 24) | (code[i + 1] << 16)) / 1073741824;
  28130. scale01 = ((code[i + 2] << 24) | (code[i + 3] << 16)) / 1073741824;
  28131. scale10 = ((code[i + 4] << 24) | (code[i + 5] << 16)) / 1073741824;
  28132. scaleY = ((code[i + 6] << 24) | (code[i + 7] << 16)) / 1073741824;
  28133. i += 8;
  28134. }
  28135. var subglyph = font.glyphs[glyphIndex];
  28136. if (subglyph) {
  28137. js.push('c.save();');
  28138. js.push('c.transform(' + scaleX + ',' + scale01 + ',' +
  28139. scale10 + ',' + scaleY + ',' + x + ',' + y + ');');
  28140. compileGlyf(subglyph, js, font);
  28141. js.push('c.restore();');
  28142. }
  28143. } while ((flags & 0x20));
  28144. } else {
  28145. // simple glyph
  28146. var endPtsOfContours = [];
  28147. var j, jj;
  28148. for (j = 0; j < numberOfContours; j++) {
  28149. endPtsOfContours.push((code[i] << 8) | code[i + 1]);
  28150. i += 2;
  28151. }
  28152. var instructionLength = (code[i] << 8) | code[i + 1];
  28153. i += 2 + instructionLength; // skipping the instructions
  28154. var numberOfPoints = endPtsOfContours[endPtsOfContours.length - 1] + 1;
  28155. var points = [];
  28156. while (points.length < numberOfPoints) {
  28157. flags = code[i++];
  28158. var repeat = 1;
  28159. if ((flags & 0x08)) {
  28160. repeat += code[i++];
  28161. }
  28162. while (repeat-- > 0) {
  28163. points.push({flags: flags});
  28164. }
  28165. }
  28166. for (j = 0; j < numberOfPoints; j++) {
  28167. switch (points[j].flags & 0x12) {
  28168. case 0x00:
  28169. x += ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  28170. i += 2;
  28171. break;
  28172. case 0x02:
  28173. x -= code[i++];
  28174. break;
  28175. case 0x12:
  28176. x += code[i++];
  28177. break;
  28178. }
  28179. points[j].x = x;
  28180. }
  28181. for (j = 0; j < numberOfPoints; j++) {
  28182. switch (points[j].flags & 0x24) {
  28183. case 0x00:
  28184. y += ((code[i] << 24) | (code[i + 1] << 16)) >> 16;
  28185. i += 2;
  28186. break;
  28187. case 0x04:
  28188. y -= code[i++];
  28189. break;
  28190. case 0x24:
  28191. y += code[i++];
  28192. break;
  28193. }
  28194. points[j].y = y;
  28195. }
  28196. var startPoint = 0;
  28197. for (i = 0; i < numberOfContours; i++) {
  28198. var endPoint = endPtsOfContours[i];
  28199. // contours might have implicit points, which is located in the middle
  28200. // between two neighboring off-curve points
  28201. var contour = points.slice(startPoint, endPoint + 1);
  28202. if ((contour[0].flags & 1)) {
  28203. contour.push(contour[0]); // using start point at the contour end
  28204. } else if ((contour[contour.length - 1].flags & 1)) {
  28205. // first is off-curve point, trying to use one from the end
  28206. contour.unshift(contour[contour.length - 1]);
  28207. } else {
  28208. // start and end are off-curve points, creating implicit one
  28209. var p = {
  28210. flags: 1,
  28211. x: (contour[0].x + contour[contour.length - 1].x) / 2,
  28212. y: (contour[0].y + contour[contour.length - 1].y) / 2
  28213. };
  28214. contour.unshift(p);
  28215. contour.push(p);
  28216. }
  28217. moveTo(contour[0].x, contour[0].y);
  28218. for (j = 1, jj = contour.length; j < jj; j++) {
  28219. if ((contour[j].flags & 1)) {
  28220. lineTo(contour[j].x, contour[j].y);
  28221. } else if ((contour[j + 1].flags & 1)){
  28222. quadraticCurveTo(contour[j].x, contour[j].y,
  28223. contour[j + 1].x, contour[j + 1].y);
  28224. j++;
  28225. } else {
  28226. quadraticCurveTo(contour[j].x, contour[j].y,
  28227. (contour[j].x + contour[j + 1].x) / 2,
  28228. (contour[j].y + contour[j + 1].y) / 2);
  28229. }
  28230. }
  28231. startPoint = endPoint + 1;
  28232. }
  28233. }
  28234. }
  28235. function compileCharString(code, js, font) {
  28236. var stack = [];
  28237. var x = 0, y = 0;
  28238. var stems = 0;
  28239. function moveTo(x, y) {
  28240. js.push('c.moveTo(' + x + ',' + y + ');');
  28241. }
  28242. function lineTo(x, y) {
  28243. js.push('c.lineTo(' + x + ',' + y + ');');
  28244. }
  28245. function bezierCurveTo(x1, y1, x2, y2, x, y) {
  28246. js.push('c.bezierCurveTo(' + x1 + ',' + y1 + ',' + x2 + ',' + y2 + ',' +
  28247. x + ',' + y + ');');
  28248. }
  28249. function parse(code) {
  28250. var i = 0;
  28251. while (i < code.length) {
  28252. var stackClean = false;
  28253. var v = code[i++];
  28254. var xa, xb, ya, yb, y1, y2, y3, n, subrCode;
  28255. switch (v) {
  28256. case 1: // hstem
  28257. stems += stack.length >> 1;
  28258. stackClean = true;
  28259. break;
  28260. case 3: // vstem
  28261. stems += stack.length >> 1;
  28262. stackClean = true;
  28263. break;
  28264. case 4: // vmoveto
  28265. y += stack.pop();
  28266. moveTo(x, y);
  28267. stackClean = true;
  28268. break;
  28269. case 5: // rlineto
  28270. while (stack.length > 0) {
  28271. x += stack.shift();
  28272. y += stack.shift();
  28273. lineTo(x, y);
  28274. }
  28275. break;
  28276. case 6: // hlineto
  28277. while (stack.length > 0) {
  28278. x += stack.shift();
  28279. lineTo(x, y);
  28280. if (stack.length === 0) {
  28281. break;
  28282. }
  28283. y += stack.shift();
  28284. lineTo(x, y);
  28285. }
  28286. break;
  28287. case 7: // vlineto
  28288. while (stack.length > 0) {
  28289. y += stack.shift();
  28290. lineTo(x, y);
  28291. if (stack.length === 0) {
  28292. break;
  28293. }
  28294. x += stack.shift();
  28295. lineTo(x, y);
  28296. }
  28297. break;
  28298. case 8: // rrcurveto
  28299. while (stack.length > 0) {
  28300. xa = x + stack.shift(); ya = y + stack.shift();
  28301. xb = xa + stack.shift(); yb = ya + stack.shift();
  28302. x = xb + stack.shift(); y = yb + stack.shift();
  28303. bezierCurveTo(xa, ya, xb, yb, x, y);
  28304. }
  28305. break;
  28306. case 10: // callsubr
  28307. n = stack.pop() + font.subrsBias;
  28308. subrCode = font.subrs[n];
  28309. if (subrCode) {
  28310. parse(subrCode);
  28311. }
  28312. break;
  28313. case 11: // return
  28314. return;
  28315. case 12:
  28316. v = code[i++];
  28317. switch (v) {
  28318. case 34: // flex
  28319. xa = x + stack.shift();
  28320. xb = xa + stack.shift(); y1 = y + stack.shift();
  28321. x = xb + stack.shift();
  28322. bezierCurveTo(xa, y, xb, y1, x, y1);
  28323. xa = x + stack.shift();
  28324. xb = xa + stack.shift();
  28325. x = xb + stack.shift();
  28326. bezierCurveTo(xa, y1, xb, y, x, y);
  28327. break;
  28328. case 35: // flex
  28329. xa = x + stack.shift(); ya = y + stack.shift();
  28330. xb = xa + stack.shift(); yb = ya + stack.shift();
  28331. x = xb + stack.shift(); y = yb + stack.shift();
  28332. bezierCurveTo(xa, ya, xb, yb, x, y);
  28333. xa = x + stack.shift(); ya = y + stack.shift();
  28334. xb = xa + stack.shift(); yb = ya + stack.shift();
  28335. x = xb + stack.shift(); y = yb + stack.shift();
  28336. bezierCurveTo(xa, ya, xb, yb, x, y);
  28337. stack.pop(); // fd
  28338. break;
  28339. case 36: // hflex1
  28340. xa = x + stack.shift(); y1 = y + stack.shift();
  28341. xb = xa + stack.shift(); y2 = y1 + stack.shift();
  28342. x = xb + stack.shift();
  28343. bezierCurveTo(xa, y1, xb, y2, x, y2);
  28344. xa = x + stack.shift();
  28345. xb = xa + stack.shift(); y3 = y2 + stack.shift();
  28346. x = xb + stack.shift();
  28347. bezierCurveTo(xa, y2, xb, y3, x, y);
  28348. break;
  28349. case 37: // flex1
  28350. var x0 = x, y0 = y;
  28351. xa = x + stack.shift(); ya = y + stack.shift();
  28352. xb = xa + stack.shift(); yb = ya + stack.shift();
  28353. x = xb + stack.shift(); y = yb + stack.shift();
  28354. bezierCurveTo(xa, ya, xb, yb, x, y);
  28355. xa = x + stack.shift(); ya = y + stack.shift();
  28356. xb = xa + stack.shift(); yb = ya + stack.shift();
  28357. x = xb; y = yb;
  28358. if (Math.abs(x - x0) > Math.abs(y - y0)) {
  28359. x += stack.shift();
  28360. } else {
  28361. y += stack.shift();
  28362. }
  28363. bezierCurveTo(xa, ya, xb, yb, x, y);
  28364. break;
  28365. default:
  28366. error('unknown operator: 12 ' + v);
  28367. }
  28368. break;
  28369. case 14: // endchar
  28370. if (stack.length >= 4) {
  28371. var achar = stack.pop();
  28372. var bchar = stack.pop();
  28373. y = stack.pop();
  28374. x = stack.pop();
  28375. js.push('c.save();');
  28376. js.push('c.translate('+ x + ',' + y + ');');
  28377. var gid = lookupCmap(font.cmap, String.fromCharCode(
  28378. font.glyphNameMap[Encodings.StandardEncoding[achar]]));
  28379. compileCharString(font.glyphs[gid], js, font);
  28380. js.push('c.restore();');
  28381. gid = lookupCmap(font.cmap, String.fromCharCode(
  28382. font.glyphNameMap[Encodings.StandardEncoding[bchar]]));
  28383. compileCharString(font.glyphs[gid], js, font);
  28384. }
  28385. return;
  28386. case 18: // hstemhm
  28387. stems += stack.length >> 1;
  28388. stackClean = true;
  28389. break;
  28390. case 19: // hintmask
  28391. stems += stack.length >> 1;
  28392. i += (stems + 7) >> 3;
  28393. stackClean = true;
  28394. break;
  28395. case 20: // cntrmask
  28396. stems += stack.length >> 1;
  28397. i += (stems + 7) >> 3;
  28398. stackClean = true;
  28399. break;
  28400. case 21: // rmoveto
  28401. y += stack.pop();
  28402. x += stack.pop();
  28403. moveTo(x, y);
  28404. stackClean = true;
  28405. break;
  28406. case 22: // hmoveto
  28407. x += stack.pop();
  28408. moveTo(x, y);
  28409. stackClean = true;
  28410. break;
  28411. case 23: // vstemhm
  28412. stems += stack.length >> 1;
  28413. stackClean = true;
  28414. break;
  28415. case 24: // rcurveline
  28416. while (stack.length > 2) {
  28417. xa = x + stack.shift(); ya = y + stack.shift();
  28418. xb = xa + stack.shift(); yb = ya + stack.shift();
  28419. x = xb + stack.shift(); y = yb + stack.shift();
  28420. bezierCurveTo(xa, ya, xb, yb, x, y);
  28421. }
  28422. x += stack.shift();
  28423. y += stack.shift();
  28424. lineTo(x, y);
  28425. break;
  28426. case 25: // rlinecurve
  28427. while (stack.length > 6) {
  28428. x += stack.shift();
  28429. y += stack.shift();
  28430. lineTo(x, y);
  28431. }
  28432. xa = x + stack.shift(); ya = y + stack.shift();
  28433. xb = xa + stack.shift(); yb = ya + stack.shift();
  28434. x = xb + stack.shift(); y = yb + stack.shift();
  28435. bezierCurveTo(xa, ya, xb, yb, x, y);
  28436. break;
  28437. case 26: // vvcurveto
  28438. if (stack.length % 2) {
  28439. x += stack.shift();
  28440. }
  28441. while (stack.length > 0) {
  28442. xa = x; ya = y + stack.shift();
  28443. xb = xa + stack.shift(); yb = ya + stack.shift();
  28444. x = xb; y = yb + stack.shift();
  28445. bezierCurveTo(xa, ya, xb, yb, x, y);
  28446. }
  28447. break;
  28448. case 27: // hhcurveto
  28449. if (stack.length % 2) {
  28450. y += stack.shift();
  28451. }
  28452. while (stack.length > 0) {
  28453. xa = x + stack.shift(); ya = y;
  28454. xb = xa + stack.shift(); yb = ya + stack.shift();
  28455. x = xb + stack.shift(); y = yb;
  28456. bezierCurveTo(xa, ya, xb, yb, x, y);
  28457. }
  28458. break;
  28459. case 28:
  28460. stack.push(((code[i] << 24) | (code[i + 1] << 16)) >> 16);
  28461. i += 2;
  28462. break;
  28463. case 29: // callgsubr
  28464. n = stack.pop() + font.gsubrsBias;
  28465. subrCode = font.gsubrs[n];
  28466. if (subrCode) {
  28467. parse(subrCode);
  28468. }
  28469. break;
  28470. case 30: // vhcurveto
  28471. while (stack.length > 0) {
  28472. xa = x; ya = y + stack.shift();
  28473. xb = xa + stack.shift(); yb = ya + stack.shift();
  28474. x = xb + stack.shift();
  28475. y = yb + (stack.length === 1 ? stack.shift() : 0);
  28476. bezierCurveTo(xa, ya, xb, yb, x, y);
  28477. if (stack.length === 0) {
  28478. break;
  28479. }
  28480. xa = x + stack.shift(); ya = y;
  28481. xb = xa + stack.shift(); yb = ya + stack.shift();
  28482. y = yb + stack.shift();
  28483. x = xb + (stack.length === 1 ? stack.shift() : 0);
  28484. bezierCurveTo(xa, ya, xb, yb, x, y);
  28485. }
  28486. break;
  28487. case 31: // hvcurveto
  28488. while (stack.length > 0) {
  28489. xa = x + stack.shift(); ya = y;
  28490. xb = xa + stack.shift(); yb = ya + stack.shift();
  28491. y = yb + stack.shift();
  28492. x = xb + (stack.length === 1 ? stack.shift() : 0);
  28493. bezierCurveTo(xa, ya, xb, yb, x, y);
  28494. if (stack.length === 0) {
  28495. break;
  28496. }
  28497. xa = x; ya = y + stack.shift();
  28498. xb = xa + stack.shift(); yb = ya + stack.shift();
  28499. x = xb + stack.shift();
  28500. y = yb + (stack.length === 1 ? stack.shift() : 0);
  28501. bezierCurveTo(xa, ya, xb, yb, x, y);
  28502. }
  28503. break;
  28504. default:
  28505. if (v < 32) {
  28506. error('unknown operator: ' + v);
  28507. }
  28508. if (v < 247) {
  28509. stack.push(v - 139);
  28510. } else if (v < 251) {
  28511. stack.push((v - 247) * 256 + code[i++] + 108);
  28512. } else if (v < 255) {
  28513. stack.push(-(v - 251) * 256 - code[i++] - 108);
  28514. } else {
  28515. stack.push(((code[i] << 24) | (code[i + 1] << 16) |
  28516. (code[i + 2] << 8) | code[i + 3]) / 65536);
  28517. i += 4;
  28518. }
  28519. break;
  28520. }
  28521. if (stackClean) {
  28522. stack.length = 0;
  28523. }
  28524. }
  28525. }
  28526. parse(code);
  28527. }
  28528. var noop = '';
  28529. function CompiledFont(fontMatrix) {
  28530. this.compiledGlyphs = {};
  28531. this.fontMatrix = fontMatrix;
  28532. }
  28533. CompiledFont.prototype = {
  28534. getPathJs: function (unicode) {
  28535. var gid = lookupCmap(this.cmap, unicode);
  28536. var fn = this.compiledGlyphs[gid];
  28537. if (!fn) {
  28538. this.compiledGlyphs[gid] = fn = this.compileGlyph(this.glyphs[gid]);
  28539. }
  28540. return fn;
  28541. },
  28542. compileGlyph: function (code) {
  28543. if (!code || code.length === 0 || code[0] === 14) {
  28544. return noop;
  28545. }
  28546. var js = [];
  28547. js.push('c.save();');
  28548. js.push('c.transform(' + this.fontMatrix.join(',') + ');');
  28549. js.push('c.scale(size, -size);');
  28550. this.compileGlyphImpl(code, js);
  28551. js.push('c.restore();');
  28552. return js.join('\n');
  28553. },
  28554. compileGlyphImpl: function () {
  28555. error('Children classes should implement this.');
  28556. },
  28557. hasBuiltPath: function (unicode) {
  28558. var gid = lookupCmap(this.cmap, unicode);
  28559. return gid in this.compiledGlyphs;
  28560. }
  28561. };
  28562. function TrueTypeCompiled(glyphs, cmap, fontMatrix) {
  28563. fontMatrix = fontMatrix || [0.000488, 0, 0, 0.000488, 0, 0];
  28564. CompiledFont.call(this, fontMatrix);
  28565. this.glyphs = glyphs;
  28566. this.cmap = cmap;
  28567. this.compiledGlyphs = [];
  28568. }
  28569. Util.inherit(TrueTypeCompiled, CompiledFont, {
  28570. compileGlyphImpl: function (code, js) {
  28571. compileGlyf(code, js, this);
  28572. }
  28573. });
  28574. function Type2Compiled(cffInfo, cmap, fontMatrix, glyphNameMap) {
  28575. fontMatrix = fontMatrix || [0.001, 0, 0, 0.001, 0, 0];
  28576. CompiledFont.call(this, fontMatrix);
  28577. this.glyphs = cffInfo.glyphs;
  28578. this.gsubrs = cffInfo.gsubrs || [];
  28579. this.subrs = cffInfo.subrs || [];
  28580. this.cmap = cmap;
  28581. this.glyphNameMap = glyphNameMap || GlyphsUnicode;
  28582. this.compiledGlyphs = [];
  28583. this.gsubrsBias = (this.gsubrs.length < 1240 ?
  28584. 107 : (this.gsubrs.length < 33900 ? 1131 : 32768));
  28585. this.subrsBias = (this.subrs.length < 1240 ?
  28586. 107 : (this.subrs.length < 33900 ? 1131 : 32768));
  28587. }
  28588. Util.inherit(Type2Compiled, CompiledFont, {
  28589. compileGlyphImpl: function (code, js) {
  28590. compileCharString(code, js, this);
  28591. }
  28592. });
  28593. return {
  28594. create: function FontRendererFactory_create(font) {
  28595. var data = new Uint8Array(font.data);
  28596. var cmap, glyf, loca, cff, indexToLocFormat, unitsPerEm;
  28597. var numTables = getUshort(data, 4);
  28598. for (var i = 0, p = 12; i < numTables; i++, p += 16) {
  28599. var tag = bytesToString(data.subarray(p, p + 4));
  28600. var offset = getLong(data, p + 8);
  28601. var length = getLong(data, p + 12);
  28602. switch (tag) {
  28603. case 'cmap':
  28604. cmap = parseCmap(data, offset, offset + length);
  28605. break;
  28606. case 'glyf':
  28607. glyf = data.subarray(offset, offset + length);
  28608. break;
  28609. case 'loca':
  28610. loca = data.subarray(offset, offset + length);
  28611. break;
  28612. case 'head':
  28613. unitsPerEm = getUshort(data, offset + 18);
  28614. indexToLocFormat = getUshort(data, offset + 50);
  28615. break;
  28616. case 'CFF ':
  28617. cff = parseCff(data, offset, offset + length);
  28618. break;
  28619. }
  28620. }
  28621. if (glyf) {
  28622. var fontMatrix = (!unitsPerEm ? font.fontMatrix :
  28623. [1 / unitsPerEm, 0, 0, 1 / unitsPerEm, 0, 0]);
  28624. return new TrueTypeCompiled(
  28625. parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix);
  28626. } else {
  28627. return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
  28628. }
  28629. }
  28630. };
  28631. })();
  28632. var GlyphsUnicode = {
  28633. A: 0x0041,
  28634. AE: 0x00C6,
  28635. AEacute: 0x01FC,
  28636. AEmacron: 0x01E2,
  28637. AEsmall: 0xF7E6,
  28638. Aacute: 0x00C1,
  28639. Aacutesmall: 0xF7E1,
  28640. Abreve: 0x0102,
  28641. Abreveacute: 0x1EAE,
  28642. Abrevecyrillic: 0x04D0,
  28643. Abrevedotbelow: 0x1EB6,
  28644. Abrevegrave: 0x1EB0,
  28645. Abrevehookabove: 0x1EB2,
  28646. Abrevetilde: 0x1EB4,
  28647. Acaron: 0x01CD,
  28648. Acircle: 0x24B6,
  28649. Acircumflex: 0x00C2,
  28650. Acircumflexacute: 0x1EA4,
  28651. Acircumflexdotbelow: 0x1EAC,
  28652. Acircumflexgrave: 0x1EA6,
  28653. Acircumflexhookabove: 0x1EA8,
  28654. Acircumflexsmall: 0xF7E2,
  28655. Acircumflextilde: 0x1EAA,
  28656. Acute: 0xF6C9,
  28657. Acutesmall: 0xF7B4,
  28658. Acyrillic: 0x0410,
  28659. Adblgrave: 0x0200,
  28660. Adieresis: 0x00C4,
  28661. Adieresiscyrillic: 0x04D2,
  28662. Adieresismacron: 0x01DE,
  28663. Adieresissmall: 0xF7E4,
  28664. Adotbelow: 0x1EA0,
  28665. Adotmacron: 0x01E0,
  28666. Agrave: 0x00C0,
  28667. Agravesmall: 0xF7E0,
  28668. Ahookabove: 0x1EA2,
  28669. Aiecyrillic: 0x04D4,
  28670. Ainvertedbreve: 0x0202,
  28671. Alpha: 0x0391,
  28672. Alphatonos: 0x0386,
  28673. Amacron: 0x0100,
  28674. Amonospace: 0xFF21,
  28675. Aogonek: 0x0104,
  28676. Aring: 0x00C5,
  28677. Aringacute: 0x01FA,
  28678. Aringbelow: 0x1E00,
  28679. Aringsmall: 0xF7E5,
  28680. Asmall: 0xF761,
  28681. Atilde: 0x00C3,
  28682. Atildesmall: 0xF7E3,
  28683. Aybarmenian: 0x0531,
  28684. B: 0x0042,
  28685. Bcircle: 0x24B7,
  28686. Bdotaccent: 0x1E02,
  28687. Bdotbelow: 0x1E04,
  28688. Becyrillic: 0x0411,
  28689. Benarmenian: 0x0532,
  28690. Beta: 0x0392,
  28691. Bhook: 0x0181,
  28692. Blinebelow: 0x1E06,
  28693. Bmonospace: 0xFF22,
  28694. Brevesmall: 0xF6F4,
  28695. Bsmall: 0xF762,
  28696. Btopbar: 0x0182,
  28697. C: 0x0043,
  28698. Caarmenian: 0x053E,
  28699. Cacute: 0x0106,
  28700. Caron: 0xF6CA,
  28701. Caronsmall: 0xF6F5,
  28702. Ccaron: 0x010C,
  28703. Ccedilla: 0x00C7,
  28704. Ccedillaacute: 0x1E08,
  28705. Ccedillasmall: 0xF7E7,
  28706. Ccircle: 0x24B8,
  28707. Ccircumflex: 0x0108,
  28708. Cdot: 0x010A,
  28709. Cdotaccent: 0x010A,
  28710. Cedillasmall: 0xF7B8,
  28711. Chaarmenian: 0x0549,
  28712. Cheabkhasiancyrillic: 0x04BC,
  28713. Checyrillic: 0x0427,
  28714. Chedescenderabkhasiancyrillic: 0x04BE,
  28715. Chedescendercyrillic: 0x04B6,
  28716. Chedieresiscyrillic: 0x04F4,
  28717. Cheharmenian: 0x0543,
  28718. Chekhakassiancyrillic: 0x04CB,
  28719. Cheverticalstrokecyrillic: 0x04B8,
  28720. Chi: 0x03A7,
  28721. Chook: 0x0187,
  28722. Circumflexsmall: 0xF6F6,
  28723. Cmonospace: 0xFF23,
  28724. Coarmenian: 0x0551,
  28725. Csmall: 0xF763,
  28726. D: 0x0044,
  28727. DZ: 0x01F1,
  28728. DZcaron: 0x01C4,
  28729. Daarmenian: 0x0534,
  28730. Dafrican: 0x0189,
  28731. Dcaron: 0x010E,
  28732. Dcedilla: 0x1E10,
  28733. Dcircle: 0x24B9,
  28734. Dcircumflexbelow: 0x1E12,
  28735. Dcroat: 0x0110,
  28736. Ddotaccent: 0x1E0A,
  28737. Ddotbelow: 0x1E0C,
  28738. Decyrillic: 0x0414,
  28739. Deicoptic: 0x03EE,
  28740. Delta: 0x2206,
  28741. Deltagreek: 0x0394,
  28742. Dhook: 0x018A,
  28743. Dieresis: 0xF6CB,
  28744. DieresisAcute: 0xF6CC,
  28745. DieresisGrave: 0xF6CD,
  28746. Dieresissmall: 0xF7A8,
  28747. Digammagreek: 0x03DC,
  28748. Djecyrillic: 0x0402,
  28749. Dlinebelow: 0x1E0E,
  28750. Dmonospace: 0xFF24,
  28751. Dotaccentsmall: 0xF6F7,
  28752. Dslash: 0x0110,
  28753. Dsmall: 0xF764,
  28754. Dtopbar: 0x018B,
  28755. Dz: 0x01F2,
  28756. Dzcaron: 0x01C5,
  28757. Dzeabkhasiancyrillic: 0x04E0,
  28758. Dzecyrillic: 0x0405,
  28759. Dzhecyrillic: 0x040F,
  28760. E: 0x0045,
  28761. Eacute: 0x00C9,
  28762. Eacutesmall: 0xF7E9,
  28763. Ebreve: 0x0114,
  28764. Ecaron: 0x011A,
  28765. Ecedillabreve: 0x1E1C,
  28766. Echarmenian: 0x0535,
  28767. Ecircle: 0x24BA,
  28768. Ecircumflex: 0x00CA,
  28769. Ecircumflexacute: 0x1EBE,
  28770. Ecircumflexbelow: 0x1E18,
  28771. Ecircumflexdotbelow: 0x1EC6,
  28772. Ecircumflexgrave: 0x1EC0,
  28773. Ecircumflexhookabove: 0x1EC2,
  28774. Ecircumflexsmall: 0xF7EA,
  28775. Ecircumflextilde: 0x1EC4,
  28776. Ecyrillic: 0x0404,
  28777. Edblgrave: 0x0204,
  28778. Edieresis: 0x00CB,
  28779. Edieresissmall: 0xF7EB,
  28780. Edot: 0x0116,
  28781. Edotaccent: 0x0116,
  28782. Edotbelow: 0x1EB8,
  28783. Efcyrillic: 0x0424,
  28784. Egrave: 0x00C8,
  28785. Egravesmall: 0xF7E8,
  28786. Eharmenian: 0x0537,
  28787. Ehookabove: 0x1EBA,
  28788. Eightroman: 0x2167,
  28789. Einvertedbreve: 0x0206,
  28790. Eiotifiedcyrillic: 0x0464,
  28791. Elcyrillic: 0x041B,
  28792. Elevenroman: 0x216A,
  28793. Emacron: 0x0112,
  28794. Emacronacute: 0x1E16,
  28795. Emacrongrave: 0x1E14,
  28796. Emcyrillic: 0x041C,
  28797. Emonospace: 0xFF25,
  28798. Encyrillic: 0x041D,
  28799. Endescendercyrillic: 0x04A2,
  28800. Eng: 0x014A,
  28801. Enghecyrillic: 0x04A4,
  28802. Enhookcyrillic: 0x04C7,
  28803. Eogonek: 0x0118,
  28804. Eopen: 0x0190,
  28805. Epsilon: 0x0395,
  28806. Epsilontonos: 0x0388,
  28807. Ercyrillic: 0x0420,
  28808. Ereversed: 0x018E,
  28809. Ereversedcyrillic: 0x042D,
  28810. Escyrillic: 0x0421,
  28811. Esdescendercyrillic: 0x04AA,
  28812. Esh: 0x01A9,
  28813. Esmall: 0xF765,
  28814. Eta: 0x0397,
  28815. Etarmenian: 0x0538,
  28816. Etatonos: 0x0389,
  28817. Eth: 0x00D0,
  28818. Ethsmall: 0xF7F0,
  28819. Etilde: 0x1EBC,
  28820. Etildebelow: 0x1E1A,
  28821. Euro: 0x20AC,
  28822. Ezh: 0x01B7,
  28823. Ezhcaron: 0x01EE,
  28824. Ezhreversed: 0x01B8,
  28825. F: 0x0046,
  28826. Fcircle: 0x24BB,
  28827. Fdotaccent: 0x1E1E,
  28828. Feharmenian: 0x0556,
  28829. Feicoptic: 0x03E4,
  28830. Fhook: 0x0191,
  28831. Fitacyrillic: 0x0472,
  28832. Fiveroman: 0x2164,
  28833. Fmonospace: 0xFF26,
  28834. Fourroman: 0x2163,
  28835. Fsmall: 0xF766,
  28836. G: 0x0047,
  28837. GBsquare: 0x3387,
  28838. Gacute: 0x01F4,
  28839. Gamma: 0x0393,
  28840. Gammaafrican: 0x0194,
  28841. Gangiacoptic: 0x03EA,
  28842. Gbreve: 0x011E,
  28843. Gcaron: 0x01E6,
  28844. Gcedilla: 0x0122,
  28845. Gcircle: 0x24BC,
  28846. Gcircumflex: 0x011C,
  28847. Gcommaaccent: 0x0122,
  28848. Gdot: 0x0120,
  28849. Gdotaccent: 0x0120,
  28850. Gecyrillic: 0x0413,
  28851. Ghadarmenian: 0x0542,
  28852. Ghemiddlehookcyrillic: 0x0494,
  28853. Ghestrokecyrillic: 0x0492,
  28854. Gheupturncyrillic: 0x0490,
  28855. Ghook: 0x0193,
  28856. Gimarmenian: 0x0533,
  28857. Gjecyrillic: 0x0403,
  28858. Gmacron: 0x1E20,
  28859. Gmonospace: 0xFF27,
  28860. Grave: 0xF6CE,
  28861. Gravesmall: 0xF760,
  28862. Gsmall: 0xF767,
  28863. Gsmallhook: 0x029B,
  28864. Gstroke: 0x01E4,
  28865. H: 0x0048,
  28866. H18533: 0x25CF,
  28867. H18543: 0x25AA,
  28868. H18551: 0x25AB,
  28869. H22073: 0x25A1,
  28870. HPsquare: 0x33CB,
  28871. Haabkhasiancyrillic: 0x04A8,
  28872. Hadescendercyrillic: 0x04B2,
  28873. Hardsigncyrillic: 0x042A,
  28874. Hbar: 0x0126,
  28875. Hbrevebelow: 0x1E2A,
  28876. Hcedilla: 0x1E28,
  28877. Hcircle: 0x24BD,
  28878. Hcircumflex: 0x0124,
  28879. Hdieresis: 0x1E26,
  28880. Hdotaccent: 0x1E22,
  28881. Hdotbelow: 0x1E24,
  28882. Hmonospace: 0xFF28,
  28883. Hoarmenian: 0x0540,
  28884. Horicoptic: 0x03E8,
  28885. Hsmall: 0xF768,
  28886. Hungarumlaut: 0xF6CF,
  28887. Hungarumlautsmall: 0xF6F8,
  28888. Hzsquare: 0x3390,
  28889. I: 0x0049,
  28890. IAcyrillic: 0x042F,
  28891. IJ: 0x0132,
  28892. IUcyrillic: 0x042E,
  28893. Iacute: 0x00CD,
  28894. Iacutesmall: 0xF7ED,
  28895. Ibreve: 0x012C,
  28896. Icaron: 0x01CF,
  28897. Icircle: 0x24BE,
  28898. Icircumflex: 0x00CE,
  28899. Icircumflexsmall: 0xF7EE,
  28900. Icyrillic: 0x0406,
  28901. Idblgrave: 0x0208,
  28902. Idieresis: 0x00CF,
  28903. Idieresisacute: 0x1E2E,
  28904. Idieresiscyrillic: 0x04E4,
  28905. Idieresissmall: 0xF7EF,
  28906. Idot: 0x0130,
  28907. Idotaccent: 0x0130,
  28908. Idotbelow: 0x1ECA,
  28909. Iebrevecyrillic: 0x04D6,
  28910. Iecyrillic: 0x0415,
  28911. Ifraktur: 0x2111,
  28912. Igrave: 0x00CC,
  28913. Igravesmall: 0xF7EC,
  28914. Ihookabove: 0x1EC8,
  28915. Iicyrillic: 0x0418,
  28916. Iinvertedbreve: 0x020A,
  28917. Iishortcyrillic: 0x0419,
  28918. Imacron: 0x012A,
  28919. Imacroncyrillic: 0x04E2,
  28920. Imonospace: 0xFF29,
  28921. Iniarmenian: 0x053B,
  28922. Iocyrillic: 0x0401,
  28923. Iogonek: 0x012E,
  28924. Iota: 0x0399,
  28925. Iotaafrican: 0x0196,
  28926. Iotadieresis: 0x03AA,
  28927. Iotatonos: 0x038A,
  28928. Ismall: 0xF769,
  28929. Istroke: 0x0197,
  28930. Itilde: 0x0128,
  28931. Itildebelow: 0x1E2C,
  28932. Izhitsacyrillic: 0x0474,
  28933. Izhitsadblgravecyrillic: 0x0476,
  28934. J: 0x004A,
  28935. Jaarmenian: 0x0541,
  28936. Jcircle: 0x24BF,
  28937. Jcircumflex: 0x0134,
  28938. Jecyrillic: 0x0408,
  28939. Jheharmenian: 0x054B,
  28940. Jmonospace: 0xFF2A,
  28941. Jsmall: 0xF76A,
  28942. K: 0x004B,
  28943. KBsquare: 0x3385,
  28944. KKsquare: 0x33CD,
  28945. Kabashkircyrillic: 0x04A0,
  28946. Kacute: 0x1E30,
  28947. Kacyrillic: 0x041A,
  28948. Kadescendercyrillic: 0x049A,
  28949. Kahookcyrillic: 0x04C3,
  28950. Kappa: 0x039A,
  28951. Kastrokecyrillic: 0x049E,
  28952. Kaverticalstrokecyrillic: 0x049C,
  28953. Kcaron: 0x01E8,
  28954. Kcedilla: 0x0136,
  28955. Kcircle: 0x24C0,
  28956. Kcommaaccent: 0x0136,
  28957. Kdotbelow: 0x1E32,
  28958. Keharmenian: 0x0554,
  28959. Kenarmenian: 0x053F,
  28960. Khacyrillic: 0x0425,
  28961. Kheicoptic: 0x03E6,
  28962. Khook: 0x0198,
  28963. Kjecyrillic: 0x040C,
  28964. Klinebelow: 0x1E34,
  28965. Kmonospace: 0xFF2B,
  28966. Koppacyrillic: 0x0480,
  28967. Koppagreek: 0x03DE,
  28968. Ksicyrillic: 0x046E,
  28969. Ksmall: 0xF76B,
  28970. L: 0x004C,
  28971. LJ: 0x01C7,
  28972. LL: 0xF6BF,
  28973. Lacute: 0x0139,
  28974. Lambda: 0x039B,
  28975. Lcaron: 0x013D,
  28976. Lcedilla: 0x013B,
  28977. Lcircle: 0x24C1,
  28978. Lcircumflexbelow: 0x1E3C,
  28979. Lcommaaccent: 0x013B,
  28980. Ldot: 0x013F,
  28981. Ldotaccent: 0x013F,
  28982. Ldotbelow: 0x1E36,
  28983. Ldotbelowmacron: 0x1E38,
  28984. Liwnarmenian: 0x053C,
  28985. Lj: 0x01C8,
  28986. Ljecyrillic: 0x0409,
  28987. Llinebelow: 0x1E3A,
  28988. Lmonospace: 0xFF2C,
  28989. Lslash: 0x0141,
  28990. Lslashsmall: 0xF6F9,
  28991. Lsmall: 0xF76C,
  28992. M: 0x004D,
  28993. MBsquare: 0x3386,
  28994. Macron: 0xF6D0,
  28995. Macronsmall: 0xF7AF,
  28996. Macute: 0x1E3E,
  28997. Mcircle: 0x24C2,
  28998. Mdotaccent: 0x1E40,
  28999. Mdotbelow: 0x1E42,
  29000. Menarmenian: 0x0544,
  29001. Mmonospace: 0xFF2D,
  29002. Msmall: 0xF76D,
  29003. Mturned: 0x019C,
  29004. Mu: 0x039C,
  29005. N: 0x004E,
  29006. NJ: 0x01CA,
  29007. Nacute: 0x0143,
  29008. Ncaron: 0x0147,
  29009. Ncedilla: 0x0145,
  29010. Ncircle: 0x24C3,
  29011. Ncircumflexbelow: 0x1E4A,
  29012. Ncommaaccent: 0x0145,
  29013. Ndotaccent: 0x1E44,
  29014. Ndotbelow: 0x1E46,
  29015. Nhookleft: 0x019D,
  29016. Nineroman: 0x2168,
  29017. Nj: 0x01CB,
  29018. Njecyrillic: 0x040A,
  29019. Nlinebelow: 0x1E48,
  29020. Nmonospace: 0xFF2E,
  29021. Nowarmenian: 0x0546,
  29022. Nsmall: 0xF76E,
  29023. Ntilde: 0x00D1,
  29024. Ntildesmall: 0xF7F1,
  29025. Nu: 0x039D,
  29026. O: 0x004F,
  29027. OE: 0x0152,
  29028. OEsmall: 0xF6FA,
  29029. Oacute: 0x00D3,
  29030. Oacutesmall: 0xF7F3,
  29031. Obarredcyrillic: 0x04E8,
  29032. Obarreddieresiscyrillic: 0x04EA,
  29033. Obreve: 0x014E,
  29034. Ocaron: 0x01D1,
  29035. Ocenteredtilde: 0x019F,
  29036. Ocircle: 0x24C4,
  29037. Ocircumflex: 0x00D4,
  29038. Ocircumflexacute: 0x1ED0,
  29039. Ocircumflexdotbelow: 0x1ED8,
  29040. Ocircumflexgrave: 0x1ED2,
  29041. Ocircumflexhookabove: 0x1ED4,
  29042. Ocircumflexsmall: 0xF7F4,
  29043. Ocircumflextilde: 0x1ED6,
  29044. Ocyrillic: 0x041E,
  29045. Odblacute: 0x0150,
  29046. Odblgrave: 0x020C,
  29047. Odieresis: 0x00D6,
  29048. Odieresiscyrillic: 0x04E6,
  29049. Odieresissmall: 0xF7F6,
  29050. Odotbelow: 0x1ECC,
  29051. Ogoneksmall: 0xF6FB,
  29052. Ograve: 0x00D2,
  29053. Ogravesmall: 0xF7F2,
  29054. Oharmenian: 0x0555,
  29055. Ohm: 0x2126,
  29056. Ohookabove: 0x1ECE,
  29057. Ohorn: 0x01A0,
  29058. Ohornacute: 0x1EDA,
  29059. Ohorndotbelow: 0x1EE2,
  29060. Ohorngrave: 0x1EDC,
  29061. Ohornhookabove: 0x1EDE,
  29062. Ohorntilde: 0x1EE0,
  29063. Ohungarumlaut: 0x0150,
  29064. Oi: 0x01A2,
  29065. Oinvertedbreve: 0x020E,
  29066. Omacron: 0x014C,
  29067. Omacronacute: 0x1E52,
  29068. Omacrongrave: 0x1E50,
  29069. Omega: 0x2126,
  29070. Omegacyrillic: 0x0460,
  29071. Omegagreek: 0x03A9,
  29072. Omegaroundcyrillic: 0x047A,
  29073. Omegatitlocyrillic: 0x047C,
  29074. Omegatonos: 0x038F,
  29075. Omicron: 0x039F,
  29076. Omicrontonos: 0x038C,
  29077. Omonospace: 0xFF2F,
  29078. Oneroman: 0x2160,
  29079. Oogonek: 0x01EA,
  29080. Oogonekmacron: 0x01EC,
  29081. Oopen: 0x0186,
  29082. Oslash: 0x00D8,
  29083. Oslashacute: 0x01FE,
  29084. Oslashsmall: 0xF7F8,
  29085. Osmall: 0xF76F,
  29086. Ostrokeacute: 0x01FE,
  29087. Otcyrillic: 0x047E,
  29088. Otilde: 0x00D5,
  29089. Otildeacute: 0x1E4C,
  29090. Otildedieresis: 0x1E4E,
  29091. Otildesmall: 0xF7F5,
  29092. P: 0x0050,
  29093. Pacute: 0x1E54,
  29094. Pcircle: 0x24C5,
  29095. Pdotaccent: 0x1E56,
  29096. Pecyrillic: 0x041F,
  29097. Peharmenian: 0x054A,
  29098. Pemiddlehookcyrillic: 0x04A6,
  29099. Phi: 0x03A6,
  29100. Phook: 0x01A4,
  29101. Pi: 0x03A0,
  29102. Piwrarmenian: 0x0553,
  29103. Pmonospace: 0xFF30,
  29104. Psi: 0x03A8,
  29105. Psicyrillic: 0x0470,
  29106. Psmall: 0xF770,
  29107. Q: 0x0051,
  29108. Qcircle: 0x24C6,
  29109. Qmonospace: 0xFF31,
  29110. Qsmall: 0xF771,
  29111. R: 0x0052,
  29112. Raarmenian: 0x054C,
  29113. Racute: 0x0154,
  29114. Rcaron: 0x0158,
  29115. Rcedilla: 0x0156,
  29116. Rcircle: 0x24C7,
  29117. Rcommaaccent: 0x0156,
  29118. Rdblgrave: 0x0210,
  29119. Rdotaccent: 0x1E58,
  29120. Rdotbelow: 0x1E5A,
  29121. Rdotbelowmacron: 0x1E5C,
  29122. Reharmenian: 0x0550,
  29123. Rfraktur: 0x211C,
  29124. Rho: 0x03A1,
  29125. Ringsmall: 0xF6FC,
  29126. Rinvertedbreve: 0x0212,
  29127. Rlinebelow: 0x1E5E,
  29128. Rmonospace: 0xFF32,
  29129. Rsmall: 0xF772,
  29130. Rsmallinverted: 0x0281,
  29131. Rsmallinvertedsuperior: 0x02B6,
  29132. S: 0x0053,
  29133. SF010000: 0x250C,
  29134. SF020000: 0x2514,
  29135. SF030000: 0x2510,
  29136. SF040000: 0x2518,
  29137. SF050000: 0x253C,
  29138. SF060000: 0x252C,
  29139. SF070000: 0x2534,
  29140. SF080000: 0x251C,
  29141. SF090000: 0x2524,
  29142. SF100000: 0x2500,
  29143. SF110000: 0x2502,
  29144. SF190000: 0x2561,
  29145. SF200000: 0x2562,
  29146. SF210000: 0x2556,
  29147. SF220000: 0x2555,
  29148. SF230000: 0x2563,
  29149. SF240000: 0x2551,
  29150. SF250000: 0x2557,
  29151. SF260000: 0x255D,
  29152. SF270000: 0x255C,
  29153. SF280000: 0x255B,
  29154. SF360000: 0x255E,
  29155. SF370000: 0x255F,
  29156. SF380000: 0x255A,
  29157. SF390000: 0x2554,
  29158. SF400000: 0x2569,
  29159. SF410000: 0x2566,
  29160. SF420000: 0x2560,
  29161. SF430000: 0x2550,
  29162. SF440000: 0x256C,
  29163. SF450000: 0x2567,
  29164. SF460000: 0x2568,
  29165. SF470000: 0x2564,
  29166. SF480000: 0x2565,
  29167. SF490000: 0x2559,
  29168. SF500000: 0x2558,
  29169. SF510000: 0x2552,
  29170. SF520000: 0x2553,
  29171. SF530000: 0x256B,
  29172. SF540000: 0x256A,
  29173. Sacute: 0x015A,
  29174. Sacutedotaccent: 0x1E64,
  29175. Sampigreek: 0x03E0,
  29176. Scaron: 0x0160,
  29177. Scarondotaccent: 0x1E66,
  29178. Scaronsmall: 0xF6FD,
  29179. Scedilla: 0x015E,
  29180. Schwa: 0x018F,
  29181. Schwacyrillic: 0x04D8,
  29182. Schwadieresiscyrillic: 0x04DA,
  29183. Scircle: 0x24C8,
  29184. Scircumflex: 0x015C,
  29185. Scommaaccent: 0x0218,
  29186. Sdotaccent: 0x1E60,
  29187. Sdotbelow: 0x1E62,
  29188. Sdotbelowdotaccent: 0x1E68,
  29189. Seharmenian: 0x054D,
  29190. Sevenroman: 0x2166,
  29191. Shaarmenian: 0x0547,
  29192. Shacyrillic: 0x0428,
  29193. Shchacyrillic: 0x0429,
  29194. Sheicoptic: 0x03E2,
  29195. Shhacyrillic: 0x04BA,
  29196. Shimacoptic: 0x03EC,
  29197. Sigma: 0x03A3,
  29198. Sixroman: 0x2165,
  29199. Smonospace: 0xFF33,
  29200. Softsigncyrillic: 0x042C,
  29201. Ssmall: 0xF773,
  29202. Stigmagreek: 0x03DA,
  29203. T: 0x0054,
  29204. Tau: 0x03A4,
  29205. Tbar: 0x0166,
  29206. Tcaron: 0x0164,
  29207. Tcedilla: 0x0162,
  29208. Tcircle: 0x24C9,
  29209. Tcircumflexbelow: 0x1E70,
  29210. Tcommaaccent: 0x0162,
  29211. Tdotaccent: 0x1E6A,
  29212. Tdotbelow: 0x1E6C,
  29213. Tecyrillic: 0x0422,
  29214. Tedescendercyrillic: 0x04AC,
  29215. Tenroman: 0x2169,
  29216. Tetsecyrillic: 0x04B4,
  29217. Theta: 0x0398,
  29218. Thook: 0x01AC,
  29219. Thorn: 0x00DE,
  29220. Thornsmall: 0xF7FE,
  29221. Threeroman: 0x2162,
  29222. Tildesmall: 0xF6FE,
  29223. Tiwnarmenian: 0x054F,
  29224. Tlinebelow: 0x1E6E,
  29225. Tmonospace: 0xFF34,
  29226. Toarmenian: 0x0539,
  29227. Tonefive: 0x01BC,
  29228. Tonesix: 0x0184,
  29229. Tonetwo: 0x01A7,
  29230. Tretroflexhook: 0x01AE,
  29231. Tsecyrillic: 0x0426,
  29232. Tshecyrillic: 0x040B,
  29233. Tsmall: 0xF774,
  29234. Twelveroman: 0x216B,
  29235. Tworoman: 0x2161,
  29236. U: 0x0055,
  29237. Uacute: 0x00DA,
  29238. Uacutesmall: 0xF7FA,
  29239. Ubreve: 0x016C,
  29240. Ucaron: 0x01D3,
  29241. Ucircle: 0x24CA,
  29242. Ucircumflex: 0x00DB,
  29243. Ucircumflexbelow: 0x1E76,
  29244. Ucircumflexsmall: 0xF7FB,
  29245. Ucyrillic: 0x0423,
  29246. Udblacute: 0x0170,
  29247. Udblgrave: 0x0214,
  29248. Udieresis: 0x00DC,
  29249. Udieresisacute: 0x01D7,
  29250. Udieresisbelow: 0x1E72,
  29251. Udieresiscaron: 0x01D9,
  29252. Udieresiscyrillic: 0x04F0,
  29253. Udieresisgrave: 0x01DB,
  29254. Udieresismacron: 0x01D5,
  29255. Udieresissmall: 0xF7FC,
  29256. Udotbelow: 0x1EE4,
  29257. Ugrave: 0x00D9,
  29258. Ugravesmall: 0xF7F9,
  29259. Uhookabove: 0x1EE6,
  29260. Uhorn: 0x01AF,
  29261. Uhornacute: 0x1EE8,
  29262. Uhorndotbelow: 0x1EF0,
  29263. Uhorngrave: 0x1EEA,
  29264. Uhornhookabove: 0x1EEC,
  29265. Uhorntilde: 0x1EEE,
  29266. Uhungarumlaut: 0x0170,
  29267. Uhungarumlautcyrillic: 0x04F2,
  29268. Uinvertedbreve: 0x0216,
  29269. Ukcyrillic: 0x0478,
  29270. Umacron: 0x016A,
  29271. Umacroncyrillic: 0x04EE,
  29272. Umacrondieresis: 0x1E7A,
  29273. Umonospace: 0xFF35,
  29274. Uogonek: 0x0172,
  29275. Upsilon: 0x03A5,
  29276. Upsilon1: 0x03D2,
  29277. Upsilonacutehooksymbolgreek: 0x03D3,
  29278. Upsilonafrican: 0x01B1,
  29279. Upsilondieresis: 0x03AB,
  29280. Upsilondieresishooksymbolgreek: 0x03D4,
  29281. Upsilonhooksymbol: 0x03D2,
  29282. Upsilontonos: 0x038E,
  29283. Uring: 0x016E,
  29284. Ushortcyrillic: 0x040E,
  29285. Usmall: 0xF775,
  29286. Ustraightcyrillic: 0x04AE,
  29287. Ustraightstrokecyrillic: 0x04B0,
  29288. Utilde: 0x0168,
  29289. Utildeacute: 0x1E78,
  29290. Utildebelow: 0x1E74,
  29291. V: 0x0056,
  29292. Vcircle: 0x24CB,
  29293. Vdotbelow: 0x1E7E,
  29294. Vecyrillic: 0x0412,
  29295. Vewarmenian: 0x054E,
  29296. Vhook: 0x01B2,
  29297. Vmonospace: 0xFF36,
  29298. Voarmenian: 0x0548,
  29299. Vsmall: 0xF776,
  29300. Vtilde: 0x1E7C,
  29301. W: 0x0057,
  29302. Wacute: 0x1E82,
  29303. Wcircle: 0x24CC,
  29304. Wcircumflex: 0x0174,
  29305. Wdieresis: 0x1E84,
  29306. Wdotaccent: 0x1E86,
  29307. Wdotbelow: 0x1E88,
  29308. Wgrave: 0x1E80,
  29309. Wmonospace: 0xFF37,
  29310. Wsmall: 0xF777,
  29311. X: 0x0058,
  29312. Xcircle: 0x24CD,
  29313. Xdieresis: 0x1E8C,
  29314. Xdotaccent: 0x1E8A,
  29315. Xeharmenian: 0x053D,
  29316. Xi: 0x039E,
  29317. Xmonospace: 0xFF38,
  29318. Xsmall: 0xF778,
  29319. Y: 0x0059,
  29320. Yacute: 0x00DD,
  29321. Yacutesmall: 0xF7FD,
  29322. Yatcyrillic: 0x0462,
  29323. Ycircle: 0x24CE,
  29324. Ycircumflex: 0x0176,
  29325. Ydieresis: 0x0178,
  29326. Ydieresissmall: 0xF7FF,
  29327. Ydotaccent: 0x1E8E,
  29328. Ydotbelow: 0x1EF4,
  29329. Yericyrillic: 0x042B,
  29330. Yerudieresiscyrillic: 0x04F8,
  29331. Ygrave: 0x1EF2,
  29332. Yhook: 0x01B3,
  29333. Yhookabove: 0x1EF6,
  29334. Yiarmenian: 0x0545,
  29335. Yicyrillic: 0x0407,
  29336. Yiwnarmenian: 0x0552,
  29337. Ymonospace: 0xFF39,
  29338. Ysmall: 0xF779,
  29339. Ytilde: 0x1EF8,
  29340. Yusbigcyrillic: 0x046A,
  29341. Yusbigiotifiedcyrillic: 0x046C,
  29342. Yuslittlecyrillic: 0x0466,
  29343. Yuslittleiotifiedcyrillic: 0x0468,
  29344. Z: 0x005A,
  29345. Zaarmenian: 0x0536,
  29346. Zacute: 0x0179,
  29347. Zcaron: 0x017D,
  29348. Zcaronsmall: 0xF6FF,
  29349. Zcircle: 0x24CF,
  29350. Zcircumflex: 0x1E90,
  29351. Zdot: 0x017B,
  29352. Zdotaccent: 0x017B,
  29353. Zdotbelow: 0x1E92,
  29354. Zecyrillic: 0x0417,
  29355. Zedescendercyrillic: 0x0498,
  29356. Zedieresiscyrillic: 0x04DE,
  29357. Zeta: 0x0396,
  29358. Zhearmenian: 0x053A,
  29359. Zhebrevecyrillic: 0x04C1,
  29360. Zhecyrillic: 0x0416,
  29361. Zhedescendercyrillic: 0x0496,
  29362. Zhedieresiscyrillic: 0x04DC,
  29363. Zlinebelow: 0x1E94,
  29364. Zmonospace: 0xFF3A,
  29365. Zsmall: 0xF77A,
  29366. Zstroke: 0x01B5,
  29367. a: 0x0061,
  29368. aabengali: 0x0986,
  29369. aacute: 0x00E1,
  29370. aadeva: 0x0906,
  29371. aagujarati: 0x0A86,
  29372. aagurmukhi: 0x0A06,
  29373. aamatragurmukhi: 0x0A3E,
  29374. aarusquare: 0x3303,
  29375. aavowelsignbengali: 0x09BE,
  29376. aavowelsigndeva: 0x093E,
  29377. aavowelsigngujarati: 0x0ABE,
  29378. abbreviationmarkarmenian: 0x055F,
  29379. abbreviationsigndeva: 0x0970,
  29380. abengali: 0x0985,
  29381. abopomofo: 0x311A,
  29382. abreve: 0x0103,
  29383. abreveacute: 0x1EAF,
  29384. abrevecyrillic: 0x04D1,
  29385. abrevedotbelow: 0x1EB7,
  29386. abrevegrave: 0x1EB1,
  29387. abrevehookabove: 0x1EB3,
  29388. abrevetilde: 0x1EB5,
  29389. acaron: 0x01CE,
  29390. acircle: 0x24D0,
  29391. acircumflex: 0x00E2,
  29392. acircumflexacute: 0x1EA5,
  29393. acircumflexdotbelow: 0x1EAD,
  29394. acircumflexgrave: 0x1EA7,
  29395. acircumflexhookabove: 0x1EA9,
  29396. acircumflextilde: 0x1EAB,
  29397. acute: 0x00B4,
  29398. acutebelowcmb: 0x0317,
  29399. acutecmb: 0x0301,
  29400. acutecomb: 0x0301,
  29401. acutedeva: 0x0954,
  29402. acutelowmod: 0x02CF,
  29403. acutetonecmb: 0x0341,
  29404. acyrillic: 0x0430,
  29405. adblgrave: 0x0201,
  29406. addakgurmukhi: 0x0A71,
  29407. adeva: 0x0905,
  29408. adieresis: 0x00E4,
  29409. adieresiscyrillic: 0x04D3,
  29410. adieresismacron: 0x01DF,
  29411. adotbelow: 0x1EA1,
  29412. adotmacron: 0x01E1,
  29413. ae: 0x00E6,
  29414. aeacute: 0x01FD,
  29415. aekorean: 0x3150,
  29416. aemacron: 0x01E3,
  29417. afii00208: 0x2015,
  29418. afii08941: 0x20A4,
  29419. afii10017: 0x0410,
  29420. afii10018: 0x0411,
  29421. afii10019: 0x0412,
  29422. afii10020: 0x0413,
  29423. afii10021: 0x0414,
  29424. afii10022: 0x0415,
  29425. afii10023: 0x0401,
  29426. afii10024: 0x0416,
  29427. afii10025: 0x0417,
  29428. afii10026: 0x0418,
  29429. afii10027: 0x0419,
  29430. afii10028: 0x041A,
  29431. afii10029: 0x041B,
  29432. afii10030: 0x041C,
  29433. afii10031: 0x041D,
  29434. afii10032: 0x041E,
  29435. afii10033: 0x041F,
  29436. afii10034: 0x0420,
  29437. afii10035: 0x0421,
  29438. afii10036: 0x0422,
  29439. afii10037: 0x0423,
  29440. afii10038: 0x0424,
  29441. afii10039: 0x0425,
  29442. afii10040: 0x0426,
  29443. afii10041: 0x0427,
  29444. afii10042: 0x0428,
  29445. afii10043: 0x0429,
  29446. afii10044: 0x042A,
  29447. afii10045: 0x042B,
  29448. afii10046: 0x042C,
  29449. afii10047: 0x042D,
  29450. afii10048: 0x042E,
  29451. afii10049: 0x042F,
  29452. afii10050: 0x0490,
  29453. afii10051: 0x0402,
  29454. afii10052: 0x0403,
  29455. afii10053: 0x0404,
  29456. afii10054: 0x0405,
  29457. afii10055: 0x0406,
  29458. afii10056: 0x0407,
  29459. afii10057: 0x0408,
  29460. afii10058: 0x0409,
  29461. afii10059: 0x040A,
  29462. afii10060: 0x040B,
  29463. afii10061: 0x040C,
  29464. afii10062: 0x040E,
  29465. afii10063: 0xF6C4,
  29466. afii10064: 0xF6C5,
  29467. afii10065: 0x0430,
  29468. afii10066: 0x0431,
  29469. afii10067: 0x0432,
  29470. afii10068: 0x0433,
  29471. afii10069: 0x0434,
  29472. afii10070: 0x0435,
  29473. afii10071: 0x0451,
  29474. afii10072: 0x0436,
  29475. afii10073: 0x0437,
  29476. afii10074: 0x0438,
  29477. afii10075: 0x0439,
  29478. afii10076: 0x043A,
  29479. afii10077: 0x043B,
  29480. afii10078: 0x043C,
  29481. afii10079: 0x043D,
  29482. afii10080: 0x043E,
  29483. afii10081: 0x043F,
  29484. afii10082: 0x0440,
  29485. afii10083: 0x0441,
  29486. afii10084: 0x0442,
  29487. afii10085: 0x0443,
  29488. afii10086: 0x0444,
  29489. afii10087: 0x0445,
  29490. afii10088: 0x0446,
  29491. afii10089: 0x0447,
  29492. afii10090: 0x0448,
  29493. afii10091: 0x0449,
  29494. afii10092: 0x044A,
  29495. afii10093: 0x044B,
  29496. afii10094: 0x044C,
  29497. afii10095: 0x044D,
  29498. afii10096: 0x044E,
  29499. afii10097: 0x044F,
  29500. afii10098: 0x0491,
  29501. afii10099: 0x0452,
  29502. afii10100: 0x0453,
  29503. afii10101: 0x0454,
  29504. afii10102: 0x0455,
  29505. afii10103: 0x0456,
  29506. afii10104: 0x0457,
  29507. afii10105: 0x0458,
  29508. afii10106: 0x0459,
  29509. afii10107: 0x045A,
  29510. afii10108: 0x045B,
  29511. afii10109: 0x045C,
  29512. afii10110: 0x045E,
  29513. afii10145: 0x040F,
  29514. afii10146: 0x0462,
  29515. afii10147: 0x0472,
  29516. afii10148: 0x0474,
  29517. afii10192: 0xF6C6,
  29518. afii10193: 0x045F,
  29519. afii10194: 0x0463,
  29520. afii10195: 0x0473,
  29521. afii10196: 0x0475,
  29522. afii10831: 0xF6C7,
  29523. afii10832: 0xF6C8,
  29524. afii10846: 0x04D9,
  29525. afii299: 0x200E,
  29526. afii300: 0x200F,
  29527. afii301: 0x200D,
  29528. afii57381: 0x066A,
  29529. afii57388: 0x060C,
  29530. afii57392: 0x0660,
  29531. afii57393: 0x0661,
  29532. afii57394: 0x0662,
  29533. afii57395: 0x0663,
  29534. afii57396: 0x0664,
  29535. afii57397: 0x0665,
  29536. afii57398: 0x0666,
  29537. afii57399: 0x0667,
  29538. afii57400: 0x0668,
  29539. afii57401: 0x0669,
  29540. afii57403: 0x061B,
  29541. afii57407: 0x061F,
  29542. afii57409: 0x0621,
  29543. afii57410: 0x0622,
  29544. afii57411: 0x0623,
  29545. afii57412: 0x0624,
  29546. afii57413: 0x0625,
  29547. afii57414: 0x0626,
  29548. afii57415: 0x0627,
  29549. afii57416: 0x0628,
  29550. afii57417: 0x0629,
  29551. afii57418: 0x062A,
  29552. afii57419: 0x062B,
  29553. afii57420: 0x062C,
  29554. afii57421: 0x062D,
  29555. afii57422: 0x062E,
  29556. afii57423: 0x062F,
  29557. afii57424: 0x0630,
  29558. afii57425: 0x0631,
  29559. afii57426: 0x0632,
  29560. afii57427: 0x0633,
  29561. afii57428: 0x0634,
  29562. afii57429: 0x0635,
  29563. afii57430: 0x0636,
  29564. afii57431: 0x0637,
  29565. afii57432: 0x0638,
  29566. afii57433: 0x0639,
  29567. afii57434: 0x063A,
  29568. afii57440: 0x0640,
  29569. afii57441: 0x0641,
  29570. afii57442: 0x0642,
  29571. afii57443: 0x0643,
  29572. afii57444: 0x0644,
  29573. afii57445: 0x0645,
  29574. afii57446: 0x0646,
  29575. afii57448: 0x0648,
  29576. afii57449: 0x0649,
  29577. afii57450: 0x064A,
  29578. afii57451: 0x064B,
  29579. afii57452: 0x064C,
  29580. afii57453: 0x064D,
  29581. afii57454: 0x064E,
  29582. afii57455: 0x064F,
  29583. afii57456: 0x0650,
  29584. afii57457: 0x0651,
  29585. afii57458: 0x0652,
  29586. afii57470: 0x0647,
  29587. afii57505: 0x06A4,
  29588. afii57506: 0x067E,
  29589. afii57507: 0x0686,
  29590. afii57508: 0x0698,
  29591. afii57509: 0x06AF,
  29592. afii57511: 0x0679,
  29593. afii57512: 0x0688,
  29594. afii57513: 0x0691,
  29595. afii57514: 0x06BA,
  29596. afii57519: 0x06D2,
  29597. afii57534: 0x06D5,
  29598. afii57636: 0x20AA,
  29599. afii57645: 0x05BE,
  29600. afii57658: 0x05C3,
  29601. afii57664: 0x05D0,
  29602. afii57665: 0x05D1,
  29603. afii57666: 0x05D2,
  29604. afii57667: 0x05D3,
  29605. afii57668: 0x05D4,
  29606. afii57669: 0x05D5,
  29607. afii57670: 0x05D6,
  29608. afii57671: 0x05D7,
  29609. afii57672: 0x05D8,
  29610. afii57673: 0x05D9,
  29611. afii57674: 0x05DA,
  29612. afii57675: 0x05DB,
  29613. afii57676: 0x05DC,
  29614. afii57677: 0x05DD,
  29615. afii57678: 0x05DE,
  29616. afii57679: 0x05DF,
  29617. afii57680: 0x05E0,
  29618. afii57681: 0x05E1,
  29619. afii57682: 0x05E2,
  29620. afii57683: 0x05E3,
  29621. afii57684: 0x05E4,
  29622. afii57685: 0x05E5,
  29623. afii57686: 0x05E6,
  29624. afii57687: 0x05E7,
  29625. afii57688: 0x05E8,
  29626. afii57689: 0x05E9,
  29627. afii57690: 0x05EA,
  29628. afii57694: 0xFB2A,
  29629. afii57695: 0xFB2B,
  29630. afii57700: 0xFB4B,
  29631. afii57705: 0xFB1F,
  29632. afii57716: 0x05F0,
  29633. afii57717: 0x05F1,
  29634. afii57718: 0x05F2,
  29635. afii57723: 0xFB35,
  29636. afii57793: 0x05B4,
  29637. afii57794: 0x05B5,
  29638. afii57795: 0x05B6,
  29639. afii57796: 0x05BB,
  29640. afii57797: 0x05B8,
  29641. afii57798: 0x05B7,
  29642. afii57799: 0x05B0,
  29643. afii57800: 0x05B2,
  29644. afii57801: 0x05B1,
  29645. afii57802: 0x05B3,
  29646. afii57803: 0x05C2,
  29647. afii57804: 0x05C1,
  29648. afii57806: 0x05B9,
  29649. afii57807: 0x05BC,
  29650. afii57839: 0x05BD,
  29651. afii57841: 0x05BF,
  29652. afii57842: 0x05C0,
  29653. afii57929: 0x02BC,
  29654. afii61248: 0x2105,
  29655. afii61289: 0x2113,
  29656. afii61352: 0x2116,
  29657. afii61573: 0x202C,
  29658. afii61574: 0x202D,
  29659. afii61575: 0x202E,
  29660. afii61664: 0x200C,
  29661. afii63167: 0x066D,
  29662. afii64937: 0x02BD,
  29663. agrave: 0x00E0,
  29664. agujarati: 0x0A85,
  29665. agurmukhi: 0x0A05,
  29666. ahiragana: 0x3042,
  29667. ahookabove: 0x1EA3,
  29668. aibengali: 0x0990,
  29669. aibopomofo: 0x311E,
  29670. aideva: 0x0910,
  29671. aiecyrillic: 0x04D5,
  29672. aigujarati: 0x0A90,
  29673. aigurmukhi: 0x0A10,
  29674. aimatragurmukhi: 0x0A48,
  29675. ainarabic: 0x0639,
  29676. ainfinalarabic: 0xFECA,
  29677. aininitialarabic: 0xFECB,
  29678. ainmedialarabic: 0xFECC,
  29679. ainvertedbreve: 0x0203,
  29680. aivowelsignbengali: 0x09C8,
  29681. aivowelsigndeva: 0x0948,
  29682. aivowelsigngujarati: 0x0AC8,
  29683. akatakana: 0x30A2,
  29684. akatakanahalfwidth: 0xFF71,
  29685. akorean: 0x314F,
  29686. alef: 0x05D0,
  29687. alefarabic: 0x0627,
  29688. alefdageshhebrew: 0xFB30,
  29689. aleffinalarabic: 0xFE8E,
  29690. alefhamzaabovearabic: 0x0623,
  29691. alefhamzaabovefinalarabic: 0xFE84,
  29692. alefhamzabelowarabic: 0x0625,
  29693. alefhamzabelowfinalarabic: 0xFE88,
  29694. alefhebrew: 0x05D0,
  29695. aleflamedhebrew: 0xFB4F,
  29696. alefmaddaabovearabic: 0x0622,
  29697. alefmaddaabovefinalarabic: 0xFE82,
  29698. alefmaksuraarabic: 0x0649,
  29699. alefmaksurafinalarabic: 0xFEF0,
  29700. alefmaksurainitialarabic: 0xFEF3,
  29701. alefmaksuramedialarabic: 0xFEF4,
  29702. alefpatahhebrew: 0xFB2E,
  29703. alefqamatshebrew: 0xFB2F,
  29704. aleph: 0x2135,
  29705. allequal: 0x224C,
  29706. alpha: 0x03B1,
  29707. alphatonos: 0x03AC,
  29708. amacron: 0x0101,
  29709. amonospace: 0xFF41,
  29710. ampersand: 0x0026,
  29711. ampersandmonospace: 0xFF06,
  29712. ampersandsmall: 0xF726,
  29713. amsquare: 0x33C2,
  29714. anbopomofo: 0x3122,
  29715. angbopomofo: 0x3124,
  29716. angbracketleft: 0x3008, // This glyph is missing from Adobe's original list.
  29717. angbracketright: 0x3009, // This glyph is missing from Adobe's original list.
  29718. angkhankhuthai: 0x0E5A,
  29719. angle: 0x2220,
  29720. anglebracketleft: 0x3008,
  29721. anglebracketleftvertical: 0xFE3F,
  29722. anglebracketright: 0x3009,
  29723. anglebracketrightvertical: 0xFE40,
  29724. angleleft: 0x2329,
  29725. angleright: 0x232A,
  29726. angstrom: 0x212B,
  29727. anoteleia: 0x0387,
  29728. anudattadeva: 0x0952,
  29729. anusvarabengali: 0x0982,
  29730. anusvaradeva: 0x0902,
  29731. anusvaragujarati: 0x0A82,
  29732. aogonek: 0x0105,
  29733. apaatosquare: 0x3300,
  29734. aparen: 0x249C,
  29735. apostrophearmenian: 0x055A,
  29736. apostrophemod: 0x02BC,
  29737. apple: 0xF8FF,
  29738. approaches: 0x2250,
  29739. approxequal: 0x2248,
  29740. approxequalorimage: 0x2252,
  29741. approximatelyequal: 0x2245,
  29742. araeaekorean: 0x318E,
  29743. araeakorean: 0x318D,
  29744. arc: 0x2312,
  29745. arighthalfring: 0x1E9A,
  29746. aring: 0x00E5,
  29747. aringacute: 0x01FB,
  29748. aringbelow: 0x1E01,
  29749. arrowboth: 0x2194,
  29750. arrowdashdown: 0x21E3,
  29751. arrowdashleft: 0x21E0,
  29752. arrowdashright: 0x21E2,
  29753. arrowdashup: 0x21E1,
  29754. arrowdblboth: 0x21D4,
  29755. arrowdbldown: 0x21D3,
  29756. arrowdblleft: 0x21D0,
  29757. arrowdblright: 0x21D2,
  29758. arrowdblup: 0x21D1,
  29759. arrowdown: 0x2193,
  29760. arrowdownleft: 0x2199,
  29761. arrowdownright: 0x2198,
  29762. arrowdownwhite: 0x21E9,
  29763. arrowheaddownmod: 0x02C5,
  29764. arrowheadleftmod: 0x02C2,
  29765. arrowheadrightmod: 0x02C3,
  29766. arrowheadupmod: 0x02C4,
  29767. arrowhorizex: 0xF8E7,
  29768. arrowleft: 0x2190,
  29769. arrowleftdbl: 0x21D0,
  29770. arrowleftdblstroke: 0x21CD,
  29771. arrowleftoverright: 0x21C6,
  29772. arrowleftwhite: 0x21E6,
  29773. arrowright: 0x2192,
  29774. arrowrightdblstroke: 0x21CF,
  29775. arrowrightheavy: 0x279E,
  29776. arrowrightoverleft: 0x21C4,
  29777. arrowrightwhite: 0x21E8,
  29778. arrowtableft: 0x21E4,
  29779. arrowtabright: 0x21E5,
  29780. arrowup: 0x2191,
  29781. arrowupdn: 0x2195,
  29782. arrowupdnbse: 0x21A8,
  29783. arrowupdownbase: 0x21A8,
  29784. arrowupleft: 0x2196,
  29785. arrowupleftofdown: 0x21C5,
  29786. arrowupright: 0x2197,
  29787. arrowupwhite: 0x21E7,
  29788. arrowvertex: 0xF8E6,
  29789. asciicircum: 0x005E,
  29790. asciicircummonospace: 0xFF3E,
  29791. asciitilde: 0x007E,
  29792. asciitildemonospace: 0xFF5E,
  29793. ascript: 0x0251,
  29794. ascriptturned: 0x0252,
  29795. asmallhiragana: 0x3041,
  29796. asmallkatakana: 0x30A1,
  29797. asmallkatakanahalfwidth: 0xFF67,
  29798. asterisk: 0x002A,
  29799. asteriskaltonearabic: 0x066D,
  29800. asteriskarabic: 0x066D,
  29801. asteriskmath: 0x2217,
  29802. asteriskmonospace: 0xFF0A,
  29803. asterisksmall: 0xFE61,
  29804. asterism: 0x2042,
  29805. asuperior: 0xF6E9,
  29806. asymptoticallyequal: 0x2243,
  29807. at: 0x0040,
  29808. atilde: 0x00E3,
  29809. atmonospace: 0xFF20,
  29810. atsmall: 0xFE6B,
  29811. aturned: 0x0250,
  29812. aubengali: 0x0994,
  29813. aubopomofo: 0x3120,
  29814. audeva: 0x0914,
  29815. augujarati: 0x0A94,
  29816. augurmukhi: 0x0A14,
  29817. aulengthmarkbengali: 0x09D7,
  29818. aumatragurmukhi: 0x0A4C,
  29819. auvowelsignbengali: 0x09CC,
  29820. auvowelsigndeva: 0x094C,
  29821. auvowelsigngujarati: 0x0ACC,
  29822. avagrahadeva: 0x093D,
  29823. aybarmenian: 0x0561,
  29824. ayin: 0x05E2,
  29825. ayinaltonehebrew: 0xFB20,
  29826. ayinhebrew: 0x05E2,
  29827. b: 0x0062,
  29828. babengali: 0x09AC,
  29829. backslash: 0x005C,
  29830. backslashmonospace: 0xFF3C,
  29831. badeva: 0x092C,
  29832. bagujarati: 0x0AAC,
  29833. bagurmukhi: 0x0A2C,
  29834. bahiragana: 0x3070,
  29835. bahtthai: 0x0E3F,
  29836. bakatakana: 0x30D0,
  29837. bar: 0x007C,
  29838. barmonospace: 0xFF5C,
  29839. bbopomofo: 0x3105,
  29840. bcircle: 0x24D1,
  29841. bdotaccent: 0x1E03,
  29842. bdotbelow: 0x1E05,
  29843. beamedsixteenthnotes: 0x266C,
  29844. because: 0x2235,
  29845. becyrillic: 0x0431,
  29846. beharabic: 0x0628,
  29847. behfinalarabic: 0xFE90,
  29848. behinitialarabic: 0xFE91,
  29849. behiragana: 0x3079,
  29850. behmedialarabic: 0xFE92,
  29851. behmeeminitialarabic: 0xFC9F,
  29852. behmeemisolatedarabic: 0xFC08,
  29853. behnoonfinalarabic: 0xFC6D,
  29854. bekatakana: 0x30D9,
  29855. benarmenian: 0x0562,
  29856. bet: 0x05D1,
  29857. beta: 0x03B2,
  29858. betasymbolgreek: 0x03D0,
  29859. betdagesh: 0xFB31,
  29860. betdageshhebrew: 0xFB31,
  29861. bethebrew: 0x05D1,
  29862. betrafehebrew: 0xFB4C,
  29863. bhabengali: 0x09AD,
  29864. bhadeva: 0x092D,
  29865. bhagujarati: 0x0AAD,
  29866. bhagurmukhi: 0x0A2D,
  29867. bhook: 0x0253,
  29868. bihiragana: 0x3073,
  29869. bikatakana: 0x30D3,
  29870. bilabialclick: 0x0298,
  29871. bindigurmukhi: 0x0A02,
  29872. birusquare: 0x3331,
  29873. blackcircle: 0x25CF,
  29874. blackdiamond: 0x25C6,
  29875. blackdownpointingtriangle: 0x25BC,
  29876. blackleftpointingpointer: 0x25C4,
  29877. blackleftpointingtriangle: 0x25C0,
  29878. blacklenticularbracketleft: 0x3010,
  29879. blacklenticularbracketleftvertical: 0xFE3B,
  29880. blacklenticularbracketright: 0x3011,
  29881. blacklenticularbracketrightvertical: 0xFE3C,
  29882. blacklowerlefttriangle: 0x25E3,
  29883. blacklowerrighttriangle: 0x25E2,
  29884. blackrectangle: 0x25AC,
  29885. blackrightpointingpointer: 0x25BA,
  29886. blackrightpointingtriangle: 0x25B6,
  29887. blacksmallsquare: 0x25AA,
  29888. blacksmilingface: 0x263B,
  29889. blacksquare: 0x25A0,
  29890. blackstar: 0x2605,
  29891. blackupperlefttriangle: 0x25E4,
  29892. blackupperrighttriangle: 0x25E5,
  29893. blackuppointingsmalltriangle: 0x25B4,
  29894. blackuppointingtriangle: 0x25B2,
  29895. blank: 0x2423,
  29896. blinebelow: 0x1E07,
  29897. block: 0x2588,
  29898. bmonospace: 0xFF42,
  29899. bobaimaithai: 0x0E1A,
  29900. bohiragana: 0x307C,
  29901. bokatakana: 0x30DC,
  29902. bparen: 0x249D,
  29903. bqsquare: 0x33C3,
  29904. braceex: 0xF8F4,
  29905. braceleft: 0x007B,
  29906. braceleftbt: 0xF8F3,
  29907. braceleftmid: 0xF8F2,
  29908. braceleftmonospace: 0xFF5B,
  29909. braceleftsmall: 0xFE5B,
  29910. bracelefttp: 0xF8F1,
  29911. braceleftvertical: 0xFE37,
  29912. braceright: 0x007D,
  29913. bracerightbt: 0xF8FE,
  29914. bracerightmid: 0xF8FD,
  29915. bracerightmonospace: 0xFF5D,
  29916. bracerightsmall: 0xFE5C,
  29917. bracerighttp: 0xF8FC,
  29918. bracerightvertical: 0xFE38,
  29919. bracketleft: 0x005B,
  29920. bracketleftbt: 0xF8F0,
  29921. bracketleftex: 0xF8EF,
  29922. bracketleftmonospace: 0xFF3B,
  29923. bracketlefttp: 0xF8EE,
  29924. bracketright: 0x005D,
  29925. bracketrightbt: 0xF8FB,
  29926. bracketrightex: 0xF8FA,
  29927. bracketrightmonospace: 0xFF3D,
  29928. bracketrighttp: 0xF8F9,
  29929. breve: 0x02D8,
  29930. brevebelowcmb: 0x032E,
  29931. brevecmb: 0x0306,
  29932. breveinvertedbelowcmb: 0x032F,
  29933. breveinvertedcmb: 0x0311,
  29934. breveinverteddoublecmb: 0x0361,
  29935. bridgebelowcmb: 0x032A,
  29936. bridgeinvertedbelowcmb: 0x033A,
  29937. brokenbar: 0x00A6,
  29938. bstroke: 0x0180,
  29939. bsuperior: 0xF6EA,
  29940. btopbar: 0x0183,
  29941. buhiragana: 0x3076,
  29942. bukatakana: 0x30D6,
  29943. bullet: 0x2022,
  29944. bulletinverse: 0x25D8,
  29945. bulletoperator: 0x2219,
  29946. bullseye: 0x25CE,
  29947. c: 0x0063,
  29948. caarmenian: 0x056E,
  29949. cabengali: 0x099A,
  29950. cacute: 0x0107,
  29951. cadeva: 0x091A,
  29952. cagujarati: 0x0A9A,
  29953. cagurmukhi: 0x0A1A,
  29954. calsquare: 0x3388,
  29955. candrabindubengali: 0x0981,
  29956. candrabinducmb: 0x0310,
  29957. candrabindudeva: 0x0901,
  29958. candrabindugujarati: 0x0A81,
  29959. capslock: 0x21EA,
  29960. careof: 0x2105,
  29961. caron: 0x02C7,
  29962. caronbelowcmb: 0x032C,
  29963. caroncmb: 0x030C,
  29964. carriagereturn: 0x21B5,
  29965. cbopomofo: 0x3118,
  29966. ccaron: 0x010D,
  29967. ccedilla: 0x00E7,
  29968. ccedillaacute: 0x1E09,
  29969. ccircle: 0x24D2,
  29970. ccircumflex: 0x0109,
  29971. ccurl: 0x0255,
  29972. cdot: 0x010B,
  29973. cdotaccent: 0x010B,
  29974. cdsquare: 0x33C5,
  29975. cedilla: 0x00B8,
  29976. cedillacmb: 0x0327,
  29977. cent: 0x00A2,
  29978. centigrade: 0x2103,
  29979. centinferior: 0xF6DF,
  29980. centmonospace: 0xFFE0,
  29981. centoldstyle: 0xF7A2,
  29982. centsuperior: 0xF6E0,
  29983. chaarmenian: 0x0579,
  29984. chabengali: 0x099B,
  29985. chadeva: 0x091B,
  29986. chagujarati: 0x0A9B,
  29987. chagurmukhi: 0x0A1B,
  29988. chbopomofo: 0x3114,
  29989. cheabkhasiancyrillic: 0x04BD,
  29990. checkmark: 0x2713,
  29991. checyrillic: 0x0447,
  29992. chedescenderabkhasiancyrillic: 0x04BF,
  29993. chedescendercyrillic: 0x04B7,
  29994. chedieresiscyrillic: 0x04F5,
  29995. cheharmenian: 0x0573,
  29996. chekhakassiancyrillic: 0x04CC,
  29997. cheverticalstrokecyrillic: 0x04B9,
  29998. chi: 0x03C7,
  29999. chieuchacirclekorean: 0x3277,
  30000. chieuchaparenkorean: 0x3217,
  30001. chieuchcirclekorean: 0x3269,
  30002. chieuchkorean: 0x314A,
  30003. chieuchparenkorean: 0x3209,
  30004. chochangthai: 0x0E0A,
  30005. chochanthai: 0x0E08,
  30006. chochingthai: 0x0E09,
  30007. chochoethai: 0x0E0C,
  30008. chook: 0x0188,
  30009. cieucacirclekorean: 0x3276,
  30010. cieucaparenkorean: 0x3216,
  30011. cieuccirclekorean: 0x3268,
  30012. cieuckorean: 0x3148,
  30013. cieucparenkorean: 0x3208,
  30014. cieucuparenkorean: 0x321C,
  30015. circle: 0x25CB,
  30016. circlecopyrt: 0x00A9, // This glyph is missing from Adobe's original list.
  30017. circlemultiply: 0x2297,
  30018. circleot: 0x2299,
  30019. circleplus: 0x2295,
  30020. circlepostalmark: 0x3036,
  30021. circlewithlefthalfblack: 0x25D0,
  30022. circlewithrighthalfblack: 0x25D1,
  30023. circumflex: 0x02C6,
  30024. circumflexbelowcmb: 0x032D,
  30025. circumflexcmb: 0x0302,
  30026. clear: 0x2327,
  30027. clickalveolar: 0x01C2,
  30028. clickdental: 0x01C0,
  30029. clicklateral: 0x01C1,
  30030. clickretroflex: 0x01C3,
  30031. club: 0x2663,
  30032. clubsuitblack: 0x2663,
  30033. clubsuitwhite: 0x2667,
  30034. cmcubedsquare: 0x33A4,
  30035. cmonospace: 0xFF43,
  30036. cmsquaredsquare: 0x33A0,
  30037. coarmenian: 0x0581,
  30038. colon: 0x003A,
  30039. colonmonetary: 0x20A1,
  30040. colonmonospace: 0xFF1A,
  30041. colonsign: 0x20A1,
  30042. colonsmall: 0xFE55,
  30043. colontriangularhalfmod: 0x02D1,
  30044. colontriangularmod: 0x02D0,
  30045. comma: 0x002C,
  30046. commaabovecmb: 0x0313,
  30047. commaaboverightcmb: 0x0315,
  30048. commaaccent: 0xF6C3,
  30049. commaarabic: 0x060C,
  30050. commaarmenian: 0x055D,
  30051. commainferior: 0xF6E1,
  30052. commamonospace: 0xFF0C,
  30053. commareversedabovecmb: 0x0314,
  30054. commareversedmod: 0x02BD,
  30055. commasmall: 0xFE50,
  30056. commasuperior: 0xF6E2,
  30057. commaturnedabovecmb: 0x0312,
  30058. commaturnedmod: 0x02BB,
  30059. compass: 0x263C,
  30060. congruent: 0x2245,
  30061. contourintegral: 0x222E,
  30062. control: 0x2303,
  30063. controlACK: 0x0006,
  30064. controlBEL: 0x0007,
  30065. controlBS: 0x0008,
  30066. controlCAN: 0x0018,
  30067. controlCR: 0x000D,
  30068. controlDC1: 0x0011,
  30069. controlDC2: 0x0012,
  30070. controlDC3: 0x0013,
  30071. controlDC4: 0x0014,
  30072. controlDEL: 0x007F,
  30073. controlDLE: 0x0010,
  30074. controlEM: 0x0019,
  30075. controlENQ: 0x0005,
  30076. controlEOT: 0x0004,
  30077. controlESC: 0x001B,
  30078. controlETB: 0x0017,
  30079. controlETX: 0x0003,
  30080. controlFF: 0x000C,
  30081. controlFS: 0x001C,
  30082. controlGS: 0x001D,
  30083. controlHT: 0x0009,
  30084. controlLF: 0x000A,
  30085. controlNAK: 0x0015,
  30086. controlRS: 0x001E,
  30087. controlSI: 0x000F,
  30088. controlSO: 0x000E,
  30089. controlSOT: 0x0002,
  30090. controlSTX: 0x0001,
  30091. controlSUB: 0x001A,
  30092. controlSYN: 0x0016,
  30093. controlUS: 0x001F,
  30094. controlVT: 0x000B,
  30095. copyright: 0x00A9,
  30096. copyrightsans: 0xF8E9,
  30097. copyrightserif: 0xF6D9,
  30098. cornerbracketleft: 0x300C,
  30099. cornerbracketlefthalfwidth: 0xFF62,
  30100. cornerbracketleftvertical: 0xFE41,
  30101. cornerbracketright: 0x300D,
  30102. cornerbracketrighthalfwidth: 0xFF63,
  30103. cornerbracketrightvertical: 0xFE42,
  30104. corporationsquare: 0x337F,
  30105. cosquare: 0x33C7,
  30106. coverkgsquare: 0x33C6,
  30107. cparen: 0x249E,
  30108. cruzeiro: 0x20A2,
  30109. cstretched: 0x0297,
  30110. curlyand: 0x22CF,
  30111. curlyor: 0x22CE,
  30112. currency: 0x00A4,
  30113. cyrBreve: 0xF6D1,
  30114. cyrFlex: 0xF6D2,
  30115. cyrbreve: 0xF6D4,
  30116. cyrflex: 0xF6D5,
  30117. d: 0x0064,
  30118. daarmenian: 0x0564,
  30119. dabengali: 0x09A6,
  30120. dadarabic: 0x0636,
  30121. dadeva: 0x0926,
  30122. dadfinalarabic: 0xFEBE,
  30123. dadinitialarabic: 0xFEBF,
  30124. dadmedialarabic: 0xFEC0,
  30125. dagesh: 0x05BC,
  30126. dageshhebrew: 0x05BC,
  30127. dagger: 0x2020,
  30128. daggerdbl: 0x2021,
  30129. dagujarati: 0x0AA6,
  30130. dagurmukhi: 0x0A26,
  30131. dahiragana: 0x3060,
  30132. dakatakana: 0x30C0,
  30133. dalarabic: 0x062F,
  30134. dalet: 0x05D3,
  30135. daletdagesh: 0xFB33,
  30136. daletdageshhebrew: 0xFB33,
  30137. dalethebrew: 0x05D3,
  30138. dalfinalarabic: 0xFEAA,
  30139. dammaarabic: 0x064F,
  30140. dammalowarabic: 0x064F,
  30141. dammatanaltonearabic: 0x064C,
  30142. dammatanarabic: 0x064C,
  30143. danda: 0x0964,
  30144. dargahebrew: 0x05A7,
  30145. dargalefthebrew: 0x05A7,
  30146. dasiapneumatacyrilliccmb: 0x0485,
  30147. dblGrave: 0xF6D3,
  30148. dblanglebracketleft: 0x300A,
  30149. dblanglebracketleftvertical: 0xFE3D,
  30150. dblanglebracketright: 0x300B,
  30151. dblanglebracketrightvertical: 0xFE3E,
  30152. dblarchinvertedbelowcmb: 0x032B,
  30153. dblarrowleft: 0x21D4,
  30154. dblarrowright: 0x21D2,
  30155. dbldanda: 0x0965,
  30156. dblgrave: 0xF6D6,
  30157. dblgravecmb: 0x030F,
  30158. dblintegral: 0x222C,
  30159. dbllowline: 0x2017,
  30160. dbllowlinecmb: 0x0333,
  30161. dbloverlinecmb: 0x033F,
  30162. dblprimemod: 0x02BA,
  30163. dblverticalbar: 0x2016,
  30164. dblverticallineabovecmb: 0x030E,
  30165. dbopomofo: 0x3109,
  30166. dbsquare: 0x33C8,
  30167. dcaron: 0x010F,
  30168. dcedilla: 0x1E11,
  30169. dcircle: 0x24D3,
  30170. dcircumflexbelow: 0x1E13,
  30171. dcroat: 0x0111,
  30172. ddabengali: 0x09A1,
  30173. ddadeva: 0x0921,
  30174. ddagujarati: 0x0AA1,
  30175. ddagurmukhi: 0x0A21,
  30176. ddalarabic: 0x0688,
  30177. ddalfinalarabic: 0xFB89,
  30178. dddhadeva: 0x095C,
  30179. ddhabengali: 0x09A2,
  30180. ddhadeva: 0x0922,
  30181. ddhagujarati: 0x0AA2,
  30182. ddhagurmukhi: 0x0A22,
  30183. ddotaccent: 0x1E0B,
  30184. ddotbelow: 0x1E0D,
  30185. decimalseparatorarabic: 0x066B,
  30186. decimalseparatorpersian: 0x066B,
  30187. decyrillic: 0x0434,
  30188. degree: 0x00B0,
  30189. dehihebrew: 0x05AD,
  30190. dehiragana: 0x3067,
  30191. deicoptic: 0x03EF,
  30192. dekatakana: 0x30C7,
  30193. deleteleft: 0x232B,
  30194. deleteright: 0x2326,
  30195. delta: 0x03B4,
  30196. deltaturned: 0x018D,
  30197. denominatorminusonenumeratorbengali: 0x09F8,
  30198. dezh: 0x02A4,
  30199. dhabengali: 0x09A7,
  30200. dhadeva: 0x0927,
  30201. dhagujarati: 0x0AA7,
  30202. dhagurmukhi: 0x0A27,
  30203. dhook: 0x0257,
  30204. dialytikatonos: 0x0385,
  30205. dialytikatonoscmb: 0x0344,
  30206. diamond: 0x2666,
  30207. diamondsuitwhite: 0x2662,
  30208. dieresis: 0x00A8,
  30209. dieresisacute: 0xF6D7,
  30210. dieresisbelowcmb: 0x0324,
  30211. dieresiscmb: 0x0308,
  30212. dieresisgrave: 0xF6D8,
  30213. dieresistonos: 0x0385,
  30214. dihiragana: 0x3062,
  30215. dikatakana: 0x30C2,
  30216. dittomark: 0x3003,
  30217. divide: 0x00F7,
  30218. divides: 0x2223,
  30219. divisionslash: 0x2215,
  30220. djecyrillic: 0x0452,
  30221. dkshade: 0x2593,
  30222. dlinebelow: 0x1E0F,
  30223. dlsquare: 0x3397,
  30224. dmacron: 0x0111,
  30225. dmonospace: 0xFF44,
  30226. dnblock: 0x2584,
  30227. dochadathai: 0x0E0E,
  30228. dodekthai: 0x0E14,
  30229. dohiragana: 0x3069,
  30230. dokatakana: 0x30C9,
  30231. dollar: 0x0024,
  30232. dollarinferior: 0xF6E3,
  30233. dollarmonospace: 0xFF04,
  30234. dollaroldstyle: 0xF724,
  30235. dollarsmall: 0xFE69,
  30236. dollarsuperior: 0xF6E4,
  30237. dong: 0x20AB,
  30238. dorusquare: 0x3326,
  30239. dotaccent: 0x02D9,
  30240. dotaccentcmb: 0x0307,
  30241. dotbelowcmb: 0x0323,
  30242. dotbelowcomb: 0x0323,
  30243. dotkatakana: 0x30FB,
  30244. dotlessi: 0x0131,
  30245. dotlessj: 0xF6BE,
  30246. dotlessjstrokehook: 0x0284,
  30247. dotmath: 0x22C5,
  30248. dottedcircle: 0x25CC,
  30249. doubleyodpatah: 0xFB1F,
  30250. doubleyodpatahhebrew: 0xFB1F,
  30251. downtackbelowcmb: 0x031E,
  30252. downtackmod: 0x02D5,
  30253. dparen: 0x249F,
  30254. dsuperior: 0xF6EB,
  30255. dtail: 0x0256,
  30256. dtopbar: 0x018C,
  30257. duhiragana: 0x3065,
  30258. dukatakana: 0x30C5,
  30259. dz: 0x01F3,
  30260. dzaltone: 0x02A3,
  30261. dzcaron: 0x01C6,
  30262. dzcurl: 0x02A5,
  30263. dzeabkhasiancyrillic: 0x04E1,
  30264. dzecyrillic: 0x0455,
  30265. dzhecyrillic: 0x045F,
  30266. e: 0x0065,
  30267. eacute: 0x00E9,
  30268. earth: 0x2641,
  30269. ebengali: 0x098F,
  30270. ebopomofo: 0x311C,
  30271. ebreve: 0x0115,
  30272. ecandradeva: 0x090D,
  30273. ecandragujarati: 0x0A8D,
  30274. ecandravowelsigndeva: 0x0945,
  30275. ecandravowelsigngujarati: 0x0AC5,
  30276. ecaron: 0x011B,
  30277. ecedillabreve: 0x1E1D,
  30278. echarmenian: 0x0565,
  30279. echyiwnarmenian: 0x0587,
  30280. ecircle: 0x24D4,
  30281. ecircumflex: 0x00EA,
  30282. ecircumflexacute: 0x1EBF,
  30283. ecircumflexbelow: 0x1E19,
  30284. ecircumflexdotbelow: 0x1EC7,
  30285. ecircumflexgrave: 0x1EC1,
  30286. ecircumflexhookabove: 0x1EC3,
  30287. ecircumflextilde: 0x1EC5,
  30288. ecyrillic: 0x0454,
  30289. edblgrave: 0x0205,
  30290. edeva: 0x090F,
  30291. edieresis: 0x00EB,
  30292. edot: 0x0117,
  30293. edotaccent: 0x0117,
  30294. edotbelow: 0x1EB9,
  30295. eegurmukhi: 0x0A0F,
  30296. eematragurmukhi: 0x0A47,
  30297. efcyrillic: 0x0444,
  30298. egrave: 0x00E8,
  30299. egujarati: 0x0A8F,
  30300. eharmenian: 0x0567,
  30301. ehbopomofo: 0x311D,
  30302. ehiragana: 0x3048,
  30303. ehookabove: 0x1EBB,
  30304. eibopomofo: 0x311F,
  30305. eight: 0x0038,
  30306. eightarabic: 0x0668,
  30307. eightbengali: 0x09EE,
  30308. eightcircle: 0x2467,
  30309. eightcircleinversesansserif: 0x2791,
  30310. eightdeva: 0x096E,
  30311. eighteencircle: 0x2471,
  30312. eighteenparen: 0x2485,
  30313. eighteenperiod: 0x2499,
  30314. eightgujarati: 0x0AEE,
  30315. eightgurmukhi: 0x0A6E,
  30316. eighthackarabic: 0x0668,
  30317. eighthangzhou: 0x3028,
  30318. eighthnotebeamed: 0x266B,
  30319. eightideographicparen: 0x3227,
  30320. eightinferior: 0x2088,
  30321. eightmonospace: 0xFF18,
  30322. eightoldstyle: 0xF738,
  30323. eightparen: 0x247B,
  30324. eightperiod: 0x248F,
  30325. eightpersian: 0x06F8,
  30326. eightroman: 0x2177,
  30327. eightsuperior: 0x2078,
  30328. eightthai: 0x0E58,
  30329. einvertedbreve: 0x0207,
  30330. eiotifiedcyrillic: 0x0465,
  30331. ekatakana: 0x30A8,
  30332. ekatakanahalfwidth: 0xFF74,
  30333. ekonkargurmukhi: 0x0A74,
  30334. ekorean: 0x3154,
  30335. elcyrillic: 0x043B,
  30336. element: 0x2208,
  30337. elevencircle: 0x246A,
  30338. elevenparen: 0x247E,
  30339. elevenperiod: 0x2492,
  30340. elevenroman: 0x217A,
  30341. ellipsis: 0x2026,
  30342. ellipsisvertical: 0x22EE,
  30343. emacron: 0x0113,
  30344. emacronacute: 0x1E17,
  30345. emacrongrave: 0x1E15,
  30346. emcyrillic: 0x043C,
  30347. emdash: 0x2014,
  30348. emdashvertical: 0xFE31,
  30349. emonospace: 0xFF45,
  30350. emphasismarkarmenian: 0x055B,
  30351. emptyset: 0x2205,
  30352. enbopomofo: 0x3123,
  30353. encyrillic: 0x043D,
  30354. endash: 0x2013,
  30355. endashvertical: 0xFE32,
  30356. endescendercyrillic: 0x04A3,
  30357. eng: 0x014B,
  30358. engbopomofo: 0x3125,
  30359. enghecyrillic: 0x04A5,
  30360. enhookcyrillic: 0x04C8,
  30361. enspace: 0x2002,
  30362. eogonek: 0x0119,
  30363. eokorean: 0x3153,
  30364. eopen: 0x025B,
  30365. eopenclosed: 0x029A,
  30366. eopenreversed: 0x025C,
  30367. eopenreversedclosed: 0x025E,
  30368. eopenreversedhook: 0x025D,
  30369. eparen: 0x24A0,
  30370. epsilon: 0x03B5,
  30371. epsilontonos: 0x03AD,
  30372. equal: 0x003D,
  30373. equalmonospace: 0xFF1D,
  30374. equalsmall: 0xFE66,
  30375. equalsuperior: 0x207C,
  30376. equivalence: 0x2261,
  30377. erbopomofo: 0x3126,
  30378. ercyrillic: 0x0440,
  30379. ereversed: 0x0258,
  30380. ereversedcyrillic: 0x044D,
  30381. escyrillic: 0x0441,
  30382. esdescendercyrillic: 0x04AB,
  30383. esh: 0x0283,
  30384. eshcurl: 0x0286,
  30385. eshortdeva: 0x090E,
  30386. eshortvowelsigndeva: 0x0946,
  30387. eshreversedloop: 0x01AA,
  30388. eshsquatreversed: 0x0285,
  30389. esmallhiragana: 0x3047,
  30390. esmallkatakana: 0x30A7,
  30391. esmallkatakanahalfwidth: 0xFF6A,
  30392. estimated: 0x212E,
  30393. esuperior: 0xF6EC,
  30394. eta: 0x03B7,
  30395. etarmenian: 0x0568,
  30396. etatonos: 0x03AE,
  30397. eth: 0x00F0,
  30398. etilde: 0x1EBD,
  30399. etildebelow: 0x1E1B,
  30400. etnahtafoukhhebrew: 0x0591,
  30401. etnahtafoukhlefthebrew: 0x0591,
  30402. etnahtahebrew: 0x0591,
  30403. etnahtalefthebrew: 0x0591,
  30404. eturned: 0x01DD,
  30405. eukorean: 0x3161,
  30406. euro: 0x20AC,
  30407. evowelsignbengali: 0x09C7,
  30408. evowelsigndeva: 0x0947,
  30409. evowelsigngujarati: 0x0AC7,
  30410. exclam: 0x0021,
  30411. exclamarmenian: 0x055C,
  30412. exclamdbl: 0x203C,
  30413. exclamdown: 0x00A1,
  30414. exclamdownsmall: 0xF7A1,
  30415. exclammonospace: 0xFF01,
  30416. exclamsmall: 0xF721,
  30417. existential: 0x2203,
  30418. ezh: 0x0292,
  30419. ezhcaron: 0x01EF,
  30420. ezhcurl: 0x0293,
  30421. ezhreversed: 0x01B9,
  30422. ezhtail: 0x01BA,
  30423. f: 0x0066,
  30424. fadeva: 0x095E,
  30425. fagurmukhi: 0x0A5E,
  30426. fahrenheit: 0x2109,
  30427. fathaarabic: 0x064E,
  30428. fathalowarabic: 0x064E,
  30429. fathatanarabic: 0x064B,
  30430. fbopomofo: 0x3108,
  30431. fcircle: 0x24D5,
  30432. fdotaccent: 0x1E1F,
  30433. feharabic: 0x0641,
  30434. feharmenian: 0x0586,
  30435. fehfinalarabic: 0xFED2,
  30436. fehinitialarabic: 0xFED3,
  30437. fehmedialarabic: 0xFED4,
  30438. feicoptic: 0x03E5,
  30439. female: 0x2640,
  30440. ff: 0xFB00,
  30441. ffi: 0xFB03,
  30442. ffl: 0xFB04,
  30443. fi: 0xFB01,
  30444. fifteencircle: 0x246E,
  30445. fifteenparen: 0x2482,
  30446. fifteenperiod: 0x2496,
  30447. figuredash: 0x2012,
  30448. filledbox: 0x25A0,
  30449. filledrect: 0x25AC,
  30450. finalkaf: 0x05DA,
  30451. finalkafdagesh: 0xFB3A,
  30452. finalkafdageshhebrew: 0xFB3A,
  30453. finalkafhebrew: 0x05DA,
  30454. finalmem: 0x05DD,
  30455. finalmemhebrew: 0x05DD,
  30456. finalnun: 0x05DF,
  30457. finalnunhebrew: 0x05DF,
  30458. finalpe: 0x05E3,
  30459. finalpehebrew: 0x05E3,
  30460. finaltsadi: 0x05E5,
  30461. finaltsadihebrew: 0x05E5,
  30462. firsttonechinese: 0x02C9,
  30463. fisheye: 0x25C9,
  30464. fitacyrillic: 0x0473,
  30465. five: 0x0035,
  30466. fivearabic: 0x0665,
  30467. fivebengali: 0x09EB,
  30468. fivecircle: 0x2464,
  30469. fivecircleinversesansserif: 0x278E,
  30470. fivedeva: 0x096B,
  30471. fiveeighths: 0x215D,
  30472. fivegujarati: 0x0AEB,
  30473. fivegurmukhi: 0x0A6B,
  30474. fivehackarabic: 0x0665,
  30475. fivehangzhou: 0x3025,
  30476. fiveideographicparen: 0x3224,
  30477. fiveinferior: 0x2085,
  30478. fivemonospace: 0xFF15,
  30479. fiveoldstyle: 0xF735,
  30480. fiveparen: 0x2478,
  30481. fiveperiod: 0x248C,
  30482. fivepersian: 0x06F5,
  30483. fiveroman: 0x2174,
  30484. fivesuperior: 0x2075,
  30485. fivethai: 0x0E55,
  30486. fl: 0xFB02,
  30487. florin: 0x0192,
  30488. fmonospace: 0xFF46,
  30489. fmsquare: 0x3399,
  30490. fofanthai: 0x0E1F,
  30491. fofathai: 0x0E1D,
  30492. fongmanthai: 0x0E4F,
  30493. forall: 0x2200,
  30494. four: 0x0034,
  30495. fourarabic: 0x0664,
  30496. fourbengali: 0x09EA,
  30497. fourcircle: 0x2463,
  30498. fourcircleinversesansserif: 0x278D,
  30499. fourdeva: 0x096A,
  30500. fourgujarati: 0x0AEA,
  30501. fourgurmukhi: 0x0A6A,
  30502. fourhackarabic: 0x0664,
  30503. fourhangzhou: 0x3024,
  30504. fourideographicparen: 0x3223,
  30505. fourinferior: 0x2084,
  30506. fourmonospace: 0xFF14,
  30507. fournumeratorbengali: 0x09F7,
  30508. fouroldstyle: 0xF734,
  30509. fourparen: 0x2477,
  30510. fourperiod: 0x248B,
  30511. fourpersian: 0x06F4,
  30512. fourroman: 0x2173,
  30513. foursuperior: 0x2074,
  30514. fourteencircle: 0x246D,
  30515. fourteenparen: 0x2481,
  30516. fourteenperiod: 0x2495,
  30517. fourthai: 0x0E54,
  30518. fourthtonechinese: 0x02CB,
  30519. fparen: 0x24A1,
  30520. fraction: 0x2044,
  30521. franc: 0x20A3,
  30522. g: 0x0067,
  30523. gabengali: 0x0997,
  30524. gacute: 0x01F5,
  30525. gadeva: 0x0917,
  30526. gafarabic: 0x06AF,
  30527. gaffinalarabic: 0xFB93,
  30528. gafinitialarabic: 0xFB94,
  30529. gafmedialarabic: 0xFB95,
  30530. gagujarati: 0x0A97,
  30531. gagurmukhi: 0x0A17,
  30532. gahiragana: 0x304C,
  30533. gakatakana: 0x30AC,
  30534. gamma: 0x03B3,
  30535. gammalatinsmall: 0x0263,
  30536. gammasuperior: 0x02E0,
  30537. gangiacoptic: 0x03EB,
  30538. gbopomofo: 0x310D,
  30539. gbreve: 0x011F,
  30540. gcaron: 0x01E7,
  30541. gcedilla: 0x0123,
  30542. gcircle: 0x24D6,
  30543. gcircumflex: 0x011D,
  30544. gcommaaccent: 0x0123,
  30545. gdot: 0x0121,
  30546. gdotaccent: 0x0121,
  30547. gecyrillic: 0x0433,
  30548. gehiragana: 0x3052,
  30549. gekatakana: 0x30B2,
  30550. geometricallyequal: 0x2251,
  30551. gereshaccenthebrew: 0x059C,
  30552. gereshhebrew: 0x05F3,
  30553. gereshmuqdamhebrew: 0x059D,
  30554. germandbls: 0x00DF,
  30555. gershayimaccenthebrew: 0x059E,
  30556. gershayimhebrew: 0x05F4,
  30557. getamark: 0x3013,
  30558. ghabengali: 0x0998,
  30559. ghadarmenian: 0x0572,
  30560. ghadeva: 0x0918,
  30561. ghagujarati: 0x0A98,
  30562. ghagurmukhi: 0x0A18,
  30563. ghainarabic: 0x063A,
  30564. ghainfinalarabic: 0xFECE,
  30565. ghaininitialarabic: 0xFECF,
  30566. ghainmedialarabic: 0xFED0,
  30567. ghemiddlehookcyrillic: 0x0495,
  30568. ghestrokecyrillic: 0x0493,
  30569. gheupturncyrillic: 0x0491,
  30570. ghhadeva: 0x095A,
  30571. ghhagurmukhi: 0x0A5A,
  30572. ghook: 0x0260,
  30573. ghzsquare: 0x3393,
  30574. gihiragana: 0x304E,
  30575. gikatakana: 0x30AE,
  30576. gimarmenian: 0x0563,
  30577. gimel: 0x05D2,
  30578. gimeldagesh: 0xFB32,
  30579. gimeldageshhebrew: 0xFB32,
  30580. gimelhebrew: 0x05D2,
  30581. gjecyrillic: 0x0453,
  30582. glottalinvertedstroke: 0x01BE,
  30583. glottalstop: 0x0294,
  30584. glottalstopinverted: 0x0296,
  30585. glottalstopmod: 0x02C0,
  30586. glottalstopreversed: 0x0295,
  30587. glottalstopreversedmod: 0x02C1,
  30588. glottalstopreversedsuperior: 0x02E4,
  30589. glottalstopstroke: 0x02A1,
  30590. glottalstopstrokereversed: 0x02A2,
  30591. gmacron: 0x1E21,
  30592. gmonospace: 0xFF47,
  30593. gohiragana: 0x3054,
  30594. gokatakana: 0x30B4,
  30595. gparen: 0x24A2,
  30596. gpasquare: 0x33AC,
  30597. gradient: 0x2207,
  30598. grave: 0x0060,
  30599. gravebelowcmb: 0x0316,
  30600. gravecmb: 0x0300,
  30601. gravecomb: 0x0300,
  30602. gravedeva: 0x0953,
  30603. gravelowmod: 0x02CE,
  30604. gravemonospace: 0xFF40,
  30605. gravetonecmb: 0x0340,
  30606. greater: 0x003E,
  30607. greaterequal: 0x2265,
  30608. greaterequalorless: 0x22DB,
  30609. greatermonospace: 0xFF1E,
  30610. greaterorequivalent: 0x2273,
  30611. greaterorless: 0x2277,
  30612. greateroverequal: 0x2267,
  30613. greatersmall: 0xFE65,
  30614. gscript: 0x0261,
  30615. gstroke: 0x01E5,
  30616. guhiragana: 0x3050,
  30617. guillemotleft: 0x00AB,
  30618. guillemotright: 0x00BB,
  30619. guilsinglleft: 0x2039,
  30620. guilsinglright: 0x203A,
  30621. gukatakana: 0x30B0,
  30622. guramusquare: 0x3318,
  30623. gysquare: 0x33C9,
  30624. h: 0x0068,
  30625. haabkhasiancyrillic: 0x04A9,
  30626. haaltonearabic: 0x06C1,
  30627. habengali: 0x09B9,
  30628. hadescendercyrillic: 0x04B3,
  30629. hadeva: 0x0939,
  30630. hagujarati: 0x0AB9,
  30631. hagurmukhi: 0x0A39,
  30632. haharabic: 0x062D,
  30633. hahfinalarabic: 0xFEA2,
  30634. hahinitialarabic: 0xFEA3,
  30635. hahiragana: 0x306F,
  30636. hahmedialarabic: 0xFEA4,
  30637. haitusquare: 0x332A,
  30638. hakatakana: 0x30CF,
  30639. hakatakanahalfwidth: 0xFF8A,
  30640. halantgurmukhi: 0x0A4D,
  30641. hamzaarabic: 0x0621,
  30642. hamzalowarabic: 0x0621,
  30643. hangulfiller: 0x3164,
  30644. hardsigncyrillic: 0x044A,
  30645. harpoonleftbarbup: 0x21BC,
  30646. harpoonrightbarbup: 0x21C0,
  30647. hasquare: 0x33CA,
  30648. hatafpatah: 0x05B2,
  30649. hatafpatah16: 0x05B2,
  30650. hatafpatah23: 0x05B2,
  30651. hatafpatah2f: 0x05B2,
  30652. hatafpatahhebrew: 0x05B2,
  30653. hatafpatahnarrowhebrew: 0x05B2,
  30654. hatafpatahquarterhebrew: 0x05B2,
  30655. hatafpatahwidehebrew: 0x05B2,
  30656. hatafqamats: 0x05B3,
  30657. hatafqamats1b: 0x05B3,
  30658. hatafqamats28: 0x05B3,
  30659. hatafqamats34: 0x05B3,
  30660. hatafqamatshebrew: 0x05B3,
  30661. hatafqamatsnarrowhebrew: 0x05B3,
  30662. hatafqamatsquarterhebrew: 0x05B3,
  30663. hatafqamatswidehebrew: 0x05B3,
  30664. hatafsegol: 0x05B1,
  30665. hatafsegol17: 0x05B1,
  30666. hatafsegol24: 0x05B1,
  30667. hatafsegol30: 0x05B1,
  30668. hatafsegolhebrew: 0x05B1,
  30669. hatafsegolnarrowhebrew: 0x05B1,
  30670. hatafsegolquarterhebrew: 0x05B1,
  30671. hatafsegolwidehebrew: 0x05B1,
  30672. hbar: 0x0127,
  30673. hbopomofo: 0x310F,
  30674. hbrevebelow: 0x1E2B,
  30675. hcedilla: 0x1E29,
  30676. hcircle: 0x24D7,
  30677. hcircumflex: 0x0125,
  30678. hdieresis: 0x1E27,
  30679. hdotaccent: 0x1E23,
  30680. hdotbelow: 0x1E25,
  30681. he: 0x05D4,
  30682. heart: 0x2665,
  30683. heartsuitblack: 0x2665,
  30684. heartsuitwhite: 0x2661,
  30685. hedagesh: 0xFB34,
  30686. hedageshhebrew: 0xFB34,
  30687. hehaltonearabic: 0x06C1,
  30688. heharabic: 0x0647,
  30689. hehebrew: 0x05D4,
  30690. hehfinalaltonearabic: 0xFBA7,
  30691. hehfinalalttwoarabic: 0xFEEA,
  30692. hehfinalarabic: 0xFEEA,
  30693. hehhamzaabovefinalarabic: 0xFBA5,
  30694. hehhamzaaboveisolatedarabic: 0xFBA4,
  30695. hehinitialaltonearabic: 0xFBA8,
  30696. hehinitialarabic: 0xFEEB,
  30697. hehiragana: 0x3078,
  30698. hehmedialaltonearabic: 0xFBA9,
  30699. hehmedialarabic: 0xFEEC,
  30700. heiseierasquare: 0x337B,
  30701. hekatakana: 0x30D8,
  30702. hekatakanahalfwidth: 0xFF8D,
  30703. hekutaarusquare: 0x3336,
  30704. henghook: 0x0267,
  30705. herutusquare: 0x3339,
  30706. het: 0x05D7,
  30707. hethebrew: 0x05D7,
  30708. hhook: 0x0266,
  30709. hhooksuperior: 0x02B1,
  30710. hieuhacirclekorean: 0x327B,
  30711. hieuhaparenkorean: 0x321B,
  30712. hieuhcirclekorean: 0x326D,
  30713. hieuhkorean: 0x314E,
  30714. hieuhparenkorean: 0x320D,
  30715. hihiragana: 0x3072,
  30716. hikatakana: 0x30D2,
  30717. hikatakanahalfwidth: 0xFF8B,
  30718. hiriq: 0x05B4,
  30719. hiriq14: 0x05B4,
  30720. hiriq21: 0x05B4,
  30721. hiriq2d: 0x05B4,
  30722. hiriqhebrew: 0x05B4,
  30723. hiriqnarrowhebrew: 0x05B4,
  30724. hiriqquarterhebrew: 0x05B4,
  30725. hiriqwidehebrew: 0x05B4,
  30726. hlinebelow: 0x1E96,
  30727. hmonospace: 0xFF48,
  30728. hoarmenian: 0x0570,
  30729. hohipthai: 0x0E2B,
  30730. hohiragana: 0x307B,
  30731. hokatakana: 0x30DB,
  30732. hokatakanahalfwidth: 0xFF8E,
  30733. holam: 0x05B9,
  30734. holam19: 0x05B9,
  30735. holam26: 0x05B9,
  30736. holam32: 0x05B9,
  30737. holamhebrew: 0x05B9,
  30738. holamnarrowhebrew: 0x05B9,
  30739. holamquarterhebrew: 0x05B9,
  30740. holamwidehebrew: 0x05B9,
  30741. honokhukthai: 0x0E2E,
  30742. hookabovecomb: 0x0309,
  30743. hookcmb: 0x0309,
  30744. hookpalatalizedbelowcmb: 0x0321,
  30745. hookretroflexbelowcmb: 0x0322,
  30746. hoonsquare: 0x3342,
  30747. horicoptic: 0x03E9,
  30748. horizontalbar: 0x2015,
  30749. horncmb: 0x031B,
  30750. hotsprings: 0x2668,
  30751. house: 0x2302,
  30752. hparen: 0x24A3,
  30753. hsuperior: 0x02B0,
  30754. hturned: 0x0265,
  30755. huhiragana: 0x3075,
  30756. huiitosquare: 0x3333,
  30757. hukatakana: 0x30D5,
  30758. hukatakanahalfwidth: 0xFF8C,
  30759. hungarumlaut: 0x02DD,
  30760. hungarumlautcmb: 0x030B,
  30761. hv: 0x0195,
  30762. hyphen: 0x002D,
  30763. hypheninferior: 0xF6E5,
  30764. hyphenmonospace: 0xFF0D,
  30765. hyphensmall: 0xFE63,
  30766. hyphensuperior: 0xF6E6,
  30767. hyphentwo: 0x2010,
  30768. i: 0x0069,
  30769. iacute: 0x00ED,
  30770. iacyrillic: 0x044F,
  30771. ibengali: 0x0987,
  30772. ibopomofo: 0x3127,
  30773. ibreve: 0x012D,
  30774. icaron: 0x01D0,
  30775. icircle: 0x24D8,
  30776. icircumflex: 0x00EE,
  30777. icyrillic: 0x0456,
  30778. idblgrave: 0x0209,
  30779. ideographearthcircle: 0x328F,
  30780. ideographfirecircle: 0x328B,
  30781. ideographicallianceparen: 0x323F,
  30782. ideographiccallparen: 0x323A,
  30783. ideographiccentrecircle: 0x32A5,
  30784. ideographicclose: 0x3006,
  30785. ideographiccomma: 0x3001,
  30786. ideographiccommaleft: 0xFF64,
  30787. ideographiccongratulationparen: 0x3237,
  30788. ideographiccorrectcircle: 0x32A3,
  30789. ideographicearthparen: 0x322F,
  30790. ideographicenterpriseparen: 0x323D,
  30791. ideographicexcellentcircle: 0x329D,
  30792. ideographicfestivalparen: 0x3240,
  30793. ideographicfinancialcircle: 0x3296,
  30794. ideographicfinancialparen: 0x3236,
  30795. ideographicfireparen: 0x322B,
  30796. ideographichaveparen: 0x3232,
  30797. ideographichighcircle: 0x32A4,
  30798. ideographiciterationmark: 0x3005,
  30799. ideographiclaborcircle: 0x3298,
  30800. ideographiclaborparen: 0x3238,
  30801. ideographicleftcircle: 0x32A7,
  30802. ideographiclowcircle: 0x32A6,
  30803. ideographicmedicinecircle: 0x32A9,
  30804. ideographicmetalparen: 0x322E,
  30805. ideographicmoonparen: 0x322A,
  30806. ideographicnameparen: 0x3234,
  30807. ideographicperiod: 0x3002,
  30808. ideographicprintcircle: 0x329E,
  30809. ideographicreachparen: 0x3243,
  30810. ideographicrepresentparen: 0x3239,
  30811. ideographicresourceparen: 0x323E,
  30812. ideographicrightcircle: 0x32A8,
  30813. ideographicsecretcircle: 0x3299,
  30814. ideographicselfparen: 0x3242,
  30815. ideographicsocietyparen: 0x3233,
  30816. ideographicspace: 0x3000,
  30817. ideographicspecialparen: 0x3235,
  30818. ideographicstockparen: 0x3231,
  30819. ideographicstudyparen: 0x323B,
  30820. ideographicsunparen: 0x3230,
  30821. ideographicsuperviseparen: 0x323C,
  30822. ideographicwaterparen: 0x322C,
  30823. ideographicwoodparen: 0x322D,
  30824. ideographiczero: 0x3007,
  30825. ideographmetalcircle: 0x328E,
  30826. ideographmooncircle: 0x328A,
  30827. ideographnamecircle: 0x3294,
  30828. ideographsuncircle: 0x3290,
  30829. ideographwatercircle: 0x328C,
  30830. ideographwoodcircle: 0x328D,
  30831. ideva: 0x0907,
  30832. idieresis: 0x00EF,
  30833. idieresisacute: 0x1E2F,
  30834. idieresiscyrillic: 0x04E5,
  30835. idotbelow: 0x1ECB,
  30836. iebrevecyrillic: 0x04D7,
  30837. iecyrillic: 0x0435,
  30838. ieungacirclekorean: 0x3275,
  30839. ieungaparenkorean: 0x3215,
  30840. ieungcirclekorean: 0x3267,
  30841. ieungkorean: 0x3147,
  30842. ieungparenkorean: 0x3207,
  30843. igrave: 0x00EC,
  30844. igujarati: 0x0A87,
  30845. igurmukhi: 0x0A07,
  30846. ihiragana: 0x3044,
  30847. ihookabove: 0x1EC9,
  30848. iibengali: 0x0988,
  30849. iicyrillic: 0x0438,
  30850. iideva: 0x0908,
  30851. iigujarati: 0x0A88,
  30852. iigurmukhi: 0x0A08,
  30853. iimatragurmukhi: 0x0A40,
  30854. iinvertedbreve: 0x020B,
  30855. iishortcyrillic: 0x0439,
  30856. iivowelsignbengali: 0x09C0,
  30857. iivowelsigndeva: 0x0940,
  30858. iivowelsigngujarati: 0x0AC0,
  30859. ij: 0x0133,
  30860. ikatakana: 0x30A4,
  30861. ikatakanahalfwidth: 0xFF72,
  30862. ikorean: 0x3163,
  30863. ilde: 0x02DC,
  30864. iluyhebrew: 0x05AC,
  30865. imacron: 0x012B,
  30866. imacroncyrillic: 0x04E3,
  30867. imageorapproximatelyequal: 0x2253,
  30868. imatragurmukhi: 0x0A3F,
  30869. imonospace: 0xFF49,
  30870. increment: 0x2206,
  30871. infinity: 0x221E,
  30872. iniarmenian: 0x056B,
  30873. integral: 0x222B,
  30874. integralbottom: 0x2321,
  30875. integralbt: 0x2321,
  30876. integralex: 0xF8F5,
  30877. integraltop: 0x2320,
  30878. integraltp: 0x2320,
  30879. intersection: 0x2229,
  30880. intisquare: 0x3305,
  30881. invbullet: 0x25D8,
  30882. invcircle: 0x25D9,
  30883. invsmileface: 0x263B,
  30884. iocyrillic: 0x0451,
  30885. iogonek: 0x012F,
  30886. iota: 0x03B9,
  30887. iotadieresis: 0x03CA,
  30888. iotadieresistonos: 0x0390,
  30889. iotalatin: 0x0269,
  30890. iotatonos: 0x03AF,
  30891. iparen: 0x24A4,
  30892. irigurmukhi: 0x0A72,
  30893. ismallhiragana: 0x3043,
  30894. ismallkatakana: 0x30A3,
  30895. ismallkatakanahalfwidth: 0xFF68,
  30896. issharbengali: 0x09FA,
  30897. istroke: 0x0268,
  30898. isuperior: 0xF6ED,
  30899. iterationhiragana: 0x309D,
  30900. iterationkatakana: 0x30FD,
  30901. itilde: 0x0129,
  30902. itildebelow: 0x1E2D,
  30903. iubopomofo: 0x3129,
  30904. iucyrillic: 0x044E,
  30905. ivowelsignbengali: 0x09BF,
  30906. ivowelsigndeva: 0x093F,
  30907. ivowelsigngujarati: 0x0ABF,
  30908. izhitsacyrillic: 0x0475,
  30909. izhitsadblgravecyrillic: 0x0477,
  30910. j: 0x006A,
  30911. jaarmenian: 0x0571,
  30912. jabengali: 0x099C,
  30913. jadeva: 0x091C,
  30914. jagujarati: 0x0A9C,
  30915. jagurmukhi: 0x0A1C,
  30916. jbopomofo: 0x3110,
  30917. jcaron: 0x01F0,
  30918. jcircle: 0x24D9,
  30919. jcircumflex: 0x0135,
  30920. jcrossedtail: 0x029D,
  30921. jdotlessstroke: 0x025F,
  30922. jecyrillic: 0x0458,
  30923. jeemarabic: 0x062C,
  30924. jeemfinalarabic: 0xFE9E,
  30925. jeeminitialarabic: 0xFE9F,
  30926. jeemmedialarabic: 0xFEA0,
  30927. jeharabic: 0x0698,
  30928. jehfinalarabic: 0xFB8B,
  30929. jhabengali: 0x099D,
  30930. jhadeva: 0x091D,
  30931. jhagujarati: 0x0A9D,
  30932. jhagurmukhi: 0x0A1D,
  30933. jheharmenian: 0x057B,
  30934. jis: 0x3004,
  30935. jmonospace: 0xFF4A,
  30936. jparen: 0x24A5,
  30937. jsuperior: 0x02B2,
  30938. k: 0x006B,
  30939. kabashkircyrillic: 0x04A1,
  30940. kabengali: 0x0995,
  30941. kacute: 0x1E31,
  30942. kacyrillic: 0x043A,
  30943. kadescendercyrillic: 0x049B,
  30944. kadeva: 0x0915,
  30945. kaf: 0x05DB,
  30946. kafarabic: 0x0643,
  30947. kafdagesh: 0xFB3B,
  30948. kafdageshhebrew: 0xFB3B,
  30949. kaffinalarabic: 0xFEDA,
  30950. kafhebrew: 0x05DB,
  30951. kafinitialarabic: 0xFEDB,
  30952. kafmedialarabic: 0xFEDC,
  30953. kafrafehebrew: 0xFB4D,
  30954. kagujarati: 0x0A95,
  30955. kagurmukhi: 0x0A15,
  30956. kahiragana: 0x304B,
  30957. kahookcyrillic: 0x04C4,
  30958. kakatakana: 0x30AB,
  30959. kakatakanahalfwidth: 0xFF76,
  30960. kappa: 0x03BA,
  30961. kappasymbolgreek: 0x03F0,
  30962. kapyeounmieumkorean: 0x3171,
  30963. kapyeounphieuphkorean: 0x3184,
  30964. kapyeounpieupkorean: 0x3178,
  30965. kapyeounssangpieupkorean: 0x3179,
  30966. karoriisquare: 0x330D,
  30967. kashidaautoarabic: 0x0640,
  30968. kashidaautonosidebearingarabic: 0x0640,
  30969. kasmallkatakana: 0x30F5,
  30970. kasquare: 0x3384,
  30971. kasraarabic: 0x0650,
  30972. kasratanarabic: 0x064D,
  30973. kastrokecyrillic: 0x049F,
  30974. katahiraprolongmarkhalfwidth: 0xFF70,
  30975. kaverticalstrokecyrillic: 0x049D,
  30976. kbopomofo: 0x310E,
  30977. kcalsquare: 0x3389,
  30978. kcaron: 0x01E9,
  30979. kcedilla: 0x0137,
  30980. kcircle: 0x24DA,
  30981. kcommaaccent: 0x0137,
  30982. kdotbelow: 0x1E33,
  30983. keharmenian: 0x0584,
  30984. kehiragana: 0x3051,
  30985. kekatakana: 0x30B1,
  30986. kekatakanahalfwidth: 0xFF79,
  30987. kenarmenian: 0x056F,
  30988. kesmallkatakana: 0x30F6,
  30989. kgreenlandic: 0x0138,
  30990. khabengali: 0x0996,
  30991. khacyrillic: 0x0445,
  30992. khadeva: 0x0916,
  30993. khagujarati: 0x0A96,
  30994. khagurmukhi: 0x0A16,
  30995. khaharabic: 0x062E,
  30996. khahfinalarabic: 0xFEA6,
  30997. khahinitialarabic: 0xFEA7,
  30998. khahmedialarabic: 0xFEA8,
  30999. kheicoptic: 0x03E7,
  31000. khhadeva: 0x0959,
  31001. khhagurmukhi: 0x0A59,
  31002. khieukhacirclekorean: 0x3278,
  31003. khieukhaparenkorean: 0x3218,
  31004. khieukhcirclekorean: 0x326A,
  31005. khieukhkorean: 0x314B,
  31006. khieukhparenkorean: 0x320A,
  31007. khokhaithai: 0x0E02,
  31008. khokhonthai: 0x0E05,
  31009. khokhuatthai: 0x0E03,
  31010. khokhwaithai: 0x0E04,
  31011. khomutthai: 0x0E5B,
  31012. khook: 0x0199,
  31013. khorakhangthai: 0x0E06,
  31014. khzsquare: 0x3391,
  31015. kihiragana: 0x304D,
  31016. kikatakana: 0x30AD,
  31017. kikatakanahalfwidth: 0xFF77,
  31018. kiroguramusquare: 0x3315,
  31019. kiromeetorusquare: 0x3316,
  31020. kirosquare: 0x3314,
  31021. kiyeokacirclekorean: 0x326E,
  31022. kiyeokaparenkorean: 0x320E,
  31023. kiyeokcirclekorean: 0x3260,
  31024. kiyeokkorean: 0x3131,
  31025. kiyeokparenkorean: 0x3200,
  31026. kiyeoksioskorean: 0x3133,
  31027. kjecyrillic: 0x045C,
  31028. klinebelow: 0x1E35,
  31029. klsquare: 0x3398,
  31030. kmcubedsquare: 0x33A6,
  31031. kmonospace: 0xFF4B,
  31032. kmsquaredsquare: 0x33A2,
  31033. kohiragana: 0x3053,
  31034. kohmsquare: 0x33C0,
  31035. kokaithai: 0x0E01,
  31036. kokatakana: 0x30B3,
  31037. kokatakanahalfwidth: 0xFF7A,
  31038. kooposquare: 0x331E,
  31039. koppacyrillic: 0x0481,
  31040. koreanstandardsymbol: 0x327F,
  31041. koroniscmb: 0x0343,
  31042. kparen: 0x24A6,
  31043. kpasquare: 0x33AA,
  31044. ksicyrillic: 0x046F,
  31045. ktsquare: 0x33CF,
  31046. kturned: 0x029E,
  31047. kuhiragana: 0x304F,
  31048. kukatakana: 0x30AF,
  31049. kukatakanahalfwidth: 0xFF78,
  31050. kvsquare: 0x33B8,
  31051. kwsquare: 0x33BE,
  31052. l: 0x006C,
  31053. labengali: 0x09B2,
  31054. lacute: 0x013A,
  31055. ladeva: 0x0932,
  31056. lagujarati: 0x0AB2,
  31057. lagurmukhi: 0x0A32,
  31058. lakkhangyaothai: 0x0E45,
  31059. lamaleffinalarabic: 0xFEFC,
  31060. lamalefhamzaabovefinalarabic: 0xFEF8,
  31061. lamalefhamzaaboveisolatedarabic: 0xFEF7,
  31062. lamalefhamzabelowfinalarabic: 0xFEFA,
  31063. lamalefhamzabelowisolatedarabic: 0xFEF9,
  31064. lamalefisolatedarabic: 0xFEFB,
  31065. lamalefmaddaabovefinalarabic: 0xFEF6,
  31066. lamalefmaddaaboveisolatedarabic: 0xFEF5,
  31067. lamarabic: 0x0644,
  31068. lambda: 0x03BB,
  31069. lambdastroke: 0x019B,
  31070. lamed: 0x05DC,
  31071. lameddagesh: 0xFB3C,
  31072. lameddageshhebrew: 0xFB3C,
  31073. lamedhebrew: 0x05DC,
  31074. lamfinalarabic: 0xFEDE,
  31075. lamhahinitialarabic: 0xFCCA,
  31076. laminitialarabic: 0xFEDF,
  31077. lamjeeminitialarabic: 0xFCC9,
  31078. lamkhahinitialarabic: 0xFCCB,
  31079. lamlamhehisolatedarabic: 0xFDF2,
  31080. lammedialarabic: 0xFEE0,
  31081. lammeemhahinitialarabic: 0xFD88,
  31082. lammeeminitialarabic: 0xFCCC,
  31083. largecircle: 0x25EF,
  31084. lbar: 0x019A,
  31085. lbelt: 0x026C,
  31086. lbopomofo: 0x310C,
  31087. lcaron: 0x013E,
  31088. lcedilla: 0x013C,
  31089. lcircle: 0x24DB,
  31090. lcircumflexbelow: 0x1E3D,
  31091. lcommaaccent: 0x013C,
  31092. ldot: 0x0140,
  31093. ldotaccent: 0x0140,
  31094. ldotbelow: 0x1E37,
  31095. ldotbelowmacron: 0x1E39,
  31096. leftangleabovecmb: 0x031A,
  31097. lefttackbelowcmb: 0x0318,
  31098. less: 0x003C,
  31099. lessequal: 0x2264,
  31100. lessequalorgreater: 0x22DA,
  31101. lessmonospace: 0xFF1C,
  31102. lessorequivalent: 0x2272,
  31103. lessorgreater: 0x2276,
  31104. lessoverequal: 0x2266,
  31105. lesssmall: 0xFE64,
  31106. lezh: 0x026E,
  31107. lfblock: 0x258C,
  31108. lhookretroflex: 0x026D,
  31109. lira: 0x20A4,
  31110. liwnarmenian: 0x056C,
  31111. lj: 0x01C9,
  31112. ljecyrillic: 0x0459,
  31113. ll: 0xF6C0,
  31114. lladeva: 0x0933,
  31115. llagujarati: 0x0AB3,
  31116. llinebelow: 0x1E3B,
  31117. llladeva: 0x0934,
  31118. llvocalicbengali: 0x09E1,
  31119. llvocalicdeva: 0x0961,
  31120. llvocalicvowelsignbengali: 0x09E3,
  31121. llvocalicvowelsigndeva: 0x0963,
  31122. lmiddletilde: 0x026B,
  31123. lmonospace: 0xFF4C,
  31124. lmsquare: 0x33D0,
  31125. lochulathai: 0x0E2C,
  31126. logicaland: 0x2227,
  31127. logicalnot: 0x00AC,
  31128. logicalnotreversed: 0x2310,
  31129. logicalor: 0x2228,
  31130. lolingthai: 0x0E25,
  31131. longs: 0x017F,
  31132. lowlinecenterline: 0xFE4E,
  31133. lowlinecmb: 0x0332,
  31134. lowlinedashed: 0xFE4D,
  31135. lozenge: 0x25CA,
  31136. lparen: 0x24A7,
  31137. lslash: 0x0142,
  31138. lsquare: 0x2113,
  31139. lsuperior: 0xF6EE,
  31140. ltshade: 0x2591,
  31141. luthai: 0x0E26,
  31142. lvocalicbengali: 0x098C,
  31143. lvocalicdeva: 0x090C,
  31144. lvocalicvowelsignbengali: 0x09E2,
  31145. lvocalicvowelsigndeva: 0x0962,
  31146. lxsquare: 0x33D3,
  31147. m: 0x006D,
  31148. mabengali: 0x09AE,
  31149. macron: 0x00AF,
  31150. macronbelowcmb: 0x0331,
  31151. macroncmb: 0x0304,
  31152. macronlowmod: 0x02CD,
  31153. macronmonospace: 0xFFE3,
  31154. macute: 0x1E3F,
  31155. madeva: 0x092E,
  31156. magujarati: 0x0AAE,
  31157. magurmukhi: 0x0A2E,
  31158. mahapakhhebrew: 0x05A4,
  31159. mahapakhlefthebrew: 0x05A4,
  31160. mahiragana: 0x307E,
  31161. maichattawalowleftthai: 0xF895,
  31162. maichattawalowrightthai: 0xF894,
  31163. maichattawathai: 0x0E4B,
  31164. maichattawaupperleftthai: 0xF893,
  31165. maieklowleftthai: 0xF88C,
  31166. maieklowrightthai: 0xF88B,
  31167. maiekthai: 0x0E48,
  31168. maiekupperleftthai: 0xF88A,
  31169. maihanakatleftthai: 0xF884,
  31170. maihanakatthai: 0x0E31,
  31171. maitaikhuleftthai: 0xF889,
  31172. maitaikhuthai: 0x0E47,
  31173. maitholowleftthai: 0xF88F,
  31174. maitholowrightthai: 0xF88E,
  31175. maithothai: 0x0E49,
  31176. maithoupperleftthai: 0xF88D,
  31177. maitrilowleftthai: 0xF892,
  31178. maitrilowrightthai: 0xF891,
  31179. maitrithai: 0x0E4A,
  31180. maitriupperleftthai: 0xF890,
  31181. maiyamokthai: 0x0E46,
  31182. makatakana: 0x30DE,
  31183. makatakanahalfwidth: 0xFF8F,
  31184. male: 0x2642,
  31185. mansyonsquare: 0x3347,
  31186. maqafhebrew: 0x05BE,
  31187. mars: 0x2642,
  31188. masoracirclehebrew: 0x05AF,
  31189. masquare: 0x3383,
  31190. mbopomofo: 0x3107,
  31191. mbsquare: 0x33D4,
  31192. mcircle: 0x24DC,
  31193. mcubedsquare: 0x33A5,
  31194. mdotaccent: 0x1E41,
  31195. mdotbelow: 0x1E43,
  31196. meemarabic: 0x0645,
  31197. meemfinalarabic: 0xFEE2,
  31198. meeminitialarabic: 0xFEE3,
  31199. meemmedialarabic: 0xFEE4,
  31200. meemmeeminitialarabic: 0xFCD1,
  31201. meemmeemisolatedarabic: 0xFC48,
  31202. meetorusquare: 0x334D,
  31203. mehiragana: 0x3081,
  31204. meizierasquare: 0x337E,
  31205. mekatakana: 0x30E1,
  31206. mekatakanahalfwidth: 0xFF92,
  31207. mem: 0x05DE,
  31208. memdagesh: 0xFB3E,
  31209. memdageshhebrew: 0xFB3E,
  31210. memhebrew: 0x05DE,
  31211. menarmenian: 0x0574,
  31212. merkhahebrew: 0x05A5,
  31213. merkhakefulahebrew: 0x05A6,
  31214. merkhakefulalefthebrew: 0x05A6,
  31215. merkhalefthebrew: 0x05A5,
  31216. mhook: 0x0271,
  31217. mhzsquare: 0x3392,
  31218. middledotkatakanahalfwidth: 0xFF65,
  31219. middot: 0x00B7,
  31220. mieumacirclekorean: 0x3272,
  31221. mieumaparenkorean: 0x3212,
  31222. mieumcirclekorean: 0x3264,
  31223. mieumkorean: 0x3141,
  31224. mieumpansioskorean: 0x3170,
  31225. mieumparenkorean: 0x3204,
  31226. mieumpieupkorean: 0x316E,
  31227. mieumsioskorean: 0x316F,
  31228. mihiragana: 0x307F,
  31229. mikatakana: 0x30DF,
  31230. mikatakanahalfwidth: 0xFF90,
  31231. minus: 0x2212,
  31232. minusbelowcmb: 0x0320,
  31233. minuscircle: 0x2296,
  31234. minusmod: 0x02D7,
  31235. minusplus: 0x2213,
  31236. minute: 0x2032,
  31237. miribaarusquare: 0x334A,
  31238. mirisquare: 0x3349,
  31239. mlonglegturned: 0x0270,
  31240. mlsquare: 0x3396,
  31241. mmcubedsquare: 0x33A3,
  31242. mmonospace: 0xFF4D,
  31243. mmsquaredsquare: 0x339F,
  31244. mohiragana: 0x3082,
  31245. mohmsquare: 0x33C1,
  31246. mokatakana: 0x30E2,
  31247. mokatakanahalfwidth: 0xFF93,
  31248. molsquare: 0x33D6,
  31249. momathai: 0x0E21,
  31250. moverssquare: 0x33A7,
  31251. moverssquaredsquare: 0x33A8,
  31252. mparen: 0x24A8,
  31253. mpasquare: 0x33AB,
  31254. mssquare: 0x33B3,
  31255. msuperior: 0xF6EF,
  31256. mturned: 0x026F,
  31257. mu: 0x00B5,
  31258. mu1: 0x00B5,
  31259. muasquare: 0x3382,
  31260. muchgreater: 0x226B,
  31261. muchless: 0x226A,
  31262. mufsquare: 0x338C,
  31263. mugreek: 0x03BC,
  31264. mugsquare: 0x338D,
  31265. muhiragana: 0x3080,
  31266. mukatakana: 0x30E0,
  31267. mukatakanahalfwidth: 0xFF91,
  31268. mulsquare: 0x3395,
  31269. multiply: 0x00D7,
  31270. mumsquare: 0x339B,
  31271. munahhebrew: 0x05A3,
  31272. munahlefthebrew: 0x05A3,
  31273. musicalnote: 0x266A,
  31274. musicalnotedbl: 0x266B,
  31275. musicflatsign: 0x266D,
  31276. musicsharpsign: 0x266F,
  31277. mussquare: 0x33B2,
  31278. muvsquare: 0x33B6,
  31279. muwsquare: 0x33BC,
  31280. mvmegasquare: 0x33B9,
  31281. mvsquare: 0x33B7,
  31282. mwmegasquare: 0x33BF,
  31283. mwsquare: 0x33BD,
  31284. n: 0x006E,
  31285. nabengali: 0x09A8,
  31286. nabla: 0x2207,
  31287. nacute: 0x0144,
  31288. nadeva: 0x0928,
  31289. nagujarati: 0x0AA8,
  31290. nagurmukhi: 0x0A28,
  31291. nahiragana: 0x306A,
  31292. nakatakana: 0x30CA,
  31293. nakatakanahalfwidth: 0xFF85,
  31294. napostrophe: 0x0149,
  31295. nasquare: 0x3381,
  31296. nbopomofo: 0x310B,
  31297. nbspace: 0x00A0,
  31298. ncaron: 0x0148,
  31299. ncedilla: 0x0146,
  31300. ncircle: 0x24DD,
  31301. ncircumflexbelow: 0x1E4B,
  31302. ncommaaccent: 0x0146,
  31303. ndotaccent: 0x1E45,
  31304. ndotbelow: 0x1E47,
  31305. nehiragana: 0x306D,
  31306. nekatakana: 0x30CD,
  31307. nekatakanahalfwidth: 0xFF88,
  31308. newsheqelsign: 0x20AA,
  31309. nfsquare: 0x338B,
  31310. ngabengali: 0x0999,
  31311. ngadeva: 0x0919,
  31312. ngagujarati: 0x0A99,
  31313. ngagurmukhi: 0x0A19,
  31314. ngonguthai: 0x0E07,
  31315. nhiragana: 0x3093,
  31316. nhookleft: 0x0272,
  31317. nhookretroflex: 0x0273,
  31318. nieunacirclekorean: 0x326F,
  31319. nieunaparenkorean: 0x320F,
  31320. nieuncieuckorean: 0x3135,
  31321. nieuncirclekorean: 0x3261,
  31322. nieunhieuhkorean: 0x3136,
  31323. nieunkorean: 0x3134,
  31324. nieunpansioskorean: 0x3168,
  31325. nieunparenkorean: 0x3201,
  31326. nieunsioskorean: 0x3167,
  31327. nieuntikeutkorean: 0x3166,
  31328. nihiragana: 0x306B,
  31329. nikatakana: 0x30CB,
  31330. nikatakanahalfwidth: 0xFF86,
  31331. nikhahitleftthai: 0xF899,
  31332. nikhahitthai: 0x0E4D,
  31333. nine: 0x0039,
  31334. ninearabic: 0x0669,
  31335. ninebengali: 0x09EF,
  31336. ninecircle: 0x2468,
  31337. ninecircleinversesansserif: 0x2792,
  31338. ninedeva: 0x096F,
  31339. ninegujarati: 0x0AEF,
  31340. ninegurmukhi: 0x0A6F,
  31341. ninehackarabic: 0x0669,
  31342. ninehangzhou: 0x3029,
  31343. nineideographicparen: 0x3228,
  31344. nineinferior: 0x2089,
  31345. ninemonospace: 0xFF19,
  31346. nineoldstyle: 0xF739,
  31347. nineparen: 0x247C,
  31348. nineperiod: 0x2490,
  31349. ninepersian: 0x06F9,
  31350. nineroman: 0x2178,
  31351. ninesuperior: 0x2079,
  31352. nineteencircle: 0x2472,
  31353. nineteenparen: 0x2486,
  31354. nineteenperiod: 0x249A,
  31355. ninethai: 0x0E59,
  31356. nj: 0x01CC,
  31357. njecyrillic: 0x045A,
  31358. nkatakana: 0x30F3,
  31359. nkatakanahalfwidth: 0xFF9D,
  31360. nlegrightlong: 0x019E,
  31361. nlinebelow: 0x1E49,
  31362. nmonospace: 0xFF4E,
  31363. nmsquare: 0x339A,
  31364. nnabengali: 0x09A3,
  31365. nnadeva: 0x0923,
  31366. nnagujarati: 0x0AA3,
  31367. nnagurmukhi: 0x0A23,
  31368. nnnadeva: 0x0929,
  31369. nohiragana: 0x306E,
  31370. nokatakana: 0x30CE,
  31371. nokatakanahalfwidth: 0xFF89,
  31372. nonbreakingspace: 0x00A0,
  31373. nonenthai: 0x0E13,
  31374. nonuthai: 0x0E19,
  31375. noonarabic: 0x0646,
  31376. noonfinalarabic: 0xFEE6,
  31377. noonghunnaarabic: 0x06BA,
  31378. noonghunnafinalarabic: 0xFB9F,
  31379. nooninitialarabic: 0xFEE7,
  31380. noonjeeminitialarabic: 0xFCD2,
  31381. noonjeemisolatedarabic: 0xFC4B,
  31382. noonmedialarabic: 0xFEE8,
  31383. noonmeeminitialarabic: 0xFCD5,
  31384. noonmeemisolatedarabic: 0xFC4E,
  31385. noonnoonfinalarabic: 0xFC8D,
  31386. notcontains: 0x220C,
  31387. notelement: 0x2209,
  31388. notelementof: 0x2209,
  31389. notequal: 0x2260,
  31390. notgreater: 0x226F,
  31391. notgreaternorequal: 0x2271,
  31392. notgreaternorless: 0x2279,
  31393. notidentical: 0x2262,
  31394. notless: 0x226E,
  31395. notlessnorequal: 0x2270,
  31396. notparallel: 0x2226,
  31397. notprecedes: 0x2280,
  31398. notsubset: 0x2284,
  31399. notsucceeds: 0x2281,
  31400. notsuperset: 0x2285,
  31401. nowarmenian: 0x0576,
  31402. nparen: 0x24A9,
  31403. nssquare: 0x33B1,
  31404. nsuperior: 0x207F,
  31405. ntilde: 0x00F1,
  31406. nu: 0x03BD,
  31407. nuhiragana: 0x306C,
  31408. nukatakana: 0x30CC,
  31409. nukatakanahalfwidth: 0xFF87,
  31410. nuktabengali: 0x09BC,
  31411. nuktadeva: 0x093C,
  31412. nuktagujarati: 0x0ABC,
  31413. nuktagurmukhi: 0x0A3C,
  31414. numbersign: 0x0023,
  31415. numbersignmonospace: 0xFF03,
  31416. numbersignsmall: 0xFE5F,
  31417. numeralsigngreek: 0x0374,
  31418. numeralsignlowergreek: 0x0375,
  31419. numero: 0x2116,
  31420. nun: 0x05E0,
  31421. nundagesh: 0xFB40,
  31422. nundageshhebrew: 0xFB40,
  31423. nunhebrew: 0x05E0,
  31424. nvsquare: 0x33B5,
  31425. nwsquare: 0x33BB,
  31426. nyabengali: 0x099E,
  31427. nyadeva: 0x091E,
  31428. nyagujarati: 0x0A9E,
  31429. nyagurmukhi: 0x0A1E,
  31430. o: 0x006F,
  31431. oacute: 0x00F3,
  31432. oangthai: 0x0E2D,
  31433. obarred: 0x0275,
  31434. obarredcyrillic: 0x04E9,
  31435. obarreddieresiscyrillic: 0x04EB,
  31436. obengali: 0x0993,
  31437. obopomofo: 0x311B,
  31438. obreve: 0x014F,
  31439. ocandradeva: 0x0911,
  31440. ocandragujarati: 0x0A91,
  31441. ocandravowelsigndeva: 0x0949,
  31442. ocandravowelsigngujarati: 0x0AC9,
  31443. ocaron: 0x01D2,
  31444. ocircle: 0x24DE,
  31445. ocircumflex: 0x00F4,
  31446. ocircumflexacute: 0x1ED1,
  31447. ocircumflexdotbelow: 0x1ED9,
  31448. ocircumflexgrave: 0x1ED3,
  31449. ocircumflexhookabove: 0x1ED5,
  31450. ocircumflextilde: 0x1ED7,
  31451. ocyrillic: 0x043E,
  31452. odblacute: 0x0151,
  31453. odblgrave: 0x020D,
  31454. odeva: 0x0913,
  31455. odieresis: 0x00F6,
  31456. odieresiscyrillic: 0x04E7,
  31457. odotbelow: 0x1ECD,
  31458. oe: 0x0153,
  31459. oekorean: 0x315A,
  31460. ogonek: 0x02DB,
  31461. ogonekcmb: 0x0328,
  31462. ograve: 0x00F2,
  31463. ogujarati: 0x0A93,
  31464. oharmenian: 0x0585,
  31465. ohiragana: 0x304A,
  31466. ohookabove: 0x1ECF,
  31467. ohorn: 0x01A1,
  31468. ohornacute: 0x1EDB,
  31469. ohorndotbelow: 0x1EE3,
  31470. ohorngrave: 0x1EDD,
  31471. ohornhookabove: 0x1EDF,
  31472. ohorntilde: 0x1EE1,
  31473. ohungarumlaut: 0x0151,
  31474. oi: 0x01A3,
  31475. oinvertedbreve: 0x020F,
  31476. okatakana: 0x30AA,
  31477. okatakanahalfwidth: 0xFF75,
  31478. okorean: 0x3157,
  31479. olehebrew: 0x05AB,
  31480. omacron: 0x014D,
  31481. omacronacute: 0x1E53,
  31482. omacrongrave: 0x1E51,
  31483. omdeva: 0x0950,
  31484. omega: 0x03C9,
  31485. omega1: 0x03D6,
  31486. omegacyrillic: 0x0461,
  31487. omegalatinclosed: 0x0277,
  31488. omegaroundcyrillic: 0x047B,
  31489. omegatitlocyrillic: 0x047D,
  31490. omegatonos: 0x03CE,
  31491. omgujarati: 0x0AD0,
  31492. omicron: 0x03BF,
  31493. omicrontonos: 0x03CC,
  31494. omonospace: 0xFF4F,
  31495. one: 0x0031,
  31496. onearabic: 0x0661,
  31497. onebengali: 0x09E7,
  31498. onecircle: 0x2460,
  31499. onecircleinversesansserif: 0x278A,
  31500. onedeva: 0x0967,
  31501. onedotenleader: 0x2024,
  31502. oneeighth: 0x215B,
  31503. onefitted: 0xF6DC,
  31504. onegujarati: 0x0AE7,
  31505. onegurmukhi: 0x0A67,
  31506. onehackarabic: 0x0661,
  31507. onehalf: 0x00BD,
  31508. onehangzhou: 0x3021,
  31509. oneideographicparen: 0x3220,
  31510. oneinferior: 0x2081,
  31511. onemonospace: 0xFF11,
  31512. onenumeratorbengali: 0x09F4,
  31513. oneoldstyle: 0xF731,
  31514. oneparen: 0x2474,
  31515. oneperiod: 0x2488,
  31516. onepersian: 0x06F1,
  31517. onequarter: 0x00BC,
  31518. oneroman: 0x2170,
  31519. onesuperior: 0x00B9,
  31520. onethai: 0x0E51,
  31521. onethird: 0x2153,
  31522. oogonek: 0x01EB,
  31523. oogonekmacron: 0x01ED,
  31524. oogurmukhi: 0x0A13,
  31525. oomatragurmukhi: 0x0A4B,
  31526. oopen: 0x0254,
  31527. oparen: 0x24AA,
  31528. openbullet: 0x25E6,
  31529. option: 0x2325,
  31530. ordfeminine: 0x00AA,
  31531. ordmasculine: 0x00BA,
  31532. orthogonal: 0x221F,
  31533. oshortdeva: 0x0912,
  31534. oshortvowelsigndeva: 0x094A,
  31535. oslash: 0x00F8,
  31536. oslashacute: 0x01FF,
  31537. osmallhiragana: 0x3049,
  31538. osmallkatakana: 0x30A9,
  31539. osmallkatakanahalfwidth: 0xFF6B,
  31540. ostrokeacute: 0x01FF,
  31541. osuperior: 0xF6F0,
  31542. otcyrillic: 0x047F,
  31543. otilde: 0x00F5,
  31544. otildeacute: 0x1E4D,
  31545. otildedieresis: 0x1E4F,
  31546. oubopomofo: 0x3121,
  31547. overline: 0x203E,
  31548. overlinecenterline: 0xFE4A,
  31549. overlinecmb: 0x0305,
  31550. overlinedashed: 0xFE49,
  31551. overlinedblwavy: 0xFE4C,
  31552. overlinewavy: 0xFE4B,
  31553. overscore: 0x00AF,
  31554. ovowelsignbengali: 0x09CB,
  31555. ovowelsigndeva: 0x094B,
  31556. ovowelsigngujarati: 0x0ACB,
  31557. p: 0x0070,
  31558. paampssquare: 0x3380,
  31559. paasentosquare: 0x332B,
  31560. pabengali: 0x09AA,
  31561. pacute: 0x1E55,
  31562. padeva: 0x092A,
  31563. pagedown: 0x21DF,
  31564. pageup: 0x21DE,
  31565. pagujarati: 0x0AAA,
  31566. pagurmukhi: 0x0A2A,
  31567. pahiragana: 0x3071,
  31568. paiyannoithai: 0x0E2F,
  31569. pakatakana: 0x30D1,
  31570. palatalizationcyrilliccmb: 0x0484,
  31571. palochkacyrillic: 0x04C0,
  31572. pansioskorean: 0x317F,
  31573. paragraph: 0x00B6,
  31574. parallel: 0x2225,
  31575. parenleft: 0x0028,
  31576. parenleftaltonearabic: 0xFD3E,
  31577. parenleftbt: 0xF8ED,
  31578. parenleftex: 0xF8EC,
  31579. parenleftinferior: 0x208D,
  31580. parenleftmonospace: 0xFF08,
  31581. parenleftsmall: 0xFE59,
  31582. parenleftsuperior: 0x207D,
  31583. parenlefttp: 0xF8EB,
  31584. parenleftvertical: 0xFE35,
  31585. parenright: 0x0029,
  31586. parenrightaltonearabic: 0xFD3F,
  31587. parenrightbt: 0xF8F8,
  31588. parenrightex: 0xF8F7,
  31589. parenrightinferior: 0x208E,
  31590. parenrightmonospace: 0xFF09,
  31591. parenrightsmall: 0xFE5A,
  31592. parenrightsuperior: 0x207E,
  31593. parenrighttp: 0xF8F6,
  31594. parenrightvertical: 0xFE36,
  31595. partialdiff: 0x2202,
  31596. paseqhebrew: 0x05C0,
  31597. pashtahebrew: 0x0599,
  31598. pasquare: 0x33A9,
  31599. patah: 0x05B7,
  31600. patah11: 0x05B7,
  31601. patah1d: 0x05B7,
  31602. patah2a: 0x05B7,
  31603. patahhebrew: 0x05B7,
  31604. patahnarrowhebrew: 0x05B7,
  31605. patahquarterhebrew: 0x05B7,
  31606. patahwidehebrew: 0x05B7,
  31607. pazerhebrew: 0x05A1,
  31608. pbopomofo: 0x3106,
  31609. pcircle: 0x24DF,
  31610. pdotaccent: 0x1E57,
  31611. pe: 0x05E4,
  31612. pecyrillic: 0x043F,
  31613. pedagesh: 0xFB44,
  31614. pedageshhebrew: 0xFB44,
  31615. peezisquare: 0x333B,
  31616. pefinaldageshhebrew: 0xFB43,
  31617. peharabic: 0x067E,
  31618. peharmenian: 0x057A,
  31619. pehebrew: 0x05E4,
  31620. pehfinalarabic: 0xFB57,
  31621. pehinitialarabic: 0xFB58,
  31622. pehiragana: 0x307A,
  31623. pehmedialarabic: 0xFB59,
  31624. pekatakana: 0x30DA,
  31625. pemiddlehookcyrillic: 0x04A7,
  31626. perafehebrew: 0xFB4E,
  31627. percent: 0x0025,
  31628. percentarabic: 0x066A,
  31629. percentmonospace: 0xFF05,
  31630. percentsmall: 0xFE6A,
  31631. period: 0x002E,
  31632. periodarmenian: 0x0589,
  31633. periodcentered: 0x00B7,
  31634. periodhalfwidth: 0xFF61,
  31635. periodinferior: 0xF6E7,
  31636. periodmonospace: 0xFF0E,
  31637. periodsmall: 0xFE52,
  31638. periodsuperior: 0xF6E8,
  31639. perispomenigreekcmb: 0x0342,
  31640. perpendicular: 0x22A5,
  31641. perthousand: 0x2030,
  31642. peseta: 0x20A7,
  31643. pfsquare: 0x338A,
  31644. phabengali: 0x09AB,
  31645. phadeva: 0x092B,
  31646. phagujarati: 0x0AAB,
  31647. phagurmukhi: 0x0A2B,
  31648. phi: 0x03C6,
  31649. phi1: 0x03D5,
  31650. phieuphacirclekorean: 0x327A,
  31651. phieuphaparenkorean: 0x321A,
  31652. phieuphcirclekorean: 0x326C,
  31653. phieuphkorean: 0x314D,
  31654. phieuphparenkorean: 0x320C,
  31655. philatin: 0x0278,
  31656. phinthuthai: 0x0E3A,
  31657. phisymbolgreek: 0x03D5,
  31658. phook: 0x01A5,
  31659. phophanthai: 0x0E1E,
  31660. phophungthai: 0x0E1C,
  31661. phosamphaothai: 0x0E20,
  31662. pi: 0x03C0,
  31663. pieupacirclekorean: 0x3273,
  31664. pieupaparenkorean: 0x3213,
  31665. pieupcieuckorean: 0x3176,
  31666. pieupcirclekorean: 0x3265,
  31667. pieupkiyeokkorean: 0x3172,
  31668. pieupkorean: 0x3142,
  31669. pieupparenkorean: 0x3205,
  31670. pieupsioskiyeokkorean: 0x3174,
  31671. pieupsioskorean: 0x3144,
  31672. pieupsiostikeutkorean: 0x3175,
  31673. pieupthieuthkorean: 0x3177,
  31674. pieuptikeutkorean: 0x3173,
  31675. pihiragana: 0x3074,
  31676. pikatakana: 0x30D4,
  31677. pisymbolgreek: 0x03D6,
  31678. piwrarmenian: 0x0583,
  31679. plus: 0x002B,
  31680. plusbelowcmb: 0x031F,
  31681. pluscircle: 0x2295,
  31682. plusminus: 0x00B1,
  31683. plusmod: 0x02D6,
  31684. plusmonospace: 0xFF0B,
  31685. plussmall: 0xFE62,
  31686. plussuperior: 0x207A,
  31687. pmonospace: 0xFF50,
  31688. pmsquare: 0x33D8,
  31689. pohiragana: 0x307D,
  31690. pointingindexdownwhite: 0x261F,
  31691. pointingindexleftwhite: 0x261C,
  31692. pointingindexrightwhite: 0x261E,
  31693. pointingindexupwhite: 0x261D,
  31694. pokatakana: 0x30DD,
  31695. poplathai: 0x0E1B,
  31696. postalmark: 0x3012,
  31697. postalmarkface: 0x3020,
  31698. pparen: 0x24AB,
  31699. precedes: 0x227A,
  31700. prescription: 0x211E,
  31701. primemod: 0x02B9,
  31702. primereversed: 0x2035,
  31703. product: 0x220F,
  31704. projective: 0x2305,
  31705. prolongedkana: 0x30FC,
  31706. propellor: 0x2318,
  31707. propersubset: 0x2282,
  31708. propersuperset: 0x2283,
  31709. proportion: 0x2237,
  31710. proportional: 0x221D,
  31711. psi: 0x03C8,
  31712. psicyrillic: 0x0471,
  31713. psilipneumatacyrilliccmb: 0x0486,
  31714. pssquare: 0x33B0,
  31715. puhiragana: 0x3077,
  31716. pukatakana: 0x30D7,
  31717. pvsquare: 0x33B4,
  31718. pwsquare: 0x33BA,
  31719. q: 0x0071,
  31720. qadeva: 0x0958,
  31721. qadmahebrew: 0x05A8,
  31722. qafarabic: 0x0642,
  31723. qaffinalarabic: 0xFED6,
  31724. qafinitialarabic: 0xFED7,
  31725. qafmedialarabic: 0xFED8,
  31726. qamats: 0x05B8,
  31727. qamats10: 0x05B8,
  31728. qamats1a: 0x05B8,
  31729. qamats1c: 0x05B8,
  31730. qamats27: 0x05B8,
  31731. qamats29: 0x05B8,
  31732. qamats33: 0x05B8,
  31733. qamatsde: 0x05B8,
  31734. qamatshebrew: 0x05B8,
  31735. qamatsnarrowhebrew: 0x05B8,
  31736. qamatsqatanhebrew: 0x05B8,
  31737. qamatsqatannarrowhebrew: 0x05B8,
  31738. qamatsqatanquarterhebrew: 0x05B8,
  31739. qamatsqatanwidehebrew: 0x05B8,
  31740. qamatsquarterhebrew: 0x05B8,
  31741. qamatswidehebrew: 0x05B8,
  31742. qarneyparahebrew: 0x059F,
  31743. qbopomofo: 0x3111,
  31744. qcircle: 0x24E0,
  31745. qhook: 0x02A0,
  31746. qmonospace: 0xFF51,
  31747. qof: 0x05E7,
  31748. qofdagesh: 0xFB47,
  31749. qofdageshhebrew: 0xFB47,
  31750. qofhebrew: 0x05E7,
  31751. qparen: 0x24AC,
  31752. quarternote: 0x2669,
  31753. qubuts: 0x05BB,
  31754. qubuts18: 0x05BB,
  31755. qubuts25: 0x05BB,
  31756. qubuts31: 0x05BB,
  31757. qubutshebrew: 0x05BB,
  31758. qubutsnarrowhebrew: 0x05BB,
  31759. qubutsquarterhebrew: 0x05BB,
  31760. qubutswidehebrew: 0x05BB,
  31761. question: 0x003F,
  31762. questionarabic: 0x061F,
  31763. questionarmenian: 0x055E,
  31764. questiondown: 0x00BF,
  31765. questiondownsmall: 0xF7BF,
  31766. questiongreek: 0x037E,
  31767. questionmonospace: 0xFF1F,
  31768. questionsmall: 0xF73F,
  31769. quotedbl: 0x0022,
  31770. quotedblbase: 0x201E,
  31771. quotedblleft: 0x201C,
  31772. quotedblmonospace: 0xFF02,
  31773. quotedblprime: 0x301E,
  31774. quotedblprimereversed: 0x301D,
  31775. quotedblright: 0x201D,
  31776. quoteleft: 0x2018,
  31777. quoteleftreversed: 0x201B,
  31778. quotereversed: 0x201B,
  31779. quoteright: 0x2019,
  31780. quoterightn: 0x0149,
  31781. quotesinglbase: 0x201A,
  31782. quotesingle: 0x0027,
  31783. quotesinglemonospace: 0xFF07,
  31784. r: 0x0072,
  31785. raarmenian: 0x057C,
  31786. rabengali: 0x09B0,
  31787. racute: 0x0155,
  31788. radeva: 0x0930,
  31789. radical: 0x221A,
  31790. radicalex: 0xF8E5,
  31791. radoverssquare: 0x33AE,
  31792. radoverssquaredsquare: 0x33AF,
  31793. radsquare: 0x33AD,
  31794. rafe: 0x05BF,
  31795. rafehebrew: 0x05BF,
  31796. ragujarati: 0x0AB0,
  31797. ragurmukhi: 0x0A30,
  31798. rahiragana: 0x3089,
  31799. rakatakana: 0x30E9,
  31800. rakatakanahalfwidth: 0xFF97,
  31801. ralowerdiagonalbengali: 0x09F1,
  31802. ramiddlediagonalbengali: 0x09F0,
  31803. ramshorn: 0x0264,
  31804. ratio: 0x2236,
  31805. rbopomofo: 0x3116,
  31806. rcaron: 0x0159,
  31807. rcedilla: 0x0157,
  31808. rcircle: 0x24E1,
  31809. rcommaaccent: 0x0157,
  31810. rdblgrave: 0x0211,
  31811. rdotaccent: 0x1E59,
  31812. rdotbelow: 0x1E5B,
  31813. rdotbelowmacron: 0x1E5D,
  31814. referencemark: 0x203B,
  31815. reflexsubset: 0x2286,
  31816. reflexsuperset: 0x2287,
  31817. registered: 0x00AE,
  31818. registersans: 0xF8E8,
  31819. registerserif: 0xF6DA,
  31820. reharabic: 0x0631,
  31821. reharmenian: 0x0580,
  31822. rehfinalarabic: 0xFEAE,
  31823. rehiragana: 0x308C,
  31824. rekatakana: 0x30EC,
  31825. rekatakanahalfwidth: 0xFF9A,
  31826. resh: 0x05E8,
  31827. reshdageshhebrew: 0xFB48,
  31828. reshhebrew: 0x05E8,
  31829. reversedtilde: 0x223D,
  31830. reviahebrew: 0x0597,
  31831. reviamugrashhebrew: 0x0597,
  31832. revlogicalnot: 0x2310,
  31833. rfishhook: 0x027E,
  31834. rfishhookreversed: 0x027F,
  31835. rhabengali: 0x09DD,
  31836. rhadeva: 0x095D,
  31837. rho: 0x03C1,
  31838. rhook: 0x027D,
  31839. rhookturned: 0x027B,
  31840. rhookturnedsuperior: 0x02B5,
  31841. rhosymbolgreek: 0x03F1,
  31842. rhotichookmod: 0x02DE,
  31843. rieulacirclekorean: 0x3271,
  31844. rieulaparenkorean: 0x3211,
  31845. rieulcirclekorean: 0x3263,
  31846. rieulhieuhkorean: 0x3140,
  31847. rieulkiyeokkorean: 0x313A,
  31848. rieulkiyeoksioskorean: 0x3169,
  31849. rieulkorean: 0x3139,
  31850. rieulmieumkorean: 0x313B,
  31851. rieulpansioskorean: 0x316C,
  31852. rieulparenkorean: 0x3203,
  31853. rieulphieuphkorean: 0x313F,
  31854. rieulpieupkorean: 0x313C,
  31855. rieulpieupsioskorean: 0x316B,
  31856. rieulsioskorean: 0x313D,
  31857. rieulthieuthkorean: 0x313E,
  31858. rieultikeutkorean: 0x316A,
  31859. rieulyeorinhieuhkorean: 0x316D,
  31860. rightangle: 0x221F,
  31861. righttackbelowcmb: 0x0319,
  31862. righttriangle: 0x22BF,
  31863. rihiragana: 0x308A,
  31864. rikatakana: 0x30EA,
  31865. rikatakanahalfwidth: 0xFF98,
  31866. ring: 0x02DA,
  31867. ringbelowcmb: 0x0325,
  31868. ringcmb: 0x030A,
  31869. ringhalfleft: 0x02BF,
  31870. ringhalfleftarmenian: 0x0559,
  31871. ringhalfleftbelowcmb: 0x031C,
  31872. ringhalfleftcentered: 0x02D3,
  31873. ringhalfright: 0x02BE,
  31874. ringhalfrightbelowcmb: 0x0339,
  31875. ringhalfrightcentered: 0x02D2,
  31876. rinvertedbreve: 0x0213,
  31877. rittorusquare: 0x3351,
  31878. rlinebelow: 0x1E5F,
  31879. rlongleg: 0x027C,
  31880. rlonglegturned: 0x027A,
  31881. rmonospace: 0xFF52,
  31882. rohiragana: 0x308D,
  31883. rokatakana: 0x30ED,
  31884. rokatakanahalfwidth: 0xFF9B,
  31885. roruathai: 0x0E23,
  31886. rparen: 0x24AD,
  31887. rrabengali: 0x09DC,
  31888. rradeva: 0x0931,
  31889. rragurmukhi: 0x0A5C,
  31890. rreharabic: 0x0691,
  31891. rrehfinalarabic: 0xFB8D,
  31892. rrvocalicbengali: 0x09E0,
  31893. rrvocalicdeva: 0x0960,
  31894. rrvocalicgujarati: 0x0AE0,
  31895. rrvocalicvowelsignbengali: 0x09C4,
  31896. rrvocalicvowelsigndeva: 0x0944,
  31897. rrvocalicvowelsigngujarati: 0x0AC4,
  31898. rsuperior: 0xF6F1,
  31899. rtblock: 0x2590,
  31900. rturned: 0x0279,
  31901. rturnedsuperior: 0x02B4,
  31902. ruhiragana: 0x308B,
  31903. rukatakana: 0x30EB,
  31904. rukatakanahalfwidth: 0xFF99,
  31905. rupeemarkbengali: 0x09F2,
  31906. rupeesignbengali: 0x09F3,
  31907. rupiah: 0xF6DD,
  31908. ruthai: 0x0E24,
  31909. rvocalicbengali: 0x098B,
  31910. rvocalicdeva: 0x090B,
  31911. rvocalicgujarati: 0x0A8B,
  31912. rvocalicvowelsignbengali: 0x09C3,
  31913. rvocalicvowelsigndeva: 0x0943,
  31914. rvocalicvowelsigngujarati: 0x0AC3,
  31915. s: 0x0073,
  31916. sabengali: 0x09B8,
  31917. sacute: 0x015B,
  31918. sacutedotaccent: 0x1E65,
  31919. sadarabic: 0x0635,
  31920. sadeva: 0x0938,
  31921. sadfinalarabic: 0xFEBA,
  31922. sadinitialarabic: 0xFEBB,
  31923. sadmedialarabic: 0xFEBC,
  31924. sagujarati: 0x0AB8,
  31925. sagurmukhi: 0x0A38,
  31926. sahiragana: 0x3055,
  31927. sakatakana: 0x30B5,
  31928. sakatakanahalfwidth: 0xFF7B,
  31929. sallallahoualayhewasallamarabic: 0xFDFA,
  31930. samekh: 0x05E1,
  31931. samekhdagesh: 0xFB41,
  31932. samekhdageshhebrew: 0xFB41,
  31933. samekhhebrew: 0x05E1,
  31934. saraaathai: 0x0E32,
  31935. saraaethai: 0x0E41,
  31936. saraaimaimalaithai: 0x0E44,
  31937. saraaimaimuanthai: 0x0E43,
  31938. saraamthai: 0x0E33,
  31939. saraathai: 0x0E30,
  31940. saraethai: 0x0E40,
  31941. saraiileftthai: 0xF886,
  31942. saraiithai: 0x0E35,
  31943. saraileftthai: 0xF885,
  31944. saraithai: 0x0E34,
  31945. saraothai: 0x0E42,
  31946. saraueeleftthai: 0xF888,
  31947. saraueethai: 0x0E37,
  31948. saraueleftthai: 0xF887,
  31949. sarauethai: 0x0E36,
  31950. sarauthai: 0x0E38,
  31951. sarauuthai: 0x0E39,
  31952. sbopomofo: 0x3119,
  31953. scaron: 0x0161,
  31954. scarondotaccent: 0x1E67,
  31955. scedilla: 0x015F,
  31956. schwa: 0x0259,
  31957. schwacyrillic: 0x04D9,
  31958. schwadieresiscyrillic: 0x04DB,
  31959. schwahook: 0x025A,
  31960. scircle: 0x24E2,
  31961. scircumflex: 0x015D,
  31962. scommaaccent: 0x0219,
  31963. sdotaccent: 0x1E61,
  31964. sdotbelow: 0x1E63,
  31965. sdotbelowdotaccent: 0x1E69,
  31966. seagullbelowcmb: 0x033C,
  31967. second: 0x2033,
  31968. secondtonechinese: 0x02CA,
  31969. section: 0x00A7,
  31970. seenarabic: 0x0633,
  31971. seenfinalarabic: 0xFEB2,
  31972. seeninitialarabic: 0xFEB3,
  31973. seenmedialarabic: 0xFEB4,
  31974. segol: 0x05B6,
  31975. segol13: 0x05B6,
  31976. segol1f: 0x05B6,
  31977. segol2c: 0x05B6,
  31978. segolhebrew: 0x05B6,
  31979. segolnarrowhebrew: 0x05B6,
  31980. segolquarterhebrew: 0x05B6,
  31981. segoltahebrew: 0x0592,
  31982. segolwidehebrew: 0x05B6,
  31983. seharmenian: 0x057D,
  31984. sehiragana: 0x305B,
  31985. sekatakana: 0x30BB,
  31986. sekatakanahalfwidth: 0xFF7E,
  31987. semicolon: 0x003B,
  31988. semicolonarabic: 0x061B,
  31989. semicolonmonospace: 0xFF1B,
  31990. semicolonsmall: 0xFE54,
  31991. semivoicedmarkkana: 0x309C,
  31992. semivoicedmarkkanahalfwidth: 0xFF9F,
  31993. sentisquare: 0x3322,
  31994. sentosquare: 0x3323,
  31995. seven: 0x0037,
  31996. sevenarabic: 0x0667,
  31997. sevenbengali: 0x09ED,
  31998. sevencircle: 0x2466,
  31999. sevencircleinversesansserif: 0x2790,
  32000. sevendeva: 0x096D,
  32001. seveneighths: 0x215E,
  32002. sevengujarati: 0x0AED,
  32003. sevengurmukhi: 0x0A6D,
  32004. sevenhackarabic: 0x0667,
  32005. sevenhangzhou: 0x3027,
  32006. sevenideographicparen: 0x3226,
  32007. seveninferior: 0x2087,
  32008. sevenmonospace: 0xFF17,
  32009. sevenoldstyle: 0xF737,
  32010. sevenparen: 0x247A,
  32011. sevenperiod: 0x248E,
  32012. sevenpersian: 0x06F7,
  32013. sevenroman: 0x2176,
  32014. sevensuperior: 0x2077,
  32015. seventeencircle: 0x2470,
  32016. seventeenparen: 0x2484,
  32017. seventeenperiod: 0x2498,
  32018. seventhai: 0x0E57,
  32019. sfthyphen: 0x00AD,
  32020. shaarmenian: 0x0577,
  32021. shabengali: 0x09B6,
  32022. shacyrillic: 0x0448,
  32023. shaddaarabic: 0x0651,
  32024. shaddadammaarabic: 0xFC61,
  32025. shaddadammatanarabic: 0xFC5E,
  32026. shaddafathaarabic: 0xFC60,
  32027. shaddakasraarabic: 0xFC62,
  32028. shaddakasratanarabic: 0xFC5F,
  32029. shade: 0x2592,
  32030. shadedark: 0x2593,
  32031. shadelight: 0x2591,
  32032. shademedium: 0x2592,
  32033. shadeva: 0x0936,
  32034. shagujarati: 0x0AB6,
  32035. shagurmukhi: 0x0A36,
  32036. shalshelethebrew: 0x0593,
  32037. shbopomofo: 0x3115,
  32038. shchacyrillic: 0x0449,
  32039. sheenarabic: 0x0634,
  32040. sheenfinalarabic: 0xFEB6,
  32041. sheeninitialarabic: 0xFEB7,
  32042. sheenmedialarabic: 0xFEB8,
  32043. sheicoptic: 0x03E3,
  32044. sheqel: 0x20AA,
  32045. sheqelhebrew: 0x20AA,
  32046. sheva: 0x05B0,
  32047. sheva115: 0x05B0,
  32048. sheva15: 0x05B0,
  32049. sheva22: 0x05B0,
  32050. sheva2e: 0x05B0,
  32051. shevahebrew: 0x05B0,
  32052. shevanarrowhebrew: 0x05B0,
  32053. shevaquarterhebrew: 0x05B0,
  32054. shevawidehebrew: 0x05B0,
  32055. shhacyrillic: 0x04BB,
  32056. shimacoptic: 0x03ED,
  32057. shin: 0x05E9,
  32058. shindagesh: 0xFB49,
  32059. shindageshhebrew: 0xFB49,
  32060. shindageshshindot: 0xFB2C,
  32061. shindageshshindothebrew: 0xFB2C,
  32062. shindageshsindot: 0xFB2D,
  32063. shindageshsindothebrew: 0xFB2D,
  32064. shindothebrew: 0x05C1,
  32065. shinhebrew: 0x05E9,
  32066. shinshindot: 0xFB2A,
  32067. shinshindothebrew: 0xFB2A,
  32068. shinsindot: 0xFB2B,
  32069. shinsindothebrew: 0xFB2B,
  32070. shook: 0x0282,
  32071. sigma: 0x03C3,
  32072. sigma1: 0x03C2,
  32073. sigmafinal: 0x03C2,
  32074. sigmalunatesymbolgreek: 0x03F2,
  32075. sihiragana: 0x3057,
  32076. sikatakana: 0x30B7,
  32077. sikatakanahalfwidth: 0xFF7C,
  32078. siluqhebrew: 0x05BD,
  32079. siluqlefthebrew: 0x05BD,
  32080. similar: 0x223C,
  32081. sindothebrew: 0x05C2,
  32082. siosacirclekorean: 0x3274,
  32083. siosaparenkorean: 0x3214,
  32084. sioscieuckorean: 0x317E,
  32085. sioscirclekorean: 0x3266,
  32086. sioskiyeokkorean: 0x317A,
  32087. sioskorean: 0x3145,
  32088. siosnieunkorean: 0x317B,
  32089. siosparenkorean: 0x3206,
  32090. siospieupkorean: 0x317D,
  32091. siostikeutkorean: 0x317C,
  32092. six: 0x0036,
  32093. sixarabic: 0x0666,
  32094. sixbengali: 0x09EC,
  32095. sixcircle: 0x2465,
  32096. sixcircleinversesansserif: 0x278F,
  32097. sixdeva: 0x096C,
  32098. sixgujarati: 0x0AEC,
  32099. sixgurmukhi: 0x0A6C,
  32100. sixhackarabic: 0x0666,
  32101. sixhangzhou: 0x3026,
  32102. sixideographicparen: 0x3225,
  32103. sixinferior: 0x2086,
  32104. sixmonospace: 0xFF16,
  32105. sixoldstyle: 0xF736,
  32106. sixparen: 0x2479,
  32107. sixperiod: 0x248D,
  32108. sixpersian: 0x06F6,
  32109. sixroman: 0x2175,
  32110. sixsuperior: 0x2076,
  32111. sixteencircle: 0x246F,
  32112. sixteencurrencydenominatorbengali: 0x09F9,
  32113. sixteenparen: 0x2483,
  32114. sixteenperiod: 0x2497,
  32115. sixthai: 0x0E56,
  32116. slash: 0x002F,
  32117. slashmonospace: 0xFF0F,
  32118. slong: 0x017F,
  32119. slongdotaccent: 0x1E9B,
  32120. smileface: 0x263A,
  32121. smonospace: 0xFF53,
  32122. sofpasuqhebrew: 0x05C3,
  32123. softhyphen: 0x00AD,
  32124. softsigncyrillic: 0x044C,
  32125. sohiragana: 0x305D,
  32126. sokatakana: 0x30BD,
  32127. sokatakanahalfwidth: 0xFF7F,
  32128. soliduslongoverlaycmb: 0x0338,
  32129. solidusshortoverlaycmb: 0x0337,
  32130. sorusithai: 0x0E29,
  32131. sosalathai: 0x0E28,
  32132. sosothai: 0x0E0B,
  32133. sosuathai: 0x0E2A,
  32134. space: 0x0020,
  32135. spacehackarabic: 0x0020,
  32136. spade: 0x2660,
  32137. spadesuitblack: 0x2660,
  32138. spadesuitwhite: 0x2664,
  32139. sparen: 0x24AE,
  32140. squarebelowcmb: 0x033B,
  32141. squarecc: 0x33C4,
  32142. squarecm: 0x339D,
  32143. squarediagonalcrosshatchfill: 0x25A9,
  32144. squarehorizontalfill: 0x25A4,
  32145. squarekg: 0x338F,
  32146. squarekm: 0x339E,
  32147. squarekmcapital: 0x33CE,
  32148. squareln: 0x33D1,
  32149. squarelog: 0x33D2,
  32150. squaremg: 0x338E,
  32151. squaremil: 0x33D5,
  32152. squaremm: 0x339C,
  32153. squaremsquared: 0x33A1,
  32154. squareorthogonalcrosshatchfill: 0x25A6,
  32155. squareupperlefttolowerrightfill: 0x25A7,
  32156. squareupperrighttolowerleftfill: 0x25A8,
  32157. squareverticalfill: 0x25A5,
  32158. squarewhitewithsmallblack: 0x25A3,
  32159. srsquare: 0x33DB,
  32160. ssabengali: 0x09B7,
  32161. ssadeva: 0x0937,
  32162. ssagujarati: 0x0AB7,
  32163. ssangcieuckorean: 0x3149,
  32164. ssanghieuhkorean: 0x3185,
  32165. ssangieungkorean: 0x3180,
  32166. ssangkiyeokkorean: 0x3132,
  32167. ssangnieunkorean: 0x3165,
  32168. ssangpieupkorean: 0x3143,
  32169. ssangsioskorean: 0x3146,
  32170. ssangtikeutkorean: 0x3138,
  32171. ssuperior: 0xF6F2,
  32172. sterling: 0x00A3,
  32173. sterlingmonospace: 0xFFE1,
  32174. strokelongoverlaycmb: 0x0336,
  32175. strokeshortoverlaycmb: 0x0335,
  32176. subset: 0x2282,
  32177. subsetnotequal: 0x228A,
  32178. subsetorequal: 0x2286,
  32179. succeeds: 0x227B,
  32180. suchthat: 0x220B,
  32181. suhiragana: 0x3059,
  32182. sukatakana: 0x30B9,
  32183. sukatakanahalfwidth: 0xFF7D,
  32184. sukunarabic: 0x0652,
  32185. summation: 0x2211,
  32186. sun: 0x263C,
  32187. superset: 0x2283,
  32188. supersetnotequal: 0x228B,
  32189. supersetorequal: 0x2287,
  32190. svsquare: 0x33DC,
  32191. syouwaerasquare: 0x337C,
  32192. t: 0x0074,
  32193. tabengali: 0x09A4,
  32194. tackdown: 0x22A4,
  32195. tackleft: 0x22A3,
  32196. tadeva: 0x0924,
  32197. tagujarati: 0x0AA4,
  32198. tagurmukhi: 0x0A24,
  32199. taharabic: 0x0637,
  32200. tahfinalarabic: 0xFEC2,
  32201. tahinitialarabic: 0xFEC3,
  32202. tahiragana: 0x305F,
  32203. tahmedialarabic: 0xFEC4,
  32204. taisyouerasquare: 0x337D,
  32205. takatakana: 0x30BF,
  32206. takatakanahalfwidth: 0xFF80,
  32207. tatweelarabic: 0x0640,
  32208. tau: 0x03C4,
  32209. tav: 0x05EA,
  32210. tavdages: 0xFB4A,
  32211. tavdagesh: 0xFB4A,
  32212. tavdageshhebrew: 0xFB4A,
  32213. tavhebrew: 0x05EA,
  32214. tbar: 0x0167,
  32215. tbopomofo: 0x310A,
  32216. tcaron: 0x0165,
  32217. tccurl: 0x02A8,
  32218. tcedilla: 0x0163,
  32219. tcheharabic: 0x0686,
  32220. tchehfinalarabic: 0xFB7B,
  32221. tchehinitialarabic: 0xFB7C,
  32222. tchehmedialarabic: 0xFB7D,
  32223. tcircle: 0x24E3,
  32224. tcircumflexbelow: 0x1E71,
  32225. tcommaaccent: 0x0163,
  32226. tdieresis: 0x1E97,
  32227. tdotaccent: 0x1E6B,
  32228. tdotbelow: 0x1E6D,
  32229. tecyrillic: 0x0442,
  32230. tedescendercyrillic: 0x04AD,
  32231. teharabic: 0x062A,
  32232. tehfinalarabic: 0xFE96,
  32233. tehhahinitialarabic: 0xFCA2,
  32234. tehhahisolatedarabic: 0xFC0C,
  32235. tehinitialarabic: 0xFE97,
  32236. tehiragana: 0x3066,
  32237. tehjeeminitialarabic: 0xFCA1,
  32238. tehjeemisolatedarabic: 0xFC0B,
  32239. tehmarbutaarabic: 0x0629,
  32240. tehmarbutafinalarabic: 0xFE94,
  32241. tehmedialarabic: 0xFE98,
  32242. tehmeeminitialarabic: 0xFCA4,
  32243. tehmeemisolatedarabic: 0xFC0E,
  32244. tehnoonfinalarabic: 0xFC73,
  32245. tekatakana: 0x30C6,
  32246. tekatakanahalfwidth: 0xFF83,
  32247. telephone: 0x2121,
  32248. telephoneblack: 0x260E,
  32249. telishagedolahebrew: 0x05A0,
  32250. telishaqetanahebrew: 0x05A9,
  32251. tencircle: 0x2469,
  32252. tenideographicparen: 0x3229,
  32253. tenparen: 0x247D,
  32254. tenperiod: 0x2491,
  32255. tenroman: 0x2179,
  32256. tesh: 0x02A7,
  32257. tet: 0x05D8,
  32258. tetdagesh: 0xFB38,
  32259. tetdageshhebrew: 0xFB38,
  32260. tethebrew: 0x05D8,
  32261. tetsecyrillic: 0x04B5,
  32262. tevirhebrew: 0x059B,
  32263. tevirlefthebrew: 0x059B,
  32264. thabengali: 0x09A5,
  32265. thadeva: 0x0925,
  32266. thagujarati: 0x0AA5,
  32267. thagurmukhi: 0x0A25,
  32268. thalarabic: 0x0630,
  32269. thalfinalarabic: 0xFEAC,
  32270. thanthakhatlowleftthai: 0xF898,
  32271. thanthakhatlowrightthai: 0xF897,
  32272. thanthakhatthai: 0x0E4C,
  32273. thanthakhatupperleftthai: 0xF896,
  32274. theharabic: 0x062B,
  32275. thehfinalarabic: 0xFE9A,
  32276. thehinitialarabic: 0xFE9B,
  32277. thehmedialarabic: 0xFE9C,
  32278. thereexists: 0x2203,
  32279. therefore: 0x2234,
  32280. theta: 0x03B8,
  32281. theta1: 0x03D1,
  32282. thetasymbolgreek: 0x03D1,
  32283. thieuthacirclekorean: 0x3279,
  32284. thieuthaparenkorean: 0x3219,
  32285. thieuthcirclekorean: 0x326B,
  32286. thieuthkorean: 0x314C,
  32287. thieuthparenkorean: 0x320B,
  32288. thirteencircle: 0x246C,
  32289. thirteenparen: 0x2480,
  32290. thirteenperiod: 0x2494,
  32291. thonangmonthothai: 0x0E11,
  32292. thook: 0x01AD,
  32293. thophuthaothai: 0x0E12,
  32294. thorn: 0x00FE,
  32295. thothahanthai: 0x0E17,
  32296. thothanthai: 0x0E10,
  32297. thothongthai: 0x0E18,
  32298. thothungthai: 0x0E16,
  32299. thousandcyrillic: 0x0482,
  32300. thousandsseparatorarabic: 0x066C,
  32301. thousandsseparatorpersian: 0x066C,
  32302. three: 0x0033,
  32303. threearabic: 0x0663,
  32304. threebengali: 0x09E9,
  32305. threecircle: 0x2462,
  32306. threecircleinversesansserif: 0x278C,
  32307. threedeva: 0x0969,
  32308. threeeighths: 0x215C,
  32309. threegujarati: 0x0AE9,
  32310. threegurmukhi: 0x0A69,
  32311. threehackarabic: 0x0663,
  32312. threehangzhou: 0x3023,
  32313. threeideographicparen: 0x3222,
  32314. threeinferior: 0x2083,
  32315. threemonospace: 0xFF13,
  32316. threenumeratorbengali: 0x09F6,
  32317. threeoldstyle: 0xF733,
  32318. threeparen: 0x2476,
  32319. threeperiod: 0x248A,
  32320. threepersian: 0x06F3,
  32321. threequarters: 0x00BE,
  32322. threequartersemdash: 0xF6DE,
  32323. threeroman: 0x2172,
  32324. threesuperior: 0x00B3,
  32325. threethai: 0x0E53,
  32326. thzsquare: 0x3394,
  32327. tihiragana: 0x3061,
  32328. tikatakana: 0x30C1,
  32329. tikatakanahalfwidth: 0xFF81,
  32330. tikeutacirclekorean: 0x3270,
  32331. tikeutaparenkorean: 0x3210,
  32332. tikeutcirclekorean: 0x3262,
  32333. tikeutkorean: 0x3137,
  32334. tikeutparenkorean: 0x3202,
  32335. tilde: 0x02DC,
  32336. tildebelowcmb: 0x0330,
  32337. tildecmb: 0x0303,
  32338. tildecomb: 0x0303,
  32339. tildedoublecmb: 0x0360,
  32340. tildeoperator: 0x223C,
  32341. tildeoverlaycmb: 0x0334,
  32342. tildeverticalcmb: 0x033E,
  32343. timescircle: 0x2297,
  32344. tipehahebrew: 0x0596,
  32345. tipehalefthebrew: 0x0596,
  32346. tippigurmukhi: 0x0A70,
  32347. titlocyrilliccmb: 0x0483,
  32348. tiwnarmenian: 0x057F,
  32349. tlinebelow: 0x1E6F,
  32350. tmonospace: 0xFF54,
  32351. toarmenian: 0x0569,
  32352. tohiragana: 0x3068,
  32353. tokatakana: 0x30C8,
  32354. tokatakanahalfwidth: 0xFF84,
  32355. tonebarextrahighmod: 0x02E5,
  32356. tonebarextralowmod: 0x02E9,
  32357. tonebarhighmod: 0x02E6,
  32358. tonebarlowmod: 0x02E8,
  32359. tonebarmidmod: 0x02E7,
  32360. tonefive: 0x01BD,
  32361. tonesix: 0x0185,
  32362. tonetwo: 0x01A8,
  32363. tonos: 0x0384,
  32364. tonsquare: 0x3327,
  32365. topatakthai: 0x0E0F,
  32366. tortoiseshellbracketleft: 0x3014,
  32367. tortoiseshellbracketleftsmall: 0xFE5D,
  32368. tortoiseshellbracketleftvertical: 0xFE39,
  32369. tortoiseshellbracketright: 0x3015,
  32370. tortoiseshellbracketrightsmall: 0xFE5E,
  32371. tortoiseshellbracketrightvertical: 0xFE3A,
  32372. totaothai: 0x0E15,
  32373. tpalatalhook: 0x01AB,
  32374. tparen: 0x24AF,
  32375. trademark: 0x2122,
  32376. trademarksans: 0xF8EA,
  32377. trademarkserif: 0xF6DB,
  32378. tretroflexhook: 0x0288,
  32379. triagdn: 0x25BC,
  32380. triaglf: 0x25C4,
  32381. triagrt: 0x25BA,
  32382. triagup: 0x25B2,
  32383. ts: 0x02A6,
  32384. tsadi: 0x05E6,
  32385. tsadidagesh: 0xFB46,
  32386. tsadidageshhebrew: 0xFB46,
  32387. tsadihebrew: 0x05E6,
  32388. tsecyrillic: 0x0446,
  32389. tsere: 0x05B5,
  32390. tsere12: 0x05B5,
  32391. tsere1e: 0x05B5,
  32392. tsere2b: 0x05B5,
  32393. tserehebrew: 0x05B5,
  32394. tserenarrowhebrew: 0x05B5,
  32395. tserequarterhebrew: 0x05B5,
  32396. tserewidehebrew: 0x05B5,
  32397. tshecyrillic: 0x045B,
  32398. tsuperior: 0xF6F3,
  32399. ttabengali: 0x099F,
  32400. ttadeva: 0x091F,
  32401. ttagujarati: 0x0A9F,
  32402. ttagurmukhi: 0x0A1F,
  32403. tteharabic: 0x0679,
  32404. ttehfinalarabic: 0xFB67,
  32405. ttehinitialarabic: 0xFB68,
  32406. ttehmedialarabic: 0xFB69,
  32407. tthabengali: 0x09A0,
  32408. tthadeva: 0x0920,
  32409. tthagujarati: 0x0AA0,
  32410. tthagurmukhi: 0x0A20,
  32411. tturned: 0x0287,
  32412. tuhiragana: 0x3064,
  32413. tukatakana: 0x30C4,
  32414. tukatakanahalfwidth: 0xFF82,
  32415. tusmallhiragana: 0x3063,
  32416. tusmallkatakana: 0x30C3,
  32417. tusmallkatakanahalfwidth: 0xFF6F,
  32418. twelvecircle: 0x246B,
  32419. twelveparen: 0x247F,
  32420. twelveperiod: 0x2493,
  32421. twelveroman: 0x217B,
  32422. twentycircle: 0x2473,
  32423. twentyhangzhou: 0x5344,
  32424. twentyparen: 0x2487,
  32425. twentyperiod: 0x249B,
  32426. two: 0x0032,
  32427. twoarabic: 0x0662,
  32428. twobengali: 0x09E8,
  32429. twocircle: 0x2461,
  32430. twocircleinversesansserif: 0x278B,
  32431. twodeva: 0x0968,
  32432. twodotenleader: 0x2025,
  32433. twodotleader: 0x2025,
  32434. twodotleadervertical: 0xFE30,
  32435. twogujarati: 0x0AE8,
  32436. twogurmukhi: 0x0A68,
  32437. twohackarabic: 0x0662,
  32438. twohangzhou: 0x3022,
  32439. twoideographicparen: 0x3221,
  32440. twoinferior: 0x2082,
  32441. twomonospace: 0xFF12,
  32442. twonumeratorbengali: 0x09F5,
  32443. twooldstyle: 0xF732,
  32444. twoparen: 0x2475,
  32445. twoperiod: 0x2489,
  32446. twopersian: 0x06F2,
  32447. tworoman: 0x2171,
  32448. twostroke: 0x01BB,
  32449. twosuperior: 0x00B2,
  32450. twothai: 0x0E52,
  32451. twothirds: 0x2154,
  32452. u: 0x0075,
  32453. uacute: 0x00FA,
  32454. ubar: 0x0289,
  32455. ubengali: 0x0989,
  32456. ubopomofo: 0x3128,
  32457. ubreve: 0x016D,
  32458. ucaron: 0x01D4,
  32459. ucircle: 0x24E4,
  32460. ucircumflex: 0x00FB,
  32461. ucircumflexbelow: 0x1E77,
  32462. ucyrillic: 0x0443,
  32463. udattadeva: 0x0951,
  32464. udblacute: 0x0171,
  32465. udblgrave: 0x0215,
  32466. udeva: 0x0909,
  32467. udieresis: 0x00FC,
  32468. udieresisacute: 0x01D8,
  32469. udieresisbelow: 0x1E73,
  32470. udieresiscaron: 0x01DA,
  32471. udieresiscyrillic: 0x04F1,
  32472. udieresisgrave: 0x01DC,
  32473. udieresismacron: 0x01D6,
  32474. udotbelow: 0x1EE5,
  32475. ugrave: 0x00F9,
  32476. ugujarati: 0x0A89,
  32477. ugurmukhi: 0x0A09,
  32478. uhiragana: 0x3046,
  32479. uhookabove: 0x1EE7,
  32480. uhorn: 0x01B0,
  32481. uhornacute: 0x1EE9,
  32482. uhorndotbelow: 0x1EF1,
  32483. uhorngrave: 0x1EEB,
  32484. uhornhookabove: 0x1EED,
  32485. uhorntilde: 0x1EEF,
  32486. uhungarumlaut: 0x0171,
  32487. uhungarumlautcyrillic: 0x04F3,
  32488. uinvertedbreve: 0x0217,
  32489. ukatakana: 0x30A6,
  32490. ukatakanahalfwidth: 0xFF73,
  32491. ukcyrillic: 0x0479,
  32492. ukorean: 0x315C,
  32493. umacron: 0x016B,
  32494. umacroncyrillic: 0x04EF,
  32495. umacrondieresis: 0x1E7B,
  32496. umatragurmukhi: 0x0A41,
  32497. umonospace: 0xFF55,
  32498. underscore: 0x005F,
  32499. underscoredbl: 0x2017,
  32500. underscoremonospace: 0xFF3F,
  32501. underscorevertical: 0xFE33,
  32502. underscorewavy: 0xFE4F,
  32503. union: 0x222A,
  32504. universal: 0x2200,
  32505. uogonek: 0x0173,
  32506. uparen: 0x24B0,
  32507. upblock: 0x2580,
  32508. upperdothebrew: 0x05C4,
  32509. upsilon: 0x03C5,
  32510. upsilondieresis: 0x03CB,
  32511. upsilondieresistonos: 0x03B0,
  32512. upsilonlatin: 0x028A,
  32513. upsilontonos: 0x03CD,
  32514. uptackbelowcmb: 0x031D,
  32515. uptackmod: 0x02D4,
  32516. uragurmukhi: 0x0A73,
  32517. uring: 0x016F,
  32518. ushortcyrillic: 0x045E,
  32519. usmallhiragana: 0x3045,
  32520. usmallkatakana: 0x30A5,
  32521. usmallkatakanahalfwidth: 0xFF69,
  32522. ustraightcyrillic: 0x04AF,
  32523. ustraightstrokecyrillic: 0x04B1,
  32524. utilde: 0x0169,
  32525. utildeacute: 0x1E79,
  32526. utildebelow: 0x1E75,
  32527. uubengali: 0x098A,
  32528. uudeva: 0x090A,
  32529. uugujarati: 0x0A8A,
  32530. uugurmukhi: 0x0A0A,
  32531. uumatragurmukhi: 0x0A42,
  32532. uuvowelsignbengali: 0x09C2,
  32533. uuvowelsigndeva: 0x0942,
  32534. uuvowelsigngujarati: 0x0AC2,
  32535. uvowelsignbengali: 0x09C1,
  32536. uvowelsigndeva: 0x0941,
  32537. uvowelsigngujarati: 0x0AC1,
  32538. v: 0x0076,
  32539. vadeva: 0x0935,
  32540. vagujarati: 0x0AB5,
  32541. vagurmukhi: 0x0A35,
  32542. vakatakana: 0x30F7,
  32543. vav: 0x05D5,
  32544. vavdagesh: 0xFB35,
  32545. vavdagesh65: 0xFB35,
  32546. vavdageshhebrew: 0xFB35,
  32547. vavhebrew: 0x05D5,
  32548. vavholam: 0xFB4B,
  32549. vavholamhebrew: 0xFB4B,
  32550. vavvavhebrew: 0x05F0,
  32551. vavyodhebrew: 0x05F1,
  32552. vcircle: 0x24E5,
  32553. vdotbelow: 0x1E7F,
  32554. vecyrillic: 0x0432,
  32555. veharabic: 0x06A4,
  32556. vehfinalarabic: 0xFB6B,
  32557. vehinitialarabic: 0xFB6C,
  32558. vehmedialarabic: 0xFB6D,
  32559. vekatakana: 0x30F9,
  32560. venus: 0x2640,
  32561. verticalbar: 0x007C,
  32562. verticallineabovecmb: 0x030D,
  32563. verticallinebelowcmb: 0x0329,
  32564. verticallinelowmod: 0x02CC,
  32565. verticallinemod: 0x02C8,
  32566. vewarmenian: 0x057E,
  32567. vhook: 0x028B,
  32568. vikatakana: 0x30F8,
  32569. viramabengali: 0x09CD,
  32570. viramadeva: 0x094D,
  32571. viramagujarati: 0x0ACD,
  32572. visargabengali: 0x0983,
  32573. visargadeva: 0x0903,
  32574. visargagujarati: 0x0A83,
  32575. vmonospace: 0xFF56,
  32576. voarmenian: 0x0578,
  32577. voicediterationhiragana: 0x309E,
  32578. voicediterationkatakana: 0x30FE,
  32579. voicedmarkkana: 0x309B,
  32580. voicedmarkkanahalfwidth: 0xFF9E,
  32581. vokatakana: 0x30FA,
  32582. vparen: 0x24B1,
  32583. vtilde: 0x1E7D,
  32584. vturned: 0x028C,
  32585. vuhiragana: 0x3094,
  32586. vukatakana: 0x30F4,
  32587. w: 0x0077,
  32588. wacute: 0x1E83,
  32589. waekorean: 0x3159,
  32590. wahiragana: 0x308F,
  32591. wakatakana: 0x30EF,
  32592. wakatakanahalfwidth: 0xFF9C,
  32593. wakorean: 0x3158,
  32594. wasmallhiragana: 0x308E,
  32595. wasmallkatakana: 0x30EE,
  32596. wattosquare: 0x3357,
  32597. wavedash: 0x301C,
  32598. wavyunderscorevertical: 0xFE34,
  32599. wawarabic: 0x0648,
  32600. wawfinalarabic: 0xFEEE,
  32601. wawhamzaabovearabic: 0x0624,
  32602. wawhamzaabovefinalarabic: 0xFE86,
  32603. wbsquare: 0x33DD,
  32604. wcircle: 0x24E6,
  32605. wcircumflex: 0x0175,
  32606. wdieresis: 0x1E85,
  32607. wdotaccent: 0x1E87,
  32608. wdotbelow: 0x1E89,
  32609. wehiragana: 0x3091,
  32610. weierstrass: 0x2118,
  32611. wekatakana: 0x30F1,
  32612. wekorean: 0x315E,
  32613. weokorean: 0x315D,
  32614. wgrave: 0x1E81,
  32615. whitebullet: 0x25E6,
  32616. whitecircle: 0x25CB,
  32617. whitecircleinverse: 0x25D9,
  32618. whitecornerbracketleft: 0x300E,
  32619. whitecornerbracketleftvertical: 0xFE43,
  32620. whitecornerbracketright: 0x300F,
  32621. whitecornerbracketrightvertical: 0xFE44,
  32622. whitediamond: 0x25C7,
  32623. whitediamondcontainingblacksmalldiamond: 0x25C8,
  32624. whitedownpointingsmalltriangle: 0x25BF,
  32625. whitedownpointingtriangle: 0x25BD,
  32626. whiteleftpointingsmalltriangle: 0x25C3,
  32627. whiteleftpointingtriangle: 0x25C1,
  32628. whitelenticularbracketleft: 0x3016,
  32629. whitelenticularbracketright: 0x3017,
  32630. whiterightpointingsmalltriangle: 0x25B9,
  32631. whiterightpointingtriangle: 0x25B7,
  32632. whitesmallsquare: 0x25AB,
  32633. whitesmilingface: 0x263A,
  32634. whitesquare: 0x25A1,
  32635. whitestar: 0x2606,
  32636. whitetelephone: 0x260F,
  32637. whitetortoiseshellbracketleft: 0x3018,
  32638. whitetortoiseshellbracketright: 0x3019,
  32639. whiteuppointingsmalltriangle: 0x25B5,
  32640. whiteuppointingtriangle: 0x25B3,
  32641. wihiragana: 0x3090,
  32642. wikatakana: 0x30F0,
  32643. wikorean: 0x315F,
  32644. wmonospace: 0xFF57,
  32645. wohiragana: 0x3092,
  32646. wokatakana: 0x30F2,
  32647. wokatakanahalfwidth: 0xFF66,
  32648. won: 0x20A9,
  32649. wonmonospace: 0xFFE6,
  32650. wowaenthai: 0x0E27,
  32651. wparen: 0x24B2,
  32652. wring: 0x1E98,
  32653. wsuperior: 0x02B7,
  32654. wturned: 0x028D,
  32655. wynn: 0x01BF,
  32656. x: 0x0078,
  32657. xabovecmb: 0x033D,
  32658. xbopomofo: 0x3112,
  32659. xcircle: 0x24E7,
  32660. xdieresis: 0x1E8D,
  32661. xdotaccent: 0x1E8B,
  32662. xeharmenian: 0x056D,
  32663. xi: 0x03BE,
  32664. xmonospace: 0xFF58,
  32665. xparen: 0x24B3,
  32666. xsuperior: 0x02E3,
  32667. y: 0x0079,
  32668. yaadosquare: 0x334E,
  32669. yabengali: 0x09AF,
  32670. yacute: 0x00FD,
  32671. yadeva: 0x092F,
  32672. yaekorean: 0x3152,
  32673. yagujarati: 0x0AAF,
  32674. yagurmukhi: 0x0A2F,
  32675. yahiragana: 0x3084,
  32676. yakatakana: 0x30E4,
  32677. yakatakanahalfwidth: 0xFF94,
  32678. yakorean: 0x3151,
  32679. yamakkanthai: 0x0E4E,
  32680. yasmallhiragana: 0x3083,
  32681. yasmallkatakana: 0x30E3,
  32682. yasmallkatakanahalfwidth: 0xFF6C,
  32683. yatcyrillic: 0x0463,
  32684. ycircle: 0x24E8,
  32685. ycircumflex: 0x0177,
  32686. ydieresis: 0x00FF,
  32687. ydotaccent: 0x1E8F,
  32688. ydotbelow: 0x1EF5,
  32689. yeharabic: 0x064A,
  32690. yehbarreearabic: 0x06D2,
  32691. yehbarreefinalarabic: 0xFBAF,
  32692. yehfinalarabic: 0xFEF2,
  32693. yehhamzaabovearabic: 0x0626,
  32694. yehhamzaabovefinalarabic: 0xFE8A,
  32695. yehhamzaaboveinitialarabic: 0xFE8B,
  32696. yehhamzaabovemedialarabic: 0xFE8C,
  32697. yehinitialarabic: 0xFEF3,
  32698. yehmedialarabic: 0xFEF4,
  32699. yehmeeminitialarabic: 0xFCDD,
  32700. yehmeemisolatedarabic: 0xFC58,
  32701. yehnoonfinalarabic: 0xFC94,
  32702. yehthreedotsbelowarabic: 0x06D1,
  32703. yekorean: 0x3156,
  32704. yen: 0x00A5,
  32705. yenmonospace: 0xFFE5,
  32706. yeokorean: 0x3155,
  32707. yeorinhieuhkorean: 0x3186,
  32708. yerahbenyomohebrew: 0x05AA,
  32709. yerahbenyomolefthebrew: 0x05AA,
  32710. yericyrillic: 0x044B,
  32711. yerudieresiscyrillic: 0x04F9,
  32712. yesieungkorean: 0x3181,
  32713. yesieungpansioskorean: 0x3183,
  32714. yesieungsioskorean: 0x3182,
  32715. yetivhebrew: 0x059A,
  32716. ygrave: 0x1EF3,
  32717. yhook: 0x01B4,
  32718. yhookabove: 0x1EF7,
  32719. yiarmenian: 0x0575,
  32720. yicyrillic: 0x0457,
  32721. yikorean: 0x3162,
  32722. yinyang: 0x262F,
  32723. yiwnarmenian: 0x0582,
  32724. ymonospace: 0xFF59,
  32725. yod: 0x05D9,
  32726. yoddagesh: 0xFB39,
  32727. yoddageshhebrew: 0xFB39,
  32728. yodhebrew: 0x05D9,
  32729. yodyodhebrew: 0x05F2,
  32730. yodyodpatahhebrew: 0xFB1F,
  32731. yohiragana: 0x3088,
  32732. yoikorean: 0x3189,
  32733. yokatakana: 0x30E8,
  32734. yokatakanahalfwidth: 0xFF96,
  32735. yokorean: 0x315B,
  32736. yosmallhiragana: 0x3087,
  32737. yosmallkatakana: 0x30E7,
  32738. yosmallkatakanahalfwidth: 0xFF6E,
  32739. yotgreek: 0x03F3,
  32740. yoyaekorean: 0x3188,
  32741. yoyakorean: 0x3187,
  32742. yoyakthai: 0x0E22,
  32743. yoyingthai: 0x0E0D,
  32744. yparen: 0x24B4,
  32745. ypogegrammeni: 0x037A,
  32746. ypogegrammenigreekcmb: 0x0345,
  32747. yr: 0x01A6,
  32748. yring: 0x1E99,
  32749. ysuperior: 0x02B8,
  32750. ytilde: 0x1EF9,
  32751. yturned: 0x028E,
  32752. yuhiragana: 0x3086,
  32753. yuikorean: 0x318C,
  32754. yukatakana: 0x30E6,
  32755. yukatakanahalfwidth: 0xFF95,
  32756. yukorean: 0x3160,
  32757. yusbigcyrillic: 0x046B,
  32758. yusbigiotifiedcyrillic: 0x046D,
  32759. yuslittlecyrillic: 0x0467,
  32760. yuslittleiotifiedcyrillic: 0x0469,
  32761. yusmallhiragana: 0x3085,
  32762. yusmallkatakana: 0x30E5,
  32763. yusmallkatakanahalfwidth: 0xFF6D,
  32764. yuyekorean: 0x318B,
  32765. yuyeokorean: 0x318A,
  32766. yyabengali: 0x09DF,
  32767. yyadeva: 0x095F,
  32768. z: 0x007A,
  32769. zaarmenian: 0x0566,
  32770. zacute: 0x017A,
  32771. zadeva: 0x095B,
  32772. zagurmukhi: 0x0A5B,
  32773. zaharabic: 0x0638,
  32774. zahfinalarabic: 0xFEC6,
  32775. zahinitialarabic: 0xFEC7,
  32776. zahiragana: 0x3056,
  32777. zahmedialarabic: 0xFEC8,
  32778. zainarabic: 0x0632,
  32779. zainfinalarabic: 0xFEB0,
  32780. zakatakana: 0x30B6,
  32781. zaqefgadolhebrew: 0x0595,
  32782. zaqefqatanhebrew: 0x0594,
  32783. zarqahebrew: 0x0598,
  32784. zayin: 0x05D6,
  32785. zayindagesh: 0xFB36,
  32786. zayindageshhebrew: 0xFB36,
  32787. zayinhebrew: 0x05D6,
  32788. zbopomofo: 0x3117,
  32789. zcaron: 0x017E,
  32790. zcircle: 0x24E9,
  32791. zcircumflex: 0x1E91,
  32792. zcurl: 0x0291,
  32793. zdot: 0x017C,
  32794. zdotaccent: 0x017C,
  32795. zdotbelow: 0x1E93,
  32796. zecyrillic: 0x0437,
  32797. zedescendercyrillic: 0x0499,
  32798. zedieresiscyrillic: 0x04DF,
  32799. zehiragana: 0x305C,
  32800. zekatakana: 0x30BC,
  32801. zero: 0x0030,
  32802. zeroarabic: 0x0660,
  32803. zerobengali: 0x09E6,
  32804. zerodeva: 0x0966,
  32805. zerogujarati: 0x0AE6,
  32806. zerogurmukhi: 0x0A66,
  32807. zerohackarabic: 0x0660,
  32808. zeroinferior: 0x2080,
  32809. zeromonospace: 0xFF10,
  32810. zerooldstyle: 0xF730,
  32811. zeropersian: 0x06F0,
  32812. zerosuperior: 0x2070,
  32813. zerothai: 0x0E50,
  32814. zerowidthjoiner: 0xFEFF,
  32815. zerowidthnonjoiner: 0x200C,
  32816. zerowidthspace: 0x200B,
  32817. zeta: 0x03B6,
  32818. zhbopomofo: 0x3113,
  32819. zhearmenian: 0x056A,
  32820. zhebrevecyrillic: 0x04C2,
  32821. zhecyrillic: 0x0436,
  32822. zhedescendercyrillic: 0x0497,
  32823. zhedieresiscyrillic: 0x04DD,
  32824. zihiragana: 0x3058,
  32825. zikatakana: 0x30B8,
  32826. zinorhebrew: 0x05AE,
  32827. zlinebelow: 0x1E95,
  32828. zmonospace: 0xFF5A,
  32829. zohiragana: 0x305E,
  32830. zokatakana: 0x30BE,
  32831. zparen: 0x24B5,
  32832. zretroflexhook: 0x0290,
  32833. zstroke: 0x01B6,
  32834. zuhiragana: 0x305A,
  32835. zukatakana: 0x30BA,
  32836. '.notdef': 0x0000
  32837. };
  32838. var PDFImage = (function PDFImageClosure() {
  32839. /**
  32840. * Decode the image in the main thread if it supported. Resovles the promise
  32841. * when the image data is ready.
  32842. */
  32843. function handleImageData(handler, xref, res, image) {
  32844. if (image instanceof JpegStream && image.isNativelyDecodable(xref, res)) {
  32845. // For natively supported jpegs send them to the main thread for decoding.
  32846. var dict = image.dict;
  32847. var colorSpace = dict.get('ColorSpace', 'CS');
  32848. colorSpace = ColorSpace.parse(colorSpace, xref, res);
  32849. var numComps = colorSpace.numComps;
  32850. var resolvePromise;
  32851. handler.send('JpegDecode', [image.getIR(), numComps], function(message) {
  32852. var data = message.data;
  32853. var stream = new Stream(data, 0, data.length, image.dict);
  32854. resolvePromise(stream);
  32855. });
  32856. return new Promise(function (resolve) {
  32857. resolvePromise = resolve;
  32858. });
  32859. } else {
  32860. return Promise.resolve(image);
  32861. }
  32862. }
  32863. /**
  32864. * Decode and clamp a value. The formula is different from the spec because we
  32865. * don't decode to float range [0,1], we decode it in the [0,max] range.
  32866. */
  32867. function decodeAndClamp(value, addend, coefficient, max) {
  32868. value = addend + value * coefficient;
  32869. // Clamp the value to the range
  32870. return (value < 0 ? 0 : (value > max ? max : value));
  32871. }
  32872. function PDFImage(xref, res, image, inline, smask, mask, isMask) {
  32873. this.image = image;
  32874. var dict = image.dict;
  32875. if (dict.has('Filter')) {
  32876. var filter = dict.get('Filter').name;
  32877. if (filter === 'JPXDecode') {
  32878. var jpxImage = new JpxImage();
  32879. jpxImage.parseImageProperties(image.stream);
  32880. image.stream.reset();
  32881. image.bitsPerComponent = jpxImage.bitsPerComponent;
  32882. image.numComps = jpxImage.componentsCount;
  32883. } else if (filter === 'JBIG2Decode') {
  32884. image.bitsPerComponent = 1;
  32885. image.numComps = 1;
  32886. }
  32887. }
  32888. // TODO cache rendered images?
  32889. this.width = dict.get('Width', 'W');
  32890. this.height = dict.get('Height', 'H');
  32891. if (this.width < 1 || this.height < 1) {
  32892. error('Invalid image width: ' + this.width + ' or height: ' +
  32893. this.height);
  32894. }
  32895. this.interpolate = dict.get('Interpolate', 'I') || false;
  32896. this.imageMask = dict.get('ImageMask', 'IM') || false;
  32897. this.matte = dict.get('Matte') || false;
  32898. var bitsPerComponent = image.bitsPerComponent;
  32899. if (!bitsPerComponent) {
  32900. bitsPerComponent = dict.get('BitsPerComponent', 'BPC');
  32901. if (!bitsPerComponent) {
  32902. if (this.imageMask) {
  32903. bitsPerComponent = 1;
  32904. } else {
  32905. error('Bits per component missing in image: ' + this.imageMask);
  32906. }
  32907. }
  32908. }
  32909. this.bpc = bitsPerComponent;
  32910. if (!this.imageMask) {
  32911. var colorSpace = dict.get('ColorSpace', 'CS');
  32912. if (!colorSpace) {
  32913. info('JPX images (which do not require color spaces)');
  32914. switch (image.numComps) {
  32915. case 1:
  32916. colorSpace = Name.get('DeviceGray');
  32917. break;
  32918. case 3:
  32919. colorSpace = Name.get('DeviceRGB');
  32920. break;
  32921. case 4:
  32922. colorSpace = Name.get('DeviceCMYK');
  32923. break;
  32924. default:
  32925. error('JPX images with ' + this.numComps +
  32926. ' color components not supported.');
  32927. }
  32928. }
  32929. this.colorSpace = ColorSpace.parse(colorSpace, xref, res);
  32930. this.numComps = this.colorSpace.numComps;
  32931. }
  32932. this.decode = dict.get('Decode', 'D');
  32933. this.needsDecode = false;
  32934. if (this.decode &&
  32935. ((this.colorSpace && !this.colorSpace.isDefaultDecode(this.decode)) ||
  32936. (isMask && !ColorSpace.isDefaultDecode(this.decode, 1)))) {
  32937. this.needsDecode = true;
  32938. // Do some preprocessing to avoid more math.
  32939. var max = (1 << bitsPerComponent) - 1;
  32940. this.decodeCoefficients = [];
  32941. this.decodeAddends = [];
  32942. for (var i = 0, j = 0; i < this.decode.length; i += 2, ++j) {
  32943. var dmin = this.decode[i];
  32944. var dmax = this.decode[i + 1];
  32945. this.decodeCoefficients[j] = dmax - dmin;
  32946. this.decodeAddends[j] = max * dmin;
  32947. }
  32948. }
  32949. if (smask) {
  32950. this.smask = new PDFImage(xref, res, smask, false);
  32951. } else if (mask) {
  32952. if (isStream(mask)) {
  32953. this.mask = new PDFImage(xref, res, mask, false, null, null, true);
  32954. } else {
  32955. // Color key mask (just an array).
  32956. this.mask = mask;
  32957. }
  32958. }
  32959. }
  32960. /**
  32961. * Handles processing of image data and returns the Promise that is resolved
  32962. * with a PDFImage when the image is ready to be used.
  32963. */
  32964. PDFImage.buildImage = function PDFImage_buildImage(handler, xref,
  32965. res, image, inline) {
  32966. var imagePromise = handleImageData(handler, xref, res, image);
  32967. var smaskPromise;
  32968. var maskPromise;
  32969. var smask = image.dict.get('SMask');
  32970. var mask = image.dict.get('Mask');
  32971. if (smask) {
  32972. smaskPromise = handleImageData(handler, xref, res, smask);
  32973. maskPromise = Promise.resolve(null);
  32974. } else {
  32975. smaskPromise = Promise.resolve(null);
  32976. if (mask) {
  32977. if (isStream(mask)) {
  32978. maskPromise = handleImageData(handler, xref, res, mask);
  32979. } else if (isArray(mask)) {
  32980. maskPromise = Promise.resolve(mask);
  32981. } else {
  32982. warn('Unsupported mask format.');
  32983. maskPromise = Promise.resolve(null);
  32984. }
  32985. } else {
  32986. maskPromise = Promise.resolve(null);
  32987. }
  32988. }
  32989. return Promise.all([imagePromise, smaskPromise, maskPromise]).then(
  32990. function(results) {
  32991. var imageData = results[0];
  32992. var smaskData = results[1];
  32993. var maskData = results[2];
  32994. return new PDFImage(xref, res, imageData, inline, smaskData, maskData);
  32995. });
  32996. };
  32997. /**
  32998. * Resize an image using the nearest neighbor algorithm. Currently only
  32999. * supports one and three component images.
  33000. * @param {TypedArray} pixels The original image with one component.
  33001. * @param {Number} bpc Number of bits per component.
  33002. * @param {Number} components Number of color components, 1 or 3 is supported.
  33003. * @param {Number} w1 Original width.
  33004. * @param {Number} h1 Original height.
  33005. * @param {Number} w2 New width.
  33006. * @param {Number} h2 New height.
  33007. * @param {TypedArray} dest (Optional) The destination buffer.
  33008. * @param {Number} alpha01 (Optional) Size reserved for the alpha channel.
  33009. * @return {TypedArray} Resized image data.
  33010. */
  33011. PDFImage.resize = function PDFImage_resize(pixels, bpc, components,
  33012. w1, h1, w2, h2, dest, alpha01) {
  33013. if (components !== 1 && components !== 3) {
  33014. error('Unsupported component count for resizing.');
  33015. }
  33016. var length = w2 * h2 * components;
  33017. var temp = dest ? dest : (bpc <= 8 ? new Uint8Array(length) :
  33018. (bpc <= 16 ? new Uint16Array(length) : new Uint32Array(length)));
  33019. var xRatio = w1 / w2;
  33020. var yRatio = h1 / h2;
  33021. var i, j, py, newIndex = 0, oldIndex;
  33022. var xScaled = new Uint16Array(w2);
  33023. var w1Scanline = w1 * components;
  33024. if (alpha01 !== 1) {
  33025. alpha01 = 0;
  33026. }
  33027. for (j = 0; j < w2; j++) {
  33028. xScaled[j] = Math.floor(j * xRatio) * components;
  33029. }
  33030. if (components === 1) {
  33031. for (i = 0; i < h2; i++) {
  33032. py = Math.floor(i * yRatio) * w1Scanline;
  33033. for (j = 0; j < w2; j++) {
  33034. oldIndex = py + xScaled[j];
  33035. temp[newIndex++] = pixels[oldIndex];
  33036. }
  33037. }
  33038. } else if (components === 3) {
  33039. for (i = 0; i < h2; i++) {
  33040. py = Math.floor(i * yRatio) * w1Scanline;
  33041. for (j = 0; j < w2; j++) {
  33042. oldIndex = py + xScaled[j];
  33043. temp[newIndex++] = pixels[oldIndex++];
  33044. temp[newIndex++] = pixels[oldIndex++];
  33045. temp[newIndex++] = pixels[oldIndex++];
  33046. newIndex += alpha01;
  33047. }
  33048. }
  33049. }
  33050. return temp;
  33051. };
  33052. PDFImage.createMask =
  33053. function PDFImage_createMask(imgArray, width, height, canTransfer,
  33054. inverseDecode) {
  33055. // If imgArray came from a DecodeStream, we're safe to transfer it.
  33056. // Otherwise, copy it.
  33057. var actualLength = imgArray.byteLength;
  33058. var data;
  33059. if (canTransfer) {
  33060. data = imgArray;
  33061. } else {
  33062. data = new Uint8Array(actualLength);
  33063. data.set(imgArray);
  33064. }
  33065. // Invert if necessary. It's safe to modify the array -- whether it's the
  33066. // original or a copy, we're about to transfer it anyway, so nothing else
  33067. // in this thread can be relying on its contents.
  33068. if (inverseDecode) {
  33069. for (var i = 0; i < actualLength; i++) {
  33070. data[i] = ~data[i];
  33071. }
  33072. }
  33073. return {data: data, width: width, height: height};
  33074. };
  33075. PDFImage.prototype = {
  33076. get drawWidth() {
  33077. return Math.max(this.width,
  33078. this.smask && this.smask.width || 0,
  33079. this.mask && this.mask.width || 0);
  33080. },
  33081. get drawHeight() {
  33082. return Math.max(this.height,
  33083. this.smask && this.smask.height || 0,
  33084. this.mask && this.mask.height || 0);
  33085. },
  33086. decodeBuffer: function PDFImage_decodeBuffer(buffer) {
  33087. var bpc = this.bpc;
  33088. var numComps = this.numComps;
  33089. var decodeAddends = this.decodeAddends;
  33090. var decodeCoefficients = this.decodeCoefficients;
  33091. var max = (1 << bpc) - 1;
  33092. var i, ii;
  33093. if (bpc === 1) {
  33094. // If the buffer needed decode that means it just needs to be inverted.
  33095. for (i = 0, ii = buffer.length; i < ii; i++) {
  33096. buffer[i] = +!(buffer[i]);
  33097. }
  33098. return;
  33099. }
  33100. var index = 0;
  33101. for (i = 0, ii = this.width * this.height; i < ii; i++) {
  33102. for (var j = 0; j < numComps; j++) {
  33103. buffer[index] = decodeAndClamp(buffer[index], decodeAddends[j],
  33104. decodeCoefficients[j], max);
  33105. index++;
  33106. }
  33107. }
  33108. },
  33109. getComponents: function PDFImage_getComponents(buffer) {
  33110. var bpc = this.bpc;
  33111. // This image doesn't require any extra work.
  33112. if (bpc === 8) {
  33113. return buffer;
  33114. }
  33115. var width = this.width;
  33116. var height = this.height;
  33117. var numComps = this.numComps;
  33118. var length = width * height * numComps;
  33119. var bufferPos = 0;
  33120. var output = (bpc <= 8 ? new Uint8Array(length) :
  33121. (bpc <= 16 ? new Uint16Array(length) : new Uint32Array(length)));
  33122. var rowComps = width * numComps;
  33123. var max = (1 << bpc) - 1;
  33124. var i = 0, ii, buf;
  33125. if (bpc === 1) {
  33126. // Optimization for reading 1 bpc images.
  33127. var mask, loop1End, loop2End;
  33128. for (var j = 0; j < height; j++) {
  33129. loop1End = i + (rowComps & ~7);
  33130. loop2End = i + rowComps;
  33131. // unroll loop for all full bytes
  33132. while (i < loop1End) {
  33133. buf = buffer[bufferPos++];
  33134. output[i] = (buf >> 7) & 1;
  33135. output[i + 1] = (buf >> 6) & 1;
  33136. output[i + 2] = (buf >> 5) & 1;
  33137. output[i + 3] = (buf >> 4) & 1;
  33138. output[i + 4] = (buf >> 3) & 1;
  33139. output[i + 5] = (buf >> 2) & 1;
  33140. output[i + 6] = (buf >> 1) & 1;
  33141. output[i + 7] = buf & 1;
  33142. i += 8;
  33143. }
  33144. // handle remaing bits
  33145. if (i < loop2End) {
  33146. buf = buffer[bufferPos++];
  33147. mask = 128;
  33148. while (i < loop2End) {
  33149. output[i++] = +!!(buf & mask);
  33150. mask >>= 1;
  33151. }
  33152. }
  33153. }
  33154. } else {
  33155. // The general case that handles all other bpc values.
  33156. var bits = 0;
  33157. buf = 0;
  33158. for (i = 0, ii = length; i < ii; ++i) {
  33159. if (i % rowComps === 0) {
  33160. buf = 0;
  33161. bits = 0;
  33162. }
  33163. while (bits < bpc) {
  33164. buf = (buf << 8) | buffer[bufferPos++];
  33165. bits += 8;
  33166. }
  33167. var remainingBits = bits - bpc;
  33168. var value = buf >> remainingBits;
  33169. output[i] = (value < 0 ? 0 : (value > max ? max : value));
  33170. buf = buf & ((1 << remainingBits) - 1);
  33171. bits = remainingBits;
  33172. }
  33173. }
  33174. return output;
  33175. },
  33176. fillOpacity: function PDFImage_fillOpacity(rgbaBuf, width, height,
  33177. actualHeight, image) {
  33178. var smask = this.smask;
  33179. var mask = this.mask;
  33180. var alphaBuf, sw, sh, i, ii, j;
  33181. if (smask) {
  33182. sw = smask.width;
  33183. sh = smask.height;
  33184. alphaBuf = new Uint8Array(sw * sh);
  33185. smask.fillGrayBuffer(alphaBuf);
  33186. if (sw != width || sh != height) {
  33187. alphaBuf = PDFImage.resize(alphaBuf, smask.bpc, 1, sw, sh, width,
  33188. height);
  33189. }
  33190. } else if (mask) {
  33191. if (mask instanceof PDFImage) {
  33192. sw = mask.width;
  33193. sh = mask.height;
  33194. alphaBuf = new Uint8Array(sw * sh);
  33195. mask.numComps = 1;
  33196. mask.fillGrayBuffer(alphaBuf);
  33197. // Need to invert values in rgbaBuf
  33198. for (i = 0, ii = sw * sh; i < ii; ++i) {
  33199. alphaBuf[i] = 255 - alphaBuf[i];
  33200. }
  33201. if (sw != width || sh != height) {
  33202. alphaBuf = PDFImage.resize(alphaBuf, mask.bpc, 1, sw, sh, width,
  33203. height);
  33204. }
  33205. } else if (isArray(mask)) {
  33206. // Color key mask: if any of the compontents are outside the range
  33207. // then they should be painted.
  33208. alphaBuf = new Uint8Array(width * height);
  33209. var numComps = this.numComps;
  33210. for (i = 0, ii = width * height; i < ii; ++i) {
  33211. var opacity = 0;
  33212. var imageOffset = i * numComps;
  33213. for (j = 0; j < numComps; ++j) {
  33214. var color = image[imageOffset + j];
  33215. var maskOffset = j * 2;
  33216. if (color < mask[maskOffset] || color > mask[maskOffset + 1]) {
  33217. opacity = 255;
  33218. break;
  33219. }
  33220. }
  33221. alphaBuf[i] = opacity;
  33222. }
  33223. } else {
  33224. error('Unknown mask format.');
  33225. }
  33226. }
  33227. if (alphaBuf) {
  33228. for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) {
  33229. rgbaBuf[j] = alphaBuf[i];
  33230. }
  33231. } else {
  33232. // No mask.
  33233. for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) {
  33234. rgbaBuf[j] = 255;
  33235. }
  33236. }
  33237. },
  33238. undoPreblend: function PDFImage_undoPreblend(buffer, width, height) {
  33239. var matte = this.smask && this.smask.matte;
  33240. if (!matte) {
  33241. return;
  33242. }
  33243. function clamp(value) {
  33244. return (value < 0 ? 0 : (value > 255 ? 255 : value)) | 0;
  33245. }
  33246. var matteRgb = this.colorSpace.getRgb(matte, 0);
  33247. var length = width * height * 4;
  33248. for (var i = 0; i < length; i += 4) {
  33249. var alpha = buffer[i + 3];
  33250. if (alpha === 0) {
  33251. // according formula we have to get Infinity in all components
  33252. // making it white (tipical paper color) should be okay
  33253. buffer[i] = 255;
  33254. buffer[i + 1] = 255;
  33255. buffer[i + 2] = 255;
  33256. continue;
  33257. }
  33258. var k = 255 / alpha;
  33259. buffer[i] = clamp((buffer[i] - matteRgb[0]) * k + matteRgb[0]);
  33260. buffer[i + 1] = clamp((buffer[i + 1] - matteRgb[1]) * k + matteRgb[1]);
  33261. buffer[i + 2] = clamp((buffer[i + 2] - matteRgb[2]) * k + matteRgb[2]);
  33262. }
  33263. },
  33264. createImageData: function PDFImage_createImageData(forceRGBA) {
  33265. var drawWidth = this.drawWidth;
  33266. var drawHeight = this.drawHeight;
  33267. var imgData = { // other fields are filled in below
  33268. width: drawWidth,
  33269. height: drawHeight
  33270. };
  33271. var numComps = this.numComps;
  33272. var originalWidth = this.width;
  33273. var originalHeight = this.height;
  33274. var bpc = this.bpc;
  33275. // Rows start at byte boundary.
  33276. var rowBytes = (originalWidth * numComps * bpc + 7) >> 3;
  33277. var imgArray;
  33278. if (!forceRGBA) {
  33279. // If it is a 1-bit-per-pixel grayscale (i.e. black-and-white) image
  33280. // without any complications, we pass a same-sized copy to the main
  33281. // thread rather than expanding by 32x to RGBA form. This saves *lots*
  33282. // of memory for many scanned documents. It's also much faster.
  33283. //
  33284. // Similarly, if it is a 24-bit-per pixel RGB image without any
  33285. // complications, we avoid expanding by 1.333x to RGBA form.
  33286. var kind;
  33287. if (this.colorSpace.name === 'DeviceGray' && bpc === 1) {
  33288. kind = ImageKind.GRAYSCALE_1BPP;
  33289. } else if (this.colorSpace.name === 'DeviceRGB' && bpc === 8) {
  33290. kind = ImageKind.RGB_24BPP;
  33291. }
  33292. if (kind && !this.smask && !this.mask && !this.needsDecode &&
  33293. drawWidth === originalWidth && drawHeight === originalHeight) {
  33294. imgData.kind = kind;
  33295. imgArray = this.getImageBytes(originalHeight * rowBytes);
  33296. // If imgArray came from a DecodeStream, we're safe to transfer it
  33297. // (and thus neuter it) because it will constitute the entire
  33298. // DecodeStream's data. But if it came from a Stream, we need to
  33299. // copy it because it'll only be a portion of the Stream's data, and
  33300. // the rest will be read later on.
  33301. if (this.image instanceof DecodeStream) {
  33302. imgData.data = imgArray;
  33303. } else {
  33304. var newArray = new Uint8Array(imgArray.length);
  33305. newArray.set(imgArray);
  33306. imgData.data = newArray;
  33307. }
  33308. return imgData;
  33309. }
  33310. }
  33311. if (this.image instanceof JpegStream) {
  33312. imgData.kind = ImageKind.RGB_24BPP;
  33313. imgData.data = this.getImageBytes(originalHeight * rowBytes,
  33314. drawWidth, drawHeight);
  33315. return imgData;
  33316. }
  33317. imgArray = this.getImageBytes(originalHeight * rowBytes);
  33318. // imgArray can be incomplete (e.g. after CCITT fax encoding).
  33319. var actualHeight = 0 | (imgArray.length / rowBytes *
  33320. drawHeight / originalHeight);
  33321. var comps = this.getComponents(imgArray);
  33322. // If opacity data is present, use RGBA_32BPP form. Otherwise, use the
  33323. // more compact RGB_24BPP form if allowable.
  33324. var alpha01, maybeUndoPreblend;
  33325. if (!forceRGBA && !this.smask && !this.mask) {
  33326. imgData.kind = ImageKind.RGB_24BPP;
  33327. imgData.data = new Uint8Array(drawWidth * drawHeight * 3);
  33328. alpha01 = 0;
  33329. maybeUndoPreblend = false;
  33330. } else {
  33331. imgData.kind = ImageKind.RGBA_32BPP;
  33332. imgData.data = new Uint8Array(drawWidth * drawHeight * 4);
  33333. alpha01 = 1;
  33334. maybeUndoPreblend = true;
  33335. // Color key masking (opacity) must be performed before decoding.
  33336. this.fillOpacity(imgData.data, drawWidth, drawHeight, actualHeight,
  33337. comps);
  33338. }
  33339. if (this.needsDecode) {
  33340. this.decodeBuffer(comps);
  33341. }
  33342. this.colorSpace.fillRgb(imgData.data, originalWidth, originalHeight,
  33343. drawWidth, drawHeight, actualHeight, bpc, comps,
  33344. alpha01);
  33345. if (maybeUndoPreblend) {
  33346. this.undoPreblend(imgData.data, drawWidth, actualHeight);
  33347. }
  33348. return imgData;
  33349. },
  33350. fillGrayBuffer: function PDFImage_fillGrayBuffer(buffer) {
  33351. var numComps = this.numComps;
  33352. if (numComps != 1) {
  33353. error('Reading gray scale from a color image: ' + numComps);
  33354. }
  33355. var width = this.width;
  33356. var height = this.height;
  33357. var bpc = this.bpc;
  33358. // rows start at byte boundary
  33359. var rowBytes = (width * numComps * bpc + 7) >> 3;
  33360. var imgArray = this.getImageBytes(height * rowBytes);
  33361. var comps = this.getComponents(imgArray);
  33362. var i, length;
  33363. if (bpc === 1) {
  33364. // inline decoding (= inversion) for 1 bpc images
  33365. length = width * height;
  33366. if (this.needsDecode) {
  33367. // invert and scale to {0, 255}
  33368. for (i = 0; i < length; ++i) {
  33369. buffer[i] = (comps[i] - 1) & 255;
  33370. }
  33371. } else {
  33372. // scale to {0, 255}
  33373. for (i = 0; i < length; ++i) {
  33374. buffer[i] = (-comps[i]) & 255;
  33375. }
  33376. }
  33377. return;
  33378. }
  33379. if (this.needsDecode) {
  33380. this.decodeBuffer(comps);
  33381. }
  33382. length = width * height;
  33383. // we aren't using a colorspace so we need to scale the value
  33384. var scale = 255 / ((1 << bpc) - 1);
  33385. for (i = 0; i < length; ++i) {
  33386. buffer[i] = (scale * comps[i]) | 0;
  33387. }
  33388. },
  33389. getImageBytes: function PDFImage_getImageBytes(length,
  33390. drawWidth, drawHeight) {
  33391. this.image.reset();
  33392. this.image.drawWidth = drawWidth;
  33393. this.image.drawHeight = drawHeight;
  33394. return this.image.getBytes(length);
  33395. }
  33396. };
  33397. return PDFImage;
  33398. })();
  33399. // The Metrics object contains glyph widths (in glyph space units).
  33400. // As per PDF spec, for most fonts (Type 3 being an exception) a glyph
  33401. // space unit corresponds to 1/1000th of text space unit.
  33402. var Metrics = {
  33403. 'Courier': 600,
  33404. 'Courier-Bold': 600,
  33405. 'Courier-BoldOblique': 600,
  33406. 'Courier-Oblique': 600,
  33407. 'Helvetica' : {
  33408. 'space': 278,
  33409. 'exclam': 278,
  33410. 'quotedbl': 355,
  33411. 'numbersign': 556,
  33412. 'dollar': 556,
  33413. 'percent': 889,
  33414. 'ampersand': 667,
  33415. 'quoteright': 222,
  33416. 'parenleft': 333,
  33417. 'parenright': 333,
  33418. 'asterisk': 389,
  33419. 'plus': 584,
  33420. 'comma': 278,
  33421. 'hyphen': 333,
  33422. 'period': 278,
  33423. 'slash': 278,
  33424. 'zero': 556,
  33425. 'one': 556,
  33426. 'two': 556,
  33427. 'three': 556,
  33428. 'four': 556,
  33429. 'five': 556,
  33430. 'six': 556,
  33431. 'seven': 556,
  33432. 'eight': 556,
  33433. 'nine': 556,
  33434. 'colon': 278,
  33435. 'semicolon': 278,
  33436. 'less': 584,
  33437. 'equal': 584,
  33438. 'greater': 584,
  33439. 'question': 556,
  33440. 'at': 1015,
  33441. 'A': 667,
  33442. 'B': 667,
  33443. 'C': 722,
  33444. 'D': 722,
  33445. 'E': 667,
  33446. 'F': 611,
  33447. 'G': 778,
  33448. 'H': 722,
  33449. 'I': 278,
  33450. 'J': 500,
  33451. 'K': 667,
  33452. 'L': 556,
  33453. 'M': 833,
  33454. 'N': 722,
  33455. 'O': 778,
  33456. 'P': 667,
  33457. 'Q': 778,
  33458. 'R': 722,
  33459. 'S': 667,
  33460. 'T': 611,
  33461. 'U': 722,
  33462. 'V': 667,
  33463. 'W': 944,
  33464. 'X': 667,
  33465. 'Y': 667,
  33466. 'Z': 611,
  33467. 'bracketleft': 278,
  33468. 'backslash': 278,
  33469. 'bracketright': 278,
  33470. 'asciicircum': 469,
  33471. 'underscore': 556,
  33472. 'quoteleft': 222,
  33473. 'a': 556,
  33474. 'b': 556,
  33475. 'c': 500,
  33476. 'd': 556,
  33477. 'e': 556,
  33478. 'f': 278,
  33479. 'g': 556,
  33480. 'h': 556,
  33481. 'i': 222,
  33482. 'j': 222,
  33483. 'k': 500,
  33484. 'l': 222,
  33485. 'm': 833,
  33486. 'n': 556,
  33487. 'o': 556,
  33488. 'p': 556,
  33489. 'q': 556,
  33490. 'r': 333,
  33491. 's': 500,
  33492. 't': 278,
  33493. 'u': 556,
  33494. 'v': 500,
  33495. 'w': 722,
  33496. 'x': 500,
  33497. 'y': 500,
  33498. 'z': 500,
  33499. 'braceleft': 334,
  33500. 'bar': 260,
  33501. 'braceright': 334,
  33502. 'asciitilde': 584,
  33503. 'exclamdown': 333,
  33504. 'cent': 556,
  33505. 'sterling': 556,
  33506. 'fraction': 167,
  33507. 'yen': 556,
  33508. 'florin': 556,
  33509. 'section': 556,
  33510. 'currency': 556,
  33511. 'quotesingle': 191,
  33512. 'quotedblleft': 333,
  33513. 'guillemotleft': 556,
  33514. 'guilsinglleft': 333,
  33515. 'guilsinglright': 333,
  33516. 'fi': 500,
  33517. 'fl': 500,
  33518. 'endash': 556,
  33519. 'dagger': 556,
  33520. 'daggerdbl': 556,
  33521. 'periodcentered': 278,
  33522. 'paragraph': 537,
  33523. 'bullet': 350,
  33524. 'quotesinglbase': 222,
  33525. 'quotedblbase': 333,
  33526. 'quotedblright': 333,
  33527. 'guillemotright': 556,
  33528. 'ellipsis': 1000,
  33529. 'perthousand': 1000,
  33530. 'questiondown': 611,
  33531. 'grave': 333,
  33532. 'acute': 333,
  33533. 'circumflex': 333,
  33534. 'tilde': 333,
  33535. 'macron': 333,
  33536. 'breve': 333,
  33537. 'dotaccent': 333,
  33538. 'dieresis': 333,
  33539. 'ring': 333,
  33540. 'cedilla': 333,
  33541. 'hungarumlaut': 333,
  33542. 'ogonek': 333,
  33543. 'caron': 333,
  33544. 'emdash': 1000,
  33545. 'AE': 1000,
  33546. 'ordfeminine': 370,
  33547. 'Lslash': 556,
  33548. 'Oslash': 778,
  33549. 'OE': 1000,
  33550. 'ordmasculine': 365,
  33551. 'ae': 889,
  33552. 'dotlessi': 278,
  33553. 'lslash': 222,
  33554. 'oslash': 611,
  33555. 'oe': 944,
  33556. 'germandbls': 611,
  33557. 'Idieresis': 278,
  33558. 'eacute': 556,
  33559. 'abreve': 556,
  33560. 'uhungarumlaut': 556,
  33561. 'ecaron': 556,
  33562. 'Ydieresis': 667,
  33563. 'divide': 584,
  33564. 'Yacute': 667,
  33565. 'Acircumflex': 667,
  33566. 'aacute': 556,
  33567. 'Ucircumflex': 722,
  33568. 'yacute': 500,
  33569. 'scommaaccent': 500,
  33570. 'ecircumflex': 556,
  33571. 'Uring': 722,
  33572. 'Udieresis': 722,
  33573. 'aogonek': 556,
  33574. 'Uacute': 722,
  33575. 'uogonek': 556,
  33576. 'Edieresis': 667,
  33577. 'Dcroat': 722,
  33578. 'commaaccent': 250,
  33579. 'copyright': 737,
  33580. 'Emacron': 667,
  33581. 'ccaron': 500,
  33582. 'aring': 556,
  33583. 'Ncommaaccent': 722,
  33584. 'lacute': 222,
  33585. 'agrave': 556,
  33586. 'Tcommaaccent': 611,
  33587. 'Cacute': 722,
  33588. 'atilde': 556,
  33589. 'Edotaccent': 667,
  33590. 'scaron': 500,
  33591. 'scedilla': 500,
  33592. 'iacute': 278,
  33593. 'lozenge': 471,
  33594. 'Rcaron': 722,
  33595. 'Gcommaaccent': 778,
  33596. 'ucircumflex': 556,
  33597. 'acircumflex': 556,
  33598. 'Amacron': 667,
  33599. 'rcaron': 333,
  33600. 'ccedilla': 500,
  33601. 'Zdotaccent': 611,
  33602. 'Thorn': 667,
  33603. 'Omacron': 778,
  33604. 'Racute': 722,
  33605. 'Sacute': 667,
  33606. 'dcaron': 643,
  33607. 'Umacron': 722,
  33608. 'uring': 556,
  33609. 'threesuperior': 333,
  33610. 'Ograve': 778,
  33611. 'Agrave': 667,
  33612. 'Abreve': 667,
  33613. 'multiply': 584,
  33614. 'uacute': 556,
  33615. 'Tcaron': 611,
  33616. 'partialdiff': 476,
  33617. 'ydieresis': 500,
  33618. 'Nacute': 722,
  33619. 'icircumflex': 278,
  33620. 'Ecircumflex': 667,
  33621. 'adieresis': 556,
  33622. 'edieresis': 556,
  33623. 'cacute': 500,
  33624. 'nacute': 556,
  33625. 'umacron': 556,
  33626. 'Ncaron': 722,
  33627. 'Iacute': 278,
  33628. 'plusminus': 584,
  33629. 'brokenbar': 260,
  33630. 'registered': 737,
  33631. 'Gbreve': 778,
  33632. 'Idotaccent': 278,
  33633. 'summation': 600,
  33634. 'Egrave': 667,
  33635. 'racute': 333,
  33636. 'omacron': 556,
  33637. 'Zacute': 611,
  33638. 'Zcaron': 611,
  33639. 'greaterequal': 549,
  33640. 'Eth': 722,
  33641. 'Ccedilla': 722,
  33642. 'lcommaaccent': 222,
  33643. 'tcaron': 317,
  33644. 'eogonek': 556,
  33645. 'Uogonek': 722,
  33646. 'Aacute': 667,
  33647. 'Adieresis': 667,
  33648. 'egrave': 556,
  33649. 'zacute': 500,
  33650. 'iogonek': 222,
  33651. 'Oacute': 778,
  33652. 'oacute': 556,
  33653. 'amacron': 556,
  33654. 'sacute': 500,
  33655. 'idieresis': 278,
  33656. 'Ocircumflex': 778,
  33657. 'Ugrave': 722,
  33658. 'Delta': 612,
  33659. 'thorn': 556,
  33660. 'twosuperior': 333,
  33661. 'Odieresis': 778,
  33662. 'mu': 556,
  33663. 'igrave': 278,
  33664. 'ohungarumlaut': 556,
  33665. 'Eogonek': 667,
  33666. 'dcroat': 556,
  33667. 'threequarters': 834,
  33668. 'Scedilla': 667,
  33669. 'lcaron': 299,
  33670. 'Kcommaaccent': 667,
  33671. 'Lacute': 556,
  33672. 'trademark': 1000,
  33673. 'edotaccent': 556,
  33674. 'Igrave': 278,
  33675. 'Imacron': 278,
  33676. 'Lcaron': 556,
  33677. 'onehalf': 834,
  33678. 'lessequal': 549,
  33679. 'ocircumflex': 556,
  33680. 'ntilde': 556,
  33681. 'Uhungarumlaut': 722,
  33682. 'Eacute': 667,
  33683. 'emacron': 556,
  33684. 'gbreve': 556,
  33685. 'onequarter': 834,
  33686. 'Scaron': 667,
  33687. 'Scommaaccent': 667,
  33688. 'Ohungarumlaut': 778,
  33689. 'degree': 400,
  33690. 'ograve': 556,
  33691. 'Ccaron': 722,
  33692. 'ugrave': 556,
  33693. 'radical': 453,
  33694. 'Dcaron': 722,
  33695. 'rcommaaccent': 333,
  33696. 'Ntilde': 722,
  33697. 'otilde': 556,
  33698. 'Rcommaaccent': 722,
  33699. 'Lcommaaccent': 556,
  33700. 'Atilde': 667,
  33701. 'Aogonek': 667,
  33702. 'Aring': 667,
  33703. 'Otilde': 778,
  33704. 'zdotaccent': 500,
  33705. 'Ecaron': 667,
  33706. 'Iogonek': 278,
  33707. 'kcommaaccent': 500,
  33708. 'minus': 584,
  33709. 'Icircumflex': 278,
  33710. 'ncaron': 556,
  33711. 'tcommaaccent': 278,
  33712. 'logicalnot': 584,
  33713. 'odieresis': 556,
  33714. 'udieresis': 556,
  33715. 'notequal': 549,
  33716. 'gcommaaccent': 556,
  33717. 'eth': 556,
  33718. 'zcaron': 500,
  33719. 'ncommaaccent': 556,
  33720. 'onesuperior': 333,
  33721. 'imacron': 278,
  33722. 'Euro': 556
  33723. },
  33724. 'Helvetica-Bold': {
  33725. 'space': 278,
  33726. 'exclam': 333,
  33727. 'quotedbl': 474,
  33728. 'numbersign': 556,
  33729. 'dollar': 556,
  33730. 'percent': 889,
  33731. 'ampersand': 722,
  33732. 'quoteright': 278,
  33733. 'parenleft': 333,
  33734. 'parenright': 333,
  33735. 'asterisk': 389,
  33736. 'plus': 584,
  33737. 'comma': 278,
  33738. 'hyphen': 333,
  33739. 'period': 278,
  33740. 'slash': 278,
  33741. 'zero': 556,
  33742. 'one': 556,
  33743. 'two': 556,
  33744. 'three': 556,
  33745. 'four': 556,
  33746. 'five': 556,
  33747. 'six': 556,
  33748. 'seven': 556,
  33749. 'eight': 556,
  33750. 'nine': 556,
  33751. 'colon': 333,
  33752. 'semicolon': 333,
  33753. 'less': 584,
  33754. 'equal': 584,
  33755. 'greater': 584,
  33756. 'question': 611,
  33757. 'at': 975,
  33758. 'A': 722,
  33759. 'B': 722,
  33760. 'C': 722,
  33761. 'D': 722,
  33762. 'E': 667,
  33763. 'F': 611,
  33764. 'G': 778,
  33765. 'H': 722,
  33766. 'I': 278,
  33767. 'J': 556,
  33768. 'K': 722,
  33769. 'L': 611,
  33770. 'M': 833,
  33771. 'N': 722,
  33772. 'O': 778,
  33773. 'P': 667,
  33774. 'Q': 778,
  33775. 'R': 722,
  33776. 'S': 667,
  33777. 'T': 611,
  33778. 'U': 722,
  33779. 'V': 667,
  33780. 'W': 944,
  33781. 'X': 667,
  33782. 'Y': 667,
  33783. 'Z': 611,
  33784. 'bracketleft': 333,
  33785. 'backslash': 278,
  33786. 'bracketright': 333,
  33787. 'asciicircum': 584,
  33788. 'underscore': 556,
  33789. 'quoteleft': 278,
  33790. 'a': 556,
  33791. 'b': 611,
  33792. 'c': 556,
  33793. 'd': 611,
  33794. 'e': 556,
  33795. 'f': 333,
  33796. 'g': 611,
  33797. 'h': 611,
  33798. 'i': 278,
  33799. 'j': 278,
  33800. 'k': 556,
  33801. 'l': 278,
  33802. 'm': 889,
  33803. 'n': 611,
  33804. 'o': 611,
  33805. 'p': 611,
  33806. 'q': 611,
  33807. 'r': 389,
  33808. 's': 556,
  33809. 't': 333,
  33810. 'u': 611,
  33811. 'v': 556,
  33812. 'w': 778,
  33813. 'x': 556,
  33814. 'y': 556,
  33815. 'z': 500,
  33816. 'braceleft': 389,
  33817. 'bar': 280,
  33818. 'braceright': 389,
  33819. 'asciitilde': 584,
  33820. 'exclamdown': 333,
  33821. 'cent': 556,
  33822. 'sterling': 556,
  33823. 'fraction': 167,
  33824. 'yen': 556,
  33825. 'florin': 556,
  33826. 'section': 556,
  33827. 'currency': 556,
  33828. 'quotesingle': 238,
  33829. 'quotedblleft': 500,
  33830. 'guillemotleft': 556,
  33831. 'guilsinglleft': 333,
  33832. 'guilsinglright': 333,
  33833. 'fi': 611,
  33834. 'fl': 611,
  33835. 'endash': 556,
  33836. 'dagger': 556,
  33837. 'daggerdbl': 556,
  33838. 'periodcentered': 278,
  33839. 'paragraph': 556,
  33840. 'bullet': 350,
  33841. 'quotesinglbase': 278,
  33842. 'quotedblbase': 500,
  33843. 'quotedblright': 500,
  33844. 'guillemotright': 556,
  33845. 'ellipsis': 1000,
  33846. 'perthousand': 1000,
  33847. 'questiondown': 611,
  33848. 'grave': 333,
  33849. 'acute': 333,
  33850. 'circumflex': 333,
  33851. 'tilde': 333,
  33852. 'macron': 333,
  33853. 'breve': 333,
  33854. 'dotaccent': 333,
  33855. 'dieresis': 333,
  33856. 'ring': 333,
  33857. 'cedilla': 333,
  33858. 'hungarumlaut': 333,
  33859. 'ogonek': 333,
  33860. 'caron': 333,
  33861. 'emdash': 1000,
  33862. 'AE': 1000,
  33863. 'ordfeminine': 370,
  33864. 'Lslash': 611,
  33865. 'Oslash': 778,
  33866. 'OE': 1000,
  33867. 'ordmasculine': 365,
  33868. 'ae': 889,
  33869. 'dotlessi': 278,
  33870. 'lslash': 278,
  33871. 'oslash': 611,
  33872. 'oe': 944,
  33873. 'germandbls': 611,
  33874. 'Idieresis': 278,
  33875. 'eacute': 556,
  33876. 'abreve': 556,
  33877. 'uhungarumlaut': 611,
  33878. 'ecaron': 556,
  33879. 'Ydieresis': 667,
  33880. 'divide': 584,
  33881. 'Yacute': 667,
  33882. 'Acircumflex': 722,
  33883. 'aacute': 556,
  33884. 'Ucircumflex': 722,
  33885. 'yacute': 556,
  33886. 'scommaaccent': 556,
  33887. 'ecircumflex': 556,
  33888. 'Uring': 722,
  33889. 'Udieresis': 722,
  33890. 'aogonek': 556,
  33891. 'Uacute': 722,
  33892. 'uogonek': 611,
  33893. 'Edieresis': 667,
  33894. 'Dcroat': 722,
  33895. 'commaaccent': 250,
  33896. 'copyright': 737,
  33897. 'Emacron': 667,
  33898. 'ccaron': 556,
  33899. 'aring': 556,
  33900. 'Ncommaaccent': 722,
  33901. 'lacute': 278,
  33902. 'agrave': 556,
  33903. 'Tcommaaccent': 611,
  33904. 'Cacute': 722,
  33905. 'atilde': 556,
  33906. 'Edotaccent': 667,
  33907. 'scaron': 556,
  33908. 'scedilla': 556,
  33909. 'iacute': 278,
  33910. 'lozenge': 494,
  33911. 'Rcaron': 722,
  33912. 'Gcommaaccent': 778,
  33913. 'ucircumflex': 611,
  33914. 'acircumflex': 556,
  33915. 'Amacron': 722,
  33916. 'rcaron': 389,
  33917. 'ccedilla': 556,
  33918. 'Zdotaccent': 611,
  33919. 'Thorn': 667,
  33920. 'Omacron': 778,
  33921. 'Racute': 722,
  33922. 'Sacute': 667,
  33923. 'dcaron': 743,
  33924. 'Umacron': 722,
  33925. 'uring': 611,
  33926. 'threesuperior': 333,
  33927. 'Ograve': 778,
  33928. 'Agrave': 722,
  33929. 'Abreve': 722,
  33930. 'multiply': 584,
  33931. 'uacute': 611,
  33932. 'Tcaron': 611,
  33933. 'partialdiff': 494,
  33934. 'ydieresis': 556,
  33935. 'Nacute': 722,
  33936. 'icircumflex': 278,
  33937. 'Ecircumflex': 667,
  33938. 'adieresis': 556,
  33939. 'edieresis': 556,
  33940. 'cacute': 556,
  33941. 'nacute': 611,
  33942. 'umacron': 611,
  33943. 'Ncaron': 722,
  33944. 'Iacute': 278,
  33945. 'plusminus': 584,
  33946. 'brokenbar': 280,
  33947. 'registered': 737,
  33948. 'Gbreve': 778,
  33949. 'Idotaccent': 278,
  33950. 'summation': 600,
  33951. 'Egrave': 667,
  33952. 'racute': 389,
  33953. 'omacron': 611,
  33954. 'Zacute': 611,
  33955. 'Zcaron': 611,
  33956. 'greaterequal': 549,
  33957. 'Eth': 722,
  33958. 'Ccedilla': 722,
  33959. 'lcommaaccent': 278,
  33960. 'tcaron': 389,
  33961. 'eogonek': 556,
  33962. 'Uogonek': 722,
  33963. 'Aacute': 722,
  33964. 'Adieresis': 722,
  33965. 'egrave': 556,
  33966. 'zacute': 500,
  33967. 'iogonek': 278,
  33968. 'Oacute': 778,
  33969. 'oacute': 611,
  33970. 'amacron': 556,
  33971. 'sacute': 556,
  33972. 'idieresis': 278,
  33973. 'Ocircumflex': 778,
  33974. 'Ugrave': 722,
  33975. 'Delta': 612,
  33976. 'thorn': 611,
  33977. 'twosuperior': 333,
  33978. 'Odieresis': 778,
  33979. 'mu': 611,
  33980. 'igrave': 278,
  33981. 'ohungarumlaut': 611,
  33982. 'Eogonek': 667,
  33983. 'dcroat': 611,
  33984. 'threequarters': 834,
  33985. 'Scedilla': 667,
  33986. 'lcaron': 400,
  33987. 'Kcommaaccent': 722,
  33988. 'Lacute': 611,
  33989. 'trademark': 1000,
  33990. 'edotaccent': 556,
  33991. 'Igrave': 278,
  33992. 'Imacron': 278,
  33993. 'Lcaron': 611,
  33994. 'onehalf': 834,
  33995. 'lessequal': 549,
  33996. 'ocircumflex': 611,
  33997. 'ntilde': 611,
  33998. 'Uhungarumlaut': 722,
  33999. 'Eacute': 667,
  34000. 'emacron': 556,
  34001. 'gbreve': 611,
  34002. 'onequarter': 834,
  34003. 'Scaron': 667,
  34004. 'Scommaaccent': 667,
  34005. 'Ohungarumlaut': 778,
  34006. 'degree': 400,
  34007. 'ograve': 611,
  34008. 'Ccaron': 722,
  34009. 'ugrave': 611,
  34010. 'radical': 549,
  34011. 'Dcaron': 722,
  34012. 'rcommaaccent': 389,
  34013. 'Ntilde': 722,
  34014. 'otilde': 611,
  34015. 'Rcommaaccent': 722,
  34016. 'Lcommaaccent': 611,
  34017. 'Atilde': 722,
  34018. 'Aogonek': 722,
  34019. 'Aring': 722,
  34020. 'Otilde': 778,
  34021. 'zdotaccent': 500,
  34022. 'Ecaron': 667,
  34023. 'Iogonek': 278,
  34024. 'kcommaaccent': 556,
  34025. 'minus': 584,
  34026. 'Icircumflex': 278,
  34027. 'ncaron': 611,
  34028. 'tcommaaccent': 333,
  34029. 'logicalnot': 584,
  34030. 'odieresis': 611,
  34031. 'udieresis': 611,
  34032. 'notequal': 549,
  34033. 'gcommaaccent': 611,
  34034. 'eth': 611,
  34035. 'zcaron': 500,
  34036. 'ncommaaccent': 611,
  34037. 'onesuperior': 333,
  34038. 'imacron': 278,
  34039. 'Euro': 556
  34040. },
  34041. 'Helvetica-BoldOblique': {
  34042. 'space': 278,
  34043. 'exclam': 333,
  34044. 'quotedbl': 474,
  34045. 'numbersign': 556,
  34046. 'dollar': 556,
  34047. 'percent': 889,
  34048. 'ampersand': 722,
  34049. 'quoteright': 278,
  34050. 'parenleft': 333,
  34051. 'parenright': 333,
  34052. 'asterisk': 389,
  34053. 'plus': 584,
  34054. 'comma': 278,
  34055. 'hyphen': 333,
  34056. 'period': 278,
  34057. 'slash': 278,
  34058. 'zero': 556,
  34059. 'one': 556,
  34060. 'two': 556,
  34061. 'three': 556,
  34062. 'four': 556,
  34063. 'five': 556,
  34064. 'six': 556,
  34065. 'seven': 556,
  34066. 'eight': 556,
  34067. 'nine': 556,
  34068. 'colon': 333,
  34069. 'semicolon': 333,
  34070. 'less': 584,
  34071. 'equal': 584,
  34072. 'greater': 584,
  34073. 'question': 611,
  34074. 'at': 975,
  34075. 'A': 722,
  34076. 'B': 722,
  34077. 'C': 722,
  34078. 'D': 722,
  34079. 'E': 667,
  34080. 'F': 611,
  34081. 'G': 778,
  34082. 'H': 722,
  34083. 'I': 278,
  34084. 'J': 556,
  34085. 'K': 722,
  34086. 'L': 611,
  34087. 'M': 833,
  34088. 'N': 722,
  34089. 'O': 778,
  34090. 'P': 667,
  34091. 'Q': 778,
  34092. 'R': 722,
  34093. 'S': 667,
  34094. 'T': 611,
  34095. 'U': 722,
  34096. 'V': 667,
  34097. 'W': 944,
  34098. 'X': 667,
  34099. 'Y': 667,
  34100. 'Z': 611,
  34101. 'bracketleft': 333,
  34102. 'backslash': 278,
  34103. 'bracketright': 333,
  34104. 'asciicircum': 584,
  34105. 'underscore': 556,
  34106. 'quoteleft': 278,
  34107. 'a': 556,
  34108. 'b': 611,
  34109. 'c': 556,
  34110. 'd': 611,
  34111. 'e': 556,
  34112. 'f': 333,
  34113. 'g': 611,
  34114. 'h': 611,
  34115. 'i': 278,
  34116. 'j': 278,
  34117. 'k': 556,
  34118. 'l': 278,
  34119. 'm': 889,
  34120. 'n': 611,
  34121. 'o': 611,
  34122. 'p': 611,
  34123. 'q': 611,
  34124. 'r': 389,
  34125. 's': 556,
  34126. 't': 333,
  34127. 'u': 611,
  34128. 'v': 556,
  34129. 'w': 778,
  34130. 'x': 556,
  34131. 'y': 556,
  34132. 'z': 500,
  34133. 'braceleft': 389,
  34134. 'bar': 280,
  34135. 'braceright': 389,
  34136. 'asciitilde': 584,
  34137. 'exclamdown': 333,
  34138. 'cent': 556,
  34139. 'sterling': 556,
  34140. 'fraction': 167,
  34141. 'yen': 556,
  34142. 'florin': 556,
  34143. 'section': 556,
  34144. 'currency': 556,
  34145. 'quotesingle': 238,
  34146. 'quotedblleft': 500,
  34147. 'guillemotleft': 556,
  34148. 'guilsinglleft': 333,
  34149. 'guilsinglright': 333,
  34150. 'fi': 611,
  34151. 'fl': 611,
  34152. 'endash': 556,
  34153. 'dagger': 556,
  34154. 'daggerdbl': 556,
  34155. 'periodcentered': 278,
  34156. 'paragraph': 556,
  34157. 'bullet': 350,
  34158. 'quotesinglbase': 278,
  34159. 'quotedblbase': 500,
  34160. 'quotedblright': 500,
  34161. 'guillemotright': 556,
  34162. 'ellipsis': 1000,
  34163. 'perthousand': 1000,
  34164. 'questiondown': 611,
  34165. 'grave': 333,
  34166. 'acute': 333,
  34167. 'circumflex': 333,
  34168. 'tilde': 333,
  34169. 'macron': 333,
  34170. 'breve': 333,
  34171. 'dotaccent': 333,
  34172. 'dieresis': 333,
  34173. 'ring': 333,
  34174. 'cedilla': 333,
  34175. 'hungarumlaut': 333,
  34176. 'ogonek': 333,
  34177. 'caron': 333,
  34178. 'emdash': 1000,
  34179. 'AE': 1000,
  34180. 'ordfeminine': 370,
  34181. 'Lslash': 611,
  34182. 'Oslash': 778,
  34183. 'OE': 1000,
  34184. 'ordmasculine': 365,
  34185. 'ae': 889,
  34186. 'dotlessi': 278,
  34187. 'lslash': 278,
  34188. 'oslash': 611,
  34189. 'oe': 944,
  34190. 'germandbls': 611,
  34191. 'Idieresis': 278,
  34192. 'eacute': 556,
  34193. 'abreve': 556,
  34194. 'uhungarumlaut': 611,
  34195. 'ecaron': 556,
  34196. 'Ydieresis': 667,
  34197. 'divide': 584,
  34198. 'Yacute': 667,
  34199. 'Acircumflex': 722,
  34200. 'aacute': 556,
  34201. 'Ucircumflex': 722,
  34202. 'yacute': 556,
  34203. 'scommaaccent': 556,
  34204. 'ecircumflex': 556,
  34205. 'Uring': 722,
  34206. 'Udieresis': 722,
  34207. 'aogonek': 556,
  34208. 'Uacute': 722,
  34209. 'uogonek': 611,
  34210. 'Edieresis': 667,
  34211. 'Dcroat': 722,
  34212. 'commaaccent': 250,
  34213. 'copyright': 737,
  34214. 'Emacron': 667,
  34215. 'ccaron': 556,
  34216. 'aring': 556,
  34217. 'Ncommaaccent': 722,
  34218. 'lacute': 278,
  34219. 'agrave': 556,
  34220. 'Tcommaaccent': 611,
  34221. 'Cacute': 722,
  34222. 'atilde': 556,
  34223. 'Edotaccent': 667,
  34224. 'scaron': 556,
  34225. 'scedilla': 556,
  34226. 'iacute': 278,
  34227. 'lozenge': 494,
  34228. 'Rcaron': 722,
  34229. 'Gcommaaccent': 778,
  34230. 'ucircumflex': 611,
  34231. 'acircumflex': 556,
  34232. 'Amacron': 722,
  34233. 'rcaron': 389,
  34234. 'ccedilla': 556,
  34235. 'Zdotaccent': 611,
  34236. 'Thorn': 667,
  34237. 'Omacron': 778,
  34238. 'Racute': 722,
  34239. 'Sacute': 667,
  34240. 'dcaron': 743,
  34241. 'Umacron': 722,
  34242. 'uring': 611,
  34243. 'threesuperior': 333,
  34244. 'Ograve': 778,
  34245. 'Agrave': 722,
  34246. 'Abreve': 722,
  34247. 'multiply': 584,
  34248. 'uacute': 611,
  34249. 'Tcaron': 611,
  34250. 'partialdiff': 494,
  34251. 'ydieresis': 556,
  34252. 'Nacute': 722,
  34253. 'icircumflex': 278,
  34254. 'Ecircumflex': 667,
  34255. 'adieresis': 556,
  34256. 'edieresis': 556,
  34257. 'cacute': 556,
  34258. 'nacute': 611,
  34259. 'umacron': 611,
  34260. 'Ncaron': 722,
  34261. 'Iacute': 278,
  34262. 'plusminus': 584,
  34263. 'brokenbar': 280,
  34264. 'registered': 737,
  34265. 'Gbreve': 778,
  34266. 'Idotaccent': 278,
  34267. 'summation': 600,
  34268. 'Egrave': 667,
  34269. 'racute': 389,
  34270. 'omacron': 611,
  34271. 'Zacute': 611,
  34272. 'Zcaron': 611,
  34273. 'greaterequal': 549,
  34274. 'Eth': 722,
  34275. 'Ccedilla': 722,
  34276. 'lcommaaccent': 278,
  34277. 'tcaron': 389,
  34278. 'eogonek': 556,
  34279. 'Uogonek': 722,
  34280. 'Aacute': 722,
  34281. 'Adieresis': 722,
  34282. 'egrave': 556,
  34283. 'zacute': 500,
  34284. 'iogonek': 278,
  34285. 'Oacute': 778,
  34286. 'oacute': 611,
  34287. 'amacron': 556,
  34288. 'sacute': 556,
  34289. 'idieresis': 278,
  34290. 'Ocircumflex': 778,
  34291. 'Ugrave': 722,
  34292. 'Delta': 612,
  34293. 'thorn': 611,
  34294. 'twosuperior': 333,
  34295. 'Odieresis': 778,
  34296. 'mu': 611,
  34297. 'igrave': 278,
  34298. 'ohungarumlaut': 611,
  34299. 'Eogonek': 667,
  34300. 'dcroat': 611,
  34301. 'threequarters': 834,
  34302. 'Scedilla': 667,
  34303. 'lcaron': 400,
  34304. 'Kcommaaccent': 722,
  34305. 'Lacute': 611,
  34306. 'trademark': 1000,
  34307. 'edotaccent': 556,
  34308. 'Igrave': 278,
  34309. 'Imacron': 278,
  34310. 'Lcaron': 611,
  34311. 'onehalf': 834,
  34312. 'lessequal': 549,
  34313. 'ocircumflex': 611,
  34314. 'ntilde': 611,
  34315. 'Uhungarumlaut': 722,
  34316. 'Eacute': 667,
  34317. 'emacron': 556,
  34318. 'gbreve': 611,
  34319. 'onequarter': 834,
  34320. 'Scaron': 667,
  34321. 'Scommaaccent': 667,
  34322. 'Ohungarumlaut': 778,
  34323. 'degree': 400,
  34324. 'ograve': 611,
  34325. 'Ccaron': 722,
  34326. 'ugrave': 611,
  34327. 'radical': 549,
  34328. 'Dcaron': 722,
  34329. 'rcommaaccent': 389,
  34330. 'Ntilde': 722,
  34331. 'otilde': 611,
  34332. 'Rcommaaccent': 722,
  34333. 'Lcommaaccent': 611,
  34334. 'Atilde': 722,
  34335. 'Aogonek': 722,
  34336. 'Aring': 722,
  34337. 'Otilde': 778,
  34338. 'zdotaccent': 500,
  34339. 'Ecaron': 667,
  34340. 'Iogonek': 278,
  34341. 'kcommaaccent': 556,
  34342. 'minus': 584,
  34343. 'Icircumflex': 278,
  34344. 'ncaron': 611,
  34345. 'tcommaaccent': 333,
  34346. 'logicalnot': 584,
  34347. 'odieresis': 611,
  34348. 'udieresis': 611,
  34349. 'notequal': 549,
  34350. 'gcommaaccent': 611,
  34351. 'eth': 611,
  34352. 'zcaron': 500,
  34353. 'ncommaaccent': 611,
  34354. 'onesuperior': 333,
  34355. 'imacron': 278,
  34356. 'Euro': 556
  34357. },
  34358. 'Helvetica-Oblique' : {
  34359. 'space': 278,
  34360. 'exclam': 278,
  34361. 'quotedbl': 355,
  34362. 'numbersign': 556,
  34363. 'dollar': 556,
  34364. 'percent': 889,
  34365. 'ampersand': 667,
  34366. 'quoteright': 222,
  34367. 'parenleft': 333,
  34368. 'parenright': 333,
  34369. 'asterisk': 389,
  34370. 'plus': 584,
  34371. 'comma': 278,
  34372. 'hyphen': 333,
  34373. 'period': 278,
  34374. 'slash': 278,
  34375. 'zero': 556,
  34376. 'one': 556,
  34377. 'two': 556,
  34378. 'three': 556,
  34379. 'four': 556,
  34380. 'five': 556,
  34381. 'six': 556,
  34382. 'seven': 556,
  34383. 'eight': 556,
  34384. 'nine': 556,
  34385. 'colon': 278,
  34386. 'semicolon': 278,
  34387. 'less': 584,
  34388. 'equal': 584,
  34389. 'greater': 584,
  34390. 'question': 556,
  34391. 'at': 1015,
  34392. 'A': 667,
  34393. 'B': 667,
  34394. 'C': 722,
  34395. 'D': 722,
  34396. 'E': 667,
  34397. 'F': 611,
  34398. 'G': 778,
  34399. 'H': 722,
  34400. 'I': 278,
  34401. 'J': 500,
  34402. 'K': 667,
  34403. 'L': 556,
  34404. 'M': 833,
  34405. 'N': 722,
  34406. 'O': 778,
  34407. 'P': 667,
  34408. 'Q': 778,
  34409. 'R': 722,
  34410. 'S': 667,
  34411. 'T': 611,
  34412. 'U': 722,
  34413. 'V': 667,
  34414. 'W': 944,
  34415. 'X': 667,
  34416. 'Y': 667,
  34417. 'Z': 611,
  34418. 'bracketleft': 278,
  34419. 'backslash': 278,
  34420. 'bracketright': 278,
  34421. 'asciicircum': 469,
  34422. 'underscore': 556,
  34423. 'quoteleft': 222,
  34424. 'a': 556,
  34425. 'b': 556,
  34426. 'c': 500,
  34427. 'd': 556,
  34428. 'e': 556,
  34429. 'f': 278,
  34430. 'g': 556,
  34431. 'h': 556,
  34432. 'i': 222,
  34433. 'j': 222,
  34434. 'k': 500,
  34435. 'l': 222,
  34436. 'm': 833,
  34437. 'n': 556,
  34438. 'o': 556,
  34439. 'p': 556,
  34440. 'q': 556,
  34441. 'r': 333,
  34442. 's': 500,
  34443. 't': 278,
  34444. 'u': 556,
  34445. 'v': 500,
  34446. 'w': 722,
  34447. 'x': 500,
  34448. 'y': 500,
  34449. 'z': 500,
  34450. 'braceleft': 334,
  34451. 'bar': 260,
  34452. 'braceright': 334,
  34453. 'asciitilde': 584,
  34454. 'exclamdown': 333,
  34455. 'cent': 556,
  34456. 'sterling': 556,
  34457. 'fraction': 167,
  34458. 'yen': 556,
  34459. 'florin': 556,
  34460. 'section': 556,
  34461. 'currency': 556,
  34462. 'quotesingle': 191,
  34463. 'quotedblleft': 333,
  34464. 'guillemotleft': 556,
  34465. 'guilsinglleft': 333,
  34466. 'guilsinglright': 333,
  34467. 'fi': 500,
  34468. 'fl': 500,
  34469. 'endash': 556,
  34470. 'dagger': 556,
  34471. 'daggerdbl': 556,
  34472. 'periodcentered': 278,
  34473. 'paragraph': 537,
  34474. 'bullet': 350,
  34475. 'quotesinglbase': 222,
  34476. 'quotedblbase': 333,
  34477. 'quotedblright': 333,
  34478. 'guillemotright': 556,
  34479. 'ellipsis': 1000,
  34480. 'perthousand': 1000,
  34481. 'questiondown': 611,
  34482. 'grave': 333,
  34483. 'acute': 333,
  34484. 'circumflex': 333,
  34485. 'tilde': 333,
  34486. 'macron': 333,
  34487. 'breve': 333,
  34488. 'dotaccent': 333,
  34489. 'dieresis': 333,
  34490. 'ring': 333,
  34491. 'cedilla': 333,
  34492. 'hungarumlaut': 333,
  34493. 'ogonek': 333,
  34494. 'caron': 333,
  34495. 'emdash': 1000,
  34496. 'AE': 1000,
  34497. 'ordfeminine': 370,
  34498. 'Lslash': 556,
  34499. 'Oslash': 778,
  34500. 'OE': 1000,
  34501. 'ordmasculine': 365,
  34502. 'ae': 889,
  34503. 'dotlessi': 278,
  34504. 'lslash': 222,
  34505. 'oslash': 611,
  34506. 'oe': 944,
  34507. 'germandbls': 611,
  34508. 'Idieresis': 278,
  34509. 'eacute': 556,
  34510. 'abreve': 556,
  34511. 'uhungarumlaut': 556,
  34512. 'ecaron': 556,
  34513. 'Ydieresis': 667,
  34514. 'divide': 584,
  34515. 'Yacute': 667,
  34516. 'Acircumflex': 667,
  34517. 'aacute': 556,
  34518. 'Ucircumflex': 722,
  34519. 'yacute': 500,
  34520. 'scommaaccent': 500,
  34521. 'ecircumflex': 556,
  34522. 'Uring': 722,
  34523. 'Udieresis': 722,
  34524. 'aogonek': 556,
  34525. 'Uacute': 722,
  34526. 'uogonek': 556,
  34527. 'Edieresis': 667,
  34528. 'Dcroat': 722,
  34529. 'commaaccent': 250,
  34530. 'copyright': 737,
  34531. 'Emacron': 667,
  34532. 'ccaron': 500,
  34533. 'aring': 556,
  34534. 'Ncommaaccent': 722,
  34535. 'lacute': 222,
  34536. 'agrave': 556,
  34537. 'Tcommaaccent': 611,
  34538. 'Cacute': 722,
  34539. 'atilde': 556,
  34540. 'Edotaccent': 667,
  34541. 'scaron': 500,
  34542. 'scedilla': 500,
  34543. 'iacute': 278,
  34544. 'lozenge': 471,
  34545. 'Rcaron': 722,
  34546. 'Gcommaaccent': 778,
  34547. 'ucircumflex': 556,
  34548. 'acircumflex': 556,
  34549. 'Amacron': 667,
  34550. 'rcaron': 333,
  34551. 'ccedilla': 500,
  34552. 'Zdotaccent': 611,
  34553. 'Thorn': 667,
  34554. 'Omacron': 778,
  34555. 'Racute': 722,
  34556. 'Sacute': 667,
  34557. 'dcaron': 643,
  34558. 'Umacron': 722,
  34559. 'uring': 556,
  34560. 'threesuperior': 333,
  34561. 'Ograve': 778,
  34562. 'Agrave': 667,
  34563. 'Abreve': 667,
  34564. 'multiply': 584,
  34565. 'uacute': 556,
  34566. 'Tcaron': 611,
  34567. 'partialdiff': 476,
  34568. 'ydieresis': 500,
  34569. 'Nacute': 722,
  34570. 'icircumflex': 278,
  34571. 'Ecircumflex': 667,
  34572. 'adieresis': 556,
  34573. 'edieresis': 556,
  34574. 'cacute': 500,
  34575. 'nacute': 556,
  34576. 'umacron': 556,
  34577. 'Ncaron': 722,
  34578. 'Iacute': 278,
  34579. 'plusminus': 584,
  34580. 'brokenbar': 260,
  34581. 'registered': 737,
  34582. 'Gbreve': 778,
  34583. 'Idotaccent': 278,
  34584. 'summation': 600,
  34585. 'Egrave': 667,
  34586. 'racute': 333,
  34587. 'omacron': 556,
  34588. 'Zacute': 611,
  34589. 'Zcaron': 611,
  34590. 'greaterequal': 549,
  34591. 'Eth': 722,
  34592. 'Ccedilla': 722,
  34593. 'lcommaaccent': 222,
  34594. 'tcaron': 317,
  34595. 'eogonek': 556,
  34596. 'Uogonek': 722,
  34597. 'Aacute': 667,
  34598. 'Adieresis': 667,
  34599. 'egrave': 556,
  34600. 'zacute': 500,
  34601. 'iogonek': 222,
  34602. 'Oacute': 778,
  34603. 'oacute': 556,
  34604. 'amacron': 556,
  34605. 'sacute': 500,
  34606. 'idieresis': 278,
  34607. 'Ocircumflex': 778,
  34608. 'Ugrave': 722,
  34609. 'Delta': 612,
  34610. 'thorn': 556,
  34611. 'twosuperior': 333,
  34612. 'Odieresis': 778,
  34613. 'mu': 556,
  34614. 'igrave': 278,
  34615. 'ohungarumlaut': 556,
  34616. 'Eogonek': 667,
  34617. 'dcroat': 556,
  34618. 'threequarters': 834,
  34619. 'Scedilla': 667,
  34620. 'lcaron': 299,
  34621. 'Kcommaaccent': 667,
  34622. 'Lacute': 556,
  34623. 'trademark': 1000,
  34624. 'edotaccent': 556,
  34625. 'Igrave': 278,
  34626. 'Imacron': 278,
  34627. 'Lcaron': 556,
  34628. 'onehalf': 834,
  34629. 'lessequal': 549,
  34630. 'ocircumflex': 556,
  34631. 'ntilde': 556,
  34632. 'Uhungarumlaut': 722,
  34633. 'Eacute': 667,
  34634. 'emacron': 556,
  34635. 'gbreve': 556,
  34636. 'onequarter': 834,
  34637. 'Scaron': 667,
  34638. 'Scommaaccent': 667,
  34639. 'Ohungarumlaut': 778,
  34640. 'degree': 400,
  34641. 'ograve': 556,
  34642. 'Ccaron': 722,
  34643. 'ugrave': 556,
  34644. 'radical': 453,
  34645. 'Dcaron': 722,
  34646. 'rcommaaccent': 333,
  34647. 'Ntilde': 722,
  34648. 'otilde': 556,
  34649. 'Rcommaaccent': 722,
  34650. 'Lcommaaccent': 556,
  34651. 'Atilde': 667,
  34652. 'Aogonek': 667,
  34653. 'Aring': 667,
  34654. 'Otilde': 778,
  34655. 'zdotaccent': 500,
  34656. 'Ecaron': 667,
  34657. 'Iogonek': 278,
  34658. 'kcommaaccent': 500,
  34659. 'minus': 584,
  34660. 'Icircumflex': 278,
  34661. 'ncaron': 556,
  34662. 'tcommaaccent': 278,
  34663. 'logicalnot': 584,
  34664. 'odieresis': 556,
  34665. 'udieresis': 556,
  34666. 'notequal': 549,
  34667. 'gcommaaccent': 556,
  34668. 'eth': 556,
  34669. 'zcaron': 500,
  34670. 'ncommaaccent': 556,
  34671. 'onesuperior': 333,
  34672. 'imacron': 278,
  34673. 'Euro': 556
  34674. },
  34675. 'Symbol': {
  34676. 'space': 250,
  34677. 'exclam': 333,
  34678. 'universal': 713,
  34679. 'numbersign': 500,
  34680. 'existential': 549,
  34681. 'percent': 833,
  34682. 'ampersand': 778,
  34683. 'suchthat': 439,
  34684. 'parenleft': 333,
  34685. 'parenright': 333,
  34686. 'asteriskmath': 500,
  34687. 'plus': 549,
  34688. 'comma': 250,
  34689. 'minus': 549,
  34690. 'period': 250,
  34691. 'slash': 278,
  34692. 'zero': 500,
  34693. 'one': 500,
  34694. 'two': 500,
  34695. 'three': 500,
  34696. 'four': 500,
  34697. 'five': 500,
  34698. 'six': 500,
  34699. 'seven': 500,
  34700. 'eight': 500,
  34701. 'nine': 500,
  34702. 'colon': 278,
  34703. 'semicolon': 278,
  34704. 'less': 549,
  34705. 'equal': 549,
  34706. 'greater': 549,
  34707. 'question': 444,
  34708. 'congruent': 549,
  34709. 'Alpha': 722,
  34710. 'Beta': 667,
  34711. 'Chi': 722,
  34712. 'Delta': 612,
  34713. 'Epsilon': 611,
  34714. 'Phi': 763,
  34715. 'Gamma': 603,
  34716. 'Eta': 722,
  34717. 'Iota': 333,
  34718. 'theta1': 631,
  34719. 'Kappa': 722,
  34720. 'Lambda': 686,
  34721. 'Mu': 889,
  34722. 'Nu': 722,
  34723. 'Omicron': 722,
  34724. 'Pi': 768,
  34725. 'Theta': 741,
  34726. 'Rho': 556,
  34727. 'Sigma': 592,
  34728. 'Tau': 611,
  34729. 'Upsilon': 690,
  34730. 'sigma1': 439,
  34731. 'Omega': 768,
  34732. 'Xi': 645,
  34733. 'Psi': 795,
  34734. 'Zeta': 611,
  34735. 'bracketleft': 333,
  34736. 'therefore': 863,
  34737. 'bracketright': 333,
  34738. 'perpendicular': 658,
  34739. 'underscore': 500,
  34740. 'radicalex': 500,
  34741. 'alpha': 631,
  34742. 'beta': 549,
  34743. 'chi': 549,
  34744. 'delta': 494,
  34745. 'epsilon': 439,
  34746. 'phi': 521,
  34747. 'gamma': 411,
  34748. 'eta': 603,
  34749. 'iota': 329,
  34750. 'phi1': 603,
  34751. 'kappa': 549,
  34752. 'lambda': 549,
  34753. 'mu': 576,
  34754. 'nu': 521,
  34755. 'omicron': 549,
  34756. 'pi': 549,
  34757. 'theta': 521,
  34758. 'rho': 549,
  34759. 'sigma': 603,
  34760. 'tau': 439,
  34761. 'upsilon': 576,
  34762. 'omega1': 713,
  34763. 'omega': 686,
  34764. 'xi': 493,
  34765. 'psi': 686,
  34766. 'zeta': 494,
  34767. 'braceleft': 480,
  34768. 'bar': 200,
  34769. 'braceright': 480,
  34770. 'similar': 549,
  34771. 'Euro': 750,
  34772. 'Upsilon1': 620,
  34773. 'minute': 247,
  34774. 'lessequal': 549,
  34775. 'fraction': 167,
  34776. 'infinity': 713,
  34777. 'florin': 500,
  34778. 'club': 753,
  34779. 'diamond': 753,
  34780. 'heart': 753,
  34781. 'spade': 753,
  34782. 'arrowboth': 1042,
  34783. 'arrowleft': 987,
  34784. 'arrowup': 603,
  34785. 'arrowright': 987,
  34786. 'arrowdown': 603,
  34787. 'degree': 400,
  34788. 'plusminus': 549,
  34789. 'second': 411,
  34790. 'greaterequal': 549,
  34791. 'multiply': 549,
  34792. 'proportional': 713,
  34793. 'partialdiff': 494,
  34794. 'bullet': 460,
  34795. 'divide': 549,
  34796. 'notequal': 549,
  34797. 'equivalence': 549,
  34798. 'approxequal': 549,
  34799. 'ellipsis': 1000,
  34800. 'arrowvertex': 603,
  34801. 'arrowhorizex': 1000,
  34802. 'carriagereturn': 658,
  34803. 'aleph': 823,
  34804. 'Ifraktur': 686,
  34805. 'Rfraktur': 795,
  34806. 'weierstrass': 987,
  34807. 'circlemultiply': 768,
  34808. 'circleplus': 768,
  34809. 'emptyset': 823,
  34810. 'intersection': 768,
  34811. 'union': 768,
  34812. 'propersuperset': 713,
  34813. 'reflexsuperset': 713,
  34814. 'notsubset': 713,
  34815. 'propersubset': 713,
  34816. 'reflexsubset': 713,
  34817. 'element': 713,
  34818. 'notelement': 713,
  34819. 'angle': 768,
  34820. 'gradient': 713,
  34821. 'registerserif': 790,
  34822. 'copyrightserif': 790,
  34823. 'trademarkserif': 890,
  34824. 'product': 823,
  34825. 'radical': 549,
  34826. 'dotmath': 250,
  34827. 'logicalnot': 713,
  34828. 'logicaland': 603,
  34829. 'logicalor': 603,
  34830. 'arrowdblboth': 1042,
  34831. 'arrowdblleft': 987,
  34832. 'arrowdblup': 603,
  34833. 'arrowdblright': 987,
  34834. 'arrowdbldown': 603,
  34835. 'lozenge': 494,
  34836. 'angleleft': 329,
  34837. 'registersans': 790,
  34838. 'copyrightsans': 790,
  34839. 'trademarksans': 786,
  34840. 'summation': 713,
  34841. 'parenlefttp': 384,
  34842. 'parenleftex': 384,
  34843. 'parenleftbt': 384,
  34844. 'bracketlefttp': 384,
  34845. 'bracketleftex': 384,
  34846. 'bracketleftbt': 384,
  34847. 'bracelefttp': 494,
  34848. 'braceleftmid': 494,
  34849. 'braceleftbt': 494,
  34850. 'braceex': 494,
  34851. 'angleright': 329,
  34852. 'integral': 274,
  34853. 'integraltp': 686,
  34854. 'integralex': 686,
  34855. 'integralbt': 686,
  34856. 'parenrighttp': 384,
  34857. 'parenrightex': 384,
  34858. 'parenrightbt': 384,
  34859. 'bracketrighttp': 384,
  34860. 'bracketrightex': 384,
  34861. 'bracketrightbt': 384,
  34862. 'bracerighttp': 494,
  34863. 'bracerightmid': 494,
  34864. 'bracerightbt': 494,
  34865. 'apple': 790
  34866. },
  34867. 'Times-Roman': {
  34868. 'space': 250,
  34869. 'exclam': 333,
  34870. 'quotedbl': 408,
  34871. 'numbersign': 500,
  34872. 'dollar': 500,
  34873. 'percent': 833,
  34874. 'ampersand': 778,
  34875. 'quoteright': 333,
  34876. 'parenleft': 333,
  34877. 'parenright': 333,
  34878. 'asterisk': 500,
  34879. 'plus': 564,
  34880. 'comma': 250,
  34881. 'hyphen': 333,
  34882. 'period': 250,
  34883. 'slash': 278,
  34884. 'zero': 500,
  34885. 'one': 500,
  34886. 'two': 500,
  34887. 'three': 500,
  34888. 'four': 500,
  34889. 'five': 500,
  34890. 'six': 500,
  34891. 'seven': 500,
  34892. 'eight': 500,
  34893. 'nine': 500,
  34894. 'colon': 278,
  34895. 'semicolon': 278,
  34896. 'less': 564,
  34897. 'equal': 564,
  34898. 'greater': 564,
  34899. 'question': 444,
  34900. 'at': 921,
  34901. 'A': 722,
  34902. 'B': 667,
  34903. 'C': 667,
  34904. 'D': 722,
  34905. 'E': 611,
  34906. 'F': 556,
  34907. 'G': 722,
  34908. 'H': 722,
  34909. 'I': 333,
  34910. 'J': 389,
  34911. 'K': 722,
  34912. 'L': 611,
  34913. 'M': 889,
  34914. 'N': 722,
  34915. 'O': 722,
  34916. 'P': 556,
  34917. 'Q': 722,
  34918. 'R': 667,
  34919. 'S': 556,
  34920. 'T': 611,
  34921. 'U': 722,
  34922. 'V': 722,
  34923. 'W': 944,
  34924. 'X': 722,
  34925. 'Y': 722,
  34926. 'Z': 611,
  34927. 'bracketleft': 333,
  34928. 'backslash': 278,
  34929. 'bracketright': 333,
  34930. 'asciicircum': 469,
  34931. 'underscore': 500,
  34932. 'quoteleft': 333,
  34933. 'a': 444,
  34934. 'b': 500,
  34935. 'c': 444,
  34936. 'd': 500,
  34937. 'e': 444,
  34938. 'f': 333,
  34939. 'g': 500,
  34940. 'h': 500,
  34941. 'i': 278,
  34942. 'j': 278,
  34943. 'k': 500,
  34944. 'l': 278,
  34945. 'm': 778,
  34946. 'n': 500,
  34947. 'o': 500,
  34948. 'p': 500,
  34949. 'q': 500,
  34950. 'r': 333,
  34951. 's': 389,
  34952. 't': 278,
  34953. 'u': 500,
  34954. 'v': 500,
  34955. 'w': 722,
  34956. 'x': 500,
  34957. 'y': 500,
  34958. 'z': 444,
  34959. 'braceleft': 480,
  34960. 'bar': 200,
  34961. 'braceright': 480,
  34962. 'asciitilde': 541,
  34963. 'exclamdown': 333,
  34964. 'cent': 500,
  34965. 'sterling': 500,
  34966. 'fraction': 167,
  34967. 'yen': 500,
  34968. 'florin': 500,
  34969. 'section': 500,
  34970. 'currency': 500,
  34971. 'quotesingle': 180,
  34972. 'quotedblleft': 444,
  34973. 'guillemotleft': 500,
  34974. 'guilsinglleft': 333,
  34975. 'guilsinglright': 333,
  34976. 'fi': 556,
  34977. 'fl': 556,
  34978. 'endash': 500,
  34979. 'dagger': 500,
  34980. 'daggerdbl': 500,
  34981. 'periodcentered': 250,
  34982. 'paragraph': 453,
  34983. 'bullet': 350,
  34984. 'quotesinglbase': 333,
  34985. 'quotedblbase': 444,
  34986. 'quotedblright': 444,
  34987. 'guillemotright': 500,
  34988. 'ellipsis': 1000,
  34989. 'perthousand': 1000,
  34990. 'questiondown': 444,
  34991. 'grave': 333,
  34992. 'acute': 333,
  34993. 'circumflex': 333,
  34994. 'tilde': 333,
  34995. 'macron': 333,
  34996. 'breve': 333,
  34997. 'dotaccent': 333,
  34998. 'dieresis': 333,
  34999. 'ring': 333,
  35000. 'cedilla': 333,
  35001. 'hungarumlaut': 333,
  35002. 'ogonek': 333,
  35003. 'caron': 333,
  35004. 'emdash': 1000,
  35005. 'AE': 889,
  35006. 'ordfeminine': 276,
  35007. 'Lslash': 611,
  35008. 'Oslash': 722,
  35009. 'OE': 889,
  35010. 'ordmasculine': 310,
  35011. 'ae': 667,
  35012. 'dotlessi': 278,
  35013. 'lslash': 278,
  35014. 'oslash': 500,
  35015. 'oe': 722,
  35016. 'germandbls': 500,
  35017. 'Idieresis': 333,
  35018. 'eacute': 444,
  35019. 'abreve': 444,
  35020. 'uhungarumlaut': 500,
  35021. 'ecaron': 444,
  35022. 'Ydieresis': 722,
  35023. 'divide': 564,
  35024. 'Yacute': 722,
  35025. 'Acircumflex': 722,
  35026. 'aacute': 444,
  35027. 'Ucircumflex': 722,
  35028. 'yacute': 500,
  35029. 'scommaaccent': 389,
  35030. 'ecircumflex': 444,
  35031. 'Uring': 722,
  35032. 'Udieresis': 722,
  35033. 'aogonek': 444,
  35034. 'Uacute': 722,
  35035. 'uogonek': 500,
  35036. 'Edieresis': 611,
  35037. 'Dcroat': 722,
  35038. 'commaaccent': 250,
  35039. 'copyright': 760,
  35040. 'Emacron': 611,
  35041. 'ccaron': 444,
  35042. 'aring': 444,
  35043. 'Ncommaaccent': 722,
  35044. 'lacute': 278,
  35045. 'agrave': 444,
  35046. 'Tcommaaccent': 611,
  35047. 'Cacute': 667,
  35048. 'atilde': 444,
  35049. 'Edotaccent': 611,
  35050. 'scaron': 389,
  35051. 'scedilla': 389,
  35052. 'iacute': 278,
  35053. 'lozenge': 471,
  35054. 'Rcaron': 667,
  35055. 'Gcommaaccent': 722,
  35056. 'ucircumflex': 500,
  35057. 'acircumflex': 444,
  35058. 'Amacron': 722,
  35059. 'rcaron': 333,
  35060. 'ccedilla': 444,
  35061. 'Zdotaccent': 611,
  35062. 'Thorn': 556,
  35063. 'Omacron': 722,
  35064. 'Racute': 667,
  35065. 'Sacute': 556,
  35066. 'dcaron': 588,
  35067. 'Umacron': 722,
  35068. 'uring': 500,
  35069. 'threesuperior': 300,
  35070. 'Ograve': 722,
  35071. 'Agrave': 722,
  35072. 'Abreve': 722,
  35073. 'multiply': 564,
  35074. 'uacute': 500,
  35075. 'Tcaron': 611,
  35076. 'partialdiff': 476,
  35077. 'ydieresis': 500,
  35078. 'Nacute': 722,
  35079. 'icircumflex': 278,
  35080. 'Ecircumflex': 611,
  35081. 'adieresis': 444,
  35082. 'edieresis': 444,
  35083. 'cacute': 444,
  35084. 'nacute': 500,
  35085. 'umacron': 500,
  35086. 'Ncaron': 722,
  35087. 'Iacute': 333,
  35088. 'plusminus': 564,
  35089. 'brokenbar': 200,
  35090. 'registered': 760,
  35091. 'Gbreve': 722,
  35092. 'Idotaccent': 333,
  35093. 'summation': 600,
  35094. 'Egrave': 611,
  35095. 'racute': 333,
  35096. 'omacron': 500,
  35097. 'Zacute': 611,
  35098. 'Zcaron': 611,
  35099. 'greaterequal': 549,
  35100. 'Eth': 722,
  35101. 'Ccedilla': 667,
  35102. 'lcommaaccent': 278,
  35103. 'tcaron': 326,
  35104. 'eogonek': 444,
  35105. 'Uogonek': 722,
  35106. 'Aacute': 722,
  35107. 'Adieresis': 722,
  35108. 'egrave': 444,
  35109. 'zacute': 444,
  35110. 'iogonek': 278,
  35111. 'Oacute': 722,
  35112. 'oacute': 500,
  35113. 'amacron': 444,
  35114. 'sacute': 389,
  35115. 'idieresis': 278,
  35116. 'Ocircumflex': 722,
  35117. 'Ugrave': 722,
  35118. 'Delta': 612,
  35119. 'thorn': 500,
  35120. 'twosuperior': 300,
  35121. 'Odieresis': 722,
  35122. 'mu': 500,
  35123. 'igrave': 278,
  35124. 'ohungarumlaut': 500,
  35125. 'Eogonek': 611,
  35126. 'dcroat': 500,
  35127. 'threequarters': 750,
  35128. 'Scedilla': 556,
  35129. 'lcaron': 344,
  35130. 'Kcommaaccent': 722,
  35131. 'Lacute': 611,
  35132. 'trademark': 980,
  35133. 'edotaccent': 444,
  35134. 'Igrave': 333,
  35135. 'Imacron': 333,
  35136. 'Lcaron': 611,
  35137. 'onehalf': 750,
  35138. 'lessequal': 549,
  35139. 'ocircumflex': 500,
  35140. 'ntilde': 500,
  35141. 'Uhungarumlaut': 722,
  35142. 'Eacute': 611,
  35143. 'emacron': 444,
  35144. 'gbreve': 500,
  35145. 'onequarter': 750,
  35146. 'Scaron': 556,
  35147. 'Scommaaccent': 556,
  35148. 'Ohungarumlaut': 722,
  35149. 'degree': 400,
  35150. 'ograve': 500,
  35151. 'Ccaron': 667,
  35152. 'ugrave': 500,
  35153. 'radical': 453,
  35154. 'Dcaron': 722,
  35155. 'rcommaaccent': 333,
  35156. 'Ntilde': 722,
  35157. 'otilde': 500,
  35158. 'Rcommaaccent': 667,
  35159. 'Lcommaaccent': 611,
  35160. 'Atilde': 722,
  35161. 'Aogonek': 722,
  35162. 'Aring': 722,
  35163. 'Otilde': 722,
  35164. 'zdotaccent': 444,
  35165. 'Ecaron': 611,
  35166. 'Iogonek': 333,
  35167. 'kcommaaccent': 500,
  35168. 'minus': 564,
  35169. 'Icircumflex': 333,
  35170. 'ncaron': 500,
  35171. 'tcommaaccent': 278,
  35172. 'logicalnot': 564,
  35173. 'odieresis': 500,
  35174. 'udieresis': 500,
  35175. 'notequal': 549,
  35176. 'gcommaaccent': 500,
  35177. 'eth': 500,
  35178. 'zcaron': 444,
  35179. 'ncommaaccent': 500,
  35180. 'onesuperior': 300,
  35181. 'imacron': 278,
  35182. 'Euro': 500
  35183. },
  35184. 'Times-Bold': {
  35185. 'space': 250,
  35186. 'exclam': 333,
  35187. 'quotedbl': 555,
  35188. 'numbersign': 500,
  35189. 'dollar': 500,
  35190. 'percent': 1000,
  35191. 'ampersand': 833,
  35192. 'quoteright': 333,
  35193. 'parenleft': 333,
  35194. 'parenright': 333,
  35195. 'asterisk': 500,
  35196. 'plus': 570,
  35197. 'comma': 250,
  35198. 'hyphen': 333,
  35199. 'period': 250,
  35200. 'slash': 278,
  35201. 'zero': 500,
  35202. 'one': 500,
  35203. 'two': 500,
  35204. 'three': 500,
  35205. 'four': 500,
  35206. 'five': 500,
  35207. 'six': 500,
  35208. 'seven': 500,
  35209. 'eight': 500,
  35210. 'nine': 500,
  35211. 'colon': 333,
  35212. 'semicolon': 333,
  35213. 'less': 570,
  35214. 'equal': 570,
  35215. 'greater': 570,
  35216. 'question': 500,
  35217. 'at': 930,
  35218. 'A': 722,
  35219. 'B': 667,
  35220. 'C': 722,
  35221. 'D': 722,
  35222. 'E': 667,
  35223. 'F': 611,
  35224. 'G': 778,
  35225. 'H': 778,
  35226. 'I': 389,
  35227. 'J': 500,
  35228. 'K': 778,
  35229. 'L': 667,
  35230. 'M': 944,
  35231. 'N': 722,
  35232. 'O': 778,
  35233. 'P': 611,
  35234. 'Q': 778,
  35235. 'R': 722,
  35236. 'S': 556,
  35237. 'T': 667,
  35238. 'U': 722,
  35239. 'V': 722,
  35240. 'W': 1000,
  35241. 'X': 722,
  35242. 'Y': 722,
  35243. 'Z': 667,
  35244. 'bracketleft': 333,
  35245. 'backslash': 278,
  35246. 'bracketright': 333,
  35247. 'asciicircum': 581,
  35248. 'underscore': 500,
  35249. 'quoteleft': 333,
  35250. 'a': 500,
  35251. 'b': 556,
  35252. 'c': 444,
  35253. 'd': 556,
  35254. 'e': 444,
  35255. 'f': 333,
  35256. 'g': 500,
  35257. 'h': 556,
  35258. 'i': 278,
  35259. 'j': 333,
  35260. 'k': 556,
  35261. 'l': 278,
  35262. 'm': 833,
  35263. 'n': 556,
  35264. 'o': 500,
  35265. 'p': 556,
  35266. 'q': 556,
  35267. 'r': 444,
  35268. 's': 389,
  35269. 't': 333,
  35270. 'u': 556,
  35271. 'v': 500,
  35272. 'w': 722,
  35273. 'x': 500,
  35274. 'y': 500,
  35275. 'z': 444,
  35276. 'braceleft': 394,
  35277. 'bar': 220,
  35278. 'braceright': 394,
  35279. 'asciitilde': 520,
  35280. 'exclamdown': 333,
  35281. 'cent': 500,
  35282. 'sterling': 500,
  35283. 'fraction': 167,
  35284. 'yen': 500,
  35285. 'florin': 500,
  35286. 'section': 500,
  35287. 'currency': 500,
  35288. 'quotesingle': 278,
  35289. 'quotedblleft': 500,
  35290. 'guillemotleft': 500,
  35291. 'guilsinglleft': 333,
  35292. 'guilsinglright': 333,
  35293. 'fi': 556,
  35294. 'fl': 556,
  35295. 'endash': 500,
  35296. 'dagger': 500,
  35297. 'daggerdbl': 500,
  35298. 'periodcentered': 250,
  35299. 'paragraph': 540,
  35300. 'bullet': 350,
  35301. 'quotesinglbase': 333,
  35302. 'quotedblbase': 500,
  35303. 'quotedblright': 500,
  35304. 'guillemotright': 500,
  35305. 'ellipsis': 1000,
  35306. 'perthousand': 1000,
  35307. 'questiondown': 500,
  35308. 'grave': 333,
  35309. 'acute': 333,
  35310. 'circumflex': 333,
  35311. 'tilde': 333,
  35312. 'macron': 333,
  35313. 'breve': 333,
  35314. 'dotaccent': 333,
  35315. 'dieresis': 333,
  35316. 'ring': 333,
  35317. 'cedilla': 333,
  35318. 'hungarumlaut': 333,
  35319. 'ogonek': 333,
  35320. 'caron': 333,
  35321. 'emdash': 1000,
  35322. 'AE': 1000,
  35323. 'ordfeminine': 300,
  35324. 'Lslash': 667,
  35325. 'Oslash': 778,
  35326. 'OE': 1000,
  35327. 'ordmasculine': 330,
  35328. 'ae': 722,
  35329. 'dotlessi': 278,
  35330. 'lslash': 278,
  35331. 'oslash': 500,
  35332. 'oe': 722,
  35333. 'germandbls': 556,
  35334. 'Idieresis': 389,
  35335. 'eacute': 444,
  35336. 'abreve': 500,
  35337. 'uhungarumlaut': 556,
  35338. 'ecaron': 444,
  35339. 'Ydieresis': 722,
  35340. 'divide': 570,
  35341. 'Yacute': 722,
  35342. 'Acircumflex': 722,
  35343. 'aacute': 500,
  35344. 'Ucircumflex': 722,
  35345. 'yacute': 500,
  35346. 'scommaaccent': 389,
  35347. 'ecircumflex': 444,
  35348. 'Uring': 722,
  35349. 'Udieresis': 722,
  35350. 'aogonek': 500,
  35351. 'Uacute': 722,
  35352. 'uogonek': 556,
  35353. 'Edieresis': 667,
  35354. 'Dcroat': 722,
  35355. 'commaaccent': 250,
  35356. 'copyright': 747,
  35357. 'Emacron': 667,
  35358. 'ccaron': 444,
  35359. 'aring': 500,
  35360. 'Ncommaaccent': 722,
  35361. 'lacute': 278,
  35362. 'agrave': 500,
  35363. 'Tcommaaccent': 667,
  35364. 'Cacute': 722,
  35365. 'atilde': 500,
  35366. 'Edotaccent': 667,
  35367. 'scaron': 389,
  35368. 'scedilla': 389,
  35369. 'iacute': 278,
  35370. 'lozenge': 494,
  35371. 'Rcaron': 722,
  35372. 'Gcommaaccent': 778,
  35373. 'ucircumflex': 556,
  35374. 'acircumflex': 500,
  35375. 'Amacron': 722,
  35376. 'rcaron': 444,
  35377. 'ccedilla': 444,
  35378. 'Zdotaccent': 667,
  35379. 'Thorn': 611,
  35380. 'Omacron': 778,
  35381. 'Racute': 722,
  35382. 'Sacute': 556,
  35383. 'dcaron': 672,
  35384. 'Umacron': 722,
  35385. 'uring': 556,
  35386. 'threesuperior': 300,
  35387. 'Ograve': 778,
  35388. 'Agrave': 722,
  35389. 'Abreve': 722,
  35390. 'multiply': 570,
  35391. 'uacute': 556,
  35392. 'Tcaron': 667,
  35393. 'partialdiff': 494,
  35394. 'ydieresis': 500,
  35395. 'Nacute': 722,
  35396. 'icircumflex': 278,
  35397. 'Ecircumflex': 667,
  35398. 'adieresis': 500,
  35399. 'edieresis': 444,
  35400. 'cacute': 444,
  35401. 'nacute': 556,
  35402. 'umacron': 556,
  35403. 'Ncaron': 722,
  35404. 'Iacute': 389,
  35405. 'plusminus': 570,
  35406. 'brokenbar': 220,
  35407. 'registered': 747,
  35408. 'Gbreve': 778,
  35409. 'Idotaccent': 389,
  35410. 'summation': 600,
  35411. 'Egrave': 667,
  35412. 'racute': 444,
  35413. 'omacron': 500,
  35414. 'Zacute': 667,
  35415. 'Zcaron': 667,
  35416. 'greaterequal': 549,
  35417. 'Eth': 722,
  35418. 'Ccedilla': 722,
  35419. 'lcommaaccent': 278,
  35420. 'tcaron': 416,
  35421. 'eogonek': 444,
  35422. 'Uogonek': 722,
  35423. 'Aacute': 722,
  35424. 'Adieresis': 722,
  35425. 'egrave': 444,
  35426. 'zacute': 444,
  35427. 'iogonek': 278,
  35428. 'Oacute': 778,
  35429. 'oacute': 500,
  35430. 'amacron': 500,
  35431. 'sacute': 389,
  35432. 'idieresis': 278,
  35433. 'Ocircumflex': 778,
  35434. 'Ugrave': 722,
  35435. 'Delta': 612,
  35436. 'thorn': 556,
  35437. 'twosuperior': 300,
  35438. 'Odieresis': 778,
  35439. 'mu': 556,
  35440. 'igrave': 278,
  35441. 'ohungarumlaut': 500,
  35442. 'Eogonek': 667,
  35443. 'dcroat': 556,
  35444. 'threequarters': 750,
  35445. 'Scedilla': 556,
  35446. 'lcaron': 394,
  35447. 'Kcommaaccent': 778,
  35448. 'Lacute': 667,
  35449. 'trademark': 1000,
  35450. 'edotaccent': 444,
  35451. 'Igrave': 389,
  35452. 'Imacron': 389,
  35453. 'Lcaron': 667,
  35454. 'onehalf': 750,
  35455. 'lessequal': 549,
  35456. 'ocircumflex': 500,
  35457. 'ntilde': 556,
  35458. 'Uhungarumlaut': 722,
  35459. 'Eacute': 667,
  35460. 'emacron': 444,
  35461. 'gbreve': 500,
  35462. 'onequarter': 750,
  35463. 'Scaron': 556,
  35464. 'Scommaaccent': 556,
  35465. 'Ohungarumlaut': 778,
  35466. 'degree': 400,
  35467. 'ograve': 500,
  35468. 'Ccaron': 722,
  35469. 'ugrave': 556,
  35470. 'radical': 549,
  35471. 'Dcaron': 722,
  35472. 'rcommaaccent': 444,
  35473. 'Ntilde': 722,
  35474. 'otilde': 500,
  35475. 'Rcommaaccent': 722,
  35476. 'Lcommaaccent': 667,
  35477. 'Atilde': 722,
  35478. 'Aogonek': 722,
  35479. 'Aring': 722,
  35480. 'Otilde': 778,
  35481. 'zdotaccent': 444,
  35482. 'Ecaron': 667,
  35483. 'Iogonek': 389,
  35484. 'kcommaaccent': 556,
  35485. 'minus': 570,
  35486. 'Icircumflex': 389,
  35487. 'ncaron': 556,
  35488. 'tcommaaccent': 333,
  35489. 'logicalnot': 570,
  35490. 'odieresis': 500,
  35491. 'udieresis': 556,
  35492. 'notequal': 549,
  35493. 'gcommaaccent': 500,
  35494. 'eth': 500,
  35495. 'zcaron': 444,
  35496. 'ncommaaccent': 556,
  35497. 'onesuperior': 300,
  35498. 'imacron': 278,
  35499. 'Euro': 500
  35500. },
  35501. 'Times-BoldItalic': {
  35502. 'space': 250,
  35503. 'exclam': 389,
  35504. 'quotedbl': 555,
  35505. 'numbersign': 500,
  35506. 'dollar': 500,
  35507. 'percent': 833,
  35508. 'ampersand': 778,
  35509. 'quoteright': 333,
  35510. 'parenleft': 333,
  35511. 'parenright': 333,
  35512. 'asterisk': 500,
  35513. 'plus': 570,
  35514. 'comma': 250,
  35515. 'hyphen': 333,
  35516. 'period': 250,
  35517. 'slash': 278,
  35518. 'zero': 500,
  35519. 'one': 500,
  35520. 'two': 500,
  35521. 'three': 500,
  35522. 'four': 500,
  35523. 'five': 500,
  35524. 'six': 500,
  35525. 'seven': 500,
  35526. 'eight': 500,
  35527. 'nine': 500,
  35528. 'colon': 333,
  35529. 'semicolon': 333,
  35530. 'less': 570,
  35531. 'equal': 570,
  35532. 'greater': 570,
  35533. 'question': 500,
  35534. 'at': 832,
  35535. 'A': 667,
  35536. 'B': 667,
  35537. 'C': 667,
  35538. 'D': 722,
  35539. 'E': 667,
  35540. 'F': 667,
  35541. 'G': 722,
  35542. 'H': 778,
  35543. 'I': 389,
  35544. 'J': 500,
  35545. 'K': 667,
  35546. 'L': 611,
  35547. 'M': 889,
  35548. 'N': 722,
  35549. 'O': 722,
  35550. 'P': 611,
  35551. 'Q': 722,
  35552. 'R': 667,
  35553. 'S': 556,
  35554. 'T': 611,
  35555. 'U': 722,
  35556. 'V': 667,
  35557. 'W': 889,
  35558. 'X': 667,
  35559. 'Y': 611,
  35560. 'Z': 611,
  35561. 'bracketleft': 333,
  35562. 'backslash': 278,
  35563. 'bracketright': 333,
  35564. 'asciicircum': 570,
  35565. 'underscore': 500,
  35566. 'quoteleft': 333,
  35567. 'a': 500,
  35568. 'b': 500,
  35569. 'c': 444,
  35570. 'd': 500,
  35571. 'e': 444,
  35572. 'f': 333,
  35573. 'g': 500,
  35574. 'h': 556,
  35575. 'i': 278,
  35576. 'j': 278,
  35577. 'k': 500,
  35578. 'l': 278,
  35579. 'm': 778,
  35580. 'n': 556,
  35581. 'o': 500,
  35582. 'p': 500,
  35583. 'q': 500,
  35584. 'r': 389,
  35585. 's': 389,
  35586. 't': 278,
  35587. 'u': 556,
  35588. 'v': 444,
  35589. 'w': 667,
  35590. 'x': 500,
  35591. 'y': 444,
  35592. 'z': 389,
  35593. 'braceleft': 348,
  35594. 'bar': 220,
  35595. 'braceright': 348,
  35596. 'asciitilde': 570,
  35597. 'exclamdown': 389,
  35598. 'cent': 500,
  35599. 'sterling': 500,
  35600. 'fraction': 167,
  35601. 'yen': 500,
  35602. 'florin': 500,
  35603. 'section': 500,
  35604. 'currency': 500,
  35605. 'quotesingle': 278,
  35606. 'quotedblleft': 500,
  35607. 'guillemotleft': 500,
  35608. 'guilsinglleft': 333,
  35609. 'guilsinglright': 333,
  35610. 'fi': 556,
  35611. 'fl': 556,
  35612. 'endash': 500,
  35613. 'dagger': 500,
  35614. 'daggerdbl': 500,
  35615. 'periodcentered': 250,
  35616. 'paragraph': 500,
  35617. 'bullet': 350,
  35618. 'quotesinglbase': 333,
  35619. 'quotedblbase': 500,
  35620. 'quotedblright': 500,
  35621. 'guillemotright': 500,
  35622. 'ellipsis': 1000,
  35623. 'perthousand': 1000,
  35624. 'questiondown': 500,
  35625. 'grave': 333,
  35626. 'acute': 333,
  35627. 'circumflex': 333,
  35628. 'tilde': 333,
  35629. 'macron': 333,
  35630. 'breve': 333,
  35631. 'dotaccent': 333,
  35632. 'dieresis': 333,
  35633. 'ring': 333,
  35634. 'cedilla': 333,
  35635. 'hungarumlaut': 333,
  35636. 'ogonek': 333,
  35637. 'caron': 333,
  35638. 'emdash': 1000,
  35639. 'AE': 944,
  35640. 'ordfeminine': 266,
  35641. 'Lslash': 611,
  35642. 'Oslash': 722,
  35643. 'OE': 944,
  35644. 'ordmasculine': 300,
  35645. 'ae': 722,
  35646. 'dotlessi': 278,
  35647. 'lslash': 278,
  35648. 'oslash': 500,
  35649. 'oe': 722,
  35650. 'germandbls': 500,
  35651. 'Idieresis': 389,
  35652. 'eacute': 444,
  35653. 'abreve': 500,
  35654. 'uhungarumlaut': 556,
  35655. 'ecaron': 444,
  35656. 'Ydieresis': 611,
  35657. 'divide': 570,
  35658. 'Yacute': 611,
  35659. 'Acircumflex': 667,
  35660. 'aacute': 500,
  35661. 'Ucircumflex': 722,
  35662. 'yacute': 444,
  35663. 'scommaaccent': 389,
  35664. 'ecircumflex': 444,
  35665. 'Uring': 722,
  35666. 'Udieresis': 722,
  35667. 'aogonek': 500,
  35668. 'Uacute': 722,
  35669. 'uogonek': 556,
  35670. 'Edieresis': 667,
  35671. 'Dcroat': 722,
  35672. 'commaaccent': 250,
  35673. 'copyright': 747,
  35674. 'Emacron': 667,
  35675. 'ccaron': 444,
  35676. 'aring': 500,
  35677. 'Ncommaaccent': 722,
  35678. 'lacute': 278,
  35679. 'agrave': 500,
  35680. 'Tcommaaccent': 611,
  35681. 'Cacute': 667,
  35682. 'atilde': 500,
  35683. 'Edotaccent': 667,
  35684. 'scaron': 389,
  35685. 'scedilla': 389,
  35686. 'iacute': 278,
  35687. 'lozenge': 494,
  35688. 'Rcaron': 667,
  35689. 'Gcommaaccent': 722,
  35690. 'ucircumflex': 556,
  35691. 'acircumflex': 500,
  35692. 'Amacron': 667,
  35693. 'rcaron': 389,
  35694. 'ccedilla': 444,
  35695. 'Zdotaccent': 611,
  35696. 'Thorn': 611,
  35697. 'Omacron': 722,
  35698. 'Racute': 667,
  35699. 'Sacute': 556,
  35700. 'dcaron': 608,
  35701. 'Umacron': 722,
  35702. 'uring': 556,
  35703. 'threesuperior': 300,
  35704. 'Ograve': 722,
  35705. 'Agrave': 667,
  35706. 'Abreve': 667,
  35707. 'multiply': 570,
  35708. 'uacute': 556,
  35709. 'Tcaron': 611,
  35710. 'partialdiff': 494,
  35711. 'ydieresis': 444,
  35712. 'Nacute': 722,
  35713. 'icircumflex': 278,
  35714. 'Ecircumflex': 667,
  35715. 'adieresis': 500,
  35716. 'edieresis': 444,
  35717. 'cacute': 444,
  35718. 'nacute': 556,
  35719. 'umacron': 556,
  35720. 'Ncaron': 722,
  35721. 'Iacute': 389,
  35722. 'plusminus': 570,
  35723. 'brokenbar': 220,
  35724. 'registered': 747,
  35725. 'Gbreve': 722,
  35726. 'Idotaccent': 389,
  35727. 'summation': 600,
  35728. 'Egrave': 667,
  35729. 'racute': 389,
  35730. 'omacron': 500,
  35731. 'Zacute': 611,
  35732. 'Zcaron': 611,
  35733. 'greaterequal': 549,
  35734. 'Eth': 722,
  35735. 'Ccedilla': 667,
  35736. 'lcommaaccent': 278,
  35737. 'tcaron': 366,
  35738. 'eogonek': 444,
  35739. 'Uogonek': 722,
  35740. 'Aacute': 667,
  35741. 'Adieresis': 667,
  35742. 'egrave': 444,
  35743. 'zacute': 389,
  35744. 'iogonek': 278,
  35745. 'Oacute': 722,
  35746. 'oacute': 500,
  35747. 'amacron': 500,
  35748. 'sacute': 389,
  35749. 'idieresis': 278,
  35750. 'Ocircumflex': 722,
  35751. 'Ugrave': 722,
  35752. 'Delta': 612,
  35753. 'thorn': 500,
  35754. 'twosuperior': 300,
  35755. 'Odieresis': 722,
  35756. 'mu': 576,
  35757. 'igrave': 278,
  35758. 'ohungarumlaut': 500,
  35759. 'Eogonek': 667,
  35760. 'dcroat': 500,
  35761. 'threequarters': 750,
  35762. 'Scedilla': 556,
  35763. 'lcaron': 382,
  35764. 'Kcommaaccent': 667,
  35765. 'Lacute': 611,
  35766. 'trademark': 1000,
  35767. 'edotaccent': 444,
  35768. 'Igrave': 389,
  35769. 'Imacron': 389,
  35770. 'Lcaron': 611,
  35771. 'onehalf': 750,
  35772. 'lessequal': 549,
  35773. 'ocircumflex': 500,
  35774. 'ntilde': 556,
  35775. 'Uhungarumlaut': 722,
  35776. 'Eacute': 667,
  35777. 'emacron': 444,
  35778. 'gbreve': 500,
  35779. 'onequarter': 750,
  35780. 'Scaron': 556,
  35781. 'Scommaaccent': 556,
  35782. 'Ohungarumlaut': 722,
  35783. 'degree': 400,
  35784. 'ograve': 500,
  35785. 'Ccaron': 667,
  35786. 'ugrave': 556,
  35787. 'radical': 549,
  35788. 'Dcaron': 722,
  35789. 'rcommaaccent': 389,
  35790. 'Ntilde': 722,
  35791. 'otilde': 500,
  35792. 'Rcommaaccent': 667,
  35793. 'Lcommaaccent': 611,
  35794. 'Atilde': 667,
  35795. 'Aogonek': 667,
  35796. 'Aring': 667,
  35797. 'Otilde': 722,
  35798. 'zdotaccent': 389,
  35799. 'Ecaron': 667,
  35800. 'Iogonek': 389,
  35801. 'kcommaaccent': 500,
  35802. 'minus': 606,
  35803. 'Icircumflex': 389,
  35804. 'ncaron': 556,
  35805. 'tcommaaccent': 278,
  35806. 'logicalnot': 606,
  35807. 'odieresis': 500,
  35808. 'udieresis': 556,
  35809. 'notequal': 549,
  35810. 'gcommaaccent': 500,
  35811. 'eth': 500,
  35812. 'zcaron': 389,
  35813. 'ncommaaccent': 556,
  35814. 'onesuperior': 300,
  35815. 'imacron': 278,
  35816. 'Euro': 500
  35817. },
  35818. 'Times-Italic': {
  35819. 'space': 250,
  35820. 'exclam': 333,
  35821. 'quotedbl': 420,
  35822. 'numbersign': 500,
  35823. 'dollar': 500,
  35824. 'percent': 833,
  35825. 'ampersand': 778,
  35826. 'quoteright': 333,
  35827. 'parenleft': 333,
  35828. 'parenright': 333,
  35829. 'asterisk': 500,
  35830. 'plus': 675,
  35831. 'comma': 250,
  35832. 'hyphen': 333,
  35833. 'period': 250,
  35834. 'slash': 278,
  35835. 'zero': 500,
  35836. 'one': 500,
  35837. 'two': 500,
  35838. 'three': 500,
  35839. 'four': 500,
  35840. 'five': 500,
  35841. 'six': 500,
  35842. 'seven': 500,
  35843. 'eight': 500,
  35844. 'nine': 500,
  35845. 'colon': 333,
  35846. 'semicolon': 333,
  35847. 'less': 675,
  35848. 'equal': 675,
  35849. 'greater': 675,
  35850. 'question': 500,
  35851. 'at': 920,
  35852. 'A': 611,
  35853. 'B': 611,
  35854. 'C': 667,
  35855. 'D': 722,
  35856. 'E': 611,
  35857. 'F': 611,
  35858. 'G': 722,
  35859. 'H': 722,
  35860. 'I': 333,
  35861. 'J': 444,
  35862. 'K': 667,
  35863. 'L': 556,
  35864. 'M': 833,
  35865. 'N': 667,
  35866. 'O': 722,
  35867. 'P': 611,
  35868. 'Q': 722,
  35869. 'R': 611,
  35870. 'S': 500,
  35871. 'T': 556,
  35872. 'U': 722,
  35873. 'V': 611,
  35874. 'W': 833,
  35875. 'X': 611,
  35876. 'Y': 556,
  35877. 'Z': 556,
  35878. 'bracketleft': 389,
  35879. 'backslash': 278,
  35880. 'bracketright': 389,
  35881. 'asciicircum': 422,
  35882. 'underscore': 500,
  35883. 'quoteleft': 333,
  35884. 'a': 500,
  35885. 'b': 500,
  35886. 'c': 444,
  35887. 'd': 500,
  35888. 'e': 444,
  35889. 'f': 278,
  35890. 'g': 500,
  35891. 'h': 500,
  35892. 'i': 278,
  35893. 'j': 278,
  35894. 'k': 444,
  35895. 'l': 278,
  35896. 'm': 722,
  35897. 'n': 500,
  35898. 'o': 500,
  35899. 'p': 500,
  35900. 'q': 500,
  35901. 'r': 389,
  35902. 's': 389,
  35903. 't': 278,
  35904. 'u': 500,
  35905. 'v': 444,
  35906. 'w': 667,
  35907. 'x': 444,
  35908. 'y': 444,
  35909. 'z': 389,
  35910. 'braceleft': 400,
  35911. 'bar': 275,
  35912. 'braceright': 400,
  35913. 'asciitilde': 541,
  35914. 'exclamdown': 389,
  35915. 'cent': 500,
  35916. 'sterling': 500,
  35917. 'fraction': 167,
  35918. 'yen': 500,
  35919. 'florin': 500,
  35920. 'section': 500,
  35921. 'currency': 500,
  35922. 'quotesingle': 214,
  35923. 'quotedblleft': 556,
  35924. 'guillemotleft': 500,
  35925. 'guilsinglleft': 333,
  35926. 'guilsinglright': 333,
  35927. 'fi': 500,
  35928. 'fl': 500,
  35929. 'endash': 500,
  35930. 'dagger': 500,
  35931. 'daggerdbl': 500,
  35932. 'periodcentered': 250,
  35933. 'paragraph': 523,
  35934. 'bullet': 350,
  35935. 'quotesinglbase': 333,
  35936. 'quotedblbase': 556,
  35937. 'quotedblright': 556,
  35938. 'guillemotright': 500,
  35939. 'ellipsis': 889,
  35940. 'perthousand': 1000,
  35941. 'questiondown': 500,
  35942. 'grave': 333,
  35943. 'acute': 333,
  35944. 'circumflex': 333,
  35945. 'tilde': 333,
  35946. 'macron': 333,
  35947. 'breve': 333,
  35948. 'dotaccent': 333,
  35949. 'dieresis': 333,
  35950. 'ring': 333,
  35951. 'cedilla': 333,
  35952. 'hungarumlaut': 333,
  35953. 'ogonek': 333,
  35954. 'caron': 333,
  35955. 'emdash': 889,
  35956. 'AE': 889,
  35957. 'ordfeminine': 276,
  35958. 'Lslash': 556,
  35959. 'Oslash': 722,
  35960. 'OE': 944,
  35961. 'ordmasculine': 310,
  35962. 'ae': 667,
  35963. 'dotlessi': 278,
  35964. 'lslash': 278,
  35965. 'oslash': 500,
  35966. 'oe': 667,
  35967. 'germandbls': 500,
  35968. 'Idieresis': 333,
  35969. 'eacute': 444,
  35970. 'abreve': 500,
  35971. 'uhungarumlaut': 500,
  35972. 'ecaron': 444,
  35973. 'Ydieresis': 556,
  35974. 'divide': 675,
  35975. 'Yacute': 556,
  35976. 'Acircumflex': 611,
  35977. 'aacute': 500,
  35978. 'Ucircumflex': 722,
  35979. 'yacute': 444,
  35980. 'scommaaccent': 389,
  35981. 'ecircumflex': 444,
  35982. 'Uring': 722,
  35983. 'Udieresis': 722,
  35984. 'aogonek': 500,
  35985. 'Uacute': 722,
  35986. 'uogonek': 500,
  35987. 'Edieresis': 611,
  35988. 'Dcroat': 722,
  35989. 'commaaccent': 250,
  35990. 'copyright': 760,
  35991. 'Emacron': 611,
  35992. 'ccaron': 444,
  35993. 'aring': 500,
  35994. 'Ncommaaccent': 667,
  35995. 'lacute': 278,
  35996. 'agrave': 500,
  35997. 'Tcommaaccent': 556,
  35998. 'Cacute': 667,
  35999. 'atilde': 500,
  36000. 'Edotaccent': 611,
  36001. 'scaron': 389,
  36002. 'scedilla': 389,
  36003. 'iacute': 278,
  36004. 'lozenge': 471,
  36005. 'Rcaron': 611,
  36006. 'Gcommaaccent': 722,
  36007. 'ucircumflex': 500,
  36008. 'acircumflex': 500,
  36009. 'Amacron': 611,
  36010. 'rcaron': 389,
  36011. 'ccedilla': 444,
  36012. 'Zdotaccent': 556,
  36013. 'Thorn': 611,
  36014. 'Omacron': 722,
  36015. 'Racute': 611,
  36016. 'Sacute': 500,
  36017. 'dcaron': 544,
  36018. 'Umacron': 722,
  36019. 'uring': 500,
  36020. 'threesuperior': 300,
  36021. 'Ograve': 722,
  36022. 'Agrave': 611,
  36023. 'Abreve': 611,
  36024. 'multiply': 675,
  36025. 'uacute': 500,
  36026. 'Tcaron': 556,
  36027. 'partialdiff': 476,
  36028. 'ydieresis': 444,
  36029. 'Nacute': 667,
  36030. 'icircumflex': 278,
  36031. 'Ecircumflex': 611,
  36032. 'adieresis': 500,
  36033. 'edieresis': 444,
  36034. 'cacute': 444,
  36035. 'nacute': 500,
  36036. 'umacron': 500,
  36037. 'Ncaron': 667,
  36038. 'Iacute': 333,
  36039. 'plusminus': 675,
  36040. 'brokenbar': 275,
  36041. 'registered': 760,
  36042. 'Gbreve': 722,
  36043. 'Idotaccent': 333,
  36044. 'summation': 600,
  36045. 'Egrave': 611,
  36046. 'racute': 389,
  36047. 'omacron': 500,
  36048. 'Zacute': 556,
  36049. 'Zcaron': 556,
  36050. 'greaterequal': 549,
  36051. 'Eth': 722,
  36052. 'Ccedilla': 667,
  36053. 'lcommaaccent': 278,
  36054. 'tcaron': 300,
  36055. 'eogonek': 444,
  36056. 'Uogonek': 722,
  36057. 'Aacute': 611,
  36058. 'Adieresis': 611,
  36059. 'egrave': 444,
  36060. 'zacute': 389,
  36061. 'iogonek': 278,
  36062. 'Oacute': 722,
  36063. 'oacute': 500,
  36064. 'amacron': 500,
  36065. 'sacute': 389,
  36066. 'idieresis': 278,
  36067. 'Ocircumflex': 722,
  36068. 'Ugrave': 722,
  36069. 'Delta': 612,
  36070. 'thorn': 500,
  36071. 'twosuperior': 300,
  36072. 'Odieresis': 722,
  36073. 'mu': 500,
  36074. 'igrave': 278,
  36075. 'ohungarumlaut': 500,
  36076. 'Eogonek': 611,
  36077. 'dcroat': 500,
  36078. 'threequarters': 750,
  36079. 'Scedilla': 500,
  36080. 'lcaron': 300,
  36081. 'Kcommaaccent': 667,
  36082. 'Lacute': 556,
  36083. 'trademark': 980,
  36084. 'edotaccent': 444,
  36085. 'Igrave': 333,
  36086. 'Imacron': 333,
  36087. 'Lcaron': 611,
  36088. 'onehalf': 750,
  36089. 'lessequal': 549,
  36090. 'ocircumflex': 500,
  36091. 'ntilde': 500,
  36092. 'Uhungarumlaut': 722,
  36093. 'Eacute': 611,
  36094. 'emacron': 444,
  36095. 'gbreve': 500,
  36096. 'onequarter': 750,
  36097. 'Scaron': 500,
  36098. 'Scommaaccent': 500,
  36099. 'Ohungarumlaut': 722,
  36100. 'degree': 400,
  36101. 'ograve': 500,
  36102. 'Ccaron': 667,
  36103. 'ugrave': 500,
  36104. 'radical': 453,
  36105. 'Dcaron': 722,
  36106. 'rcommaaccent': 389,
  36107. 'Ntilde': 667,
  36108. 'otilde': 500,
  36109. 'Rcommaaccent': 611,
  36110. 'Lcommaaccent': 556,
  36111. 'Atilde': 611,
  36112. 'Aogonek': 611,
  36113. 'Aring': 611,
  36114. 'Otilde': 722,
  36115. 'zdotaccent': 389,
  36116. 'Ecaron': 611,
  36117. 'Iogonek': 333,
  36118. 'kcommaaccent': 444,
  36119. 'minus': 675,
  36120. 'Icircumflex': 333,
  36121. 'ncaron': 500,
  36122. 'tcommaaccent': 278,
  36123. 'logicalnot': 675,
  36124. 'odieresis': 500,
  36125. 'udieresis': 500,
  36126. 'notequal': 549,
  36127. 'gcommaaccent': 500,
  36128. 'eth': 500,
  36129. 'zcaron': 389,
  36130. 'ncommaaccent': 500,
  36131. 'onesuperior': 300,
  36132. 'imacron': 278,
  36133. 'Euro': 500
  36134. },
  36135. 'ZapfDingbats': {
  36136. 'space': 278,
  36137. 'a1': 974,
  36138. 'a2': 961,
  36139. 'a202': 974,
  36140. 'a3': 980,
  36141. 'a4': 719,
  36142. 'a5': 789,
  36143. 'a119': 790,
  36144. 'a118': 791,
  36145. 'a117': 690,
  36146. 'a11': 960,
  36147. 'a12': 939,
  36148. 'a13': 549,
  36149. 'a14': 855,
  36150. 'a15': 911,
  36151. 'a16': 933,
  36152. 'a105': 911,
  36153. 'a17': 945,
  36154. 'a18': 974,
  36155. 'a19': 755,
  36156. 'a20': 846,
  36157. 'a21': 762,
  36158. 'a22': 761,
  36159. 'a23': 571,
  36160. 'a24': 677,
  36161. 'a25': 763,
  36162. 'a26': 760,
  36163. 'a27': 759,
  36164. 'a28': 754,
  36165. 'a6': 494,
  36166. 'a7': 552,
  36167. 'a8': 537,
  36168. 'a9': 577,
  36169. 'a10': 692,
  36170. 'a29': 786,
  36171. 'a30': 788,
  36172. 'a31': 788,
  36173. 'a32': 790,
  36174. 'a33': 793,
  36175. 'a34': 794,
  36176. 'a35': 816,
  36177. 'a36': 823,
  36178. 'a37': 789,
  36179. 'a38': 841,
  36180. 'a39': 823,
  36181. 'a40': 833,
  36182. 'a41': 816,
  36183. 'a42': 831,
  36184. 'a43': 923,
  36185. 'a44': 744,
  36186. 'a45': 723,
  36187. 'a46': 749,
  36188. 'a47': 790,
  36189. 'a48': 792,
  36190. 'a49': 695,
  36191. 'a50': 776,
  36192. 'a51': 768,
  36193. 'a52': 792,
  36194. 'a53': 759,
  36195. 'a54': 707,
  36196. 'a55': 708,
  36197. 'a56': 682,
  36198. 'a57': 701,
  36199. 'a58': 826,
  36200. 'a59': 815,
  36201. 'a60': 789,
  36202. 'a61': 789,
  36203. 'a62': 707,
  36204. 'a63': 687,
  36205. 'a64': 696,
  36206. 'a65': 689,
  36207. 'a66': 786,
  36208. 'a67': 787,
  36209. 'a68': 713,
  36210. 'a69': 791,
  36211. 'a70': 785,
  36212. 'a71': 791,
  36213. 'a72': 873,
  36214. 'a73': 761,
  36215. 'a74': 762,
  36216. 'a203': 762,
  36217. 'a75': 759,
  36218. 'a204': 759,
  36219. 'a76': 892,
  36220. 'a77': 892,
  36221. 'a78': 788,
  36222. 'a79': 784,
  36223. 'a81': 438,
  36224. 'a82': 138,
  36225. 'a83': 277,
  36226. 'a84': 415,
  36227. 'a97': 392,
  36228. 'a98': 392,
  36229. 'a99': 668,
  36230. 'a100': 668,
  36231. 'a89': 390,
  36232. 'a90': 390,
  36233. 'a93': 317,
  36234. 'a94': 317,
  36235. 'a91': 276,
  36236. 'a92': 276,
  36237. 'a205': 509,
  36238. 'a85': 509,
  36239. 'a206': 410,
  36240. 'a86': 410,
  36241. 'a87': 234,
  36242. 'a88': 234,
  36243. 'a95': 334,
  36244. 'a96': 334,
  36245. 'a101': 732,
  36246. 'a102': 544,
  36247. 'a103': 544,
  36248. 'a104': 910,
  36249. 'a106': 667,
  36250. 'a107': 760,
  36251. 'a108': 760,
  36252. 'a112': 776,
  36253. 'a111': 595,
  36254. 'a110': 694,
  36255. 'a109': 626,
  36256. 'a120': 788,
  36257. 'a121': 788,
  36258. 'a122': 788,
  36259. 'a123': 788,
  36260. 'a124': 788,
  36261. 'a125': 788,
  36262. 'a126': 788,
  36263. 'a127': 788,
  36264. 'a128': 788,
  36265. 'a129': 788,
  36266. 'a130': 788,
  36267. 'a131': 788,
  36268. 'a132': 788,
  36269. 'a133': 788,
  36270. 'a134': 788,
  36271. 'a135': 788,
  36272. 'a136': 788,
  36273. 'a137': 788,
  36274. 'a138': 788,
  36275. 'a139': 788,
  36276. 'a140': 788,
  36277. 'a141': 788,
  36278. 'a142': 788,
  36279. 'a143': 788,
  36280. 'a144': 788,
  36281. 'a145': 788,
  36282. 'a146': 788,
  36283. 'a147': 788,
  36284. 'a148': 788,
  36285. 'a149': 788,
  36286. 'a150': 788,
  36287. 'a151': 788,
  36288. 'a152': 788,
  36289. 'a153': 788,
  36290. 'a154': 788,
  36291. 'a155': 788,
  36292. 'a156': 788,
  36293. 'a157': 788,
  36294. 'a158': 788,
  36295. 'a159': 788,
  36296. 'a160': 894,
  36297. 'a161': 838,
  36298. 'a163': 1016,
  36299. 'a164': 458,
  36300. 'a196': 748,
  36301. 'a165': 924,
  36302. 'a192': 748,
  36303. 'a166': 918,
  36304. 'a167': 927,
  36305. 'a168': 928,
  36306. 'a169': 928,
  36307. 'a170': 834,
  36308. 'a171': 873,
  36309. 'a172': 828,
  36310. 'a173': 924,
  36311. 'a162': 924,
  36312. 'a174': 917,
  36313. 'a175': 930,
  36314. 'a176': 931,
  36315. 'a177': 463,
  36316. 'a178': 883,
  36317. 'a179': 836,
  36318. 'a193': 836,
  36319. 'a180': 867,
  36320. 'a199': 867,
  36321. 'a181': 696,
  36322. 'a200': 696,
  36323. 'a182': 874,
  36324. 'a201': 874,
  36325. 'a183': 760,
  36326. 'a184': 946,
  36327. 'a197': 771,
  36328. 'a185': 865,
  36329. 'a194': 771,
  36330. 'a198': 888,
  36331. 'a186': 967,
  36332. 'a195': 888,
  36333. 'a187': 831,
  36334. 'a188': 873,
  36335. 'a189': 927,
  36336. 'a190': 970,
  36337. 'a191': 918
  36338. }
  36339. };
  36340. var EOF = {};
  36341. function isEOF(v) {
  36342. return (v == EOF);
  36343. }
  36344. var Parser = (function ParserClosure() {
  36345. function Parser(lexer, allowStreams, xref) {
  36346. this.lexer = lexer;
  36347. this.allowStreams = allowStreams;
  36348. this.xref = xref;
  36349. this.imageCache = {
  36350. length: 0,
  36351. adler32: 0,
  36352. stream: null
  36353. };
  36354. this.refill();
  36355. }
  36356. Parser.prototype = {
  36357. refill: function Parser_refill() {
  36358. this.buf1 = this.lexer.getObj();
  36359. this.buf2 = this.lexer.getObj();
  36360. },
  36361. shift: function Parser_shift() {
  36362. if (isCmd(this.buf2, 'ID')) {
  36363. this.buf1 = this.buf2;
  36364. this.buf2 = null;
  36365. } else {
  36366. this.buf1 = this.buf2;
  36367. this.buf2 = this.lexer.getObj();
  36368. }
  36369. },
  36370. getObj: function Parser_getObj(cipherTransform) {
  36371. if (isCmd(this.buf1, 'BI')) { // inline image
  36372. this.shift();
  36373. return this.makeInlineImage(cipherTransform);
  36374. }
  36375. if (isCmd(this.buf1, '[')) { // array
  36376. this.shift();
  36377. var array = [];
  36378. while (!isCmd(this.buf1, ']') && !isEOF(this.buf1)) {
  36379. array.push(this.getObj(cipherTransform));
  36380. }
  36381. if (isEOF(this.buf1)) {
  36382. error('End of file inside array');
  36383. }
  36384. this.shift();
  36385. return array;
  36386. }
  36387. if (isCmd(this.buf1, '<<')) { // dictionary or stream
  36388. this.shift();
  36389. var dict = new Dict(this.xref);
  36390. while (!isCmd(this.buf1, '>>') && !isEOF(this.buf1)) {
  36391. if (!isName(this.buf1)) {
  36392. info('Malformed dictionary: key must be a name object');
  36393. this.shift();
  36394. continue;
  36395. }
  36396. var key = this.buf1.name;
  36397. this.shift();
  36398. if (isEOF(this.buf1)) {
  36399. break;
  36400. }
  36401. dict.set(key, this.getObj(cipherTransform));
  36402. }
  36403. if (isEOF(this.buf1)) {
  36404. error('End of file inside dictionary');
  36405. }
  36406. // Stream objects are not allowed inside content streams or
  36407. // object streams.
  36408. if (isCmd(this.buf2, 'stream')) {
  36409. return (this.allowStreams ?
  36410. this.makeStream(dict, cipherTransform) : dict);
  36411. }
  36412. this.shift();
  36413. return dict;
  36414. }
  36415. if (isInt(this.buf1)) { // indirect reference or integer
  36416. var num = this.buf1;
  36417. this.shift();
  36418. if (isInt(this.buf1) && isCmd(this.buf2, 'R')) {
  36419. var ref = new Ref(num, this.buf1);
  36420. this.shift();
  36421. this.shift();
  36422. return ref;
  36423. }
  36424. return num;
  36425. }
  36426. if (isString(this.buf1)) { // string
  36427. var str = this.buf1;
  36428. this.shift();
  36429. if (cipherTransform) {
  36430. str = cipherTransform.decryptString(str);
  36431. }
  36432. return str;
  36433. }
  36434. // simple object
  36435. var obj = this.buf1;
  36436. this.shift();
  36437. return obj;
  36438. },
  36439. makeInlineImage: function Parser_makeInlineImage(cipherTransform) {
  36440. var lexer = this.lexer;
  36441. var stream = lexer.stream;
  36442. // parse dictionary
  36443. var dict = new Dict(null);
  36444. while (!isCmd(this.buf1, 'ID') && !isEOF(this.buf1)) {
  36445. if (!isName(this.buf1)) {
  36446. error('Dictionary key must be a name object');
  36447. }
  36448. var key = this.buf1.name;
  36449. this.shift();
  36450. if (isEOF(this.buf1)) {
  36451. break;
  36452. }
  36453. dict.set(key, this.getObj(cipherTransform));
  36454. }
  36455. // parse image stream
  36456. var startPos = stream.pos;
  36457. // searching for the /EI\s/
  36458. var state = 0, ch, i, ii;
  36459. while (state != 4 && (ch = stream.getByte()) !== -1) {
  36460. switch (ch | 0) {
  36461. case 0x20:
  36462. case 0x0D:
  36463. case 0x0A:
  36464. // let's check next five bytes to be ASCII... just be sure
  36465. var followingBytes = stream.peekBytes(5);
  36466. for (i = 0, ii = followingBytes.length; i < ii; i++) {
  36467. ch = followingBytes[i];
  36468. if (ch !== 0x0A && ch !== 0x0D && (ch < 0x20 || ch > 0x7F)) {
  36469. // not a LF, CR, SPACE or any visible ASCII character
  36470. state = 0;
  36471. break; // some binary stuff found, resetting the state
  36472. }
  36473. }
  36474. state = (state === 3 ? 4 : 0);
  36475. break;
  36476. case 0x45:
  36477. state = 2;
  36478. break;
  36479. case 0x49:
  36480. state = (state === 2 ? 3 : 0);
  36481. break;
  36482. default:
  36483. state = 0;
  36484. break;
  36485. }
  36486. }
  36487. var length = (stream.pos - 4) - startPos;
  36488. var imageStream = stream.makeSubStream(startPos, length, dict);
  36489. // trying to cache repeat images, first we are trying to "warm up" caching
  36490. // using length, then comparing adler32
  36491. var MAX_LENGTH_TO_CACHE = 1000;
  36492. var cacheImage = false, adler32;
  36493. if (length < MAX_LENGTH_TO_CACHE && this.imageCache.length === length) {
  36494. var imageBytes = imageStream.getBytes();
  36495. imageStream.reset();
  36496. var a = 1;
  36497. var b = 0;
  36498. for (i = 0, ii = imageBytes.length; i < ii; ++i) {
  36499. a = (a + (imageBytes[i] & 0xff)) % 65521;
  36500. b = (b + a) % 65521;
  36501. }
  36502. adler32 = (b << 16) | a;
  36503. if (this.imageCache.stream && this.imageCache.adler32 === adler32) {
  36504. this.buf2 = Cmd.get('EI');
  36505. this.shift();
  36506. this.imageCache.stream.reset();
  36507. return this.imageCache.stream;
  36508. }
  36509. cacheImage = true;
  36510. }
  36511. if (!cacheImage && !this.imageCache.stream) {
  36512. this.imageCache.length = length;
  36513. this.imageCache.stream = null;
  36514. }
  36515. if (cipherTransform) {
  36516. imageStream = cipherTransform.createStream(imageStream, length);
  36517. }
  36518. imageStream = this.filter(imageStream, dict, length);
  36519. imageStream.dict = dict;
  36520. if (cacheImage) {
  36521. imageStream.cacheKey = 'inline_' + length + '_' + adler32;
  36522. this.imageCache.adler32 = adler32;
  36523. this.imageCache.stream = imageStream;
  36524. }
  36525. this.buf2 = Cmd.get('EI');
  36526. this.shift();
  36527. return imageStream;
  36528. },
  36529. fetchIfRef: function Parser_fetchIfRef(obj) {
  36530. // not relying on the xref.fetchIfRef -- xref might not be set
  36531. return (isRef(obj) ? this.xref.fetch(obj) : obj);
  36532. },
  36533. makeStream: function Parser_makeStream(dict, cipherTransform) {
  36534. var lexer = this.lexer;
  36535. var stream = lexer.stream;
  36536. // get stream start position
  36537. lexer.skipToNextLine();
  36538. var pos = stream.pos - 1;
  36539. // get length
  36540. var length = this.fetchIfRef(dict.get('Length'));
  36541. if (!isInt(length)) {
  36542. info('Bad ' + length + ' attribute in stream');
  36543. length = 0;
  36544. }
  36545. // skip over the stream data
  36546. stream.pos = pos + length;
  36547. lexer.nextChar();
  36548. this.shift(); // '>>'
  36549. this.shift(); // 'stream'
  36550. if (!isCmd(this.buf1, 'endstream')) {
  36551. // bad stream length, scanning for endstream
  36552. stream.pos = pos;
  36553. var SCAN_BLOCK_SIZE = 2048;
  36554. var ENDSTREAM_SIGNATURE_LENGTH = 9;
  36555. var ENDSTREAM_SIGNATURE = [0x65, 0x6E, 0x64, 0x73, 0x74, 0x72, 0x65,
  36556. 0x61, 0x6D];
  36557. var skipped = 0, found = false, i, j;
  36558. while (stream.pos < stream.end) {
  36559. var scanBytes = stream.peekBytes(SCAN_BLOCK_SIZE);
  36560. var scanLength = scanBytes.length - ENDSTREAM_SIGNATURE_LENGTH;
  36561. found = false;
  36562. for (i = 0, j = 0; i < scanLength; i++) {
  36563. var b = scanBytes[i];
  36564. if (b !== ENDSTREAM_SIGNATURE[j]) {
  36565. i -= j;
  36566. j = 0;
  36567. } else {
  36568. j++;
  36569. if (j >= ENDSTREAM_SIGNATURE_LENGTH) {
  36570. i++;
  36571. found = true;
  36572. break;
  36573. }
  36574. }
  36575. }
  36576. if (found) {
  36577. skipped += i - ENDSTREAM_SIGNATURE_LENGTH;
  36578. stream.pos += i - ENDSTREAM_SIGNATURE_LENGTH;
  36579. break;
  36580. }
  36581. skipped += scanLength;
  36582. stream.pos += scanLength;
  36583. }
  36584. if (!found) {
  36585. error('Missing endstream');
  36586. }
  36587. length = skipped;
  36588. lexer.nextChar();
  36589. this.shift();
  36590. this.shift();
  36591. }
  36592. this.shift(); // 'endstream'
  36593. stream = stream.makeSubStream(pos, length, dict);
  36594. if (cipherTransform) {
  36595. stream = cipherTransform.createStream(stream, length);
  36596. }
  36597. stream = this.filter(stream, dict, length);
  36598. stream.dict = dict;
  36599. return stream;
  36600. },
  36601. filter: function Parser_filter(stream, dict, length) {
  36602. var filter = this.fetchIfRef(dict.get('Filter', 'F'));
  36603. var params = this.fetchIfRef(dict.get('DecodeParms', 'DP'));
  36604. if (isName(filter)) {
  36605. return this.makeFilter(stream, filter.name, length, params);
  36606. }
  36607. var maybeLength = length;
  36608. if (isArray(filter)) {
  36609. var filterArray = filter;
  36610. var paramsArray = params;
  36611. for (var i = 0, ii = filterArray.length; i < ii; ++i) {
  36612. filter = filterArray[i];
  36613. if (!isName(filter)) {
  36614. error('Bad filter name: ' + filter);
  36615. }
  36616. params = null;
  36617. if (isArray(paramsArray) && (i in paramsArray)) {
  36618. params = paramsArray[i];
  36619. }
  36620. stream = this.makeFilter(stream, filter.name, maybeLength, params);
  36621. // after the first stream the length variable is invalid
  36622. maybeLength = null;
  36623. }
  36624. }
  36625. return stream;
  36626. },
  36627. makeFilter: function Parser_makeFilter(stream, name, maybeLength, params) {
  36628. if (stream.dict.get('Length') === 0) {
  36629. return new NullStream(stream);
  36630. }
  36631. if (name == 'FlateDecode' || name == 'Fl') {
  36632. if (params) {
  36633. return new PredictorStream(new FlateStream(stream, maybeLength),
  36634. maybeLength, params);
  36635. }
  36636. return new FlateStream(stream, maybeLength);
  36637. }
  36638. if (name == 'LZWDecode' || name == 'LZW') {
  36639. var earlyChange = 1;
  36640. if (params) {
  36641. if (params.has('EarlyChange')) {
  36642. earlyChange = params.get('EarlyChange');
  36643. }
  36644. return new PredictorStream(
  36645. new LZWStream(stream, maybeLength, earlyChange),
  36646. maybeLength, params);
  36647. }
  36648. return new LZWStream(stream, maybeLength, earlyChange);
  36649. }
  36650. if (name == 'DCTDecode' || name == 'DCT') {
  36651. return new JpegStream(stream, maybeLength, stream.dict, this.xref);
  36652. }
  36653. if (name == 'JPXDecode' || name == 'JPX') {
  36654. return new JpxStream(stream, maybeLength, stream.dict);
  36655. }
  36656. if (name == 'ASCII85Decode' || name == 'A85') {
  36657. return new Ascii85Stream(stream, maybeLength);
  36658. }
  36659. if (name == 'ASCIIHexDecode' || name == 'AHx') {
  36660. return new AsciiHexStream(stream, maybeLength);
  36661. }
  36662. if (name == 'CCITTFaxDecode' || name == 'CCF') {
  36663. return new CCITTFaxStream(stream, maybeLength, params);
  36664. }
  36665. if (name == 'RunLengthDecode' || name == 'RL') {
  36666. return new RunLengthStream(stream, maybeLength);
  36667. }
  36668. if (name == 'JBIG2Decode') {
  36669. return new Jbig2Stream(stream, maybeLength, stream.dict);
  36670. }
  36671. warn('filter "' + name + '" not supported yet');
  36672. return stream;
  36673. }
  36674. };
  36675. return Parser;
  36676. })();
  36677. var Lexer = (function LexerClosure() {
  36678. function Lexer(stream, knownCommands) {
  36679. this.stream = stream;
  36680. this.nextChar();
  36681. // While lexing, we build up many strings one char at a time. Using += for
  36682. // this can result in lots of garbage strings. It's better to build an
  36683. // array of single-char strings and then join() them together at the end.
  36684. // And reusing a single array (i.e. |this.strBuf|) over and over for this
  36685. // purpose uses less memory than using a new array for each string.
  36686. this.strBuf = [];
  36687. // The PDFs might have "glued" commands with other commands, operands or
  36688. // literals, e.g. "q1". The knownCommands is a dictionary of the valid
  36689. // commands and their prefixes. The prefixes are built the following way:
  36690. // if there a command that is a prefix of the other valid command or
  36691. // literal (e.g. 'f' and 'false') the following prefixes must be included,
  36692. // 'fa', 'fal', 'fals'. The prefixes are not needed, if the command has no
  36693. // other commands or literals as a prefix. The knowCommands is optional.
  36694. this.knownCommands = knownCommands;
  36695. }
  36696. Lexer.isSpace = function Lexer_isSpace(ch) {
  36697. // Space is one of the following characters: SPACE, TAB, CR or LF.
  36698. return (ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A);
  36699. };
  36700. // A '1' in this array means the character is white space. A '1' or
  36701. // '2' means the character ends a name or command.
  36702. var specialChars = [
  36703. 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
  36704. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
  36705. 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, // 2x
  36706. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, // 3x
  36707. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4x
  36708. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 5x
  36709. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6x
  36710. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, // 7x
  36711. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
  36712. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
  36713. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ax
  36714. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // bx
  36715. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // cx
  36716. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // dx
  36717. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // ex
  36718. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // fx
  36719. ];
  36720. function toHexDigit(ch) {
  36721. if (ch >= 0x30 && ch <= 0x39) { // '0'-'9'
  36722. return ch & 0x0F;
  36723. }
  36724. if ((ch >= 0x41 && ch <= 0x46) || (ch >= 0x61 && ch <= 0x66)) {
  36725. // 'A'-'F', 'a'-'f'
  36726. return (ch & 0x0F) + 9;
  36727. }
  36728. return -1;
  36729. }
  36730. Lexer.prototype = {
  36731. nextChar: function Lexer_nextChar() {
  36732. return (this.currentChar = this.stream.getByte());
  36733. },
  36734. peekChar: function Lexer_peekChar() {
  36735. return this.stream.peekBytes(1)[0];
  36736. },
  36737. getNumber: function Lexer_getNumber() {
  36738. var ch = this.currentChar;
  36739. var eNotation = false;
  36740. var divideBy = 0; // different from 0 if it's a floating point value
  36741. var sign = 1;
  36742. if (ch === 0x2D) { // '-'
  36743. sign = -1;
  36744. ch = this.nextChar();
  36745. } else if (ch === 0x2B) { // '+'
  36746. ch = this.nextChar();
  36747. }
  36748. if (ch === 0x2E) { // '.'
  36749. divideBy = 10;
  36750. ch = this.nextChar();
  36751. }
  36752. if (ch < 0x30 || ch > 0x39) { // '0' - '9'
  36753. error('Invalid number: ' + String.fromCharCode(ch));
  36754. return 0;
  36755. }
  36756. var baseValue = ch - 0x30; // '0'
  36757. var powerValue = 0;
  36758. var powerValueSign = 1;
  36759. while ((ch = this.nextChar()) >= 0) {
  36760. if (0x30 <= ch && ch <= 0x39) { // '0' - '9'
  36761. var currentDigit = ch - 0x30; // '0'
  36762. if (eNotation) { // We are after an 'e' or 'E'
  36763. powerValue = powerValue * 10 + currentDigit;
  36764. } else {
  36765. if (divideBy !== 0) { // We are after a point
  36766. divideBy *= 10;
  36767. }
  36768. baseValue = baseValue * 10 + currentDigit;
  36769. }
  36770. } else if (ch === 0x2E) { // '.'
  36771. if (divideBy === 0) {
  36772. divideBy = 1;
  36773. } else {
  36774. // A number can have only one '.'
  36775. break;
  36776. }
  36777. } else if (ch === 0x2D) { // '-'
  36778. // ignore minus signs in the middle of numbers to match
  36779. // Adobe's behavior
  36780. warn('Badly formated number');
  36781. } else if (ch === 0x45 || ch === 0x65) { // 'E', 'e'
  36782. // 'E' can be either a scientific notation or the beginning of a new
  36783. // operator
  36784. ch = this.peekChar();
  36785. if (ch === 0x2B || ch === 0x2D) { // '+', '-'
  36786. powerValueSign = (ch === 0x2D) ? -1 : 1;
  36787. this.nextChar(); // Consume the sign character
  36788. } else if (ch < 0x30 || ch > 0x39) { // '0' - '9'
  36789. // The 'E' must be the beginning of a new operator
  36790. break;
  36791. }
  36792. eNotation = true;
  36793. } else {
  36794. // the last character doesn't belong to us
  36795. break;
  36796. }
  36797. }
  36798. if (divideBy !== 0) {
  36799. baseValue /= divideBy;
  36800. }
  36801. if (eNotation) {
  36802. baseValue *= Math.pow(10, powerValueSign * powerValue);
  36803. }
  36804. return sign * baseValue;
  36805. },
  36806. getString: function Lexer_getString() {
  36807. var numParen = 1;
  36808. var done = false;
  36809. var strBuf = this.strBuf;
  36810. strBuf.length = 0;
  36811. var ch = this.nextChar();
  36812. while (true) {
  36813. var charBuffered = false;
  36814. switch (ch | 0) {
  36815. case -1:
  36816. warn('Unterminated string');
  36817. done = true;
  36818. break;
  36819. case 0x28: // '('
  36820. ++numParen;
  36821. strBuf.push('(');
  36822. break;
  36823. case 0x29: // ')'
  36824. if (--numParen === 0) {
  36825. this.nextChar(); // consume strings ')'
  36826. done = true;
  36827. } else {
  36828. strBuf.push(')');
  36829. }
  36830. break;
  36831. case 0x5C: // '\\'
  36832. ch = this.nextChar();
  36833. switch (ch) {
  36834. case -1:
  36835. warn('Unterminated string');
  36836. done = true;
  36837. break;
  36838. case 0x6E: // 'n'
  36839. strBuf.push('\n');
  36840. break;
  36841. case 0x72: // 'r'
  36842. strBuf.push('\r');
  36843. break;
  36844. case 0x74: // 't'
  36845. strBuf.push('\t');
  36846. break;
  36847. case 0x62: // 'b'
  36848. strBuf.push('\b');
  36849. break;
  36850. case 0x66: // 'f'
  36851. strBuf.push('\f');
  36852. break;
  36853. case 0x5C: // '\'
  36854. case 0x28: // '('
  36855. case 0x29: // ')'
  36856. strBuf.push(String.fromCharCode(ch));
  36857. break;
  36858. case 0x30: case 0x31: case 0x32: case 0x33: // '0'-'3'
  36859. case 0x34: case 0x35: case 0x36: case 0x37: // '4'-'7'
  36860. var x = ch & 0x0F;
  36861. ch = this.nextChar();
  36862. charBuffered = true;
  36863. if (ch >= 0x30 && ch <= 0x37) { // '0'-'7'
  36864. x = (x << 3) + (ch & 0x0F);
  36865. ch = this.nextChar();
  36866. if (ch >= 0x30 && ch <= 0x37) { // '0'-'7'
  36867. charBuffered = false;
  36868. x = (x << 3) + (ch & 0x0F);
  36869. }
  36870. }
  36871. strBuf.push(String.fromCharCode(x));
  36872. break;
  36873. case 0x0D: // CR
  36874. if (this.peekChar() === 0x0A) { // LF
  36875. this.nextChar();
  36876. }
  36877. break;
  36878. case 0x0A: // LF
  36879. break;
  36880. default:
  36881. strBuf.push(String.fromCharCode(ch));
  36882. break;
  36883. }
  36884. break;
  36885. default:
  36886. strBuf.push(String.fromCharCode(ch));
  36887. break;
  36888. }
  36889. if (done) {
  36890. break;
  36891. }
  36892. if (!charBuffered) {
  36893. ch = this.nextChar();
  36894. }
  36895. }
  36896. return strBuf.join('');
  36897. },
  36898. getName: function Lexer_getName() {
  36899. var ch;
  36900. var strBuf = this.strBuf;
  36901. strBuf.length = 0;
  36902. while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
  36903. if (ch === 0x23) { // '#'
  36904. ch = this.nextChar();
  36905. var x = toHexDigit(ch);
  36906. if (x != -1) {
  36907. var x2 = toHexDigit(this.nextChar());
  36908. if (x2 == -1) {
  36909. error('Illegal digit in hex char in name: ' + x2);
  36910. }
  36911. strBuf.push(String.fromCharCode((x << 4) | x2));
  36912. } else {
  36913. strBuf.push('#', String.fromCharCode(ch));
  36914. }
  36915. } else {
  36916. strBuf.push(String.fromCharCode(ch));
  36917. }
  36918. }
  36919. if (strBuf.length > 128) {
  36920. error('Warning: name token is longer than allowed by the spec: ' +
  36921. strBuf.length);
  36922. }
  36923. return Name.get(strBuf.join(''));
  36924. },
  36925. getHexString: function Lexer_getHexString() {
  36926. var strBuf = this.strBuf;
  36927. strBuf.length = 0;
  36928. var ch = this.currentChar;
  36929. var isFirstHex = true;
  36930. var firstDigit;
  36931. var secondDigit;
  36932. while (true) {
  36933. if (ch < 0) {
  36934. warn('Unterminated hex string');
  36935. break;
  36936. } else if (ch === 0x3E) { // '>'
  36937. this.nextChar();
  36938. break;
  36939. } else if (specialChars[ch] === 1) {
  36940. ch = this.nextChar();
  36941. continue;
  36942. } else {
  36943. if (isFirstHex) {
  36944. firstDigit = toHexDigit(ch);
  36945. if (firstDigit === -1) {
  36946. warn('Ignoring invalid character "' + ch + '" in hex string');
  36947. ch = this.nextChar();
  36948. continue;
  36949. }
  36950. } else {
  36951. secondDigit = toHexDigit(ch);
  36952. if (secondDigit === -1) {
  36953. warn('Ignoring invalid character "' + ch + '" in hex string');
  36954. ch = this.nextChar();
  36955. continue;
  36956. }
  36957. strBuf.push(String.fromCharCode((firstDigit << 4) | secondDigit));
  36958. }
  36959. isFirstHex = !isFirstHex;
  36960. ch = this.nextChar();
  36961. }
  36962. }
  36963. return strBuf.join('');
  36964. },
  36965. getObj: function Lexer_getObj() {
  36966. // skip whitespace and comments
  36967. var comment = false;
  36968. var ch = this.currentChar;
  36969. while (true) {
  36970. if (ch < 0) {
  36971. return EOF;
  36972. }
  36973. if (comment) {
  36974. if (ch === 0x0A || ch == 0x0D) { // LF, CR
  36975. comment = false;
  36976. }
  36977. } else if (ch === 0x25) { // '%'
  36978. comment = true;
  36979. } else if (specialChars[ch] !== 1) {
  36980. break;
  36981. }
  36982. ch = this.nextChar();
  36983. }
  36984. // start reading token
  36985. switch (ch | 0) {
  36986. case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: // '0'-'4'
  36987. case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: // '5'-'9'
  36988. case 0x2B: case 0x2D: case 0x2E: // '+', '-', '.'
  36989. return this.getNumber();
  36990. case 0x28: // '('
  36991. return this.getString();
  36992. case 0x2F: // '/'
  36993. return this.getName();
  36994. // array punctuation
  36995. case 0x5B: // '['
  36996. this.nextChar();
  36997. return Cmd.get('[');
  36998. case 0x5D: // ']'
  36999. this.nextChar();
  37000. return Cmd.get(']');
  37001. // hex string or dict punctuation
  37002. case 0x3C: // '<'
  37003. ch = this.nextChar();
  37004. if (ch === 0x3C) {
  37005. // dict punctuation
  37006. this.nextChar();
  37007. return Cmd.get('<<');
  37008. }
  37009. return this.getHexString();
  37010. // dict punctuation
  37011. case 0x3E: // '>'
  37012. ch = this.nextChar();
  37013. if (ch === 0x3E) {
  37014. this.nextChar();
  37015. return Cmd.get('>>');
  37016. }
  37017. return Cmd.get('>');
  37018. case 0x7B: // '{'
  37019. this.nextChar();
  37020. return Cmd.get('{');
  37021. case 0x7D: // '}'
  37022. this.nextChar();
  37023. return Cmd.get('}');
  37024. case 0x29: // ')'
  37025. error('Illegal character: ' + ch);
  37026. break;
  37027. }
  37028. // command
  37029. var str = String.fromCharCode(ch);
  37030. var knownCommands = this.knownCommands;
  37031. var knownCommandFound = knownCommands && (str in knownCommands);
  37032. while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) {
  37033. // stop if known command is found and next character does not make
  37034. // the str a command
  37035. var possibleCommand = str + String.fromCharCode(ch);
  37036. if (knownCommandFound && !(possibleCommand in knownCommands)) {
  37037. break;
  37038. }
  37039. if (str.length == 128) {
  37040. error('Command token too long: ' + str.length);
  37041. }
  37042. str = possibleCommand;
  37043. knownCommandFound = knownCommands && (str in knownCommands);
  37044. }
  37045. if (str == 'true') {
  37046. return true;
  37047. }
  37048. if (str == 'false') {
  37049. return false;
  37050. }
  37051. if (str == 'null') {
  37052. return null;
  37053. }
  37054. return Cmd.get(str);
  37055. },
  37056. skipToNextLine: function Lexer_skipToNextLine() {
  37057. var ch = this.currentChar;
  37058. while (ch >= 0) {
  37059. if (ch === 0x0D) { // CR
  37060. ch = this.nextChar();
  37061. if (ch === 0x0A) { // LF
  37062. this.nextChar();
  37063. }
  37064. break;
  37065. } else if (ch === 0x0A) { // LF
  37066. this.nextChar();
  37067. break;
  37068. }
  37069. ch = this.nextChar();
  37070. }
  37071. }
  37072. };
  37073. return Lexer;
  37074. })();
  37075. var Linearization = (function LinearizationClosure() {
  37076. function Linearization(stream) {
  37077. this.parser = new Parser(new Lexer(stream), false, null);
  37078. var obj1 = this.parser.getObj();
  37079. var obj2 = this.parser.getObj();
  37080. var obj3 = this.parser.getObj();
  37081. this.linDict = this.parser.getObj();
  37082. if (isInt(obj1) && isInt(obj2) && isCmd(obj3, 'obj') &&
  37083. isDict(this.linDict)) {
  37084. var obj = this.linDict.get('Linearized');
  37085. if (!(isNum(obj) && obj > 0)) {
  37086. this.linDict = null;
  37087. }
  37088. }
  37089. }
  37090. Linearization.prototype = {
  37091. getInt: function Linearization_getInt(name) {
  37092. var linDict = this.linDict;
  37093. var obj;
  37094. if (isDict(linDict) && isInt(obj = linDict.get(name)) && obj > 0) {
  37095. return obj;
  37096. }
  37097. error('"' + name + '" field in linearization table is invalid');
  37098. },
  37099. getHint: function Linearization_getHint(index) {
  37100. var linDict = this.linDict;
  37101. var obj1, obj2;
  37102. if (isDict(linDict) && isArray(obj1 = linDict.get('H')) &&
  37103. obj1.length >= 2 && isInt(obj2 = obj1[index]) && obj2 > 0) {
  37104. return obj2;
  37105. }
  37106. error('Hints table in linearization table is invalid: ' + index);
  37107. },
  37108. get length() {
  37109. if (!isDict(this.linDict)) {
  37110. return 0;
  37111. }
  37112. return this.getInt('L');
  37113. },
  37114. get hintsOffset() {
  37115. return this.getHint(0);
  37116. },
  37117. get hintsLength() {
  37118. return this.getHint(1);
  37119. },
  37120. get hintsOffset2() {
  37121. return this.getHint(2);
  37122. },
  37123. get hintsLenth2() {
  37124. return this.getHint(3);
  37125. },
  37126. get objectNumberFirst() {
  37127. return this.getInt('O');
  37128. },
  37129. get endFirst() {
  37130. return this.getInt('E');
  37131. },
  37132. get numPages() {
  37133. return this.getInt('N');
  37134. },
  37135. get mainXRefEntriesOffset() {
  37136. return this.getInt('T');
  37137. },
  37138. get pageFirst() {
  37139. return this.getInt('P');
  37140. }
  37141. };
  37142. return Linearization;
  37143. })();
  37144. var PostScriptParser = (function PostScriptParserClosure() {
  37145. function PostScriptParser(lexer) {
  37146. this.lexer = lexer;
  37147. this.operators = [];
  37148. this.token = null;
  37149. this.prev = null;
  37150. }
  37151. PostScriptParser.prototype = {
  37152. nextToken: function PostScriptParser_nextToken() {
  37153. this.prev = this.token;
  37154. this.token = this.lexer.getToken();
  37155. },
  37156. accept: function PostScriptParser_accept(type) {
  37157. if (this.token.type == type) {
  37158. this.nextToken();
  37159. return true;
  37160. }
  37161. return false;
  37162. },
  37163. expect: function PostScriptParser_expect(type) {
  37164. if (this.accept(type)) {
  37165. return true;
  37166. }
  37167. error('Unexpected symbol: found ' + this.token.type + ' expected ' +
  37168. type + '.');
  37169. },
  37170. parse: function PostScriptParser_parse() {
  37171. this.nextToken();
  37172. this.expect(PostScriptTokenTypes.LBRACE);
  37173. this.parseBlock();
  37174. this.expect(PostScriptTokenTypes.RBRACE);
  37175. return this.operators;
  37176. },
  37177. parseBlock: function PostScriptParser_parseBlock() {
  37178. while (true) {
  37179. if (this.accept(PostScriptTokenTypes.NUMBER)) {
  37180. this.operators.push(this.prev.value);
  37181. } else if (this.accept(PostScriptTokenTypes.OPERATOR)) {
  37182. this.operators.push(this.prev.value);
  37183. } else if (this.accept(PostScriptTokenTypes.LBRACE)) {
  37184. this.parseCondition();
  37185. } else {
  37186. return;
  37187. }
  37188. }
  37189. },
  37190. parseCondition: function PostScriptParser_parseCondition() {
  37191. // Add two place holders that will be updated later
  37192. var conditionLocation = this.operators.length;
  37193. this.operators.push(null, null);
  37194. this.parseBlock();
  37195. this.expect(PostScriptTokenTypes.RBRACE);
  37196. if (this.accept(PostScriptTokenTypes.IF)) {
  37197. // The true block is right after the 'if' so it just falls through on
  37198. // true else it jumps and skips the true block.
  37199. this.operators[conditionLocation] = this.operators.length;
  37200. this.operators[conditionLocation + 1] = 'jz';
  37201. } else if (this.accept(PostScriptTokenTypes.LBRACE)) {
  37202. var jumpLocation = this.operators.length;
  37203. this.operators.push(null, null);
  37204. var endOfTrue = this.operators.length;
  37205. this.parseBlock();
  37206. this.expect(PostScriptTokenTypes.RBRACE);
  37207. this.expect(PostScriptTokenTypes.IFELSE);
  37208. // The jump is added at the end of the true block to skip the false
  37209. // block.
  37210. this.operators[jumpLocation] = this.operators.length;
  37211. this.operators[jumpLocation + 1] = 'j';
  37212. this.operators[conditionLocation] = endOfTrue;
  37213. this.operators[conditionLocation + 1] = 'jz';
  37214. } else {
  37215. error('PS Function: error parsing conditional.');
  37216. }
  37217. }
  37218. };
  37219. return PostScriptParser;
  37220. })();
  37221. var PostScriptTokenTypes = {
  37222. LBRACE: 0,
  37223. RBRACE: 1,
  37224. NUMBER: 2,
  37225. OPERATOR: 3,
  37226. IF: 4,
  37227. IFELSE: 5
  37228. };
  37229. var PostScriptToken = (function PostScriptTokenClosure() {
  37230. function PostScriptToken(type, value) {
  37231. this.type = type;
  37232. this.value = value;
  37233. }
  37234. var opCache = {};
  37235. PostScriptToken.getOperator = function PostScriptToken_getOperator(op) {
  37236. var opValue = opCache[op];
  37237. if (opValue) {
  37238. return opValue;
  37239. }
  37240. return opCache[op] = new PostScriptToken(PostScriptTokenTypes.OPERATOR, op);
  37241. };
  37242. PostScriptToken.LBRACE = new PostScriptToken(PostScriptTokenTypes.LBRACE,
  37243. '{');
  37244. PostScriptToken.RBRACE = new PostScriptToken(PostScriptTokenTypes.RBRACE,
  37245. '}');
  37246. PostScriptToken.IF = new PostScriptToken(PostScriptTokenTypes.IF, 'IF');
  37247. PostScriptToken.IFELSE = new PostScriptToken(PostScriptTokenTypes.IFELSE,
  37248. 'IFELSE');
  37249. return PostScriptToken;
  37250. })();
  37251. var PostScriptLexer = (function PostScriptLexerClosure() {
  37252. function PostScriptLexer(stream) {
  37253. this.stream = stream;
  37254. this.nextChar();
  37255. }
  37256. PostScriptLexer.prototype = {
  37257. nextChar: function PostScriptLexer_nextChar() {
  37258. return (this.currentChar = this.stream.getByte());
  37259. },
  37260. getToken: function PostScriptLexer_getToken() {
  37261. var comment = false;
  37262. var ch = this.currentChar;
  37263. // skip comments
  37264. while (true) {
  37265. if (ch < 0) {
  37266. return EOF;
  37267. }
  37268. if (comment) {
  37269. if (ch === 0x0A || ch === 0x0D) {
  37270. comment = false;
  37271. }
  37272. } else if (ch == 0x25) { // '%'
  37273. comment = true;
  37274. } else if (!Lexer.isSpace(ch)) {
  37275. break;
  37276. }
  37277. ch = this.nextChar();
  37278. }
  37279. switch (ch | 0) {
  37280. case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: // '0'-'4'
  37281. case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: // '5'-'9'
  37282. case 0x2B: case 0x2D: case 0x2E: // '+', '-', '.'
  37283. return new PostScriptToken(PostScriptTokenTypes.NUMBER,
  37284. this.getNumber());
  37285. case 0x7B: // '{'
  37286. this.nextChar();
  37287. return PostScriptToken.LBRACE;
  37288. case 0x7D: // '}'
  37289. this.nextChar();
  37290. return PostScriptToken.RBRACE;
  37291. }
  37292. // operator
  37293. var str = String.fromCharCode(ch);
  37294. while ((ch = this.nextChar()) >= 0 && // and 'A'-'Z', 'a'-'z'
  37295. ((ch >= 0x41 && ch <= 0x5A) || (ch >= 0x61 && ch <= 0x7A))) {
  37296. str += String.fromCharCode(ch);
  37297. }
  37298. switch (str.toLowerCase()) {
  37299. case 'if':
  37300. return PostScriptToken.IF;
  37301. case 'ifelse':
  37302. return PostScriptToken.IFELSE;
  37303. default:
  37304. return PostScriptToken.getOperator(str);
  37305. }
  37306. },
  37307. getNumber: function PostScriptLexer_getNumber() {
  37308. var ch = this.currentChar;
  37309. var str = String.fromCharCode(ch);
  37310. while ((ch = this.nextChar()) >= 0) {
  37311. if ((ch >= 0x30 && ch <= 0x39) || // '0'-'9'
  37312. ch === 0x2D || ch === 0x2E) { // '-', '.'
  37313. str += String.fromCharCode(ch);
  37314. } else {
  37315. break;
  37316. }
  37317. }
  37318. var value = parseFloat(str);
  37319. if (isNaN(value)) {
  37320. error('Invalid floating point number: ' + value);
  37321. }
  37322. return value;
  37323. }
  37324. };
  37325. return PostScriptLexer;
  37326. })();
  37327. var Stream = (function StreamClosure() {
  37328. function Stream(arrayBuffer, start, length, dict) {
  37329. this.bytes = (arrayBuffer instanceof Uint8Array ?
  37330. arrayBuffer : new Uint8Array(arrayBuffer));
  37331. this.start = start || 0;
  37332. this.pos = this.start;
  37333. this.end = (start + length) || this.bytes.length;
  37334. this.dict = dict;
  37335. }
  37336. // required methods for a stream. if a particular stream does not
  37337. // implement these, an error should be thrown
  37338. Stream.prototype = {
  37339. get length() {
  37340. return this.end - this.start;
  37341. },
  37342. getByte: function Stream_getByte() {
  37343. if (this.pos >= this.end) {
  37344. return -1;
  37345. }
  37346. return this.bytes[this.pos++];
  37347. },
  37348. getUint16: function Stream_getUint16() {
  37349. var b0 = this.getByte();
  37350. var b1 = this.getByte();
  37351. return (b0 << 8) + b1;
  37352. },
  37353. getInt32: function Stream_getInt32() {
  37354. var b0 = this.getByte();
  37355. var b1 = this.getByte();
  37356. var b2 = this.getByte();
  37357. var b3 = this.getByte();
  37358. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  37359. },
  37360. // returns subarray of original buffer
  37361. // should only be read
  37362. getBytes: function Stream_getBytes(length) {
  37363. var bytes = this.bytes;
  37364. var pos = this.pos;
  37365. var strEnd = this.end;
  37366. if (!length) {
  37367. return bytes.subarray(pos, strEnd);
  37368. }
  37369. var end = pos + length;
  37370. if (end > strEnd) {
  37371. end = strEnd;
  37372. }
  37373. this.pos = end;
  37374. return bytes.subarray(pos, end);
  37375. },
  37376. peekBytes: function Stream_peekBytes(length) {
  37377. var bytes = this.getBytes(length);
  37378. this.pos -= bytes.length;
  37379. return bytes;
  37380. },
  37381. skip: function Stream_skip(n) {
  37382. if (!n) {
  37383. n = 1;
  37384. }
  37385. this.pos += n;
  37386. },
  37387. reset: function Stream_reset() {
  37388. this.pos = this.start;
  37389. },
  37390. moveStart: function Stream_moveStart() {
  37391. this.start = this.pos;
  37392. },
  37393. makeSubStream: function Stream_makeSubStream(start, length, dict) {
  37394. return new Stream(this.bytes.buffer, start, length, dict);
  37395. },
  37396. isStream: true
  37397. };
  37398. return Stream;
  37399. })();
  37400. var StringStream = (function StringStreamClosure() {
  37401. function StringStream(str) {
  37402. var length = str.length;
  37403. var bytes = new Uint8Array(length);
  37404. for (var n = 0; n < length; ++n) {
  37405. bytes[n] = str.charCodeAt(n);
  37406. }
  37407. Stream.call(this, bytes);
  37408. }
  37409. StringStream.prototype = Stream.prototype;
  37410. return StringStream;
  37411. })();
  37412. // super class for the decoding streams
  37413. var DecodeStream = (function DecodeStreamClosure() {
  37414. function DecodeStream(maybeMinBufferLength) {
  37415. this.pos = 0;
  37416. this.bufferLength = 0;
  37417. this.eof = false;
  37418. this.buffer = null;
  37419. this.minBufferLength = 512;
  37420. if (maybeMinBufferLength) {
  37421. // Compute the first power of two that is as big as maybeMinBufferLength.
  37422. while (this.minBufferLength < maybeMinBufferLength) {
  37423. this.minBufferLength *= 2;
  37424. }
  37425. }
  37426. }
  37427. DecodeStream.prototype = {
  37428. ensureBuffer: function DecodeStream_ensureBuffer(requested) {
  37429. var buffer = this.buffer;
  37430. var current;
  37431. if (buffer) {
  37432. current = buffer.byteLength;
  37433. if (requested <= current) {
  37434. return buffer;
  37435. }
  37436. } else {
  37437. current = 0;
  37438. }
  37439. var size = this.minBufferLength;
  37440. while (size < requested) {
  37441. size *= 2;
  37442. }
  37443. var buffer2 = new Uint8Array(size);
  37444. for (var i = 0; i < current; ++i) {
  37445. buffer2[i] = buffer[i];
  37446. }
  37447. return (this.buffer = buffer2);
  37448. },
  37449. getByte: function DecodeStream_getByte() {
  37450. var pos = this.pos;
  37451. while (this.bufferLength <= pos) {
  37452. if (this.eof) {
  37453. return -1;
  37454. }
  37455. this.readBlock();
  37456. }
  37457. return this.buffer[this.pos++];
  37458. },
  37459. getUint16: function DecodeStream_getUint16() {
  37460. var b0 = this.getByte();
  37461. var b1 = this.getByte();
  37462. return (b0 << 8) + b1;
  37463. },
  37464. getInt32: function DecodeStream_getInt32() {
  37465. var b0 = this.getByte();
  37466. var b1 = this.getByte();
  37467. var b2 = this.getByte();
  37468. var b3 = this.getByte();
  37469. return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;
  37470. },
  37471. getBytes: function DecodeStream_getBytes(length) {
  37472. var end, pos = this.pos;
  37473. if (length) {
  37474. this.ensureBuffer(pos + length);
  37475. end = pos + length;
  37476. while (!this.eof && this.bufferLength < end) {
  37477. this.readBlock();
  37478. }
  37479. var bufEnd = this.bufferLength;
  37480. if (end > bufEnd) {
  37481. end = bufEnd;
  37482. }
  37483. } else {
  37484. while (!this.eof) {
  37485. this.readBlock();
  37486. }
  37487. end = this.bufferLength;
  37488. // checking if bufferLength is still 0 then
  37489. // the buffer has to be initialized
  37490. if (!end) {
  37491. this.buffer = new Uint8Array(0);
  37492. }
  37493. }
  37494. this.pos = end;
  37495. return this.buffer.subarray(pos, end);
  37496. },
  37497. peekBytes: function DecodeStream_peekBytes(length) {
  37498. var bytes = this.getBytes(length);
  37499. this.pos -= bytes.length;
  37500. return bytes;
  37501. },
  37502. makeSubStream: function DecodeStream_makeSubStream(start, length, dict) {
  37503. var end = start + length;
  37504. while (this.bufferLength <= end && !this.eof) {
  37505. this.readBlock();
  37506. }
  37507. return new Stream(this.buffer, start, length, dict);
  37508. },
  37509. skip: function Stream_skip(n) {
  37510. if (!n) {
  37511. n = 1;
  37512. }
  37513. this.pos += n;
  37514. },
  37515. reset: function DecodeStream_reset() {
  37516. this.pos = 0;
  37517. },
  37518. getBaseStreams: function DecodeStream_getBaseStreams() {
  37519. if (this.str && this.str.getBaseStreams) {
  37520. return this.str.getBaseStreams();
  37521. }
  37522. return [];
  37523. }
  37524. };
  37525. return DecodeStream;
  37526. })();
  37527. var StreamsSequenceStream = (function StreamsSequenceStreamClosure() {
  37528. function StreamsSequenceStream(streams) {
  37529. this.streams = streams;
  37530. DecodeStream.call(this, /* maybeLength = */ null);
  37531. }
  37532. StreamsSequenceStream.prototype = Object.create(DecodeStream.prototype);
  37533. StreamsSequenceStream.prototype.readBlock =
  37534. function streamSequenceStreamReadBlock() {
  37535. var streams = this.streams;
  37536. if (streams.length === 0) {
  37537. this.eof = true;
  37538. return;
  37539. }
  37540. var stream = streams.shift();
  37541. var chunk = stream.getBytes();
  37542. var bufferLength = this.bufferLength;
  37543. var newLength = bufferLength + chunk.length;
  37544. var buffer = this.ensureBuffer(newLength);
  37545. buffer.set(chunk, bufferLength);
  37546. this.bufferLength = newLength;
  37547. };
  37548. StreamsSequenceStream.prototype.getBaseStreams =
  37549. function StreamsSequenceStream_getBaseStreams() {
  37550. var baseStreams = [];
  37551. for (var i = 0, ii = this.streams.length; i < ii; i++) {
  37552. var stream = this.streams[i];
  37553. if (stream.getBaseStreams) {
  37554. Util.concatenateToArray(baseStreams, stream.getBaseStreams());
  37555. }
  37556. }
  37557. return baseStreams;
  37558. };
  37559. return StreamsSequenceStream;
  37560. })();
  37561. var FlateStream = (function FlateStreamClosure() {
  37562. var codeLenCodeMap = new Uint32Array([
  37563. 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
  37564. ]);
  37565. var lengthDecode = new Uint32Array([
  37566. 0x00003, 0x00004, 0x00005, 0x00006, 0x00007, 0x00008, 0x00009, 0x0000a,
  37567. 0x1000b, 0x1000d, 0x1000f, 0x10011, 0x20013, 0x20017, 0x2001b, 0x2001f,
  37568. 0x30023, 0x3002b, 0x30033, 0x3003b, 0x40043, 0x40053, 0x40063, 0x40073,
  37569. 0x50083, 0x500a3, 0x500c3, 0x500e3, 0x00102, 0x00102, 0x00102
  37570. ]);
  37571. var distDecode = new Uint32Array([
  37572. 0x00001, 0x00002, 0x00003, 0x00004, 0x10005, 0x10007, 0x20009, 0x2000d,
  37573. 0x30011, 0x30019, 0x40021, 0x40031, 0x50041, 0x50061, 0x60081, 0x600c1,
  37574. 0x70101, 0x70181, 0x80201, 0x80301, 0x90401, 0x90601, 0xa0801, 0xa0c01,
  37575. 0xb1001, 0xb1801, 0xc2001, 0xc3001, 0xd4001, 0xd6001
  37576. ]);
  37577. var fixedLitCodeTab = [new Uint32Array([
  37578. 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c0,
  37579. 0x70108, 0x80060, 0x80020, 0x900a0, 0x80000, 0x80080, 0x80040, 0x900e0,
  37580. 0x70104, 0x80058, 0x80018, 0x90090, 0x70114, 0x80078, 0x80038, 0x900d0,
  37581. 0x7010c, 0x80068, 0x80028, 0x900b0, 0x80008, 0x80088, 0x80048, 0x900f0,
  37582. 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c8,
  37583. 0x7010a, 0x80064, 0x80024, 0x900a8, 0x80004, 0x80084, 0x80044, 0x900e8,
  37584. 0x70106, 0x8005c, 0x8001c, 0x90098, 0x70116, 0x8007c, 0x8003c, 0x900d8,
  37585. 0x7010e, 0x8006c, 0x8002c, 0x900b8, 0x8000c, 0x8008c, 0x8004c, 0x900f8,
  37586. 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c4,
  37587. 0x70109, 0x80062, 0x80022, 0x900a4, 0x80002, 0x80082, 0x80042, 0x900e4,
  37588. 0x70105, 0x8005a, 0x8001a, 0x90094, 0x70115, 0x8007a, 0x8003a, 0x900d4,
  37589. 0x7010d, 0x8006a, 0x8002a, 0x900b4, 0x8000a, 0x8008a, 0x8004a, 0x900f4,
  37590. 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cc,
  37591. 0x7010b, 0x80066, 0x80026, 0x900ac, 0x80006, 0x80086, 0x80046, 0x900ec,
  37592. 0x70107, 0x8005e, 0x8001e, 0x9009c, 0x70117, 0x8007e, 0x8003e, 0x900dc,
  37593. 0x7010f, 0x8006e, 0x8002e, 0x900bc, 0x8000e, 0x8008e, 0x8004e, 0x900fc,
  37594. 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c2,
  37595. 0x70108, 0x80061, 0x80021, 0x900a2, 0x80001, 0x80081, 0x80041, 0x900e2,
  37596. 0x70104, 0x80059, 0x80019, 0x90092, 0x70114, 0x80079, 0x80039, 0x900d2,
  37597. 0x7010c, 0x80069, 0x80029, 0x900b2, 0x80009, 0x80089, 0x80049, 0x900f2,
  37598. 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900ca,
  37599. 0x7010a, 0x80065, 0x80025, 0x900aa, 0x80005, 0x80085, 0x80045, 0x900ea,
  37600. 0x70106, 0x8005d, 0x8001d, 0x9009a, 0x70116, 0x8007d, 0x8003d, 0x900da,
  37601. 0x7010e, 0x8006d, 0x8002d, 0x900ba, 0x8000d, 0x8008d, 0x8004d, 0x900fa,
  37602. 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c6,
  37603. 0x70109, 0x80063, 0x80023, 0x900a6, 0x80003, 0x80083, 0x80043, 0x900e6,
  37604. 0x70105, 0x8005b, 0x8001b, 0x90096, 0x70115, 0x8007b, 0x8003b, 0x900d6,
  37605. 0x7010d, 0x8006b, 0x8002b, 0x900b6, 0x8000b, 0x8008b, 0x8004b, 0x900f6,
  37606. 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900ce,
  37607. 0x7010b, 0x80067, 0x80027, 0x900ae, 0x80007, 0x80087, 0x80047, 0x900ee,
  37608. 0x70107, 0x8005f, 0x8001f, 0x9009e, 0x70117, 0x8007f, 0x8003f, 0x900de,
  37609. 0x7010f, 0x8006f, 0x8002f, 0x900be, 0x8000f, 0x8008f, 0x8004f, 0x900fe,
  37610. 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c1,
  37611. 0x70108, 0x80060, 0x80020, 0x900a1, 0x80000, 0x80080, 0x80040, 0x900e1,
  37612. 0x70104, 0x80058, 0x80018, 0x90091, 0x70114, 0x80078, 0x80038, 0x900d1,
  37613. 0x7010c, 0x80068, 0x80028, 0x900b1, 0x80008, 0x80088, 0x80048, 0x900f1,
  37614. 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c9,
  37615. 0x7010a, 0x80064, 0x80024, 0x900a9, 0x80004, 0x80084, 0x80044, 0x900e9,
  37616. 0x70106, 0x8005c, 0x8001c, 0x90099, 0x70116, 0x8007c, 0x8003c, 0x900d9,
  37617. 0x7010e, 0x8006c, 0x8002c, 0x900b9, 0x8000c, 0x8008c, 0x8004c, 0x900f9,
  37618. 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c5,
  37619. 0x70109, 0x80062, 0x80022, 0x900a5, 0x80002, 0x80082, 0x80042, 0x900e5,
  37620. 0x70105, 0x8005a, 0x8001a, 0x90095, 0x70115, 0x8007a, 0x8003a, 0x900d5,
  37621. 0x7010d, 0x8006a, 0x8002a, 0x900b5, 0x8000a, 0x8008a, 0x8004a, 0x900f5,
  37622. 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cd,
  37623. 0x7010b, 0x80066, 0x80026, 0x900ad, 0x80006, 0x80086, 0x80046, 0x900ed,
  37624. 0x70107, 0x8005e, 0x8001e, 0x9009d, 0x70117, 0x8007e, 0x8003e, 0x900dd,
  37625. 0x7010f, 0x8006e, 0x8002e, 0x900bd, 0x8000e, 0x8008e, 0x8004e, 0x900fd,
  37626. 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c3,
  37627. 0x70108, 0x80061, 0x80021, 0x900a3, 0x80001, 0x80081, 0x80041, 0x900e3,
  37628. 0x70104, 0x80059, 0x80019, 0x90093, 0x70114, 0x80079, 0x80039, 0x900d3,
  37629. 0x7010c, 0x80069, 0x80029, 0x900b3, 0x80009, 0x80089, 0x80049, 0x900f3,
  37630. 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900cb,
  37631. 0x7010a, 0x80065, 0x80025, 0x900ab, 0x80005, 0x80085, 0x80045, 0x900eb,
  37632. 0x70106, 0x8005d, 0x8001d, 0x9009b, 0x70116, 0x8007d, 0x8003d, 0x900db,
  37633. 0x7010e, 0x8006d, 0x8002d, 0x900bb, 0x8000d, 0x8008d, 0x8004d, 0x900fb,
  37634. 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c7,
  37635. 0x70109, 0x80063, 0x80023, 0x900a7, 0x80003, 0x80083, 0x80043, 0x900e7,
  37636. 0x70105, 0x8005b, 0x8001b, 0x90097, 0x70115, 0x8007b, 0x8003b, 0x900d7,
  37637. 0x7010d, 0x8006b, 0x8002b, 0x900b7, 0x8000b, 0x8008b, 0x8004b, 0x900f7,
  37638. 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900cf,
  37639. 0x7010b, 0x80067, 0x80027, 0x900af, 0x80007, 0x80087, 0x80047, 0x900ef,
  37640. 0x70107, 0x8005f, 0x8001f, 0x9009f, 0x70117, 0x8007f, 0x8003f, 0x900df,
  37641. 0x7010f, 0x8006f, 0x8002f, 0x900bf, 0x8000f, 0x8008f, 0x8004f, 0x900ff
  37642. ]), 9];
  37643. var fixedDistCodeTab = [new Uint32Array([
  37644. 0x50000, 0x50010, 0x50008, 0x50018, 0x50004, 0x50014, 0x5000c, 0x5001c,
  37645. 0x50002, 0x50012, 0x5000a, 0x5001a, 0x50006, 0x50016, 0x5000e, 0x00000,
  37646. 0x50001, 0x50011, 0x50009, 0x50019, 0x50005, 0x50015, 0x5000d, 0x5001d,
  37647. 0x50003, 0x50013, 0x5000b, 0x5001b, 0x50007, 0x50017, 0x5000f, 0x00000
  37648. ]), 5];
  37649. function FlateStream(str, maybeLength) {
  37650. this.str = str;
  37651. this.dict = str.dict;
  37652. var cmf = str.getByte();
  37653. var flg = str.getByte();
  37654. if (cmf == -1 || flg == -1) {
  37655. error('Invalid header in flate stream: ' + cmf + ', ' + flg);
  37656. }
  37657. if ((cmf & 0x0f) != 0x08) {
  37658. error('Unknown compression method in flate stream: ' + cmf + ', ' + flg);
  37659. }
  37660. if ((((cmf << 8) + flg) % 31) !== 0) {
  37661. error('Bad FCHECK in flate stream: ' + cmf + ', ' + flg);
  37662. }
  37663. if (flg & 0x20) {
  37664. error('FDICT bit set in flate stream: ' + cmf + ', ' + flg);
  37665. }
  37666. this.codeSize = 0;
  37667. this.codeBuf = 0;
  37668. DecodeStream.call(this, maybeLength);
  37669. }
  37670. FlateStream.prototype = Object.create(DecodeStream.prototype);
  37671. FlateStream.prototype.getBits = function FlateStream_getBits(bits) {
  37672. var str = this.str;
  37673. var codeSize = this.codeSize;
  37674. var codeBuf = this.codeBuf;
  37675. var b;
  37676. while (codeSize < bits) {
  37677. if ((b = str.getByte()) === -1) {
  37678. error('Bad encoding in flate stream');
  37679. }
  37680. codeBuf |= b << codeSize;
  37681. codeSize += 8;
  37682. }
  37683. b = codeBuf & ((1 << bits) - 1);
  37684. this.codeBuf = codeBuf >> bits;
  37685. this.codeSize = codeSize -= bits;
  37686. return b;
  37687. };
  37688. FlateStream.prototype.getCode = function FlateStream_getCode(table) {
  37689. var str = this.str;
  37690. var codes = table[0];
  37691. var maxLen = table[1];
  37692. var codeSize = this.codeSize;
  37693. var codeBuf = this.codeBuf;
  37694. while (codeSize < maxLen) {
  37695. var b;
  37696. if ((b = str.getByte()) === -1) {
  37697. error('Bad encoding in flate stream');
  37698. }
  37699. codeBuf |= (b << codeSize);
  37700. codeSize += 8;
  37701. }
  37702. var code = codes[codeBuf & ((1 << maxLen) - 1)];
  37703. var codeLen = code >> 16;
  37704. var codeVal = code & 0xffff;
  37705. if (codeSize === 0 || codeSize < codeLen || codeLen === 0) {
  37706. error('Bad encoding in flate stream');
  37707. }
  37708. this.codeBuf = (codeBuf >> codeLen);
  37709. this.codeSize = (codeSize - codeLen);
  37710. return codeVal;
  37711. };
  37712. FlateStream.prototype.generateHuffmanTable =
  37713. function flateStreamGenerateHuffmanTable(lengths) {
  37714. var n = lengths.length;
  37715. // find max code length
  37716. var maxLen = 0;
  37717. var i;
  37718. for (i = 0; i < n; ++i) {
  37719. if (lengths[i] > maxLen) {
  37720. maxLen = lengths[i];
  37721. }
  37722. }
  37723. // build the table
  37724. var size = 1 << maxLen;
  37725. var codes = new Uint32Array(size);
  37726. for (var len = 1, code = 0, skip = 2;
  37727. len <= maxLen;
  37728. ++len, code <<= 1, skip <<= 1) {
  37729. for (var val = 0; val < n; ++val) {
  37730. if (lengths[val] == len) {
  37731. // bit-reverse the code
  37732. var code2 = 0;
  37733. var t = code;
  37734. for (i = 0; i < len; ++i) {
  37735. code2 = (code2 << 1) | (t & 1);
  37736. t >>= 1;
  37737. }
  37738. // fill the table entries
  37739. for (i = code2; i < size; i += skip) {
  37740. codes[i] = (len << 16) | val;
  37741. }
  37742. ++code;
  37743. }
  37744. }
  37745. }
  37746. return [codes, maxLen];
  37747. };
  37748. FlateStream.prototype.readBlock = function FlateStream_readBlock() {
  37749. var buffer, len;
  37750. var str = this.str;
  37751. // read block header
  37752. var hdr = this.getBits(3);
  37753. if (hdr & 1) {
  37754. this.eof = true;
  37755. }
  37756. hdr >>= 1;
  37757. if (hdr === 0) { // uncompressed block
  37758. var b;
  37759. if ((b = str.getByte()) === -1) {
  37760. error('Bad block header in flate stream');
  37761. }
  37762. var blockLen = b;
  37763. if ((b = str.getByte()) === -1) {
  37764. error('Bad block header in flate stream');
  37765. }
  37766. blockLen |= (b << 8);
  37767. if ((b = str.getByte()) === -1) {
  37768. error('Bad block header in flate stream');
  37769. }
  37770. var check = b;
  37771. if ((b = str.getByte()) === -1) {
  37772. error('Bad block header in flate stream');
  37773. }
  37774. check |= (b << 8);
  37775. if (check != (~blockLen & 0xffff) &&
  37776. (blockLen !== 0 || check !== 0)) {
  37777. // Ignoring error for bad "empty" block (see issue 1277)
  37778. error('Bad uncompressed block length in flate stream');
  37779. }
  37780. this.codeBuf = 0;
  37781. this.codeSize = 0;
  37782. var bufferLength = this.bufferLength;
  37783. buffer = this.ensureBuffer(bufferLength + blockLen);
  37784. var end = bufferLength + blockLen;
  37785. this.bufferLength = end;
  37786. if (blockLen === 0) {
  37787. if (str.peekBytes(1).length === 0) {
  37788. this.eof = true;
  37789. }
  37790. } else {
  37791. for (var n = bufferLength; n < end; ++n) {
  37792. if ((b = str.getByte()) === -1) {
  37793. this.eof = true;
  37794. break;
  37795. }
  37796. buffer[n] = b;
  37797. }
  37798. }
  37799. return;
  37800. }
  37801. var litCodeTable;
  37802. var distCodeTable;
  37803. if (hdr == 1) { // compressed block, fixed codes
  37804. litCodeTable = fixedLitCodeTab;
  37805. distCodeTable = fixedDistCodeTab;
  37806. } else if (hdr == 2) { // compressed block, dynamic codes
  37807. var numLitCodes = this.getBits(5) + 257;
  37808. var numDistCodes = this.getBits(5) + 1;
  37809. var numCodeLenCodes = this.getBits(4) + 4;
  37810. // build the code lengths code table
  37811. var codeLenCodeLengths = new Uint8Array(codeLenCodeMap.length);
  37812. var i;
  37813. for (i = 0; i < numCodeLenCodes; ++i) {
  37814. codeLenCodeLengths[codeLenCodeMap[i]] = this.getBits(3);
  37815. }
  37816. var codeLenCodeTab = this.generateHuffmanTable(codeLenCodeLengths);
  37817. // build the literal and distance code tables
  37818. len = 0;
  37819. i = 0;
  37820. var codes = numLitCodes + numDistCodes;
  37821. var codeLengths = new Uint8Array(codes);
  37822. var bitsLength, bitsOffset, what;
  37823. while (i < codes) {
  37824. var code = this.getCode(codeLenCodeTab);
  37825. if (code == 16) {
  37826. bitsLength = 2; bitsOffset = 3; what = len;
  37827. } else if (code == 17) {
  37828. bitsLength = 3; bitsOffset = 3; what = (len = 0);
  37829. } else if (code == 18) {
  37830. bitsLength = 7; bitsOffset = 11; what = (len = 0);
  37831. } else {
  37832. codeLengths[i++] = len = code;
  37833. continue;
  37834. }
  37835. var repeatLength = this.getBits(bitsLength) + bitsOffset;
  37836. while (repeatLength-- > 0) {
  37837. codeLengths[i++] = what;
  37838. }
  37839. }
  37840. litCodeTable =
  37841. this.generateHuffmanTable(codeLengths.subarray(0, numLitCodes));
  37842. distCodeTable =
  37843. this.generateHuffmanTable(codeLengths.subarray(numLitCodes, codes));
  37844. } else {
  37845. error('Unknown block type in flate stream');
  37846. }
  37847. buffer = this.buffer;
  37848. var limit = buffer ? buffer.length : 0;
  37849. var pos = this.bufferLength;
  37850. while (true) {
  37851. var code1 = this.getCode(litCodeTable);
  37852. if (code1 < 256) {
  37853. if (pos + 1 >= limit) {
  37854. buffer = this.ensureBuffer(pos + 1);
  37855. limit = buffer.length;
  37856. }
  37857. buffer[pos++] = code1;
  37858. continue;
  37859. }
  37860. if (code1 == 256) {
  37861. this.bufferLength = pos;
  37862. return;
  37863. }
  37864. code1 -= 257;
  37865. code1 = lengthDecode[code1];
  37866. var code2 = code1 >> 16;
  37867. if (code2 > 0) {
  37868. code2 = this.getBits(code2);
  37869. }
  37870. len = (code1 & 0xffff) + code2;
  37871. code1 = this.getCode(distCodeTable);
  37872. code1 = distDecode[code1];
  37873. code2 = code1 >> 16;
  37874. if (code2 > 0) {
  37875. code2 = this.getBits(code2);
  37876. }
  37877. var dist = (code1 & 0xffff) + code2;
  37878. if (pos + len >= limit) {
  37879. buffer = this.ensureBuffer(pos + len);
  37880. limit = buffer.length;
  37881. }
  37882. for (var k = 0; k < len; ++k, ++pos) {
  37883. buffer[pos] = buffer[pos - dist];
  37884. }
  37885. }
  37886. };
  37887. return FlateStream;
  37888. })();
  37889. var PredictorStream = (function PredictorStreamClosure() {
  37890. function PredictorStream(str, maybeLength, params) {
  37891. var predictor = this.predictor = params.get('Predictor') || 1;
  37892. if (predictor <= 1) {
  37893. return str; // no prediction
  37894. }
  37895. if (predictor !== 2 && (predictor < 10 || predictor > 15)) {
  37896. error('Unsupported predictor: ' + predictor);
  37897. }
  37898. if (predictor === 2) {
  37899. this.readBlock = this.readBlockTiff;
  37900. } else {
  37901. this.readBlock = this.readBlockPng;
  37902. }
  37903. this.str = str;
  37904. this.dict = str.dict;
  37905. var colors = this.colors = params.get('Colors') || 1;
  37906. var bits = this.bits = params.get('BitsPerComponent') || 8;
  37907. var columns = this.columns = params.get('Columns') || 1;
  37908. this.pixBytes = (colors * bits + 7) >> 3;
  37909. this.rowBytes = (columns * colors * bits + 7) >> 3;
  37910. DecodeStream.call(this, maybeLength);
  37911. return this;
  37912. }
  37913. PredictorStream.prototype = Object.create(DecodeStream.prototype);
  37914. PredictorStream.prototype.readBlockTiff =
  37915. function predictorStreamReadBlockTiff() {
  37916. var rowBytes = this.rowBytes;
  37917. var bufferLength = this.bufferLength;
  37918. var buffer = this.ensureBuffer(bufferLength + rowBytes);
  37919. var bits = this.bits;
  37920. var colors = this.colors;
  37921. var rawBytes = this.str.getBytes(rowBytes);
  37922. this.eof = !rawBytes.length;
  37923. if (this.eof) {
  37924. return;
  37925. }
  37926. var inbuf = 0, outbuf = 0;
  37927. var inbits = 0, outbits = 0;
  37928. var pos = bufferLength;
  37929. var i;
  37930. if (bits === 1) {
  37931. for (i = 0; i < rowBytes; ++i) {
  37932. var c = rawBytes[i];
  37933. inbuf = (inbuf << 8) | c;
  37934. // bitwise addition is exclusive or
  37935. // first shift inbuf and then add
  37936. buffer[pos++] = (c ^ (inbuf >> colors)) & 0xFF;
  37937. // truncate inbuf (assumes colors < 16)
  37938. inbuf &= 0xFFFF;
  37939. }
  37940. } else if (bits === 8) {
  37941. for (i = 0; i < colors; ++i) {
  37942. buffer[pos++] = rawBytes[i];
  37943. }
  37944. for (; i < rowBytes; ++i) {
  37945. buffer[pos] = buffer[pos - colors] + rawBytes[i];
  37946. pos++;
  37947. }
  37948. } else {
  37949. var compArray = new Uint8Array(colors + 1);
  37950. var bitMask = (1 << bits) - 1;
  37951. var j = 0, k = bufferLength;
  37952. var columns = this.columns;
  37953. for (i = 0; i < columns; ++i) {
  37954. for (var kk = 0; kk < colors; ++kk) {
  37955. if (inbits < bits) {
  37956. inbuf = (inbuf << 8) | (rawBytes[j++] & 0xFF);
  37957. inbits += 8;
  37958. }
  37959. compArray[kk] = (compArray[kk] +
  37960. (inbuf >> (inbits - bits))) & bitMask;
  37961. inbits -= bits;
  37962. outbuf = (outbuf << bits) | compArray[kk];
  37963. outbits += bits;
  37964. if (outbits >= 8) {
  37965. buffer[k++] = (outbuf >> (outbits - 8)) & 0xFF;
  37966. outbits -= 8;
  37967. }
  37968. }
  37969. }
  37970. if (outbits > 0) {
  37971. buffer[k++] = (outbuf << (8 - outbits)) +
  37972. (inbuf & ((1 << (8 - outbits)) - 1));
  37973. }
  37974. }
  37975. this.bufferLength += rowBytes;
  37976. };
  37977. PredictorStream.prototype.readBlockPng =
  37978. function predictorStreamReadBlockPng() {
  37979. var rowBytes = this.rowBytes;
  37980. var pixBytes = this.pixBytes;
  37981. var predictor = this.str.getByte();
  37982. var rawBytes = this.str.getBytes(rowBytes);
  37983. this.eof = !rawBytes.length;
  37984. if (this.eof) {
  37985. return;
  37986. }
  37987. var bufferLength = this.bufferLength;
  37988. var buffer = this.ensureBuffer(bufferLength + rowBytes);
  37989. var prevRow = buffer.subarray(bufferLength - rowBytes, bufferLength);
  37990. if (prevRow.length === 0) {
  37991. prevRow = new Uint8Array(rowBytes);
  37992. }
  37993. var i, j = bufferLength, up, c;
  37994. switch (predictor) {
  37995. case 0:
  37996. for (i = 0; i < rowBytes; ++i) {
  37997. buffer[j++] = rawBytes[i];
  37998. }
  37999. break;
  38000. case 1:
  38001. for (i = 0; i < pixBytes; ++i) {
  38002. buffer[j++] = rawBytes[i];
  38003. }
  38004. for (; i < rowBytes; ++i) {
  38005. buffer[j] = (buffer[j - pixBytes] + rawBytes[i]) & 0xFF;
  38006. j++;
  38007. }
  38008. break;
  38009. case 2:
  38010. for (i = 0; i < rowBytes; ++i) {
  38011. buffer[j++] = (prevRow[i] + rawBytes[i]) & 0xFF;
  38012. }
  38013. break;
  38014. case 3:
  38015. for (i = 0; i < pixBytes; ++i) {
  38016. buffer[j++] = (prevRow[i] >> 1) + rawBytes[i];
  38017. }
  38018. for (; i < rowBytes; ++i) {
  38019. buffer[j] = (((prevRow[i] + buffer[j - pixBytes]) >> 1) +
  38020. rawBytes[i]) & 0xFF;
  38021. j++;
  38022. }
  38023. break;
  38024. case 4:
  38025. // we need to save the up left pixels values. the simplest way
  38026. // is to create a new buffer
  38027. for (i = 0; i < pixBytes; ++i) {
  38028. up = prevRow[i];
  38029. c = rawBytes[i];
  38030. buffer[j++] = up + c;
  38031. }
  38032. for (; i < rowBytes; ++i) {
  38033. up = prevRow[i];
  38034. var upLeft = prevRow[i - pixBytes];
  38035. var left = buffer[j - pixBytes];
  38036. var p = left + up - upLeft;
  38037. var pa = p - left;
  38038. if (pa < 0) {
  38039. pa = -pa;
  38040. }
  38041. var pb = p - up;
  38042. if (pb < 0) {
  38043. pb = -pb;
  38044. }
  38045. var pc = p - upLeft;
  38046. if (pc < 0) {
  38047. pc = -pc;
  38048. }
  38049. c = rawBytes[i];
  38050. if (pa <= pb && pa <= pc) {
  38051. buffer[j++] = left + c;
  38052. } else if (pb <= pc) {
  38053. buffer[j++] = up + c;
  38054. } else {
  38055. buffer[j++] = upLeft + c;
  38056. }
  38057. }
  38058. break;
  38059. default:
  38060. error('Unsupported predictor: ' + predictor);
  38061. }
  38062. this.bufferLength += rowBytes;
  38063. };
  38064. return PredictorStream;
  38065. })();
  38066. /**
  38067. * Depending on the type of JPEG a JpegStream is handled in different ways. For
  38068. * JPEG's that are supported natively such as DeviceGray and DeviceRGB the image
  38069. * data is stored and then loaded by the browser. For unsupported JPEG's we use
  38070. * a library to decode these images and the stream behaves like all the other
  38071. * DecodeStreams.
  38072. */
  38073. var JpegStream = (function JpegStreamClosure() {
  38074. function JpegStream(stream, maybeLength, dict, xref) {
  38075. // TODO: per poppler, some images may have 'junk' before that
  38076. // need to be removed
  38077. this.stream = stream;
  38078. this.maybeLength = maybeLength;
  38079. this.dict = dict;
  38080. DecodeStream.call(this, maybeLength);
  38081. }
  38082. JpegStream.prototype = Object.create(DecodeStream.prototype);
  38083. Object.defineProperty(JpegStream.prototype, 'bytes', {
  38084. get: function JpegStream_bytes() {
  38085. // If this.maybeLength is null, we'll get the entire stream.
  38086. return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
  38087. },
  38088. configurable: true
  38089. });
  38090. JpegStream.prototype.ensureBuffer = function JpegStream_ensureBuffer(req) {
  38091. if (this.bufferLength) {
  38092. return;
  38093. }
  38094. try {
  38095. var jpegImage = new JpegImage();
  38096. if (this.colorTransform != -1) {
  38097. jpegImage.colorTransform = this.colorTransform;
  38098. }
  38099. jpegImage.parse(this.bytes);
  38100. var data = jpegImage.getData(this.drawWidth, this.drawHeight,
  38101. /* forceRGBoutput = */true);
  38102. this.buffer = data;
  38103. this.bufferLength = data.length;
  38104. this.eof = true;
  38105. } catch (e) {
  38106. error('JPEG error: ' + e);
  38107. }
  38108. };
  38109. JpegStream.prototype.getBytes = function JpegStream_getBytes(length) {
  38110. this.ensureBuffer();
  38111. return this.buffer;
  38112. };
  38113. JpegStream.prototype.getIR = function JpegStream_getIR() {
  38114. return PDFJS.createObjectURL(this.bytes, 'image/jpeg');
  38115. };
  38116. /**
  38117. * Checks if the image can be decoded and displayed by the browser without any
  38118. * further processing such as color space conversions.
  38119. */
  38120. JpegStream.prototype.isNativelySupported =
  38121. function JpegStream_isNativelySupported(xref, res) {
  38122. var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res);
  38123. return cs.name === 'DeviceGray' || cs.name === 'DeviceRGB';
  38124. };
  38125. /**
  38126. * Checks if the image can be decoded by the browser.
  38127. */
  38128. JpegStream.prototype.isNativelyDecodable =
  38129. function JpegStream_isNativelyDecodable(xref, res) {
  38130. var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res);
  38131. var numComps = cs.numComps;
  38132. return numComps == 1 || numComps == 3;
  38133. };
  38134. return JpegStream;
  38135. })();
  38136. /**
  38137. * For JPEG 2000's we use a library to decode these images and
  38138. * the stream behaves like all the other DecodeStreams.
  38139. */
  38140. var JpxStream = (function JpxStreamClosure() {
  38141. function JpxStream(stream, maybeLength, dict) {
  38142. this.stream = stream;
  38143. this.maybeLength = maybeLength;
  38144. this.dict = dict;
  38145. DecodeStream.call(this, maybeLength);
  38146. }
  38147. JpxStream.prototype = Object.create(DecodeStream.prototype);
  38148. Object.defineProperty(JpxStream.prototype, 'bytes', {
  38149. get: function JpxStream_bytes() {
  38150. // If this.maybeLength is null, we'll get the entire stream.
  38151. return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
  38152. },
  38153. configurable: true
  38154. });
  38155. JpxStream.prototype.ensureBuffer = function JpxStream_ensureBuffer(req) {
  38156. if (this.bufferLength) {
  38157. return;
  38158. }
  38159. var jpxImage = new JpxImage();
  38160. jpxImage.parse(this.bytes);
  38161. var width = jpxImage.width;
  38162. var height = jpxImage.height;
  38163. var componentsCount = jpxImage.componentsCount;
  38164. var tileCount = jpxImage.tiles.length;
  38165. if (tileCount === 1) {
  38166. this.buffer = jpxImage.tiles[0].items;
  38167. } else {
  38168. var data = new Uint8Array(width * height * componentsCount);
  38169. for (var k = 0; k < tileCount; k++) {
  38170. var tileComponents = jpxImage.tiles[k];
  38171. var tileWidth = tileComponents.width;
  38172. var tileHeight = tileComponents.height;
  38173. var tileLeft = tileComponents.left;
  38174. var tileTop = tileComponents.top;
  38175. var src = tileComponents.items;
  38176. var srcPosition = 0;
  38177. var dataPosition = (width * tileTop + tileLeft) * componentsCount;
  38178. var imgRowSize = width * componentsCount;
  38179. var tileRowSize = tileWidth * componentsCount;
  38180. for (var j = 0; j < tileHeight; j++) {
  38181. var rowBytes = src.subarray(srcPosition, srcPosition + tileRowSize);
  38182. data.set(rowBytes, dataPosition);
  38183. srcPosition += tileRowSize;
  38184. dataPosition += imgRowSize;
  38185. }
  38186. }
  38187. this.buffer = data;
  38188. }
  38189. this.bufferLength = this.buffer.length;
  38190. this.eof = true;
  38191. };
  38192. return JpxStream;
  38193. })();
  38194. /**
  38195. * For JBIG2's we use a library to decode these images and
  38196. * the stream behaves like all the other DecodeStreams.
  38197. */
  38198. var Jbig2Stream = (function Jbig2StreamClosure() {
  38199. function Jbig2Stream(stream, maybeLength, dict) {
  38200. this.stream = stream;
  38201. this.maybeLength = maybeLength;
  38202. this.dict = dict;
  38203. DecodeStream.call(this, maybeLength);
  38204. }
  38205. Jbig2Stream.prototype = Object.create(DecodeStream.prototype);
  38206. Object.defineProperty(Jbig2Stream.prototype, 'bytes', {
  38207. get: function Jbig2Stream_bytes() {
  38208. // If this.maybeLength is null, we'll get the entire stream.
  38209. return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
  38210. },
  38211. configurable: true
  38212. });
  38213. Jbig2Stream.prototype.ensureBuffer = function Jbig2Stream_ensureBuffer(req) {
  38214. if (this.bufferLength) {
  38215. return;
  38216. }
  38217. var jbig2Image = new Jbig2Image();
  38218. var chunks = [], decodeParams = this.dict.get('DecodeParms');
  38219. // According to the PDF specification, DecodeParms can be either
  38220. // a dictionary, or an array whose elements are dictionaries.
  38221. if (isArray(decodeParams)) {
  38222. if (decodeParams.length > 1) {
  38223. warn('JBIG2 - \'DecodeParms\' array with multiple elements ' +
  38224. 'not supported.');
  38225. }
  38226. decodeParams = decodeParams[0];
  38227. }
  38228. if (decodeParams && decodeParams.has('JBIG2Globals')) {
  38229. var globalsStream = decodeParams.get('JBIG2Globals');
  38230. var globals = globalsStream.getBytes();
  38231. chunks.push({data: globals, start: 0, end: globals.length});
  38232. }
  38233. chunks.push({data: this.bytes, start: 0, end: this.bytes.length});
  38234. var data = jbig2Image.parseChunks(chunks);
  38235. var dataLength = data.length;
  38236. // JBIG2 had black as 1 and white as 0, inverting the colors
  38237. for (var i = 0; i < dataLength; i++) {
  38238. data[i] ^= 0xFF;
  38239. }
  38240. this.buffer = data;
  38241. this.bufferLength = dataLength;
  38242. this.eof = true;
  38243. };
  38244. return Jbig2Stream;
  38245. })();
  38246. var DecryptStream = (function DecryptStreamClosure() {
  38247. function DecryptStream(str, maybeLength, decrypt) {
  38248. this.str = str;
  38249. this.dict = str.dict;
  38250. this.decrypt = decrypt;
  38251. this.nextChunk = null;
  38252. this.initialized = false;
  38253. DecodeStream.call(this, maybeLength);
  38254. }
  38255. var chunkSize = 512;
  38256. DecryptStream.prototype = Object.create(DecodeStream.prototype);
  38257. DecryptStream.prototype.readBlock = function DecryptStream_readBlock() {
  38258. var chunk;
  38259. if (this.initialized) {
  38260. chunk = this.nextChunk;
  38261. } else {
  38262. chunk = this.str.getBytes(chunkSize);
  38263. this.initialized = true;
  38264. }
  38265. if (!chunk || chunk.length === 0) {
  38266. this.eof = true;
  38267. return;
  38268. }
  38269. this.nextChunk = this.str.getBytes(chunkSize);
  38270. var hasMoreData = this.nextChunk && this.nextChunk.length > 0;
  38271. var decrypt = this.decrypt;
  38272. chunk = decrypt(chunk, !hasMoreData);
  38273. var bufferLength = this.bufferLength;
  38274. var i, n = chunk.length;
  38275. var buffer = this.ensureBuffer(bufferLength + n);
  38276. for (i = 0; i < n; i++) {
  38277. buffer[bufferLength++] = chunk[i];
  38278. }
  38279. this.bufferLength = bufferLength;
  38280. };
  38281. return DecryptStream;
  38282. })();
  38283. var Ascii85Stream = (function Ascii85StreamClosure() {
  38284. function Ascii85Stream(str, maybeLength) {
  38285. this.str = str;
  38286. this.dict = str.dict;
  38287. this.input = new Uint8Array(5);
  38288. // Most streams increase in size when decoded, but Ascii85 streams
  38289. // typically shrink by ~20%.
  38290. if (maybeLength) {
  38291. maybeLength = 0.8 * maybeLength;
  38292. }
  38293. DecodeStream.call(this, maybeLength);
  38294. }
  38295. Ascii85Stream.prototype = Object.create(DecodeStream.prototype);
  38296. Ascii85Stream.prototype.readBlock = function Ascii85Stream_readBlock() {
  38297. var TILDA_CHAR = 0x7E; // '~'
  38298. var Z_LOWER_CHAR = 0x7A; // 'z'
  38299. var EOF = -1;
  38300. var str = this.str;
  38301. var c = str.getByte();
  38302. while (Lexer.isSpace(c)) {
  38303. c = str.getByte();
  38304. }
  38305. if (c === EOF || c === TILDA_CHAR) {
  38306. this.eof = true;
  38307. return;
  38308. }
  38309. var bufferLength = this.bufferLength, buffer;
  38310. var i;
  38311. // special code for z
  38312. if (c == Z_LOWER_CHAR) {
  38313. buffer = this.ensureBuffer(bufferLength + 4);
  38314. for (i = 0; i < 4; ++i) {
  38315. buffer[bufferLength + i] = 0;
  38316. }
  38317. this.bufferLength += 4;
  38318. } else {
  38319. var input = this.input;
  38320. input[0] = c;
  38321. for (i = 1; i < 5; ++i) {
  38322. c = str.getByte();
  38323. while (Lexer.isSpace(c)) {
  38324. c = str.getByte();
  38325. }
  38326. input[i] = c;
  38327. if (c === EOF || c == TILDA_CHAR) {
  38328. break;
  38329. }
  38330. }
  38331. buffer = this.ensureBuffer(bufferLength + i - 1);
  38332. this.bufferLength += i - 1;
  38333. // partial ending;
  38334. if (i < 5) {
  38335. for (; i < 5; ++i) {
  38336. input[i] = 0x21 + 84;
  38337. }
  38338. this.eof = true;
  38339. }
  38340. var t = 0;
  38341. for (i = 0; i < 5; ++i) {
  38342. t = t * 85 + (input[i] - 0x21);
  38343. }
  38344. for (i = 3; i >= 0; --i) {
  38345. buffer[bufferLength + i] = t & 0xFF;
  38346. t >>= 8;
  38347. }
  38348. }
  38349. };
  38350. return Ascii85Stream;
  38351. })();
  38352. var AsciiHexStream = (function AsciiHexStreamClosure() {
  38353. function AsciiHexStream(str, maybeLength) {
  38354. this.str = str;
  38355. this.dict = str.dict;
  38356. this.firstDigit = -1;
  38357. // Most streams increase in size when decoded, but AsciiHex streams shrink
  38358. // by 50%.
  38359. if (maybeLength) {
  38360. maybeLength = 0.5 * maybeLength;
  38361. }
  38362. DecodeStream.call(this, maybeLength);
  38363. }
  38364. AsciiHexStream.prototype = Object.create(DecodeStream.prototype);
  38365. AsciiHexStream.prototype.readBlock = function AsciiHexStream_readBlock() {
  38366. var UPSTREAM_BLOCK_SIZE = 8000;
  38367. var bytes = this.str.getBytes(UPSTREAM_BLOCK_SIZE);
  38368. if (!bytes.length) {
  38369. this.eof = true;
  38370. return;
  38371. }
  38372. var maxDecodeLength = (bytes.length + 1) >> 1;
  38373. var buffer = this.ensureBuffer(this.bufferLength + maxDecodeLength);
  38374. var bufferLength = this.bufferLength;
  38375. var firstDigit = this.firstDigit;
  38376. for (var i = 0, ii = bytes.length; i < ii; i++) {
  38377. var ch = bytes[i], digit;
  38378. if (ch >= 0x30 && ch <= 0x39) { // '0'-'9'
  38379. digit = ch & 0x0F;
  38380. } else if ((ch >= 0x41 && ch <= 0x46) || (ch >= 0x61 && ch <= 0x66)) {
  38381. // 'A'-'Z', 'a'-'z'
  38382. digit = (ch & 0x0F) + 9;
  38383. } else if (ch === 0x3E) { // '>'
  38384. this.eof = true;
  38385. break;
  38386. } else { // probably whitespace
  38387. continue; // ignoring
  38388. }
  38389. if (firstDigit < 0) {
  38390. firstDigit = digit;
  38391. } else {
  38392. buffer[bufferLength++] = (firstDigit << 4) | digit;
  38393. firstDigit = -1;
  38394. }
  38395. }
  38396. if (firstDigit >= 0 && this.eof) {
  38397. // incomplete byte
  38398. buffer[bufferLength++] = (firstDigit << 4);
  38399. firstDigit = -1;
  38400. }
  38401. this.firstDigit = firstDigit;
  38402. this.bufferLength = bufferLength;
  38403. };
  38404. return AsciiHexStream;
  38405. })();
  38406. var RunLengthStream = (function RunLengthStreamClosure() {
  38407. function RunLengthStream(str, maybeLength) {
  38408. this.str = str;
  38409. this.dict = str.dict;
  38410. DecodeStream.call(this, maybeLength);
  38411. }
  38412. RunLengthStream.prototype = Object.create(DecodeStream.prototype);
  38413. RunLengthStream.prototype.readBlock = function RunLengthStream_readBlock() {
  38414. // The repeatHeader has following format. The first byte defines type of run
  38415. // and amount of bytes to repeat/copy: n = 0 through 127 - copy next n bytes
  38416. // (in addition to the second byte from the header), n = 129 through 255 -
  38417. // duplicate the second byte from the header (257 - n) times, n = 128 - end.
  38418. var repeatHeader = this.str.getBytes(2);
  38419. if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] == 128) {
  38420. this.eof = true;
  38421. return;
  38422. }
  38423. var buffer;
  38424. var bufferLength = this.bufferLength;
  38425. var n = repeatHeader[0];
  38426. if (n < 128) {
  38427. // copy n bytes
  38428. buffer = this.ensureBuffer(bufferLength + n + 1);
  38429. buffer[bufferLength++] = repeatHeader[1];
  38430. if (n > 0) {
  38431. var source = this.str.getBytes(n);
  38432. buffer.set(source, bufferLength);
  38433. bufferLength += n;
  38434. }
  38435. } else {
  38436. n = 257 - n;
  38437. var b = repeatHeader[1];
  38438. buffer = this.ensureBuffer(bufferLength + n + 1);
  38439. for (var i = 0; i < n; i++) {
  38440. buffer[bufferLength++] = b;
  38441. }
  38442. }
  38443. this.bufferLength = bufferLength;
  38444. };
  38445. return RunLengthStream;
  38446. })();
  38447. var CCITTFaxStream = (function CCITTFaxStreamClosure() {
  38448. var ccittEOL = -2;
  38449. var twoDimPass = 0;
  38450. var twoDimHoriz = 1;
  38451. var twoDimVert0 = 2;
  38452. var twoDimVertR1 = 3;
  38453. var twoDimVertL1 = 4;
  38454. var twoDimVertR2 = 5;
  38455. var twoDimVertL2 = 6;
  38456. var twoDimVertR3 = 7;
  38457. var twoDimVertL3 = 8;
  38458. var twoDimTable = [
  38459. [-1, -1], [-1, -1], // 000000x
  38460. [7, twoDimVertL3], // 0000010
  38461. [7, twoDimVertR3], // 0000011
  38462. [6, twoDimVertL2], [6, twoDimVertL2], // 000010x
  38463. [6, twoDimVertR2], [6, twoDimVertR2], // 000011x
  38464. [4, twoDimPass], [4, twoDimPass], // 0001xxx
  38465. [4, twoDimPass], [4, twoDimPass],
  38466. [4, twoDimPass], [4, twoDimPass],
  38467. [4, twoDimPass], [4, twoDimPass],
  38468. [3, twoDimHoriz], [3, twoDimHoriz], // 001xxxx
  38469. [3, twoDimHoriz], [3, twoDimHoriz],
  38470. [3, twoDimHoriz], [3, twoDimHoriz],
  38471. [3, twoDimHoriz], [3, twoDimHoriz],
  38472. [3, twoDimHoriz], [3, twoDimHoriz],
  38473. [3, twoDimHoriz], [3, twoDimHoriz],
  38474. [3, twoDimHoriz], [3, twoDimHoriz],
  38475. [3, twoDimHoriz], [3, twoDimHoriz],
  38476. [3, twoDimVertL1], [3, twoDimVertL1], // 010xxxx
  38477. [3, twoDimVertL1], [3, twoDimVertL1],
  38478. [3, twoDimVertL1], [3, twoDimVertL1],
  38479. [3, twoDimVertL1], [3, twoDimVertL1],
  38480. [3, twoDimVertL1], [3, twoDimVertL1],
  38481. [3, twoDimVertL1], [3, twoDimVertL1],
  38482. [3, twoDimVertL1], [3, twoDimVertL1],
  38483. [3, twoDimVertL1], [3, twoDimVertL1],
  38484. [3, twoDimVertR1], [3, twoDimVertR1], // 011xxxx
  38485. [3, twoDimVertR1], [3, twoDimVertR1],
  38486. [3, twoDimVertR1], [3, twoDimVertR1],
  38487. [3, twoDimVertR1], [3, twoDimVertR1],
  38488. [3, twoDimVertR1], [3, twoDimVertR1],
  38489. [3, twoDimVertR1], [3, twoDimVertR1],
  38490. [3, twoDimVertR1], [3, twoDimVertR1],
  38491. [3, twoDimVertR1], [3, twoDimVertR1],
  38492. [1, twoDimVert0], [1, twoDimVert0], // 1xxxxxx
  38493. [1, twoDimVert0], [1, twoDimVert0],
  38494. [1, twoDimVert0], [1, twoDimVert0],
  38495. [1, twoDimVert0], [1, twoDimVert0],
  38496. [1, twoDimVert0], [1, twoDimVert0],
  38497. [1, twoDimVert0], [1, twoDimVert0],
  38498. [1, twoDimVert0], [1, twoDimVert0],
  38499. [1, twoDimVert0], [1, twoDimVert0],
  38500. [1, twoDimVert0], [1, twoDimVert0],
  38501. [1, twoDimVert0], [1, twoDimVert0],
  38502. [1, twoDimVert0], [1, twoDimVert0],
  38503. [1, twoDimVert0], [1, twoDimVert0],
  38504. [1, twoDimVert0], [1, twoDimVert0],
  38505. [1, twoDimVert0], [1, twoDimVert0],
  38506. [1, twoDimVert0], [1, twoDimVert0],
  38507. [1, twoDimVert0], [1, twoDimVert0],
  38508. [1, twoDimVert0], [1, twoDimVert0],
  38509. [1, twoDimVert0], [1, twoDimVert0],
  38510. [1, twoDimVert0], [1, twoDimVert0],
  38511. [1, twoDimVert0], [1, twoDimVert0],
  38512. [1, twoDimVert0], [1, twoDimVert0],
  38513. [1, twoDimVert0], [1, twoDimVert0],
  38514. [1, twoDimVert0], [1, twoDimVert0],
  38515. [1, twoDimVert0], [1, twoDimVert0],
  38516. [1, twoDimVert0], [1, twoDimVert0],
  38517. [1, twoDimVert0], [1, twoDimVert0],
  38518. [1, twoDimVert0], [1, twoDimVert0],
  38519. [1, twoDimVert0], [1, twoDimVert0],
  38520. [1, twoDimVert0], [1, twoDimVert0],
  38521. [1, twoDimVert0], [1, twoDimVert0],
  38522. [1, twoDimVert0], [1, twoDimVert0],
  38523. [1, twoDimVert0], [1, twoDimVert0]
  38524. ];
  38525. var whiteTable1 = [
  38526. [-1, -1], // 00000
  38527. [12, ccittEOL], // 00001
  38528. [-1, -1], [-1, -1], // 0001x
  38529. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 001xx
  38530. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 010xx
  38531. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 011xx
  38532. [11, 1792], [11, 1792], // 1000x
  38533. [12, 1984], // 10010
  38534. [12, 2048], // 10011
  38535. [12, 2112], // 10100
  38536. [12, 2176], // 10101
  38537. [12, 2240], // 10110
  38538. [12, 2304], // 10111
  38539. [11, 1856], [11, 1856], // 1100x
  38540. [11, 1920], [11, 1920], // 1101x
  38541. [12, 2368], // 11100
  38542. [12, 2432], // 11101
  38543. [12, 2496], // 11110
  38544. [12, 2560] // 11111
  38545. ];
  38546. var whiteTable2 = [
  38547. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000000xx
  38548. [8, 29], [8, 29], // 00000010x
  38549. [8, 30], [8, 30], // 00000011x
  38550. [8, 45], [8, 45], // 00000100x
  38551. [8, 46], [8, 46], // 00000101x
  38552. [7, 22], [7, 22], [7, 22], [7, 22], // 0000011xx
  38553. [7, 23], [7, 23], [7, 23], [7, 23], // 0000100xx
  38554. [8, 47], [8, 47], // 00001010x
  38555. [8, 48], [8, 48], // 00001011x
  38556. [6, 13], [6, 13], [6, 13], [6, 13], // 000011xxx
  38557. [6, 13], [6, 13], [6, 13], [6, 13],
  38558. [7, 20], [7, 20], [7, 20], [7, 20], // 0001000xx
  38559. [8, 33], [8, 33], // 00010010x
  38560. [8, 34], [8, 34], // 00010011x
  38561. [8, 35], [8, 35], // 00010100x
  38562. [8, 36], [8, 36], // 00010101x
  38563. [8, 37], [8, 37], // 00010110x
  38564. [8, 38], [8, 38], // 00010111x
  38565. [7, 19], [7, 19], [7, 19], [7, 19], // 0001100xx
  38566. [8, 31], [8, 31], // 00011010x
  38567. [8, 32], [8, 32], // 00011011x
  38568. [6, 1], [6, 1], [6, 1], [6, 1], // 000111xxx
  38569. [6, 1], [6, 1], [6, 1], [6, 1],
  38570. [6, 12], [6, 12], [6, 12], [6, 12], // 001000xxx
  38571. [6, 12], [6, 12], [6, 12], [6, 12],
  38572. [8, 53], [8, 53], // 00100100x
  38573. [8, 54], [8, 54], // 00100101x
  38574. [7, 26], [7, 26], [7, 26], [7, 26], // 0010011xx
  38575. [8, 39], [8, 39], // 00101000x
  38576. [8, 40], [8, 40], // 00101001x
  38577. [8, 41], [8, 41], // 00101010x
  38578. [8, 42], [8, 42], // 00101011x
  38579. [8, 43], [8, 43], // 00101100x
  38580. [8, 44], [8, 44], // 00101101x
  38581. [7, 21], [7, 21], [7, 21], [7, 21], // 0010111xx
  38582. [7, 28], [7, 28], [7, 28], [7, 28], // 0011000xx
  38583. [8, 61], [8, 61], // 00110010x
  38584. [8, 62], [8, 62], // 00110011x
  38585. [8, 63], [8, 63], // 00110100x
  38586. [8, 0], [8, 0], // 00110101x
  38587. [8, 320], [8, 320], // 00110110x
  38588. [8, 384], [8, 384], // 00110111x
  38589. [5, 10], [5, 10], [5, 10], [5, 10], // 00111xxxx
  38590. [5, 10], [5, 10], [5, 10], [5, 10],
  38591. [5, 10], [5, 10], [5, 10], [5, 10],
  38592. [5, 10], [5, 10], [5, 10], [5, 10],
  38593. [5, 11], [5, 11], [5, 11], [5, 11], // 01000xxxx
  38594. [5, 11], [5, 11], [5, 11], [5, 11],
  38595. [5, 11], [5, 11], [5, 11], [5, 11],
  38596. [5, 11], [5, 11], [5, 11], [5, 11],
  38597. [7, 27], [7, 27], [7, 27], [7, 27], // 0100100xx
  38598. [8, 59], [8, 59], // 01001010x
  38599. [8, 60], [8, 60], // 01001011x
  38600. [9, 1472], // 010011000
  38601. [9, 1536], // 010011001
  38602. [9, 1600], // 010011010
  38603. [9, 1728], // 010011011
  38604. [7, 18], [7, 18], [7, 18], [7, 18], // 0100111xx
  38605. [7, 24], [7, 24], [7, 24], [7, 24], // 0101000xx
  38606. [8, 49], [8, 49], // 01010010x
  38607. [8, 50], [8, 50], // 01010011x
  38608. [8, 51], [8, 51], // 01010100x
  38609. [8, 52], [8, 52], // 01010101x
  38610. [7, 25], [7, 25], [7, 25], [7, 25], // 0101011xx
  38611. [8, 55], [8, 55], // 01011000x
  38612. [8, 56], [8, 56], // 01011001x
  38613. [8, 57], [8, 57], // 01011010x
  38614. [8, 58], [8, 58], // 01011011x
  38615. [6, 192], [6, 192], [6, 192], [6, 192], // 010111xxx
  38616. [6, 192], [6, 192], [6, 192], [6, 192],
  38617. [6, 1664], [6, 1664], [6, 1664], [6, 1664], // 011000xxx
  38618. [6, 1664], [6, 1664], [6, 1664], [6, 1664],
  38619. [8, 448], [8, 448], // 01100100x
  38620. [8, 512], [8, 512], // 01100101x
  38621. [9, 704], // 011001100
  38622. [9, 768], // 011001101
  38623. [8, 640], [8, 640], // 01100111x
  38624. [8, 576], [8, 576], // 01101000x
  38625. [9, 832], // 011010010
  38626. [9, 896], // 011010011
  38627. [9, 960], // 011010100
  38628. [9, 1024], // 011010101
  38629. [9, 1088], // 011010110
  38630. [9, 1152], // 011010111
  38631. [9, 1216], // 011011000
  38632. [9, 1280], // 011011001
  38633. [9, 1344], // 011011010
  38634. [9, 1408], // 011011011
  38635. [7, 256], [7, 256], [7, 256], [7, 256], // 0110111xx
  38636. [4, 2], [4, 2], [4, 2], [4, 2], // 0111xxxxx
  38637. [4, 2], [4, 2], [4, 2], [4, 2],
  38638. [4, 2], [4, 2], [4, 2], [4, 2],
  38639. [4, 2], [4, 2], [4, 2], [4, 2],
  38640. [4, 2], [4, 2], [4, 2], [4, 2],
  38641. [4, 2], [4, 2], [4, 2], [4, 2],
  38642. [4, 2], [4, 2], [4, 2], [4, 2],
  38643. [4, 2], [4, 2], [4, 2], [4, 2],
  38644. [4, 3], [4, 3], [4, 3], [4, 3], // 1000xxxxx
  38645. [4, 3], [4, 3], [4, 3], [4, 3],
  38646. [4, 3], [4, 3], [4, 3], [4, 3],
  38647. [4, 3], [4, 3], [4, 3], [4, 3],
  38648. [4, 3], [4, 3], [4, 3], [4, 3],
  38649. [4, 3], [4, 3], [4, 3], [4, 3],
  38650. [4, 3], [4, 3], [4, 3], [4, 3],
  38651. [4, 3], [4, 3], [4, 3], [4, 3],
  38652. [5, 128], [5, 128], [5, 128], [5, 128], // 10010xxxx
  38653. [5, 128], [5, 128], [5, 128], [5, 128],
  38654. [5, 128], [5, 128], [5, 128], [5, 128],
  38655. [5, 128], [5, 128], [5, 128], [5, 128],
  38656. [5, 8], [5, 8], [5, 8], [5, 8], // 10011xxxx
  38657. [5, 8], [5, 8], [5, 8], [5, 8],
  38658. [5, 8], [5, 8], [5, 8], [5, 8],
  38659. [5, 8], [5, 8], [5, 8], [5, 8],
  38660. [5, 9], [5, 9], [5, 9], [5, 9], // 10100xxxx
  38661. [5, 9], [5, 9], [5, 9], [5, 9],
  38662. [5, 9], [5, 9], [5, 9], [5, 9],
  38663. [5, 9], [5, 9], [5, 9], [5, 9],
  38664. [6, 16], [6, 16], [6, 16], [6, 16], // 101010xxx
  38665. [6, 16], [6, 16], [6, 16], [6, 16],
  38666. [6, 17], [6, 17], [6, 17], [6, 17], // 101011xxx
  38667. [6, 17], [6, 17], [6, 17], [6, 17],
  38668. [4, 4], [4, 4], [4, 4], [4, 4], // 1011xxxxx
  38669. [4, 4], [4, 4], [4, 4], [4, 4],
  38670. [4, 4], [4, 4], [4, 4], [4, 4],
  38671. [4, 4], [4, 4], [4, 4], [4, 4],
  38672. [4, 4], [4, 4], [4, 4], [4, 4],
  38673. [4, 4], [4, 4], [4, 4], [4, 4],
  38674. [4, 4], [4, 4], [4, 4], [4, 4],
  38675. [4, 4], [4, 4], [4, 4], [4, 4],
  38676. [4, 5], [4, 5], [4, 5], [4, 5], // 1100xxxxx
  38677. [4, 5], [4, 5], [4, 5], [4, 5],
  38678. [4, 5], [4, 5], [4, 5], [4, 5],
  38679. [4, 5], [4, 5], [4, 5], [4, 5],
  38680. [4, 5], [4, 5], [4, 5], [4, 5],
  38681. [4, 5], [4, 5], [4, 5], [4, 5],
  38682. [4, 5], [4, 5], [4, 5], [4, 5],
  38683. [4, 5], [4, 5], [4, 5], [4, 5],
  38684. [6, 14], [6, 14], [6, 14], [6, 14], // 110100xxx
  38685. [6, 14], [6, 14], [6, 14], [6, 14],
  38686. [6, 15], [6, 15], [6, 15], [6, 15], // 110101xxx
  38687. [6, 15], [6, 15], [6, 15], [6, 15],
  38688. [5, 64], [5, 64], [5, 64], [5, 64], // 11011xxxx
  38689. [5, 64], [5, 64], [5, 64], [5, 64],
  38690. [5, 64], [5, 64], [5, 64], [5, 64],
  38691. [5, 64], [5, 64], [5, 64], [5, 64],
  38692. [4, 6], [4, 6], [4, 6], [4, 6], // 1110xxxxx
  38693. [4, 6], [4, 6], [4, 6], [4, 6],
  38694. [4, 6], [4, 6], [4, 6], [4, 6],
  38695. [4, 6], [4, 6], [4, 6], [4, 6],
  38696. [4, 6], [4, 6], [4, 6], [4, 6],
  38697. [4, 6], [4, 6], [4, 6], [4, 6],
  38698. [4, 6], [4, 6], [4, 6], [4, 6],
  38699. [4, 6], [4, 6], [4, 6], [4, 6],
  38700. [4, 7], [4, 7], [4, 7], [4, 7], // 1111xxxxx
  38701. [4, 7], [4, 7], [4, 7], [4, 7],
  38702. [4, 7], [4, 7], [4, 7], [4, 7],
  38703. [4, 7], [4, 7], [4, 7], [4, 7],
  38704. [4, 7], [4, 7], [4, 7], [4, 7],
  38705. [4, 7], [4, 7], [4, 7], [4, 7],
  38706. [4, 7], [4, 7], [4, 7], [4, 7],
  38707. [4, 7], [4, 7], [4, 7], [4, 7]
  38708. ];
  38709. var blackTable1 = [
  38710. [-1, -1], [-1, -1], // 000000000000x
  38711. [12, ccittEOL], [12, ccittEOL], // 000000000001x
  38712. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000001xx
  38713. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000010xx
  38714. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000011xx
  38715. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000100xx
  38716. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000101xx
  38717. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000110xx
  38718. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000111xx
  38719. [11, 1792], [11, 1792], [11, 1792], [11, 1792], // 00000001000xx
  38720. [12, 1984], [12, 1984], // 000000010010x
  38721. [12, 2048], [12, 2048], // 000000010011x
  38722. [12, 2112], [12, 2112], // 000000010100x
  38723. [12, 2176], [12, 2176], // 000000010101x
  38724. [12, 2240], [12, 2240], // 000000010110x
  38725. [12, 2304], [12, 2304], // 000000010111x
  38726. [11, 1856], [11, 1856], [11, 1856], [11, 1856], // 00000001100xx
  38727. [11, 1920], [11, 1920], [11, 1920], [11, 1920], // 00000001101xx
  38728. [12, 2368], [12, 2368], // 000000011100x
  38729. [12, 2432], [12, 2432], // 000000011101x
  38730. [12, 2496], [12, 2496], // 000000011110x
  38731. [12, 2560], [12, 2560], // 000000011111x
  38732. [10, 18], [10, 18], [10, 18], [10, 18], // 0000001000xxx
  38733. [10, 18], [10, 18], [10, 18], [10, 18],
  38734. [12, 52], [12, 52], // 000000100100x
  38735. [13, 640], // 0000001001010
  38736. [13, 704], // 0000001001011
  38737. [13, 768], // 0000001001100
  38738. [13, 832], // 0000001001101
  38739. [12, 55], [12, 55], // 000000100111x
  38740. [12, 56], [12, 56], // 000000101000x
  38741. [13, 1280], // 0000001010010
  38742. [13, 1344], // 0000001010011
  38743. [13, 1408], // 0000001010100
  38744. [13, 1472], // 0000001010101
  38745. [12, 59], [12, 59], // 000000101011x
  38746. [12, 60], [12, 60], // 000000101100x
  38747. [13, 1536], // 0000001011010
  38748. [13, 1600], // 0000001011011
  38749. [11, 24], [11, 24], [11, 24], [11, 24], // 00000010111xx
  38750. [11, 25], [11, 25], [11, 25], [11, 25], // 00000011000xx
  38751. [13, 1664], // 0000001100100
  38752. [13, 1728], // 0000001100101
  38753. [12, 320], [12, 320], // 000000110011x
  38754. [12, 384], [12, 384], // 000000110100x
  38755. [12, 448], [12, 448], // 000000110101x
  38756. [13, 512], // 0000001101100
  38757. [13, 576], // 0000001101101
  38758. [12, 53], [12, 53], // 000000110111x
  38759. [12, 54], [12, 54], // 000000111000x
  38760. [13, 896], // 0000001110010
  38761. [13, 960], // 0000001110011
  38762. [13, 1024], // 0000001110100
  38763. [13, 1088], // 0000001110101
  38764. [13, 1152], // 0000001110110
  38765. [13, 1216], // 0000001110111
  38766. [10, 64], [10, 64], [10, 64], [10, 64], // 0000001111xxx
  38767. [10, 64], [10, 64], [10, 64], [10, 64]
  38768. ];
  38769. var blackTable2 = [
  38770. [8, 13], [8, 13], [8, 13], [8, 13], // 00000100xxxx
  38771. [8, 13], [8, 13], [8, 13], [8, 13],
  38772. [8, 13], [8, 13], [8, 13], [8, 13],
  38773. [8, 13], [8, 13], [8, 13], [8, 13],
  38774. [11, 23], [11, 23], // 00000101000x
  38775. [12, 50], // 000001010010
  38776. [12, 51], // 000001010011
  38777. [12, 44], // 000001010100
  38778. [12, 45], // 000001010101
  38779. [12, 46], // 000001010110
  38780. [12, 47], // 000001010111
  38781. [12, 57], // 000001011000
  38782. [12, 58], // 000001011001
  38783. [12, 61], // 000001011010
  38784. [12, 256], // 000001011011
  38785. [10, 16], [10, 16], [10, 16], [10, 16], // 0000010111xx
  38786. [10, 17], [10, 17], [10, 17], [10, 17], // 0000011000xx
  38787. [12, 48], // 000001100100
  38788. [12, 49], // 000001100101
  38789. [12, 62], // 000001100110
  38790. [12, 63], // 000001100111
  38791. [12, 30], // 000001101000
  38792. [12, 31], // 000001101001
  38793. [12, 32], // 000001101010
  38794. [12, 33], // 000001101011
  38795. [12, 40], // 000001101100
  38796. [12, 41], // 000001101101
  38797. [11, 22], [11, 22], // 00000110111x
  38798. [8, 14], [8, 14], [8, 14], [8, 14], // 00000111xxxx
  38799. [8, 14], [8, 14], [8, 14], [8, 14],
  38800. [8, 14], [8, 14], [8, 14], [8, 14],
  38801. [8, 14], [8, 14], [8, 14], [8, 14],
  38802. [7, 10], [7, 10], [7, 10], [7, 10], // 0000100xxxxx
  38803. [7, 10], [7, 10], [7, 10], [7, 10],
  38804. [7, 10], [7, 10], [7, 10], [7, 10],
  38805. [7, 10], [7, 10], [7, 10], [7, 10],
  38806. [7, 10], [7, 10], [7, 10], [7, 10],
  38807. [7, 10], [7, 10], [7, 10], [7, 10],
  38808. [7, 10], [7, 10], [7, 10], [7, 10],
  38809. [7, 10], [7, 10], [7, 10], [7, 10],
  38810. [7, 11], [7, 11], [7, 11], [7, 11], // 0000101xxxxx
  38811. [7, 11], [7, 11], [7, 11], [7, 11],
  38812. [7, 11], [7, 11], [7, 11], [7, 11],
  38813. [7, 11], [7, 11], [7, 11], [7, 11],
  38814. [7, 11], [7, 11], [7, 11], [7, 11],
  38815. [7, 11], [7, 11], [7, 11], [7, 11],
  38816. [7, 11], [7, 11], [7, 11], [7, 11],
  38817. [7, 11], [7, 11], [7, 11], [7, 11],
  38818. [9, 15], [9, 15], [9, 15], [9, 15], // 000011000xxx
  38819. [9, 15], [9, 15], [9, 15], [9, 15],
  38820. [12, 128], // 000011001000
  38821. [12, 192], // 000011001001
  38822. [12, 26], // 000011001010
  38823. [12, 27], // 000011001011
  38824. [12, 28], // 000011001100
  38825. [12, 29], // 000011001101
  38826. [11, 19], [11, 19], // 00001100111x
  38827. [11, 20], [11, 20], // 00001101000x
  38828. [12, 34], // 000011010010
  38829. [12, 35], // 000011010011
  38830. [12, 36], // 000011010100
  38831. [12, 37], // 000011010101
  38832. [12, 38], // 000011010110
  38833. [12, 39], // 000011010111
  38834. [11, 21], [11, 21], // 00001101100x
  38835. [12, 42], // 000011011010
  38836. [12, 43], // 000011011011
  38837. [10, 0], [10, 0], [10, 0], [10, 0], // 0000110111xx
  38838. [7, 12], [7, 12], [7, 12], [7, 12], // 0000111xxxxx
  38839. [7, 12], [7, 12], [7, 12], [7, 12],
  38840. [7, 12], [7, 12], [7, 12], [7, 12],
  38841. [7, 12], [7, 12], [7, 12], [7, 12],
  38842. [7, 12], [7, 12], [7, 12], [7, 12],
  38843. [7, 12], [7, 12], [7, 12], [7, 12],
  38844. [7, 12], [7, 12], [7, 12], [7, 12],
  38845. [7, 12], [7, 12], [7, 12], [7, 12]
  38846. ];
  38847. var blackTable3 = [
  38848. [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000xx
  38849. [6, 9], // 000100
  38850. [6, 8], // 000101
  38851. [5, 7], [5, 7], // 00011x
  38852. [4, 6], [4, 6], [4, 6], [4, 6], // 0010xx
  38853. [4, 5], [4, 5], [4, 5], [4, 5], // 0011xx
  38854. [3, 1], [3, 1], [3, 1], [3, 1], // 010xxx
  38855. [3, 1], [3, 1], [3, 1], [3, 1],
  38856. [3, 4], [3, 4], [3, 4], [3, 4], // 011xxx
  38857. [3, 4], [3, 4], [3, 4], [3, 4],
  38858. [2, 3], [2, 3], [2, 3], [2, 3], // 10xxxx
  38859. [2, 3], [2, 3], [2, 3], [2, 3],
  38860. [2, 3], [2, 3], [2, 3], [2, 3],
  38861. [2, 3], [2, 3], [2, 3], [2, 3],
  38862. [2, 2], [2, 2], [2, 2], [2, 2], // 11xxxx
  38863. [2, 2], [2, 2], [2, 2], [2, 2],
  38864. [2, 2], [2, 2], [2, 2], [2, 2],
  38865. [2, 2], [2, 2], [2, 2], [2, 2]
  38866. ];
  38867. function CCITTFaxStream(str, maybeLength, params) {
  38868. this.str = str;
  38869. this.dict = str.dict;
  38870. params = params || Dict.empty;
  38871. this.encoding = params.get('K') || 0;
  38872. this.eoline = params.get('EndOfLine') || false;
  38873. this.byteAlign = params.get('EncodedByteAlign') || false;
  38874. this.columns = params.get('Columns') || 1728;
  38875. this.rows = params.get('Rows') || 0;
  38876. var eoblock = params.get('EndOfBlock');
  38877. if (eoblock === null || eoblock === undefined) {
  38878. eoblock = true;
  38879. }
  38880. this.eoblock = eoblock;
  38881. this.black = params.get('BlackIs1') || false;
  38882. this.codingLine = new Uint32Array(this.columns + 1);
  38883. this.refLine = new Uint32Array(this.columns + 2);
  38884. this.codingLine[0] = this.columns;
  38885. this.codingPos = 0;
  38886. this.row = 0;
  38887. this.nextLine2D = this.encoding < 0;
  38888. this.inputBits = 0;
  38889. this.inputBuf = 0;
  38890. this.outputBits = 0;
  38891. var code1;
  38892. while ((code1 = this.lookBits(12)) === 0) {
  38893. this.eatBits(1);
  38894. }
  38895. if (code1 == 1) {
  38896. this.eatBits(12);
  38897. }
  38898. if (this.encoding > 0) {
  38899. this.nextLine2D = !this.lookBits(1);
  38900. this.eatBits(1);
  38901. }
  38902. DecodeStream.call(this, maybeLength);
  38903. }
  38904. CCITTFaxStream.prototype = Object.create(DecodeStream.prototype);
  38905. CCITTFaxStream.prototype.readBlock = function CCITTFaxStream_readBlock() {
  38906. while (!this.eof) {
  38907. var c = this.lookChar();
  38908. this.ensureBuffer(this.bufferLength + 1);
  38909. this.buffer[this.bufferLength++] = c;
  38910. }
  38911. };
  38912. CCITTFaxStream.prototype.addPixels =
  38913. function ccittFaxStreamAddPixels(a1, blackPixels) {
  38914. var codingLine = this.codingLine;
  38915. var codingPos = this.codingPos;
  38916. if (a1 > codingLine[codingPos]) {
  38917. if (a1 > this.columns) {
  38918. info('row is wrong length');
  38919. this.err = true;
  38920. a1 = this.columns;
  38921. }
  38922. if ((codingPos & 1) ^ blackPixels) {
  38923. ++codingPos;
  38924. }
  38925. codingLine[codingPos] = a1;
  38926. }
  38927. this.codingPos = codingPos;
  38928. };
  38929. CCITTFaxStream.prototype.addPixelsNeg =
  38930. function ccittFaxStreamAddPixelsNeg(a1, blackPixels) {
  38931. var codingLine = this.codingLine;
  38932. var codingPos = this.codingPos;
  38933. if (a1 > codingLine[codingPos]) {
  38934. if (a1 > this.columns) {
  38935. info('row is wrong length');
  38936. this.err = true;
  38937. a1 = this.columns;
  38938. }
  38939. if ((codingPos & 1) ^ blackPixels) {
  38940. ++codingPos;
  38941. }
  38942. codingLine[codingPos] = a1;
  38943. } else if (a1 < codingLine[codingPos]) {
  38944. if (a1 < 0) {
  38945. info('invalid code');
  38946. this.err = true;
  38947. a1 = 0;
  38948. }
  38949. while (codingPos > 0 && a1 < codingLine[codingPos - 1]) {
  38950. --codingPos;
  38951. }
  38952. codingLine[codingPos] = a1;
  38953. }
  38954. this.codingPos = codingPos;
  38955. };
  38956. CCITTFaxStream.prototype.lookChar = function CCITTFaxStream_lookChar() {
  38957. var refLine = this.refLine;
  38958. var codingLine = this.codingLine;
  38959. var columns = this.columns;
  38960. var refPos, blackPixels, bits, i;
  38961. if (this.outputBits === 0) {
  38962. if (this.eof) {
  38963. return null;
  38964. }
  38965. this.err = false;
  38966. var code1, code2, code3;
  38967. if (this.nextLine2D) {
  38968. for (i = 0; codingLine[i] < columns; ++i) {
  38969. refLine[i] = codingLine[i];
  38970. }
  38971. refLine[i++] = columns;
  38972. refLine[i] = columns;
  38973. codingLine[0] = 0;
  38974. this.codingPos = 0;
  38975. refPos = 0;
  38976. blackPixels = 0;
  38977. while (codingLine[this.codingPos] < columns) {
  38978. code1 = this.getTwoDimCode();
  38979. switch (code1) {
  38980. case twoDimPass:
  38981. this.addPixels(refLine[refPos + 1], blackPixels);
  38982. if (refLine[refPos + 1] < columns) {
  38983. refPos += 2;
  38984. }
  38985. break;
  38986. case twoDimHoriz:
  38987. code1 = code2 = 0;
  38988. if (blackPixels) {
  38989. do {
  38990. code1 += (code3 = this.getBlackCode());
  38991. } while (code3 >= 64);
  38992. do {
  38993. code2 += (code3 = this.getWhiteCode());
  38994. } while (code3 >= 64);
  38995. } else {
  38996. do {
  38997. code1 += (code3 = this.getWhiteCode());
  38998. } while (code3 >= 64);
  38999. do {
  39000. code2 += (code3 = this.getBlackCode());
  39001. } while (code3 >= 64);
  39002. }
  39003. this.addPixels(codingLine[this.codingPos] +
  39004. code1, blackPixels);
  39005. if (codingLine[this.codingPos] < columns) {
  39006. this.addPixels(codingLine[this.codingPos] + code2,
  39007. blackPixels ^ 1);
  39008. }
  39009. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39010. refLine[refPos] < columns) {
  39011. refPos += 2;
  39012. }
  39013. break;
  39014. case twoDimVertR3:
  39015. this.addPixels(refLine[refPos] + 3, blackPixels);
  39016. blackPixels ^= 1;
  39017. if (codingLine[this.codingPos] < columns) {
  39018. ++refPos;
  39019. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39020. refLine[refPos] < columns) {
  39021. refPos += 2;
  39022. }
  39023. }
  39024. break;
  39025. case twoDimVertR2:
  39026. this.addPixels(refLine[refPos] + 2, blackPixels);
  39027. blackPixels ^= 1;
  39028. if (codingLine[this.codingPos] < columns) {
  39029. ++refPos;
  39030. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39031. refLine[refPos] < columns) {
  39032. refPos += 2;
  39033. }
  39034. }
  39035. break;
  39036. case twoDimVertR1:
  39037. this.addPixels(refLine[refPos] + 1, blackPixels);
  39038. blackPixels ^= 1;
  39039. if (codingLine[this.codingPos] < columns) {
  39040. ++refPos;
  39041. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39042. refLine[refPos] < columns) {
  39043. refPos += 2;
  39044. }
  39045. }
  39046. break;
  39047. case twoDimVert0:
  39048. this.addPixels(refLine[refPos], blackPixels);
  39049. blackPixels ^= 1;
  39050. if (codingLine[this.codingPos] < columns) {
  39051. ++refPos;
  39052. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39053. refLine[refPos] < columns) {
  39054. refPos += 2;
  39055. }
  39056. }
  39057. break;
  39058. case twoDimVertL3:
  39059. this.addPixelsNeg(refLine[refPos] - 3, blackPixels);
  39060. blackPixels ^= 1;
  39061. if (codingLine[this.codingPos] < columns) {
  39062. if (refPos > 0) {
  39063. --refPos;
  39064. } else {
  39065. ++refPos;
  39066. }
  39067. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39068. refLine[refPos] < columns) {
  39069. refPos += 2;
  39070. }
  39071. }
  39072. break;
  39073. case twoDimVertL2:
  39074. this.addPixelsNeg(refLine[refPos] - 2, blackPixels);
  39075. blackPixels ^= 1;
  39076. if (codingLine[this.codingPos] < columns) {
  39077. if (refPos > 0) {
  39078. --refPos;
  39079. } else {
  39080. ++refPos;
  39081. }
  39082. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39083. refLine[refPos] < columns) {
  39084. refPos += 2;
  39085. }
  39086. }
  39087. break;
  39088. case twoDimVertL1:
  39089. this.addPixelsNeg(refLine[refPos] - 1, blackPixels);
  39090. blackPixels ^= 1;
  39091. if (codingLine[this.codingPos] < columns) {
  39092. if (refPos > 0) {
  39093. --refPos;
  39094. } else {
  39095. ++refPos;
  39096. }
  39097. while (refLine[refPos] <= codingLine[this.codingPos] &&
  39098. refLine[refPos] < columns) {
  39099. refPos += 2;
  39100. }
  39101. }
  39102. break;
  39103. case EOF:
  39104. this.addPixels(columns, 0);
  39105. this.eof = true;
  39106. break;
  39107. default:
  39108. info('bad 2d code');
  39109. this.addPixels(columns, 0);
  39110. this.err = true;
  39111. }
  39112. }
  39113. } else {
  39114. codingLine[0] = 0;
  39115. this.codingPos = 0;
  39116. blackPixels = 0;
  39117. while (codingLine[this.codingPos] < columns) {
  39118. code1 = 0;
  39119. if (blackPixels) {
  39120. do {
  39121. code1 += (code3 = this.getBlackCode());
  39122. } while (code3 >= 64);
  39123. } else {
  39124. do {
  39125. code1 += (code3 = this.getWhiteCode());
  39126. } while (code3 >= 64);
  39127. }
  39128. this.addPixels(codingLine[this.codingPos] + code1, blackPixels);
  39129. blackPixels ^= 1;
  39130. }
  39131. }
  39132. if (this.byteAlign) {
  39133. this.inputBits &= ~7;
  39134. }
  39135. var gotEOL = false;
  39136. if (!this.eoblock && this.row == this.rows - 1) {
  39137. this.eof = true;
  39138. } else {
  39139. code1 = this.lookBits(12);
  39140. while (code1 === 0) {
  39141. this.eatBits(1);
  39142. code1 = this.lookBits(12);
  39143. }
  39144. if (code1 == 1) {
  39145. this.eatBits(12);
  39146. gotEOL = true;
  39147. } else if (code1 == EOF) {
  39148. this.eof = true;
  39149. }
  39150. }
  39151. if (!this.eof && this.encoding > 0) {
  39152. this.nextLine2D = !this.lookBits(1);
  39153. this.eatBits(1);
  39154. }
  39155. if (this.eoblock && gotEOL) {
  39156. code1 = this.lookBits(12);
  39157. if (code1 == 1) {
  39158. this.eatBits(12);
  39159. if (this.encoding > 0) {
  39160. this.lookBits(1);
  39161. this.eatBits(1);
  39162. }
  39163. if (this.encoding >= 0) {
  39164. for (i = 0; i < 4; ++i) {
  39165. code1 = this.lookBits(12);
  39166. if (code1 != 1) {
  39167. info('bad rtc code: ' + code1);
  39168. }
  39169. this.eatBits(12);
  39170. if (this.encoding > 0) {
  39171. this.lookBits(1);
  39172. this.eatBits(1);
  39173. }
  39174. }
  39175. }
  39176. this.eof = true;
  39177. }
  39178. } else if (this.err && this.eoline) {
  39179. while (true) {
  39180. code1 = this.lookBits(13);
  39181. if (code1 == EOF) {
  39182. this.eof = true;
  39183. return null;
  39184. }
  39185. if ((code1 >> 1) == 1) {
  39186. break;
  39187. }
  39188. this.eatBits(1);
  39189. }
  39190. this.eatBits(12);
  39191. if (this.encoding > 0) {
  39192. this.eatBits(1);
  39193. this.nextLine2D = !(code1 & 1);
  39194. }
  39195. }
  39196. if (codingLine[0] > 0) {
  39197. this.outputBits = codingLine[this.codingPos = 0];
  39198. } else {
  39199. this.outputBits = codingLine[this.codingPos = 1];
  39200. }
  39201. this.row++;
  39202. }
  39203. var c;
  39204. if (this.outputBits >= 8) {
  39205. c = (this.codingPos & 1) ? 0 : 0xFF;
  39206. this.outputBits -= 8;
  39207. if (this.outputBits === 0 && codingLine[this.codingPos] < columns) {
  39208. this.codingPos++;
  39209. this.outputBits = (codingLine[this.codingPos] -
  39210. codingLine[this.codingPos - 1]);
  39211. }
  39212. } else {
  39213. bits = 8;
  39214. c = 0;
  39215. do {
  39216. if (this.outputBits > bits) {
  39217. c <<= bits;
  39218. if (!(this.codingPos & 1)) {
  39219. c |= 0xFF >> (8 - bits);
  39220. }
  39221. this.outputBits -= bits;
  39222. bits = 0;
  39223. } else {
  39224. c <<= this.outputBits;
  39225. if (!(this.codingPos & 1)) {
  39226. c |= 0xFF >> (8 - this.outputBits);
  39227. }
  39228. bits -= this.outputBits;
  39229. this.outputBits = 0;
  39230. if (codingLine[this.codingPos] < columns) {
  39231. this.codingPos++;
  39232. this.outputBits = (codingLine[this.codingPos] -
  39233. codingLine[this.codingPos - 1]);
  39234. } else if (bits > 0) {
  39235. c <<= bits;
  39236. bits = 0;
  39237. }
  39238. }
  39239. } while (bits);
  39240. }
  39241. if (this.black) {
  39242. c ^= 0xFF;
  39243. }
  39244. return c;
  39245. };
  39246. // This functions returns the code found from the table.
  39247. // The start and end parameters set the boundaries for searching the table.
  39248. // The limit parameter is optional. Function returns an array with three
  39249. // values. The first array element indicates whether a valid code is being
  39250. // returned. The second array element is the actual code. The third array
  39251. // element indicates whether EOF was reached.
  39252. CCITTFaxStream.prototype.findTableCode =
  39253. function ccittFaxStreamFindTableCode(start, end, table, limit) {
  39254. var limitValue = limit || 0;
  39255. for (var i = start; i <= end; ++i) {
  39256. var code = this.lookBits(i);
  39257. if (code == EOF) {
  39258. return [true, 1, false];
  39259. }
  39260. if (i < end) {
  39261. code <<= end - i;
  39262. }
  39263. if (!limitValue || code >= limitValue) {
  39264. var p = table[code - limitValue];
  39265. if (p[0] == i) {
  39266. this.eatBits(i);
  39267. return [true, p[1], true];
  39268. }
  39269. }
  39270. }
  39271. return [false, 0, false];
  39272. };
  39273. CCITTFaxStream.prototype.getTwoDimCode =
  39274. function ccittFaxStreamGetTwoDimCode() {
  39275. var code = 0;
  39276. var p;
  39277. if (this.eoblock) {
  39278. code = this.lookBits(7);
  39279. p = twoDimTable[code];
  39280. if (p && p[0] > 0) {
  39281. this.eatBits(p[0]);
  39282. return p[1];
  39283. }
  39284. } else {
  39285. var result = this.findTableCode(1, 7, twoDimTable);
  39286. if (result[0] && result[2]) {
  39287. return result[1];
  39288. }
  39289. }
  39290. info('Bad two dim code');
  39291. return EOF;
  39292. };
  39293. CCITTFaxStream.prototype.getWhiteCode =
  39294. function ccittFaxStreamGetWhiteCode() {
  39295. var code = 0;
  39296. var p;
  39297. if (this.eoblock) {
  39298. code = this.lookBits(12);
  39299. if (code == EOF) {
  39300. return 1;
  39301. }
  39302. if ((code >> 5) === 0) {
  39303. p = whiteTable1[code];
  39304. } else {
  39305. p = whiteTable2[code >> 3];
  39306. }
  39307. if (p[0] > 0) {
  39308. this.eatBits(p[0]);
  39309. return p[1];
  39310. }
  39311. } else {
  39312. var result = this.findTableCode(1, 9, whiteTable2);
  39313. if (result[0]) {
  39314. return result[1];
  39315. }
  39316. result = this.findTableCode(11, 12, whiteTable1);
  39317. if (result[0]) {
  39318. return result[1];
  39319. }
  39320. }
  39321. info('bad white code');
  39322. this.eatBits(1);
  39323. return 1;
  39324. };
  39325. CCITTFaxStream.prototype.getBlackCode =
  39326. function ccittFaxStreamGetBlackCode() {
  39327. var code, p;
  39328. if (this.eoblock) {
  39329. code = this.lookBits(13);
  39330. if (code == EOF) {
  39331. return 1;
  39332. }
  39333. if ((code >> 7) === 0) {
  39334. p = blackTable1[code];
  39335. } else if ((code >> 9) === 0 && (code >> 7) !== 0) {
  39336. p = blackTable2[(code >> 1) - 64];
  39337. } else {
  39338. p = blackTable3[code >> 7];
  39339. }
  39340. if (p[0] > 0) {
  39341. this.eatBits(p[0]);
  39342. return p[1];
  39343. }
  39344. } else {
  39345. var result = this.findTableCode(2, 6, blackTable3);
  39346. if (result[0]) {
  39347. return result[1];
  39348. }
  39349. result = this.findTableCode(7, 12, blackTable2, 64);
  39350. if (result[0]) {
  39351. return result[1];
  39352. }
  39353. result = this.findTableCode(10, 13, blackTable1);
  39354. if (result[0]) {
  39355. return result[1];
  39356. }
  39357. }
  39358. info('bad black code');
  39359. this.eatBits(1);
  39360. return 1;
  39361. };
  39362. CCITTFaxStream.prototype.lookBits = function CCITTFaxStream_lookBits(n) {
  39363. var c;
  39364. while (this.inputBits < n) {
  39365. if ((c = this.str.getByte()) === -1) {
  39366. if (this.inputBits === 0) {
  39367. return EOF;
  39368. }
  39369. return ((this.inputBuf << (n - this.inputBits)) &
  39370. (0xFFFF >> (16 - n)));
  39371. }
  39372. this.inputBuf = (this.inputBuf << 8) + c;
  39373. this.inputBits += 8;
  39374. }
  39375. return (this.inputBuf >> (this.inputBits - n)) & (0xFFFF >> (16 - n));
  39376. };
  39377. CCITTFaxStream.prototype.eatBits = function CCITTFaxStream_eatBits(n) {
  39378. if ((this.inputBits -= n) < 0) {
  39379. this.inputBits = 0;
  39380. }
  39381. };
  39382. return CCITTFaxStream;
  39383. })();
  39384. var LZWStream = (function LZWStreamClosure() {
  39385. function LZWStream(str, maybeLength, earlyChange) {
  39386. this.str = str;
  39387. this.dict = str.dict;
  39388. this.cachedData = 0;
  39389. this.bitsCached = 0;
  39390. var maxLzwDictionarySize = 4096;
  39391. var lzwState = {
  39392. earlyChange: earlyChange,
  39393. codeLength: 9,
  39394. nextCode: 258,
  39395. dictionaryValues: new Uint8Array(maxLzwDictionarySize),
  39396. dictionaryLengths: new Uint16Array(maxLzwDictionarySize),
  39397. dictionaryPrevCodes: new Uint16Array(maxLzwDictionarySize),
  39398. currentSequence: new Uint8Array(maxLzwDictionarySize),
  39399. currentSequenceLength: 0
  39400. };
  39401. for (var i = 0; i < 256; ++i) {
  39402. lzwState.dictionaryValues[i] = i;
  39403. lzwState.dictionaryLengths[i] = 1;
  39404. }
  39405. this.lzwState = lzwState;
  39406. DecodeStream.call(this, maybeLength);
  39407. }
  39408. LZWStream.prototype = Object.create(DecodeStream.prototype);
  39409. LZWStream.prototype.readBits = function LZWStream_readBits(n) {
  39410. var bitsCached = this.bitsCached;
  39411. var cachedData = this.cachedData;
  39412. while (bitsCached < n) {
  39413. var c = this.str.getByte();
  39414. if (c === -1) {
  39415. this.eof = true;
  39416. return null;
  39417. }
  39418. cachedData = (cachedData << 8) | c;
  39419. bitsCached += 8;
  39420. }
  39421. this.bitsCached = (bitsCached -= n);
  39422. this.cachedData = cachedData;
  39423. this.lastCode = null;
  39424. return (cachedData >>> bitsCached) & ((1 << n) - 1);
  39425. };
  39426. LZWStream.prototype.readBlock = function LZWStream_readBlock() {
  39427. var blockSize = 512;
  39428. var estimatedDecodedSize = blockSize * 2, decodedSizeDelta = blockSize;
  39429. var i, j, q;
  39430. var lzwState = this.lzwState;
  39431. if (!lzwState) {
  39432. return; // eof was found
  39433. }
  39434. var earlyChange = lzwState.earlyChange;
  39435. var nextCode = lzwState.nextCode;
  39436. var dictionaryValues = lzwState.dictionaryValues;
  39437. var dictionaryLengths = lzwState.dictionaryLengths;
  39438. var dictionaryPrevCodes = lzwState.dictionaryPrevCodes;
  39439. var codeLength = lzwState.codeLength;
  39440. var prevCode = lzwState.prevCode;
  39441. var currentSequence = lzwState.currentSequence;
  39442. var currentSequenceLength = lzwState.currentSequenceLength;
  39443. var decodedLength = 0;
  39444. var currentBufferLength = this.bufferLength;
  39445. var buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize);
  39446. for (i = 0; i < blockSize; i++) {
  39447. var code = this.readBits(codeLength);
  39448. var hasPrev = currentSequenceLength > 0;
  39449. if (code < 256) {
  39450. currentSequence[0] = code;
  39451. currentSequenceLength = 1;
  39452. } else if (code >= 258) {
  39453. if (code < nextCode) {
  39454. currentSequenceLength = dictionaryLengths[code];
  39455. for (j = currentSequenceLength - 1, q = code; j >= 0; j--) {
  39456. currentSequence[j] = dictionaryValues[q];
  39457. q = dictionaryPrevCodes[q];
  39458. }
  39459. } else {
  39460. currentSequence[currentSequenceLength++] = currentSequence[0];
  39461. }
  39462. } else if (code == 256) {
  39463. codeLength = 9;
  39464. nextCode = 258;
  39465. currentSequenceLength = 0;
  39466. continue;
  39467. } else {
  39468. this.eof = true;
  39469. delete this.lzwState;
  39470. break;
  39471. }
  39472. if (hasPrev) {
  39473. dictionaryPrevCodes[nextCode] = prevCode;
  39474. dictionaryLengths[nextCode] = dictionaryLengths[prevCode] + 1;
  39475. dictionaryValues[nextCode] = currentSequence[0];
  39476. nextCode++;
  39477. codeLength = (nextCode + earlyChange) & (nextCode + earlyChange - 1) ?
  39478. codeLength : Math.min(Math.log(nextCode + earlyChange) /
  39479. 0.6931471805599453 + 1, 12) | 0;
  39480. }
  39481. prevCode = code;
  39482. decodedLength += currentSequenceLength;
  39483. if (estimatedDecodedSize < decodedLength) {
  39484. do {
  39485. estimatedDecodedSize += decodedSizeDelta;
  39486. } while (estimatedDecodedSize < decodedLength);
  39487. buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize);
  39488. }
  39489. for (j = 0; j < currentSequenceLength; j++) {
  39490. buffer[currentBufferLength++] = currentSequence[j];
  39491. }
  39492. }
  39493. lzwState.nextCode = nextCode;
  39494. lzwState.codeLength = codeLength;
  39495. lzwState.prevCode = prevCode;
  39496. lzwState.currentSequenceLength = currentSequenceLength;
  39497. this.bufferLength = currentBufferLength;
  39498. };
  39499. return LZWStream;
  39500. })();
  39501. var NullStream = (function NullStreamClosure() {
  39502. function NullStream() {
  39503. Stream.call(this, new Uint8Array(0));
  39504. }
  39505. NullStream.prototype = Stream.prototype;
  39506. return NullStream;
  39507. })();
  39508. var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
  39509. setup: function wphSetup(handler) {
  39510. var pdfManager;
  39511. function loadDocument(recoveryMode) {
  39512. var loadDocumentPromise = new LegacyPromise();
  39513. var parseSuccess = function parseSuccess() {
  39514. var numPagesPromise = pdfManager.ensureDoc('numPages');
  39515. var fingerprintPromise = pdfManager.ensureDoc('fingerprint');
  39516. var outlinePromise = pdfManager.ensureCatalog('documentOutline');
  39517. var infoPromise = pdfManager.ensureDoc('documentInfo');
  39518. var metadataPromise = pdfManager.ensureCatalog('metadata');
  39519. var encryptedPromise = pdfManager.ensureXRef('encrypt');
  39520. var javaScriptPromise = pdfManager.ensureCatalog('javaScript');
  39521. Promise.all([numPagesPromise, fingerprintPromise, outlinePromise,
  39522. infoPromise, metadataPromise, encryptedPromise,
  39523. javaScriptPromise]).then(function onDocReady(results) {
  39524. var doc = {
  39525. numPages: results[0],
  39526. fingerprint: results[1],
  39527. outline: results[2],
  39528. info: results[3],
  39529. metadata: results[4],
  39530. encrypted: !!results[5],
  39531. javaScript: results[6]
  39532. };
  39533. loadDocumentPromise.resolve(doc);
  39534. },
  39535. parseFailure);
  39536. };
  39537. var parseFailure = function parseFailure(e) {
  39538. loadDocumentPromise.reject(e);
  39539. };
  39540. pdfManager.ensureDoc('checkHeader', []).then(function() {
  39541. pdfManager.ensureDoc('parseStartXRef', []).then(function() {
  39542. pdfManager.ensureDoc('parse', [recoveryMode]).then(
  39543. parseSuccess, parseFailure);
  39544. }, parseFailure);
  39545. }, parseFailure);
  39546. return loadDocumentPromise;
  39547. }
  39548. function getPdfManager(data) {
  39549. var pdfManagerPromise = new LegacyPromise();
  39550. var source = data.source;
  39551. var disableRange = data.disableRange;
  39552. if (source.data) {
  39553. try {
  39554. pdfManager = new LocalPdfManager(source.data, source.password);
  39555. pdfManagerPromise.resolve();
  39556. } catch (ex) {
  39557. pdfManagerPromise.reject(ex);
  39558. }
  39559. return pdfManagerPromise;
  39560. } else if (source.chunkedViewerLoading) {
  39561. try {
  39562. pdfManager = new NetworkPdfManager(source, handler);
  39563. pdfManagerPromise.resolve();
  39564. } catch (ex) {
  39565. pdfManagerPromise.reject(ex);
  39566. }
  39567. return pdfManagerPromise;
  39568. }
  39569. var networkManager = new NetworkManager(source.url, {
  39570. httpHeaders: source.httpHeaders,
  39571. withCredentials: source.withCredentials
  39572. });
  39573. var fullRequestXhrId = networkManager.requestFull({
  39574. onHeadersReceived: function onHeadersReceived() {
  39575. if (disableRange) {
  39576. return;
  39577. }
  39578. var fullRequestXhr = networkManager.getRequestXhr(fullRequestXhrId);
  39579. if (fullRequestXhr.getResponseHeader('Accept-Ranges') !== 'bytes') {
  39580. return;
  39581. }
  39582. var contentEncoding =
  39583. fullRequestXhr.getResponseHeader('Content-Encoding') || 'identity';
  39584. if (contentEncoding !== 'identity') {
  39585. return;
  39586. }
  39587. var length = fullRequestXhr.getResponseHeader('Content-Length');
  39588. length = parseInt(length, 10);
  39589. if (!isInt(length)) {
  39590. return;
  39591. }
  39592. source.length = length;
  39593. if (length <= 2 * RANGE_CHUNK_SIZE) {
  39594. // The file size is smaller than the size of two chunks, so it does
  39595. // not make any sense to abort the request and retry with a range
  39596. // request.
  39597. return;
  39598. }
  39599. // NOTE: by cancelling the full request, and then issuing range
  39600. // requests, there will be an issue for sites where you can only
  39601. // request the pdf once. However, if this is the case, then the
  39602. // server should not be returning that it can support range requests.
  39603. networkManager.abortRequest(fullRequestXhrId);
  39604. try {
  39605. pdfManager = new NetworkPdfManager(source, handler);
  39606. pdfManagerPromise.resolve(pdfManager);
  39607. } catch (ex) {
  39608. pdfManagerPromise.reject(ex);
  39609. }
  39610. },
  39611. onDone: function onDone(args) {
  39612. // the data is array, instantiating directly from it
  39613. try {
  39614. pdfManager = new LocalPdfManager(args.chunk, source.password);
  39615. pdfManagerPromise.resolve();
  39616. } catch (ex) {
  39617. pdfManagerPromise.reject(ex);
  39618. }
  39619. },
  39620. onError: function onError(status) {
  39621. if (status == 404) {
  39622. var exception = new MissingPDFException('Missing PDF "' +
  39623. source.url + '".');
  39624. handler.send('MissingPDF', { exception: exception });
  39625. } else {
  39626. handler.send('DocError', 'Unexpected server response (' +
  39627. status + ') while retrieving PDF "' +
  39628. source.url + '".');
  39629. }
  39630. },
  39631. onProgress: function onProgress(evt) {
  39632. handler.send('DocProgress', {
  39633. loaded: evt.loaded,
  39634. total: evt.lengthComputable ? evt.total : source.length
  39635. });
  39636. }
  39637. });
  39638. return pdfManagerPromise;
  39639. }
  39640. handler.on('test', function wphSetupTest(data) {
  39641. // check if Uint8Array can be sent to worker
  39642. if (!(data instanceof Uint8Array)) {
  39643. handler.send('test', false);
  39644. return;
  39645. }
  39646. // making sure postMessage transfers are working
  39647. var supportTransfers = data[0] === 255;
  39648. handler.postMessageTransfers = supportTransfers;
  39649. // check if the response property is supported by xhr
  39650. var xhr = new XMLHttpRequest();
  39651. var responseExists = 'response' in xhr;
  39652. // check if the property is actually implemented
  39653. try {
  39654. var dummy = xhr.responseType;
  39655. } catch (e) {
  39656. responseExists = false;
  39657. }
  39658. if (!responseExists) {
  39659. handler.send('test', false);
  39660. return;
  39661. }
  39662. handler.send('test', {
  39663. supportTypedArray: true,
  39664. supportTransfers: supportTransfers
  39665. });
  39666. });
  39667. handler.on('GetDocRequest', function wphSetupDoc(data) {
  39668. var onSuccess = function(doc) {
  39669. handler.send('GetDoc', { pdfInfo: doc });
  39670. };
  39671. var onFailure = function(e) {
  39672. if (e instanceof PasswordException) {
  39673. if (e.code === PasswordResponses.NEED_PASSWORD) {
  39674. handler.send('NeedPassword', {
  39675. exception: e
  39676. });
  39677. } else if (e.code === PasswordResponses.INCORRECT_PASSWORD) {
  39678. handler.send('IncorrectPassword', {
  39679. exception: e
  39680. });
  39681. }
  39682. } else if (e instanceof InvalidPDFException) {
  39683. handler.send('InvalidPDF', {
  39684. exception: e
  39685. });
  39686. } else if (e instanceof MissingPDFException) {
  39687. handler.send('MissingPDF', {
  39688. exception: e
  39689. });
  39690. } else {
  39691. handler.send('UnknownError', {
  39692. exception: new UnknownErrorException(e.message, e.toString())
  39693. });
  39694. }
  39695. };
  39696. PDFJS.maxImageSize = data.maxImageSize === undefined ?
  39697. -1 : data.maxImageSize;
  39698. PDFJS.disableFontFace = data.disableFontFace;
  39699. PDFJS.disableCreateObjectURL = data.disableCreateObjectURL;
  39700. PDFJS.verbosity = data.verbosity;
  39701. PDFJS.cMapUrl = data.cMapUrl === undefined ?
  39702. null : data.cMapUrl;
  39703. PDFJS.cMapPacked = data.cMapPacked === true;
  39704. getPdfManager(data).then(function () {
  39705. pdfManager.onLoadedStream().then(function(stream) {
  39706. handler.send('DataLoaded', { length: stream.bytes.byteLength });
  39707. });
  39708. }).then(function pdfManagerReady() {
  39709. loadDocument(false).then(onSuccess, function loadFailure(ex) {
  39710. // Try again with recoveryMode == true
  39711. if (!(ex instanceof XRefParseException)) {
  39712. if (ex instanceof PasswordException) {
  39713. // after password exception prepare to receive a new password
  39714. // to repeat loading
  39715. pdfManager.passwordChangedPromise = new LegacyPromise();
  39716. pdfManager.passwordChangedPromise.then(pdfManagerReady);
  39717. }
  39718. onFailure(ex);
  39719. return;
  39720. }
  39721. pdfManager.requestLoadedStream();
  39722. pdfManager.onLoadedStream().then(function() {
  39723. loadDocument(true).then(onSuccess, onFailure);
  39724. });
  39725. }, onFailure);
  39726. }, onFailure);
  39727. });
  39728. handler.on('GetPageRequest', function wphSetupGetPage(data) {
  39729. var pageIndex = data.pageIndex;
  39730. pdfManager.getPage(pageIndex).then(function(page) {
  39731. var rotatePromise = pdfManager.ensure(page, 'rotate');
  39732. var refPromise = pdfManager.ensure(page, 'ref');
  39733. var viewPromise = pdfManager.ensure(page, 'view');
  39734. Promise.all([rotatePromise, refPromise, viewPromise]).then(
  39735. function(results) {
  39736. var page = {
  39737. pageIndex: data.pageIndex,
  39738. rotate: results[0],
  39739. ref: results[1],
  39740. view: results[2]
  39741. };
  39742. handler.send('GetPage', { pageInfo: page });
  39743. });
  39744. });
  39745. });
  39746. handler.on('GetPageIndex', function wphSetupGetPageIndex(data, deferred) {
  39747. var ref = new Ref(data.ref.num, data.ref.gen);
  39748. var catalog = pdfManager.pdfDocument.catalog;
  39749. catalog.getPageIndex(ref).then(function (pageIndex) {
  39750. deferred.resolve(pageIndex);
  39751. }, deferred.reject);
  39752. });
  39753. handler.on('GetDestinations',
  39754. function wphSetupGetDestinations(data, deferred) {
  39755. pdfManager.ensureCatalog('destinations').then(function(destinations) {
  39756. deferred.resolve(destinations);
  39757. });
  39758. }
  39759. );
  39760. handler.on('GetAttachments',
  39761. function wphSetupGetAttachments(data, deferred) {
  39762. pdfManager.ensureCatalog('attachments').then(function(attachments) {
  39763. deferred.resolve(attachments);
  39764. }, deferred.reject);
  39765. }
  39766. );
  39767. handler.on('GetData', function wphSetupGetData(data, deferred) {
  39768. pdfManager.requestLoadedStream();
  39769. pdfManager.onLoadedStream().then(function(stream) {
  39770. deferred.resolve(stream.bytes);
  39771. });
  39772. });
  39773. handler.on('UpdatePassword', function wphSetupUpdatePassword(data) {
  39774. pdfManager.updatePassword(data);
  39775. });
  39776. handler.on('GetAnnotationsRequest', function wphSetupGetAnnotations(data) {
  39777. pdfManager.getPage(data.pageIndex).then(function(page) {
  39778. pdfManager.ensure(page, 'getAnnotationsData', []).then(
  39779. function(annotationsData) {
  39780. handler.send('GetAnnotations', {
  39781. pageIndex: data.pageIndex,
  39782. annotations: annotationsData
  39783. });
  39784. }
  39785. );
  39786. });
  39787. });
  39788. handler.on('RenderPageRequest', function wphSetupRenderPage(data) {
  39789. pdfManager.getPage(data.pageIndex).then(function(page) {
  39790. var pageNum = data.pageIndex + 1;
  39791. var start = Date.now();
  39792. // Pre compile the pdf page and fetch the fonts/images.
  39793. page.getOperatorList(handler, data.intent).then(function(operatorList) {
  39794. info('page=' + pageNum + ' - getOperatorList: time=' +
  39795. (Date.now() - start) + 'ms, len=' + operatorList.fnArray.length);
  39796. }, function(e) {
  39797. var minimumStackMessage =
  39798. 'worker.js: while trying to getPage() and getOperatorList()';
  39799. var wrappedException;
  39800. // Turn the error into an obj that can be serialized
  39801. if (typeof e === 'string') {
  39802. wrappedException = {
  39803. message: e,
  39804. stack: minimumStackMessage
  39805. };
  39806. } else if (typeof e === 'object') {
  39807. wrappedException = {
  39808. message: e.message || e.toString(),
  39809. stack: e.stack || minimumStackMessage
  39810. };
  39811. } else {
  39812. wrappedException = {
  39813. message: 'Unknown exception type: ' + (typeof e),
  39814. stack: minimumStackMessage
  39815. };
  39816. }
  39817. handler.send('PageError', {
  39818. pageNum: pageNum,
  39819. error: wrappedException,
  39820. intent: data.intent
  39821. });
  39822. });
  39823. });
  39824. }, this);
  39825. handler.on('GetTextContent', function wphExtractText(data, deferred) {
  39826. pdfManager.getPage(data.pageIndex).then(function(page) {
  39827. var pageNum = data.pageIndex + 1;
  39828. var start = Date.now();
  39829. page.extractTextContent().then(function(textContent) {
  39830. deferred.resolve(textContent);
  39831. info('text indexing: page=' + pageNum + ' - time=' +
  39832. (Date.now() - start) + 'ms');
  39833. }, function (e) {
  39834. // Skip errored pages
  39835. deferred.reject(e);
  39836. });
  39837. });
  39838. });
  39839. handler.on('Cleanup', function wphCleanup(data, deferred) {
  39840. pdfManager.cleanup();
  39841. deferred.resolve(true);
  39842. });
  39843. handler.on('Terminate', function wphTerminate(data, deferred) {
  39844. pdfManager.terminate();
  39845. deferred.resolve();
  39846. });
  39847. }
  39848. };
  39849. var consoleTimer = {};
  39850. var workerConsole = {
  39851. log: function log() {
  39852. var args = Array.prototype.slice.call(arguments);
  39853. globalScope.postMessage({
  39854. action: 'console_log',
  39855. data: args
  39856. });
  39857. },
  39858. error: function error() {
  39859. var args = Array.prototype.slice.call(arguments);
  39860. globalScope.postMessage({
  39861. action: 'console_error',
  39862. data: args
  39863. });
  39864. throw 'pdf.js execution error';
  39865. },
  39866. time: function time(name) {
  39867. consoleTimer[name] = Date.now();
  39868. },
  39869. timeEnd: function timeEnd(name) {
  39870. var time = consoleTimer[name];
  39871. if (!time) {
  39872. error('Unknown timer name ' + name);
  39873. }
  39874. this.log('Timer:', name, Date.now() - time);
  39875. }
  39876. };
  39877. // Worker thread?
  39878. if (typeof window === 'undefined') {
  39879. if (!('console' in globalScope)) {
  39880. globalScope.console = workerConsole;
  39881. }
  39882. // Listen for unsupported features so we can pass them on to the main thread.
  39883. PDFJS.UnsupportedManager.listen(function (msg) {
  39884. globalScope.postMessage({
  39885. action: '_unsupported_feature',
  39886. data: msg
  39887. });
  39888. });
  39889. var handler = new MessageHandler('worker_processor', this);
  39890. WorkerMessageHandler.setup(handler);
  39891. }
  39892. /* This class implements the QM Coder decoding as defined in
  39893. * JPEG 2000 Part I Final Committee Draft Version 1.0
  39894. * Annex C.3 Arithmetic decoding procedure
  39895. * available at http://www.jpeg.org/public/fcd15444-1.pdf
  39896. *
  39897. * The arithmetic decoder is used in conjunction with context models to decode
  39898. * JPEG2000 and JBIG2 streams.
  39899. */
  39900. var ArithmeticDecoder = (function ArithmeticDecoderClosure() {
  39901. // Table C-2
  39902. var QeTable = [
  39903. {qe: 0x5601, nmps: 1, nlps: 1, switchFlag: 1},
  39904. {qe: 0x3401, nmps: 2, nlps: 6, switchFlag: 0},
  39905. {qe: 0x1801, nmps: 3, nlps: 9, switchFlag: 0},
  39906. {qe: 0x0AC1, nmps: 4, nlps: 12, switchFlag: 0},
  39907. {qe: 0x0521, nmps: 5, nlps: 29, switchFlag: 0},
  39908. {qe: 0x0221, nmps: 38, nlps: 33, switchFlag: 0},
  39909. {qe: 0x5601, nmps: 7, nlps: 6, switchFlag: 1},
  39910. {qe: 0x5401, nmps: 8, nlps: 14, switchFlag: 0},
  39911. {qe: 0x4801, nmps: 9, nlps: 14, switchFlag: 0},
  39912. {qe: 0x3801, nmps: 10, nlps: 14, switchFlag: 0},
  39913. {qe: 0x3001, nmps: 11, nlps: 17, switchFlag: 0},
  39914. {qe: 0x2401, nmps: 12, nlps: 18, switchFlag: 0},
  39915. {qe: 0x1C01, nmps: 13, nlps: 20, switchFlag: 0},
  39916. {qe: 0x1601, nmps: 29, nlps: 21, switchFlag: 0},
  39917. {qe: 0x5601, nmps: 15, nlps: 14, switchFlag: 1},
  39918. {qe: 0x5401, nmps: 16, nlps: 14, switchFlag: 0},
  39919. {qe: 0x5101, nmps: 17, nlps: 15, switchFlag: 0},
  39920. {qe: 0x4801, nmps: 18, nlps: 16, switchFlag: 0},
  39921. {qe: 0x3801, nmps: 19, nlps: 17, switchFlag: 0},
  39922. {qe: 0x3401, nmps: 20, nlps: 18, switchFlag: 0},
  39923. {qe: 0x3001, nmps: 21, nlps: 19, switchFlag: 0},
  39924. {qe: 0x2801, nmps: 22, nlps: 19, switchFlag: 0},
  39925. {qe: 0x2401, nmps: 23, nlps: 20, switchFlag: 0},
  39926. {qe: 0x2201, nmps: 24, nlps: 21, switchFlag: 0},
  39927. {qe: 0x1C01, nmps: 25, nlps: 22, switchFlag: 0},
  39928. {qe: 0x1801, nmps: 26, nlps: 23, switchFlag: 0},
  39929. {qe: 0x1601, nmps: 27, nlps: 24, switchFlag: 0},
  39930. {qe: 0x1401, nmps: 28, nlps: 25, switchFlag: 0},
  39931. {qe: 0x1201, nmps: 29, nlps: 26, switchFlag: 0},
  39932. {qe: 0x1101, nmps: 30, nlps: 27, switchFlag: 0},
  39933. {qe: 0x0AC1, nmps: 31, nlps: 28, switchFlag: 0},
  39934. {qe: 0x09C1, nmps: 32, nlps: 29, switchFlag: 0},
  39935. {qe: 0x08A1, nmps: 33, nlps: 30, switchFlag: 0},
  39936. {qe: 0x0521, nmps: 34, nlps: 31, switchFlag: 0},
  39937. {qe: 0x0441, nmps: 35, nlps: 32, switchFlag: 0},
  39938. {qe: 0x02A1, nmps: 36, nlps: 33, switchFlag: 0},
  39939. {qe: 0x0221, nmps: 37, nlps: 34, switchFlag: 0},
  39940. {qe: 0x0141, nmps: 38, nlps: 35, switchFlag: 0},
  39941. {qe: 0x0111, nmps: 39, nlps: 36, switchFlag: 0},
  39942. {qe: 0x0085, nmps: 40, nlps: 37, switchFlag: 0},
  39943. {qe: 0x0049, nmps: 41, nlps: 38, switchFlag: 0},
  39944. {qe: 0x0025, nmps: 42, nlps: 39, switchFlag: 0},
  39945. {qe: 0x0015, nmps: 43, nlps: 40, switchFlag: 0},
  39946. {qe: 0x0009, nmps: 44, nlps: 41, switchFlag: 0},
  39947. {qe: 0x0005, nmps: 45, nlps: 42, switchFlag: 0},
  39948. {qe: 0x0001, nmps: 45, nlps: 43, switchFlag: 0},
  39949. {qe: 0x5601, nmps: 46, nlps: 46, switchFlag: 0}
  39950. ];
  39951. // C.3.5 Initialisation of the decoder (INITDEC)
  39952. function ArithmeticDecoder(data, start, end) {
  39953. this.data = data;
  39954. this.bp = start;
  39955. this.dataEnd = end;
  39956. this.chigh = data[start];
  39957. this.clow = 0;
  39958. this.byteIn();
  39959. this.chigh = ((this.chigh << 7) & 0xFFFF) | ((this.clow >> 9) & 0x7F);
  39960. this.clow = (this.clow << 7) & 0xFFFF;
  39961. this.ct -= 7;
  39962. this.a = 0x8000;
  39963. }
  39964. ArithmeticDecoder.prototype = {
  39965. // C.3.4 Compressed data input (BYTEIN)
  39966. byteIn: function ArithmeticDecoder_byteIn() {
  39967. var data = this.data;
  39968. var bp = this.bp;
  39969. if (data[bp] == 0xFF) {
  39970. var b1 = data[bp + 1];
  39971. if (b1 > 0x8F) {
  39972. this.clow += 0xFF00;
  39973. this.ct = 8;
  39974. } else {
  39975. bp++;
  39976. this.clow += (data[bp] << 9);
  39977. this.ct = 7;
  39978. this.bp = bp;
  39979. }
  39980. } else {
  39981. bp++;
  39982. this.clow += bp < this.dataEnd ? (data[bp] << 8) : 0xFF00;
  39983. this.ct = 8;
  39984. this.bp = bp;
  39985. }
  39986. if (this.clow > 0xFFFF) {
  39987. this.chigh += (this.clow >> 16);
  39988. this.clow &= 0xFFFF;
  39989. }
  39990. },
  39991. // C.3.2 Decoding a decision (DECODE)
  39992. readBit: function ArithmeticDecoder_readBit(contexts, pos) {
  39993. // contexts are packed into 1 byte:
  39994. // highest 7 bits carry cx.index, lowest bit carries cx.mps
  39995. var cx_index = contexts[pos] >> 1, cx_mps = contexts[pos] & 1;
  39996. var qeTableIcx = QeTable[cx_index];
  39997. var qeIcx = qeTableIcx.qe;
  39998. var d;
  39999. var a = this.a - qeIcx;
  40000. if (this.chigh < qeIcx) {
  40001. // exchangeLps
  40002. if (a < qeIcx) {
  40003. a = qeIcx;
  40004. d = cx_mps;
  40005. cx_index = qeTableIcx.nmps;
  40006. } else {
  40007. a = qeIcx;
  40008. d = 1 ^ cx_mps;
  40009. if (qeTableIcx.switchFlag === 1) {
  40010. cx_mps = d;
  40011. }
  40012. cx_index = qeTableIcx.nlps;
  40013. }
  40014. } else {
  40015. this.chigh -= qeIcx;
  40016. if ((a & 0x8000) !== 0) {
  40017. this.a = a;
  40018. return cx_mps;
  40019. }
  40020. // exchangeMps
  40021. if (a < qeIcx) {
  40022. d = 1 ^ cx_mps;
  40023. if (qeTableIcx.switchFlag === 1) {
  40024. cx_mps = d;
  40025. }
  40026. cx_index = qeTableIcx.nlps;
  40027. } else {
  40028. d = cx_mps;
  40029. cx_index = qeTableIcx.nmps;
  40030. }
  40031. }
  40032. // C.3.3 renormD;
  40033. do {
  40034. if (this.ct === 0) {
  40035. this.byteIn();
  40036. }
  40037. a <<= 1;
  40038. this.chigh = ((this.chigh << 1) & 0xFFFF) | ((this.clow >> 15) & 1);
  40039. this.clow = (this.clow << 1) & 0xFFFF;
  40040. this.ct--;
  40041. } while ((a & 0x8000) === 0);
  40042. this.a = a;
  40043. contexts[pos] = cx_index << 1 | cx_mps;
  40044. return d;
  40045. }
  40046. };
  40047. return ArithmeticDecoder;
  40048. })();
  40049. var JpegImage = (function jpegImage() {
  40050. var dctZigZag = new Int32Array([
  40051. 0,
  40052. 1, 8,
  40053. 16, 9, 2,
  40054. 3, 10, 17, 24,
  40055. 32, 25, 18, 11, 4,
  40056. 5, 12, 19, 26, 33, 40,
  40057. 48, 41, 34, 27, 20, 13, 6,
  40058. 7, 14, 21, 28, 35, 42, 49, 56,
  40059. 57, 50, 43, 36, 29, 22, 15,
  40060. 23, 30, 37, 44, 51, 58,
  40061. 59, 52, 45, 38, 31,
  40062. 39, 46, 53, 60,
  40063. 61, 54, 47,
  40064. 55, 62,
  40065. 63
  40066. ]);
  40067. var dctCos1 = 4017; // cos(pi/16)
  40068. var dctSin1 = 799; // sin(pi/16)
  40069. var dctCos3 = 3406; // cos(3*pi/16)
  40070. var dctSin3 = 2276; // sin(3*pi/16)
  40071. var dctCos6 = 1567; // cos(6*pi/16)
  40072. var dctSin6 = 3784; // sin(6*pi/16)
  40073. var dctSqrt2 = 5793; // sqrt(2)
  40074. var dctSqrt1d2 = 2896; // sqrt(2) / 2
  40075. function constructor() {
  40076. }
  40077. function buildHuffmanTable(codeLengths, values) {
  40078. var k = 0, code = [], i, j, length = 16;
  40079. while (length > 0 && !codeLengths[length - 1]) {
  40080. length--;
  40081. }
  40082. code.push({children: [], index: 0});
  40083. var p = code[0], q;
  40084. for (i = 0; i < length; i++) {
  40085. for (j = 0; j < codeLengths[i]; j++) {
  40086. p = code.pop();
  40087. p.children[p.index] = values[k];
  40088. while (p.index > 0) {
  40089. p = code.pop();
  40090. }
  40091. p.index++;
  40092. code.push(p);
  40093. while (code.length <= i) {
  40094. code.push(q = {children: [], index: 0});
  40095. p.children[p.index] = q.children;
  40096. p = q;
  40097. }
  40098. k++;
  40099. }
  40100. if (i + 1 < length) {
  40101. // p here points to last code
  40102. code.push(q = {children: [], index: 0});
  40103. p.children[p.index] = q.children;
  40104. p = q;
  40105. }
  40106. }
  40107. return code[0].children;
  40108. }
  40109. function getBlockBufferOffset(component, row, col) {
  40110. return 64 * ((component.blocksPerLine + 1) * row + col);
  40111. }
  40112. function decodeScan(data, offset,
  40113. frame, components, resetInterval,
  40114. spectralStart, spectralEnd,
  40115. successivePrev, successive) {
  40116. var precision = frame.precision;
  40117. var samplesPerLine = frame.samplesPerLine;
  40118. var scanLines = frame.scanLines;
  40119. var mcusPerLine = frame.mcusPerLine;
  40120. var progressive = frame.progressive;
  40121. var maxH = frame.maxH, maxV = frame.maxV;
  40122. var startOffset = offset, bitsData = 0, bitsCount = 0;
  40123. function readBit() {
  40124. if (bitsCount > 0) {
  40125. bitsCount--;
  40126. return (bitsData >> bitsCount) & 1;
  40127. }
  40128. bitsData = data[offset++];
  40129. if (bitsData == 0xFF) {
  40130. var nextByte = data[offset++];
  40131. if (nextByte) {
  40132. throw 'unexpected marker: ' +
  40133. ((bitsData << 8) | nextByte).toString(16);
  40134. }
  40135. // unstuff 0
  40136. }
  40137. bitsCount = 7;
  40138. return bitsData >>> 7;
  40139. }
  40140. function decodeHuffman(tree) {
  40141. var node = tree;
  40142. var bit;
  40143. while ((bit = readBit()) !== null) {
  40144. node = node[bit];
  40145. if (typeof node === 'number') {
  40146. return node;
  40147. }
  40148. if (typeof node !== 'object') {
  40149. throw 'invalid huffman sequence';
  40150. }
  40151. }
  40152. return null;
  40153. }
  40154. function receive(length) {
  40155. var n = 0;
  40156. while (length > 0) {
  40157. var bit = readBit();
  40158. if (bit === null) {
  40159. return;
  40160. }
  40161. n = (n << 1) | bit;
  40162. length--;
  40163. }
  40164. return n;
  40165. }
  40166. function receiveAndExtend(length) {
  40167. var n = receive(length);
  40168. if (n >= 1 << (length - 1)) {
  40169. return n;
  40170. }
  40171. return n + (-1 << length) + 1;
  40172. }
  40173. function decodeBaseline(component, offset) {
  40174. var t = decodeHuffman(component.huffmanTableDC);
  40175. var diff = t === 0 ? 0 : receiveAndExtend(t);
  40176. component.blockData[offset] = (component.pred += diff);
  40177. var k = 1;
  40178. while (k < 64) {
  40179. var rs = decodeHuffman(component.huffmanTableAC);
  40180. var s = rs & 15, r = rs >> 4;
  40181. if (s === 0) {
  40182. if (r < 15) {
  40183. break;
  40184. }
  40185. k += 16;
  40186. continue;
  40187. }
  40188. k += r;
  40189. var z = dctZigZag[k];
  40190. component.blockData[offset + z] = receiveAndExtend(s);
  40191. k++;
  40192. }
  40193. }
  40194. function decodeDCFirst(component, offset) {
  40195. var t = decodeHuffman(component.huffmanTableDC);
  40196. var diff = t === 0 ? 0 : (receiveAndExtend(t) << successive);
  40197. component.blockData[offset] = (component.pred += diff);
  40198. }
  40199. function decodeDCSuccessive(component, offset) {
  40200. component.blockData[offset] |= readBit() << successive;
  40201. }
  40202. var eobrun = 0;
  40203. function decodeACFirst(component, offset) {
  40204. if (eobrun > 0) {
  40205. eobrun--;
  40206. return;
  40207. }
  40208. var k = spectralStart, e = spectralEnd;
  40209. while (k <= e) {
  40210. var rs = decodeHuffman(component.huffmanTableAC);
  40211. var s = rs & 15, r = rs >> 4;
  40212. if (s === 0) {
  40213. if (r < 15) {
  40214. eobrun = receive(r) + (1 << r) - 1;
  40215. break;
  40216. }
  40217. k += 16;
  40218. continue;
  40219. }
  40220. k += r;
  40221. var z = dctZigZag[k];
  40222. component.blockData[offset + z] =
  40223. receiveAndExtend(s) * (1 << successive);
  40224. k++;
  40225. }
  40226. }
  40227. var successiveACState = 0, successiveACNextValue;
  40228. function decodeACSuccessive(component, offset) {
  40229. var k = spectralStart;
  40230. var e = spectralEnd;
  40231. var r = 0;
  40232. var s;
  40233. var rs;
  40234. while (k <= e) {
  40235. var z = dctZigZag[k];
  40236. switch (successiveACState) {
  40237. case 0: // initial state
  40238. rs = decodeHuffman(component.huffmanTableAC);
  40239. s = rs & 15;
  40240. r = rs >> 4;
  40241. if (s === 0) {
  40242. if (r < 15) {
  40243. eobrun = receive(r) + (1 << r);
  40244. successiveACState = 4;
  40245. } else {
  40246. r = 16;
  40247. successiveACState = 1;
  40248. }
  40249. } else {
  40250. if (s !== 1) {
  40251. throw 'invalid ACn encoding';
  40252. }
  40253. successiveACNextValue = receiveAndExtend(s);
  40254. successiveACState = r ? 2 : 3;
  40255. }
  40256. continue;
  40257. case 1: // skipping r zero items
  40258. case 2:
  40259. if (component.blockData[offset + z]) {
  40260. component.blockData[offset + z] += (readBit() << successive);
  40261. } else {
  40262. r--;
  40263. if (r === 0) {
  40264. successiveACState = successiveACState == 2 ? 3 : 0;
  40265. }
  40266. }
  40267. break;
  40268. case 3: // set value for a zero item
  40269. if (component.blockData[offset + z]) {
  40270. component.blockData[offset + z] += (readBit() << successive);
  40271. } else {
  40272. component.blockData[offset + z] =
  40273. successiveACNextValue << successive;
  40274. successiveACState = 0;
  40275. }
  40276. break;
  40277. case 4: // eob
  40278. if (component.blockData[offset + z]) {
  40279. component.blockData[offset + z] += (readBit() << successive);
  40280. }
  40281. break;
  40282. }
  40283. k++;
  40284. }
  40285. if (successiveACState === 4) {
  40286. eobrun--;
  40287. if (eobrun === 0) {
  40288. successiveACState = 0;
  40289. }
  40290. }
  40291. }
  40292. function decodeMcu(component, decode, mcu, row, col) {
  40293. var mcuRow = (mcu / mcusPerLine) | 0;
  40294. var mcuCol = mcu % mcusPerLine;
  40295. var blockRow = mcuRow * component.v + row;
  40296. var blockCol = mcuCol * component.h + col;
  40297. var offset = getBlockBufferOffset(component, blockRow, blockCol);
  40298. decode(component, offset);
  40299. }
  40300. function decodeBlock(component, decode, mcu) {
  40301. var blockRow = (mcu / component.blocksPerLine) | 0;
  40302. var blockCol = mcu % component.blocksPerLine;
  40303. var offset = getBlockBufferOffset(component, blockRow, blockCol);
  40304. decode(component, offset);
  40305. }
  40306. var componentsLength = components.length;
  40307. var component, i, j, k, n;
  40308. var decodeFn;
  40309. if (progressive) {
  40310. if (spectralStart === 0) {
  40311. decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive;
  40312. } else {
  40313. decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive;
  40314. }
  40315. } else {
  40316. decodeFn = decodeBaseline;
  40317. }
  40318. var mcu = 0, marker;
  40319. var mcuExpected;
  40320. if (componentsLength == 1) {
  40321. mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn;
  40322. } else {
  40323. mcuExpected = mcusPerLine * frame.mcusPerColumn;
  40324. }
  40325. if (!resetInterval) {
  40326. resetInterval = mcuExpected;
  40327. }
  40328. var h, v;
  40329. while (mcu < mcuExpected) {
  40330. // reset interval stuff
  40331. for (i = 0; i < componentsLength; i++) {
  40332. components[i].pred = 0;
  40333. }
  40334. eobrun = 0;
  40335. if (componentsLength == 1) {
  40336. component = components[0];
  40337. for (n = 0; n < resetInterval; n++) {
  40338. decodeBlock(component, decodeFn, mcu);
  40339. mcu++;
  40340. }
  40341. } else {
  40342. for (n = 0; n < resetInterval; n++) {
  40343. for (i = 0; i < componentsLength; i++) {
  40344. component = components[i];
  40345. h = component.h;
  40346. v = component.v;
  40347. for (j = 0; j < v; j++) {
  40348. for (k = 0; k < h; k++) {
  40349. decodeMcu(component, decodeFn, mcu, j, k);
  40350. }
  40351. }
  40352. }
  40353. mcu++;
  40354. }
  40355. }
  40356. // find marker
  40357. bitsCount = 0;
  40358. marker = (data[offset] << 8) | data[offset + 1];
  40359. if (marker <= 0xFF00) {
  40360. throw 'marker was not found';
  40361. }
  40362. if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx
  40363. offset += 2;
  40364. } else {
  40365. break;
  40366. }
  40367. }
  40368. return offset - startOffset;
  40369. }
  40370. // A port of poppler's IDCT method which in turn is taken from:
  40371. // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz,
  40372. // 'Practical Fast 1-D DCT Algorithms with 11 Multiplications',
  40373. // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989,
  40374. // 988-991.
  40375. function quantizeAndInverse(component, blockBufferOffset, p) {
  40376. var qt = component.quantizationTable;
  40377. var v0, v1, v2, v3, v4, v5, v6, v7, t;
  40378. var i;
  40379. // dequant
  40380. for (i = 0; i < 64; i++) {
  40381. p[i] = component.blockData[blockBufferOffset + i] * qt[i];
  40382. }
  40383. // inverse DCT on rows
  40384. for (i = 0; i < 8; ++i) {
  40385. var row = 8 * i;
  40386. // check for all-zero AC coefficients
  40387. if (p[1 + row] === 0 && p[2 + row] === 0 && p[3 + row] === 0 &&
  40388. p[4 + row] === 0 && p[5 + row] === 0 && p[6 + row] === 0 &&
  40389. p[7 + row] === 0) {
  40390. t = (dctSqrt2 * p[0 + row] + 512) >> 10;
  40391. p[0 + row] = t;
  40392. p[1 + row] = t;
  40393. p[2 + row] = t;
  40394. p[3 + row] = t;
  40395. p[4 + row] = t;
  40396. p[5 + row] = t;
  40397. p[6 + row] = t;
  40398. p[7 + row] = t;
  40399. continue;
  40400. }
  40401. // stage 4
  40402. v0 = (dctSqrt2 * p[0 + row] + 128) >> 8;
  40403. v1 = (dctSqrt2 * p[4 + row] + 128) >> 8;
  40404. v2 = p[2 + row];
  40405. v3 = p[6 + row];
  40406. v4 = (dctSqrt1d2 * (p[1 + row] - p[7 + row]) + 128) >> 8;
  40407. v7 = (dctSqrt1d2 * (p[1 + row] + p[7 + row]) + 128) >> 8;
  40408. v5 = p[3 + row] << 4;
  40409. v6 = p[5 + row] << 4;
  40410. // stage 3
  40411. t = (v0 - v1+ 1) >> 1;
  40412. v0 = (v0 + v1 + 1) >> 1;
  40413. v1 = t;
  40414. t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8;
  40415. v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8;
  40416. v3 = t;
  40417. t = (v4 - v6 + 1) >> 1;
  40418. v4 = (v4 + v6 + 1) >> 1;
  40419. v6 = t;
  40420. t = (v7 + v5 + 1) >> 1;
  40421. v5 = (v7 - v5 + 1) >> 1;
  40422. v7 = t;
  40423. // stage 2
  40424. t = (v0 - v3 + 1) >> 1;
  40425. v0 = (v0 + v3 + 1) >> 1;
  40426. v3 = t;
  40427. t = (v1 - v2 + 1) >> 1;
  40428. v1 = (v1 + v2 + 1) >> 1;
  40429. v2 = t;
  40430. t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;
  40431. v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;
  40432. v7 = t;
  40433. t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;
  40434. v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;
  40435. v6 = t;
  40436. // stage 1
  40437. p[0 + row] = v0 + v7;
  40438. p[7 + row] = v0 - v7;
  40439. p[1 + row] = v1 + v6;
  40440. p[6 + row] = v1 - v6;
  40441. p[2 + row] = v2 + v5;
  40442. p[5 + row] = v2 - v5;
  40443. p[3 + row] = v3 + v4;
  40444. p[4 + row] = v3 - v4;
  40445. }
  40446. // inverse DCT on columns
  40447. for (i = 0; i < 8; ++i) {
  40448. var col = i;
  40449. // check for all-zero AC coefficients
  40450. if (p[1*8 + col] === 0 && p[2*8 + col] === 0 && p[3*8 + col] === 0 &&
  40451. p[4*8 + col] === 0 && p[5*8 + col] === 0 && p[6*8 + col] === 0 &&
  40452. p[7*8 + col] === 0) {
  40453. t = (dctSqrt2 * p[i+0] + 8192) >> 14;
  40454. p[0*8 + col] = t;
  40455. p[1*8 + col] = t;
  40456. p[2*8 + col] = t;
  40457. p[3*8 + col] = t;
  40458. p[4*8 + col] = t;
  40459. p[5*8 + col] = t;
  40460. p[6*8 + col] = t;
  40461. p[7*8 + col] = t;
  40462. continue;
  40463. }
  40464. // stage 4
  40465. v0 = (dctSqrt2 * p[0*8 + col] + 2048) >> 12;
  40466. v1 = (dctSqrt2 * p[4*8 + col] + 2048) >> 12;
  40467. v2 = p[2*8 + col];
  40468. v3 = p[6*8 + col];
  40469. v4 = (dctSqrt1d2 * (p[1*8 + col] - p[7*8 + col]) + 2048) >> 12;
  40470. v7 = (dctSqrt1d2 * (p[1*8 + col] + p[7*8 + col]) + 2048) >> 12;
  40471. v5 = p[3*8 + col];
  40472. v6 = p[5*8 + col];
  40473. // stage 3
  40474. t = (v0 - v1 + 1) >> 1;
  40475. v0 = (v0 + v1 + 1) >> 1;
  40476. v1 = t;
  40477. t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12;
  40478. v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12;
  40479. v3 = t;
  40480. t = (v4 - v6 + 1) >> 1;
  40481. v4 = (v4 + v6 + 1) >> 1;
  40482. v6 = t;
  40483. t = (v7 + v5 + 1) >> 1;
  40484. v5 = (v7 - v5 + 1) >> 1;
  40485. v7 = t;
  40486. // stage 2
  40487. t = (v0 - v3 + 1) >> 1;
  40488. v0 = (v0 + v3 + 1) >> 1;
  40489. v3 = t;
  40490. t = (v1 - v2 + 1) >> 1;
  40491. v1 = (v1 + v2 + 1) >> 1;
  40492. v2 = t;
  40493. t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;
  40494. v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;
  40495. v7 = t;
  40496. t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;
  40497. v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;
  40498. v6 = t;
  40499. // stage 1
  40500. p[0*8 + col] = v0 + v7;
  40501. p[7*8 + col] = v0 - v7;
  40502. p[1*8 + col] = v1 + v6;
  40503. p[6*8 + col] = v1 - v6;
  40504. p[2*8 + col] = v2 + v5;
  40505. p[5*8 + col] = v2 - v5;
  40506. p[3*8 + col] = v3 + v4;
  40507. p[4*8 + col] = v3 - v4;
  40508. }
  40509. // convert to 8-bit integers
  40510. for (i = 0; i < 64; ++i) {
  40511. var index = blockBufferOffset + i;
  40512. var q = p[i];
  40513. q = (q <= -2056) ? 0 : (q >= 2024) ? 255 : (q + 2056) >> 4;
  40514. component.blockData[index] = q;
  40515. }
  40516. }
  40517. function buildComponentData(frame, component) {
  40518. var lines = [];
  40519. var blocksPerLine = component.blocksPerLine;
  40520. var blocksPerColumn = component.blocksPerColumn;
  40521. var samplesPerLine = blocksPerLine << 3;
  40522. var computationBuffer = new Int32Array(64);
  40523. var i, j, ll = 0;
  40524. for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) {
  40525. for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) {
  40526. var offset = getBlockBufferOffset(component, blockRow, blockCol);
  40527. quantizeAndInverse(component, offset, computationBuffer);
  40528. }
  40529. }
  40530. return component.blockData;
  40531. }
  40532. function clamp0to255(a) {
  40533. return a <= 0 ? 0 : a >= 255 ? 255 : a;
  40534. }
  40535. constructor.prototype = {
  40536. parse: function parse(data) {
  40537. function readUint16() {
  40538. var value = (data[offset] << 8) | data[offset + 1];
  40539. offset += 2;
  40540. return value;
  40541. }
  40542. function readDataBlock() {
  40543. var length = readUint16();
  40544. var array = data.subarray(offset, offset + length - 2);
  40545. offset += array.length;
  40546. return array;
  40547. }
  40548. function prepareComponents(frame) {
  40549. var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / frame.maxH);
  40550. var mcusPerColumn = Math.ceil(frame.scanLines / 8 / frame.maxV);
  40551. for (var i = 0; i < frame.components.length; i++) {
  40552. component = frame.components[i];
  40553. var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) *
  40554. component.h / frame.maxH);
  40555. var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) *
  40556. component.v / frame.maxV);
  40557. var blocksPerLineForMcu = mcusPerLine * component.h;
  40558. var blocksPerColumnForMcu = mcusPerColumn * component.v;
  40559. var blocksBufferSize = 64 * blocksPerColumnForMcu *
  40560. (blocksPerLineForMcu + 1);
  40561. component.blockData = new Int16Array(blocksBufferSize);
  40562. component.blocksPerLine = blocksPerLine;
  40563. component.blocksPerColumn = blocksPerColumn;
  40564. }
  40565. frame.mcusPerLine = mcusPerLine;
  40566. frame.mcusPerColumn = mcusPerColumn;
  40567. }
  40568. var offset = 0, length = data.length;
  40569. var jfif = null;
  40570. var adobe = null;
  40571. var pixels = null;
  40572. var frame, resetInterval;
  40573. var quantizationTables = [];
  40574. var huffmanTablesAC = [], huffmanTablesDC = [];
  40575. var fileMarker = readUint16();
  40576. if (fileMarker != 0xFFD8) { // SOI (Start of Image)
  40577. throw 'SOI not found';
  40578. }
  40579. fileMarker = readUint16();
  40580. while (fileMarker != 0xFFD9) { // EOI (End of image)
  40581. var i, j, l;
  40582. switch(fileMarker) {
  40583. case 0xFFE0: // APP0 (Application Specific)
  40584. case 0xFFE1: // APP1
  40585. case 0xFFE2: // APP2
  40586. case 0xFFE3: // APP3
  40587. case 0xFFE4: // APP4
  40588. case 0xFFE5: // APP5
  40589. case 0xFFE6: // APP6
  40590. case 0xFFE7: // APP7
  40591. case 0xFFE8: // APP8
  40592. case 0xFFE9: // APP9
  40593. case 0xFFEA: // APP10
  40594. case 0xFFEB: // APP11
  40595. case 0xFFEC: // APP12
  40596. case 0xFFED: // APP13
  40597. case 0xFFEE: // APP14
  40598. case 0xFFEF: // APP15
  40599. case 0xFFFE: // COM (Comment)
  40600. var appData = readDataBlock();
  40601. if (fileMarker === 0xFFE0) {
  40602. if (appData[0] === 0x4A && appData[1] === 0x46 &&
  40603. appData[2] === 0x49 && appData[3] === 0x46 &&
  40604. appData[4] === 0) { // 'JFIF\x00'
  40605. jfif = {
  40606. version: { major: appData[5], minor: appData[6] },
  40607. densityUnits: appData[7],
  40608. xDensity: (appData[8] << 8) | appData[9],
  40609. yDensity: (appData[10] << 8) | appData[11],
  40610. thumbWidth: appData[12],
  40611. thumbHeight: appData[13],
  40612. thumbData: appData.subarray(14, 14 +
  40613. 3 * appData[12] * appData[13])
  40614. };
  40615. }
  40616. }
  40617. // TODO APP1 - Exif
  40618. if (fileMarker === 0xFFEE) {
  40619. if (appData[0] === 0x41 && appData[1] === 0x64 &&
  40620. appData[2] === 0x6F && appData[3] === 0x62 &&
  40621. appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\x00'
  40622. adobe = {
  40623. version: appData[6],
  40624. flags0: (appData[7] << 8) | appData[8],
  40625. flags1: (appData[9] << 8) | appData[10],
  40626. transformCode: appData[11]
  40627. };
  40628. }
  40629. }
  40630. break;
  40631. case 0xFFDB: // DQT (Define Quantization Tables)
  40632. var quantizationTablesLength = readUint16();
  40633. var quantizationTablesEnd = quantizationTablesLength + offset - 2;
  40634. var z;
  40635. while (offset < quantizationTablesEnd) {
  40636. var quantizationTableSpec = data[offset++];
  40637. var tableData = new Int32Array(64);
  40638. if ((quantizationTableSpec >> 4) === 0) { // 8 bit values
  40639. for (j = 0; j < 64; j++) {
  40640. z = dctZigZag[j];
  40641. tableData[z] = data[offset++];
  40642. }
  40643. } else if ((quantizationTableSpec >> 4) === 1) { //16 bit
  40644. for (j = 0; j < 64; j++) {
  40645. z = dctZigZag[j];
  40646. tableData[z] = readUint16();
  40647. }
  40648. } else {
  40649. throw 'DQT: invalid table spec';
  40650. }
  40651. quantizationTables[quantizationTableSpec & 15] = tableData;
  40652. }
  40653. break;
  40654. case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT)
  40655. case 0xFFC1: // SOF1 (Start of Frame, Extended DCT)
  40656. case 0xFFC2: // SOF2 (Start of Frame, Progressive DCT)
  40657. if (frame) {
  40658. throw 'Only single frame JPEGs supported';
  40659. }
  40660. readUint16(); // skip data length
  40661. frame = {};
  40662. frame.extended = (fileMarker === 0xFFC1);
  40663. frame.progressive = (fileMarker === 0xFFC2);
  40664. frame.precision = data[offset++];
  40665. frame.scanLines = readUint16();
  40666. frame.samplesPerLine = readUint16();
  40667. frame.components = [];
  40668. frame.componentIds = {};
  40669. var componentsCount = data[offset++], componentId;
  40670. var maxH = 0, maxV = 0;
  40671. for (i = 0; i < componentsCount; i++) {
  40672. componentId = data[offset];
  40673. var h = data[offset + 1] >> 4;
  40674. var v = data[offset + 1] & 15;
  40675. if (maxH < h) {
  40676. maxH = h;
  40677. }
  40678. if (maxV < v) {
  40679. maxV = v;
  40680. }
  40681. var qId = data[offset + 2];
  40682. l = frame.components.push({
  40683. h: h,
  40684. v: v,
  40685. quantizationTable: quantizationTables[qId]
  40686. });
  40687. frame.componentIds[componentId] = l - 1;
  40688. offset += 3;
  40689. }
  40690. frame.maxH = maxH;
  40691. frame.maxV = maxV;
  40692. prepareComponents(frame);
  40693. break;
  40694. case 0xFFC4: // DHT (Define Huffman Tables)
  40695. var huffmanLength = readUint16();
  40696. for (i = 2; i < huffmanLength;) {
  40697. var huffmanTableSpec = data[offset++];
  40698. var codeLengths = new Uint8Array(16);
  40699. var codeLengthSum = 0;
  40700. for (j = 0; j < 16; j++, offset++) {
  40701. codeLengthSum += (codeLengths[j] = data[offset]);
  40702. }
  40703. var huffmanValues = new Uint8Array(codeLengthSum);
  40704. for (j = 0; j < codeLengthSum; j++, offset++) {
  40705. huffmanValues[j] = data[offset];
  40706. }
  40707. i += 17 + codeLengthSum;
  40708. ((huffmanTableSpec >> 4) === 0 ?
  40709. huffmanTablesDC : huffmanTablesAC)[huffmanTableSpec & 15] =
  40710. buildHuffmanTable(codeLengths, huffmanValues);
  40711. }
  40712. break;
  40713. case 0xFFDD: // DRI (Define Restart Interval)
  40714. readUint16(); // skip data length
  40715. resetInterval = readUint16();
  40716. break;
  40717. case 0xFFDA: // SOS (Start of Scan)
  40718. var scanLength = readUint16();
  40719. var selectorsCount = data[offset++];
  40720. var components = [], component;
  40721. for (i = 0; i < selectorsCount; i++) {
  40722. var componentIndex = frame.componentIds[data[offset++]];
  40723. component = frame.components[componentIndex];
  40724. var tableSpec = data[offset++];
  40725. component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4];
  40726. component.huffmanTableAC = huffmanTablesAC[tableSpec & 15];
  40727. components.push(component);
  40728. }
  40729. var spectralStart = data[offset++];
  40730. var spectralEnd = data[offset++];
  40731. var successiveApproximation = data[offset++];
  40732. var processed = decodeScan(data, offset,
  40733. frame, components, resetInterval,
  40734. spectralStart, spectralEnd,
  40735. successiveApproximation >> 4, successiveApproximation & 15);
  40736. offset += processed;
  40737. break;
  40738. default:
  40739. if (data[offset - 3] == 0xFF &&
  40740. data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) {
  40741. // could be incorrect encoding -- last 0xFF byte of the previous
  40742. // block was eaten by the encoder
  40743. offset -= 3;
  40744. break;
  40745. }
  40746. throw 'unknown JPEG marker ' + fileMarker.toString(16);
  40747. }
  40748. fileMarker = readUint16();
  40749. }
  40750. this.width = frame.samplesPerLine;
  40751. this.height = frame.scanLines;
  40752. this.jfif = jfif;
  40753. this.adobe = adobe;
  40754. this.components = [];
  40755. for (i = 0; i < frame.components.length; i++) {
  40756. component = frame.components[i];
  40757. this.components.push({
  40758. output: buildComponentData(frame, component),
  40759. scaleX: component.h / frame.maxH,
  40760. scaleY: component.v / frame.maxV,
  40761. blocksPerLine: component.blocksPerLine,
  40762. blocksPerColumn: component.blocksPerColumn
  40763. });
  40764. }
  40765. this.numComponents = this.components.length;
  40766. },
  40767. _getLinearizedBlockData: function getLinearizedBlockData(width, height) {
  40768. var scaleX = this.width / width, scaleY = this.height / height;
  40769. var component, componentScaleX, componentScaleY;
  40770. var x, y, i;
  40771. var offset = 0;
  40772. var Y, Cb, Cr, K, C, M, Ye, R, G, B;
  40773. var colorTransform;
  40774. var numComponents = this.components.length;
  40775. var dataLength = width * height * numComponents;
  40776. var data = new Uint8Array(dataLength);
  40777. var componentLine;
  40778. // lineData is reused for all components. Assume first component is
  40779. // the biggest
  40780. var lineData = new Uint8Array((this.components[0].blocksPerLine << 3) *
  40781. this.components[0].blocksPerColumn * 8);
  40782. // First construct image data ...
  40783. for (i = 0; i < numComponents; i++) {
  40784. component = this.components[i];
  40785. var blocksPerLine = component.blocksPerLine;
  40786. var blocksPerColumn = component.blocksPerColumn;
  40787. var samplesPerLine = blocksPerLine << 3;
  40788. var j, k, ll = 0;
  40789. var sample;
  40790. var lineOffset = 0;
  40791. for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) {
  40792. var scanLine = blockRow << 3;
  40793. for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) {
  40794. var bufferOffset = getBlockBufferOffset(component,
  40795. blockRow, blockCol);
  40796. offset = 0;
  40797. sample = blockCol << 3;
  40798. for (j = 0; j < 8; j++) {
  40799. lineOffset = (scanLine + j) * samplesPerLine;
  40800. for (k = 0; k < 8; k++) {
  40801. lineData[lineOffset + sample + k] =
  40802. component.output[bufferOffset + offset++];
  40803. }
  40804. }
  40805. }
  40806. }
  40807. componentScaleX = component.scaleX * scaleX;
  40808. componentScaleY = component.scaleY * scaleY;
  40809. offset = i;
  40810. var cx, cy;
  40811. var index;
  40812. for (y = 0; y < height; y++) {
  40813. for (x = 0; x < width; x++) {
  40814. cy = 0 | (y * componentScaleY);
  40815. cx = 0 | (x * componentScaleX);
  40816. index = cy * samplesPerLine + cx;
  40817. data[offset] = lineData[index];
  40818. offset += numComponents;
  40819. }
  40820. }
  40821. }
  40822. return data;
  40823. },
  40824. _isColorConversionNeeded: function isColorConversionNeeded() {
  40825. if (this.adobe && this.adobe.transformCode) {
  40826. // The adobe transform marker overrides any previous setting
  40827. return true;
  40828. } else if (this.numComponents == 3) {
  40829. return true;
  40830. } else if (typeof this.colorTransform !== 'undefined') {
  40831. return !!this.colorTransform;
  40832. } else {
  40833. return false;
  40834. }
  40835. },
  40836. _convertYccToRgb: function convertYccToRgb(data) {
  40837. var Y, Cb, Cr;
  40838. for (var i = 0; i < data.length; i += this.numComponents) {
  40839. Y = data[i ];
  40840. Cb = data[i + 1];
  40841. Cr = data[i + 2];
  40842. data[i ] = clamp0to255(Y - 179.456 + 1.402 * Cr);
  40843. data[i + 1] = clamp0to255(Y + 135.459 - 0.344 * Cb - 0.714 * Cr);
  40844. data[i + 2] = clamp0to255(Y - 226.816 + 1.772 * Cb);
  40845. }
  40846. return data;
  40847. },
  40848. _convertYcckToRgb: function convertYcckToRgb(data) {
  40849. var Y, Cb, Cr, k, CbCb, CbCr, CbY, Cbk, CrCr, Crk, CrY, YY, Yk, kk;
  40850. var offset = 0;
  40851. for (var i = 0; i < data.length; i += this.numComponents) {
  40852. Y = data[i];
  40853. Cb = data[i + 1];
  40854. Cr = data[i + 2];
  40855. k = data[i + 3];
  40856. CbCb = Cb * Cb;
  40857. CbCr = Cb * Cr;
  40858. CbY = Cb * Y;
  40859. Cbk = Cb * k;
  40860. CrCr = Cr * Cr;
  40861. Crk = Cr * k;
  40862. CrY = Cr * Y;
  40863. YY = Y * Y;
  40864. Yk = Y * k;
  40865. kk = k * k;
  40866. var r = - 122.67195406894 -
  40867. 6.60635669420364e-5 * CbCb + 0.000437130475926232 * CbCr -
  40868. 5.4080610064599e-5* CbY + 0.00048449797120281* Cbk -
  40869. 0.154362151871126 * Cb - 0.000957964378445773 * CrCr +
  40870. 0.000817076911346625 * CrY - 0.00477271405408747 * Crk +
  40871. 1.53380253221734 * Cr + 0.000961250184130688 * YY -
  40872. 0.00266257332283933 * Yk + 0.48357088451265 * Y -
  40873. 0.000336197177618394 * kk + 0.484791561490776 * k;
  40874. var g = 107.268039397724 +
  40875. 2.19927104525741e-5 * CbCb - 0.000640992018297945 * CbCr +
  40876. 0.000659397001245577* CbY + 0.000426105652938837* Cbk -
  40877. 0.176491792462875 * Cb - 0.000778269941513683 * CrCr +
  40878. 0.00130872261408275 * CrY + 0.000770482631801132 * Crk -
  40879. 0.151051492775562 * Cr + 0.00126935368114843 * YY -
  40880. 0.00265090189010898 * Yk + 0.25802910206845 * Y -
  40881. 0.000318913117588328 * kk - 0.213742400323665 * k;
  40882. var b = - 20.810012546947 -
  40883. 0.000570115196973677 * CbCb - 2.63409051004589e-5 * CbCr +
  40884. 0.0020741088115012* CbY - 0.00288260236853442* Cbk +
  40885. 0.814272968359295 * Cb - 1.53496057440975e-5 * CrCr -
  40886. 0.000132689043961446 * CrY + 0.000560833691242812 * Crk -
  40887. 0.195152027534049 * Cr + 0.00174418132927582 * YY -
  40888. 0.00255243321439347 * Yk + 0.116935020465145 * Y -
  40889. 0.000343531996510555 * kk + 0.24165260232407 * k;
  40890. data[offset++] = clamp0to255(r);
  40891. data[offset++] = clamp0to255(g);
  40892. data[offset++] = clamp0to255(b);
  40893. }
  40894. return data;
  40895. },
  40896. _convertYcckToCmyk: function convertYcckToCmyk(data) {
  40897. var Y, Cb, Cr;
  40898. for (var i = 0; i < data.length; i += this.numComponents) {
  40899. Y = data[i];
  40900. Cb = data[i + 1];
  40901. Cr = data[i + 2];
  40902. data[i ] = clamp0to255(434.456 - Y - 1.402 * Cr);
  40903. data[i + 1] = clamp0to255(119.541 - Y + 0.344 * Cb + 0.714 * Cr);
  40904. data[i + 2] = clamp0to255(481.816 - Y - 1.772 * Cb);
  40905. // K in data[i + 3] is unchanged
  40906. }
  40907. return data;
  40908. },
  40909. _convertCmykToRgb: function convertCmykToRgb(data) {
  40910. var c, m, y, k;
  40911. var offset = 0;
  40912. for (var i = 0; i < data.length; i += this.numComponents) {
  40913. c = data[i ] * 0.00392156862745098;
  40914. m = data[i + 1] * 0.00392156862745098;
  40915. y = data[i + 2] * 0.00392156862745098;
  40916. k = data[i + 3] * 0.00392156862745098;
  40917. var r =
  40918. c * (-4.387332384609988 * c + 54.48615194189176 * m +
  40919. 18.82290502165302 * y + 212.25662451639585 * k +
  40920. -285.2331026137004) +
  40921. m * (1.7149763477362134 * m - 5.6096736904047315 * y +
  40922. -17.873870861415444 * k - 5.497006427196366) +
  40923. y * (-2.5217340131683033 * y - 21.248923337353073 * k +
  40924. 17.5119270841813) +
  40925. k * (-21.86122147463605 * k - 189.48180835922747) + 255;
  40926. var g =
  40927. c * (8.841041422036149 * c + 60.118027045597366 * m +
  40928. 6.871425592049007 * y + 31.159100130055922 * k +
  40929. -79.2970844816548) +
  40930. m * (-15.310361306967817 * m + 17.575251261109482 * y +
  40931. 131.35250912493976 * k - 190.9453302588951) +
  40932. y * (4.444339102852739 * y + 9.8632861493405 * k - 24.8674158255588) +
  40933. k * (-20.737325471181034 * k - 187.80453709719578) + 255;
  40934. var b =
  40935. c * (0.8842522430003296 * c + 8.078677503112928 * m +
  40936. 30.89978309703729 * y - 0.23883238689178934 * k +
  40937. -14.183576799673286) +
  40938. m * (10.49593273432072 * m + 63.02378494754052 * y +
  40939. 50.606957656360734 * k - 112.23884253719248) +
  40940. y * (0.03296041114873217 * y + 115.60384449646641 * k +
  40941. -193.58209356861505) +
  40942. k * (-22.33816807309886 * k - 180.12613974708367) + 255;
  40943. data[offset++] = clamp0to255(r);
  40944. data[offset++] = clamp0to255(g);
  40945. data[offset++] = clamp0to255(b);
  40946. }
  40947. return data;
  40948. },
  40949. getData: function getData(width, height, forceRGBoutput) {
  40950. var i;
  40951. var Y, Cb, Cr, K, C, M, Ye, R, G, B;
  40952. var colorTransform;
  40953. if (this.numComponents > 4) {
  40954. throw 'Unsupported color mode';
  40955. }
  40956. // type of data: Uint8Array(width * height * numComponents)
  40957. var data = this._getLinearizedBlockData(width, height);
  40958. if (this.numComponents === 3) {
  40959. return this._convertYccToRgb(data);
  40960. } else if (this.numComponents === 4) {
  40961. if (this._isColorConversionNeeded()) {
  40962. if (forceRGBoutput) {
  40963. return this._convertYcckToRgb(data);
  40964. } else {
  40965. return this._convertYcckToCmyk(data);
  40966. }
  40967. } else {
  40968. return this._convertCmykToRgb(data);
  40969. }
  40970. }
  40971. return data;
  40972. }
  40973. };
  40974. return constructor;
  40975. })();
  40976. var JpxImage = (function JpxImageClosure() {
  40977. // Table E.1
  40978. var SubbandsGainLog2 = {
  40979. 'LL': 0,
  40980. 'LH': 1,
  40981. 'HL': 1,
  40982. 'HH': 2
  40983. };
  40984. function JpxImage() {
  40985. this.failOnCorruptedImage = false;
  40986. }
  40987. JpxImage.prototype = {
  40988. load: function JpxImage_load(url) {
  40989. var xhr = new XMLHttpRequest();
  40990. xhr.open('GET', url, true);
  40991. xhr.responseType = 'arraybuffer';
  40992. xhr.onload = (function() {
  40993. // TODO catch parse error
  40994. var data = new Uint8Array(xhr.response || xhr.mozResponseArrayBuffer);
  40995. this.parse(data);
  40996. if (this.onload) {
  40997. this.onload();
  40998. }
  40999. }).bind(this);
  41000. xhr.send(null);
  41001. },
  41002. parse: function JpxImage_parse(data) {
  41003. var head = readUint16(data, 0);
  41004. // No box header, immediate start of codestream (SOC)
  41005. if (head === 0xFF4F) {
  41006. this.parseCodestream(data, 0, data.length);
  41007. return;
  41008. }
  41009. var position = 0, length = data.length;
  41010. while (position < length) {
  41011. var headerSize = 8;
  41012. var lbox = readUint32(data, position);
  41013. var tbox = readUint32(data, position + 4);
  41014. position += headerSize;
  41015. if (lbox === 1) {
  41016. // XLBox: read UInt64 according to spec.
  41017. // JavaScript's int precision of 53 bit should be sufficient here.
  41018. lbox = readUint32(data, position) * 4294967296 +
  41019. readUint32(data, position + 4);
  41020. position += 8;
  41021. headerSize += 8;
  41022. }
  41023. if (lbox === 0) {
  41024. lbox = length - position + headerSize;
  41025. }
  41026. if (lbox < headerSize) {
  41027. error('JPX error: Invalid box field size');
  41028. }
  41029. var dataLength = lbox - headerSize;
  41030. var jumpDataLength = true;
  41031. switch (tbox) {
  41032. case 0x6A501A1A: // 'jP\032\032'
  41033. // TODO
  41034. break;
  41035. case 0x6A703268: // 'jp2h'
  41036. jumpDataLength = false; // parsing child boxes
  41037. break;
  41038. case 0x636F6C72: // 'colr'
  41039. // TODO
  41040. break;
  41041. case 0x6A703263: // 'jp2c'
  41042. this.parseCodestream(data, position, position + dataLength);
  41043. break;
  41044. }
  41045. if (jumpDataLength) {
  41046. position += dataLength;
  41047. }
  41048. }
  41049. },
  41050. parseImageProperties: function JpxImage_parseImageProperties(stream) {
  41051. try {
  41052. var newByte = stream.getByte();
  41053. while (newByte >= 0) {
  41054. var oldByte = newByte;
  41055. newByte = stream.getByte();
  41056. var code = (oldByte << 8) | newByte;
  41057. // Image and tile size (SIZ)
  41058. if (code == 0xFF51) {
  41059. stream.skip(4);
  41060. var Xsiz = stream.getInt32() >>> 0; // Byte 4
  41061. var Ysiz = stream.getInt32() >>> 0; // Byte 8
  41062. var XOsiz = stream.getInt32() >>> 0; // Byte 12
  41063. var YOsiz = stream.getInt32() >>> 0; // Byte 16
  41064. stream.skip(16);
  41065. var Csiz = stream.getUint16(); // Byte 36
  41066. this.width = Xsiz - XOsiz;
  41067. this.height = Ysiz - YOsiz;
  41068. this.componentsCount = Csiz;
  41069. // Results are always returned as Uint8Arrays
  41070. this.bitsPerComponent = 8;
  41071. return;
  41072. }
  41073. }
  41074. throw 'No size marker found in JPX stream';
  41075. } catch (e) {
  41076. if (this.failOnCorruptedImage) {
  41077. error('JPX error: ' + e);
  41078. } else {
  41079. warn('JPX error: ' + e + '. Trying to recover');
  41080. }
  41081. }
  41082. },
  41083. parseCodestream: function JpxImage_parseCodestream(data, start, end) {
  41084. var context = {};
  41085. try {
  41086. var position = start;
  41087. while (position + 1 < end) {
  41088. var code = readUint16(data, position);
  41089. position += 2;
  41090. var length = 0, j, sqcd, spqcds, spqcdSize, scalarExpounded, tile;
  41091. switch (code) {
  41092. case 0xFF4F: // Start of codestream (SOC)
  41093. context.mainHeader = true;
  41094. break;
  41095. case 0xFFD9: // End of codestream (EOC)
  41096. break;
  41097. case 0xFF51: // Image and tile size (SIZ)
  41098. length = readUint16(data, position);
  41099. var siz = {};
  41100. siz.Xsiz = readUint32(data, position + 4);
  41101. siz.Ysiz = readUint32(data, position + 8);
  41102. siz.XOsiz = readUint32(data, position + 12);
  41103. siz.YOsiz = readUint32(data, position + 16);
  41104. siz.XTsiz = readUint32(data, position + 20);
  41105. siz.YTsiz = readUint32(data, position + 24);
  41106. siz.XTOsiz = readUint32(data, position + 28);
  41107. siz.YTOsiz = readUint32(data, position + 32);
  41108. var componentsCount = readUint16(data, position + 36);
  41109. siz.Csiz = componentsCount;
  41110. var components = [];
  41111. j = position + 38;
  41112. for (var i = 0; i < componentsCount; i++) {
  41113. var component = {
  41114. precision: (data[j] & 0x7F) + 1,
  41115. isSigned: !!(data[j] & 0x80),
  41116. XRsiz: data[j + 1],
  41117. YRsiz: data[j + 1]
  41118. };
  41119. calculateComponentDimensions(component, siz);
  41120. components.push(component);
  41121. }
  41122. context.SIZ = siz;
  41123. context.components = components;
  41124. calculateTileGrids(context, components);
  41125. context.QCC = [];
  41126. context.COC = [];
  41127. break;
  41128. case 0xFF5C: // Quantization default (QCD)
  41129. length = readUint16(data, position);
  41130. var qcd = {};
  41131. j = position + 2;
  41132. sqcd = data[j++];
  41133. switch (sqcd & 0x1F) {
  41134. case 0:
  41135. spqcdSize = 8;
  41136. scalarExpounded = true;
  41137. break;
  41138. case 1:
  41139. spqcdSize = 16;
  41140. scalarExpounded = false;
  41141. break;
  41142. case 2:
  41143. spqcdSize = 16;
  41144. scalarExpounded = true;
  41145. break;
  41146. default:
  41147. throw 'Invalid SQcd value ' + sqcd;
  41148. }
  41149. qcd.noQuantization = (spqcdSize == 8);
  41150. qcd.scalarExpounded = scalarExpounded;
  41151. qcd.guardBits = sqcd >> 5;
  41152. spqcds = [];
  41153. while (j < length + position) {
  41154. var spqcd = {};
  41155. if (spqcdSize == 8) {
  41156. spqcd.epsilon = data[j++] >> 3;
  41157. spqcd.mu = 0;
  41158. } else {
  41159. spqcd.epsilon = data[j] >> 3;
  41160. spqcd.mu = ((data[j] & 0x7) << 8) | data[j + 1];
  41161. j += 2;
  41162. }
  41163. spqcds.push(spqcd);
  41164. }
  41165. qcd.SPqcds = spqcds;
  41166. if (context.mainHeader) {
  41167. context.QCD = qcd;
  41168. } else {
  41169. context.currentTile.QCD = qcd;
  41170. context.currentTile.QCC = [];
  41171. }
  41172. break;
  41173. case 0xFF5D: // Quantization component (QCC)
  41174. length = readUint16(data, position);
  41175. var qcc = {};
  41176. j = position + 2;
  41177. var cqcc;
  41178. if (context.SIZ.Csiz < 257) {
  41179. cqcc = data[j++];
  41180. } else {
  41181. cqcc = readUint16(data, j);
  41182. j += 2;
  41183. }
  41184. sqcd = data[j++];
  41185. switch (sqcd & 0x1F) {
  41186. case 0:
  41187. spqcdSize = 8;
  41188. scalarExpounded = true;
  41189. break;
  41190. case 1:
  41191. spqcdSize = 16;
  41192. scalarExpounded = false;
  41193. break;
  41194. case 2:
  41195. spqcdSize = 16;
  41196. scalarExpounded = true;
  41197. break;
  41198. default:
  41199. throw 'Invalid SQcd value ' + sqcd;
  41200. }
  41201. qcc.noQuantization = (spqcdSize == 8);
  41202. qcc.scalarExpounded = scalarExpounded;
  41203. qcc.guardBits = sqcd >> 5;
  41204. spqcds = [];
  41205. while (j < (length + position)) {
  41206. spqcd = {};
  41207. if (spqcdSize == 8) {
  41208. spqcd.epsilon = data[j++] >> 3;
  41209. spqcd.mu = 0;
  41210. } else {
  41211. spqcd.epsilon = data[j] >> 3;
  41212. spqcd.mu = ((data[j] & 0x7) << 8) | data[j + 1];
  41213. j += 2;
  41214. }
  41215. spqcds.push(spqcd);
  41216. }
  41217. qcc.SPqcds = spqcds;
  41218. if (context.mainHeader) {
  41219. context.QCC[cqcc] = qcc;
  41220. } else {
  41221. context.currentTile.QCC[cqcc] = qcc;
  41222. }
  41223. break;
  41224. case 0xFF52: // Coding style default (COD)
  41225. length = readUint16(data, position);
  41226. var cod = {};
  41227. j = position + 2;
  41228. var scod = data[j++];
  41229. cod.entropyCoderWithCustomPrecincts = !!(scod & 1);
  41230. cod.sopMarkerUsed = !!(scod & 2);
  41231. cod.ephMarkerUsed = !!(scod & 4);
  41232. cod.progressionOrder = data[j++];
  41233. cod.layersCount = readUint16(data, j);
  41234. j += 2;
  41235. cod.multipleComponentTransform = data[j++];
  41236. cod.decompositionLevelsCount = data[j++];
  41237. cod.xcb = (data[j++] & 0xF) + 2;
  41238. cod.ycb = (data[j++] & 0xF) + 2;
  41239. var blockStyle = data[j++];
  41240. cod.selectiveArithmeticCodingBypass = !!(blockStyle & 1);
  41241. cod.resetContextProbabilities = !!(blockStyle & 2);
  41242. cod.terminationOnEachCodingPass = !!(blockStyle & 4);
  41243. cod.verticalyStripe = !!(blockStyle & 8);
  41244. cod.predictableTermination = !!(blockStyle & 16);
  41245. cod.segmentationSymbolUsed = !!(blockStyle & 32);
  41246. cod.reversibleTransformation = data[j++];
  41247. if (cod.entropyCoderWithCustomPrecincts) {
  41248. var precinctsSizes = [];
  41249. while (j < length + position) {
  41250. var precinctsSize = data[j++];
  41251. precinctsSizes.push({
  41252. PPx: precinctsSize & 0xF,
  41253. PPy: precinctsSize >> 4
  41254. });
  41255. }
  41256. cod.precinctsSizes = precinctsSizes;
  41257. }
  41258. if (cod.sopMarkerUsed || cod.ephMarkerUsed ||
  41259. cod.selectiveArithmeticCodingBypass ||
  41260. cod.resetContextProbabilities ||
  41261. cod.terminationOnEachCodingPass ||
  41262. cod.verticalyStripe || cod.predictableTermination) {
  41263. throw 'Unsupported COD options: ' +
  41264. globalScope.JSON.stringify(cod);
  41265. }
  41266. if (context.mainHeader) {
  41267. context.COD = cod;
  41268. } else {
  41269. context.currentTile.COD = cod;
  41270. context.currentTile.COC = [];
  41271. }
  41272. break;
  41273. case 0xFF90: // Start of tile-part (SOT)
  41274. length = readUint16(data, position);
  41275. tile = {};
  41276. tile.index = readUint16(data, position + 2);
  41277. tile.length = readUint32(data, position + 4);
  41278. tile.dataEnd = tile.length + position - 2;
  41279. tile.partIndex = data[position + 8];
  41280. tile.partsCount = data[position + 9];
  41281. context.mainHeader = false;
  41282. if (tile.partIndex === 0) {
  41283. // reset component specific settings
  41284. tile.COD = context.COD;
  41285. tile.COC = context.COC.slice(0); // clone of the global COC
  41286. tile.QCD = context.QCD;
  41287. tile.QCC = context.QCC.slice(0); // clone of the global COC
  41288. }
  41289. context.currentTile = tile;
  41290. break;
  41291. case 0xFF93: // Start of data (SOD)
  41292. tile = context.currentTile;
  41293. if (tile.partIndex === 0) {
  41294. initializeTile(context, tile.index);
  41295. buildPackets(context);
  41296. }
  41297. // moving to the end of the data
  41298. length = tile.dataEnd - position;
  41299. parseTilePackets(context, data, position, length);
  41300. break;
  41301. case 0xFF64: // Comment (COM)
  41302. length = readUint16(data, position);
  41303. // skipping content
  41304. break;
  41305. case 0xFF53: // Coding style component (COC)
  41306. throw 'Codestream code 0xFF53 (COC) is not implemented';
  41307. default:
  41308. throw 'Unknown codestream code: ' + code.toString(16);
  41309. }
  41310. position += length;
  41311. }
  41312. } catch (e) {
  41313. if (this.failOnCorruptedImage) {
  41314. error('JPX error: ' + e);
  41315. } else {
  41316. warn('JPX error: ' + e + '. Trying to recover');
  41317. }
  41318. }
  41319. this.tiles = transformComponents(context);
  41320. this.width = context.SIZ.Xsiz - context.SIZ.XOsiz;
  41321. this.height = context.SIZ.Ysiz - context.SIZ.YOsiz;
  41322. this.componentsCount = context.SIZ.Csiz;
  41323. }
  41324. };
  41325. function calculateComponentDimensions(component, siz) {
  41326. // Section B.2 Component mapping
  41327. component.x0 = Math.ceil(siz.XOsiz / component.XRsiz);
  41328. component.x1 = Math.ceil(siz.Xsiz / component.XRsiz);
  41329. component.y0 = Math.ceil(siz.YOsiz / component.YRsiz);
  41330. component.y1 = Math.ceil(siz.Ysiz / component.YRsiz);
  41331. component.width = component.x1 - component.x0;
  41332. component.height = component.y1 - component.y0;
  41333. }
  41334. function calculateTileGrids(context, components) {
  41335. var siz = context.SIZ;
  41336. // Section B.3 Division into tile and tile-components
  41337. var tile, tiles = [];
  41338. var numXtiles = Math.ceil((siz.Xsiz - siz.XTOsiz) / siz.XTsiz);
  41339. var numYtiles = Math.ceil((siz.Ysiz - siz.YTOsiz) / siz.YTsiz);
  41340. for (var q = 0; q < numYtiles; q++) {
  41341. for (var p = 0; p < numXtiles; p++) {
  41342. tile = {};
  41343. tile.tx0 = Math.max(siz.XTOsiz + p * siz.XTsiz, siz.XOsiz);
  41344. tile.ty0 = Math.max(siz.YTOsiz + q * siz.YTsiz, siz.YOsiz);
  41345. tile.tx1 = Math.min(siz.XTOsiz + (p + 1) * siz.XTsiz, siz.Xsiz);
  41346. tile.ty1 = Math.min(siz.YTOsiz + (q + 1) * siz.YTsiz, siz.Ysiz);
  41347. tile.width = tile.tx1 - tile.tx0;
  41348. tile.height = tile.ty1 - tile.ty0;
  41349. tile.components = [];
  41350. tiles.push(tile);
  41351. }
  41352. }
  41353. context.tiles = tiles;
  41354. var componentsCount = siz.Csiz;
  41355. for (var i = 0, ii = componentsCount; i < ii; i++) {
  41356. var component = components[i];
  41357. for (var j = 0, jj = tiles.length; j < jj; j++) {
  41358. var tileComponent = {};
  41359. tile = tiles[j];
  41360. tileComponent.tcx0 = Math.ceil(tile.tx0 / component.XRsiz);
  41361. tileComponent.tcy0 = Math.ceil(tile.ty0 / component.YRsiz);
  41362. tileComponent.tcx1 = Math.ceil(tile.tx1 / component.XRsiz);
  41363. tileComponent.tcy1 = Math.ceil(tile.ty1 / component.YRsiz);
  41364. tileComponent.width = tileComponent.tcx1 - tileComponent.tcx0;
  41365. tileComponent.height = tileComponent.tcy1 - tileComponent.tcy0;
  41366. tile.components[i] = tileComponent;
  41367. }
  41368. }
  41369. }
  41370. function getBlocksDimensions(context, component, r) {
  41371. var codOrCoc = component.codingStyleParameters;
  41372. var result = {};
  41373. if (!codOrCoc.entropyCoderWithCustomPrecincts) {
  41374. result.PPx = 15;
  41375. result.PPy = 15;
  41376. } else {
  41377. result.PPx = codOrCoc.precinctsSizes[r].PPx;
  41378. result.PPy = codOrCoc.precinctsSizes[r].PPy;
  41379. }
  41380. // calculate codeblock size as described in section B.7
  41381. result.xcb_ = (r > 0 ? Math.min(codOrCoc.xcb, result.PPx - 1) :
  41382. Math.min(codOrCoc.xcb, result.PPx));
  41383. result.ycb_ = (r > 0 ? Math.min(codOrCoc.ycb, result.PPy - 1) :
  41384. Math.min(codOrCoc.ycb, result.PPy));
  41385. return result;
  41386. }
  41387. function buildPrecincts(context, resolution, dimensions) {
  41388. // Section B.6 Division resolution to precincts
  41389. var precinctWidth = 1 << dimensions.PPx;
  41390. var precinctHeight = 1 << dimensions.PPy;
  41391. var numprecinctswide = (resolution.trx1 > resolution.trx0 ?
  41392. Math.ceil(resolution.trx1 / precinctWidth) -
  41393. Math.floor(resolution.trx0 / precinctWidth) : 0);
  41394. var numprecinctshigh = (resolution.try1 > resolution.try0 ?
  41395. Math.ceil(resolution.try1 / precinctHeight) -
  41396. Math.floor(resolution.try0 / precinctHeight) : 0);
  41397. var numprecincts = numprecinctswide * numprecinctshigh;
  41398. var precinctXOffset = Math.floor(resolution.trx0 / precinctWidth) *
  41399. precinctWidth;
  41400. var precinctYOffset = Math.floor(resolution.try0 / precinctHeight) *
  41401. precinctHeight;
  41402. resolution.precinctParameters = {
  41403. precinctXOffset: precinctXOffset,
  41404. precinctYOffset: precinctYOffset,
  41405. precinctWidth: precinctWidth,
  41406. precinctHeight: precinctHeight,
  41407. numprecinctswide: numprecinctswide,
  41408. numprecinctshigh: numprecinctshigh,
  41409. numprecincts: numprecincts
  41410. };
  41411. }
  41412. function buildCodeblocks(context, subband, dimensions) {
  41413. // Section B.7 Division sub-band into code-blocks
  41414. var xcb_ = dimensions.xcb_;
  41415. var ycb_ = dimensions.ycb_;
  41416. var codeblockWidth = 1 << xcb_;
  41417. var codeblockHeight = 1 << ycb_;
  41418. var cbx0 = subband.tbx0 >> xcb_;
  41419. var cby0 = subband.tby0 >> ycb_;
  41420. var cbx1 = (subband.tbx1 + codeblockWidth - 1) >> xcb_;
  41421. var cby1 = (subband.tby1 + codeblockHeight - 1) >> ycb_;
  41422. var precinctParameters = subband.resolution.precinctParameters;
  41423. var codeblocks = [];
  41424. var precincts = [];
  41425. var i, j, codeblock, precinctNumber;
  41426. for (j = cby0; j < cby1; j++) {
  41427. for (i = cbx0; i < cbx1; i++) {
  41428. codeblock = {
  41429. cbx: i,
  41430. cby: j,
  41431. tbx0: codeblockWidth * i,
  41432. tby0: codeblockHeight * j,
  41433. tbx1: codeblockWidth * (i + 1),
  41434. tby1: codeblockHeight * (j + 1)
  41435. };
  41436. // calculate precinct number
  41437. var pi = Math.floor((codeblock.tbx0 -
  41438. precinctParameters.precinctXOffset) /
  41439. precinctParameters.precinctWidth);
  41440. var pj = Math.floor((codeblock.tby0 -
  41441. precinctParameters.precinctYOffset) /
  41442. precinctParameters.precinctHeight);
  41443. precinctNumber = pj + pi * precinctParameters.numprecinctswide;
  41444. codeblock.tbx0_ = Math.max(subband.tbx0, codeblock.tbx0);
  41445. codeblock.tby0_ = Math.max(subband.tby0, codeblock.tby0);
  41446. codeblock.tbx1_ = Math.min(subband.tbx1, codeblock.tbx1);
  41447. codeblock.tby1_ = Math.min(subband.tby1, codeblock.tby1);
  41448. codeblock.precinctNumber = precinctNumber;
  41449. codeblock.subbandType = subband.type;
  41450. codeblock.Lblock = 3;
  41451. codeblocks.push(codeblock);
  41452. // building precinct for the sub-band
  41453. var precinct = precincts[precinctNumber];
  41454. if (precinct !== undefined) {
  41455. if (i < precinct.cbxMin) {
  41456. precinct.cbxMin = i;
  41457. } else if (i > precinct.cbxMax) {
  41458. precinct.cbxMax = i;
  41459. }
  41460. if (j < precinct.cbyMin) {
  41461. precinct.cbxMin = j;
  41462. } else if (j > precinct.cbyMax) {
  41463. precinct.cbyMax = j;
  41464. }
  41465. } else {
  41466. precincts[precinctNumber] = precinct = {
  41467. cbxMin: i,
  41468. cbyMin: j,
  41469. cbxMax: i,
  41470. cbyMax: j
  41471. };
  41472. }
  41473. codeblock.precinct = precinct;
  41474. }
  41475. }
  41476. subband.codeblockParameters = {
  41477. codeblockWidth: xcb_,
  41478. codeblockHeight: ycb_,
  41479. numcodeblockwide: cbx1 - cbx0 + 1,
  41480. numcodeblockhigh: cby1 - cby1 + 1
  41481. };
  41482. subband.codeblocks = codeblocks;
  41483. subband.precincts = precincts;
  41484. }
  41485. function createPacket(resolution, precinctNumber, layerNumber) {
  41486. var precinctCodeblocks = [];
  41487. // Section B.10.8 Order of info in packet
  41488. var subbands = resolution.subbands;
  41489. // sub-bands already ordered in 'LL', 'HL', 'LH', and 'HH' sequence
  41490. for (var i = 0, ii = subbands.length; i < ii; i++) {
  41491. var subband = subbands[i];
  41492. var codeblocks = subband.codeblocks;
  41493. for (var j = 0, jj = codeblocks.length; j < jj; j++) {
  41494. var codeblock = codeblocks[j];
  41495. if (codeblock.precinctNumber != precinctNumber) {
  41496. continue;
  41497. }
  41498. precinctCodeblocks.push(codeblock);
  41499. }
  41500. }
  41501. return {
  41502. layerNumber: layerNumber,
  41503. codeblocks: precinctCodeblocks
  41504. };
  41505. }
  41506. function LayerResolutionComponentPositionIterator(context) {
  41507. var siz = context.SIZ;
  41508. var tileIndex = context.currentTile.index;
  41509. var tile = context.tiles[tileIndex];
  41510. var layersCount = tile.codingStyleDefaultParameters.layersCount;
  41511. var componentsCount = siz.Csiz;
  41512. var maxDecompositionLevelsCount = 0;
  41513. for (var q = 0; q < componentsCount; q++) {
  41514. maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount,
  41515. tile.components[q].codingStyleParameters.decompositionLevelsCount);
  41516. }
  41517. var l = 0, r = 0, i = 0, k = 0;
  41518. this.nextPacket = function JpxImage_nextPacket() {
  41519. // Section B.12.1.1 Layer-resolution-component-position
  41520. for (; l < layersCount; l++) {
  41521. for (; r <= maxDecompositionLevelsCount; r++) {
  41522. for (; i < componentsCount; i++) {
  41523. var component = tile.components[i];
  41524. if (r > component.codingStyleParameters.decompositionLevelsCount) {
  41525. continue;
  41526. }
  41527. var resolution = component.resolutions[r];
  41528. var numprecincts = resolution.precinctParameters.numprecincts;
  41529. for (; k < numprecincts;) {
  41530. var packet = createPacket(resolution, k, l);
  41531. k++;
  41532. return packet;
  41533. }
  41534. k = 0;
  41535. }
  41536. i = 0;
  41537. }
  41538. r = 0;
  41539. }
  41540. throw 'Out of packets';
  41541. };
  41542. }
  41543. function ResolutionLayerComponentPositionIterator(context) {
  41544. var siz = context.SIZ;
  41545. var tileIndex = context.currentTile.index;
  41546. var tile = context.tiles[tileIndex];
  41547. var layersCount = tile.codingStyleDefaultParameters.layersCount;
  41548. var componentsCount = siz.Csiz;
  41549. var maxDecompositionLevelsCount = 0;
  41550. for (var q = 0; q < componentsCount; q++) {
  41551. maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount,
  41552. tile.components[q].codingStyleParameters.decompositionLevelsCount);
  41553. }
  41554. var r = 0, l = 0, i = 0, k = 0;
  41555. this.nextPacket = function JpxImage_nextPacket() {
  41556. // Section B.12.1.2 Resolution-layer-component-position
  41557. for (; r <= maxDecompositionLevelsCount; r++) {
  41558. for (; l < layersCount; l++) {
  41559. for (; i < componentsCount; i++) {
  41560. var component = tile.components[i];
  41561. if (r > component.codingStyleParameters.decompositionLevelsCount) {
  41562. continue;
  41563. }
  41564. var resolution = component.resolutions[r];
  41565. var numprecincts = resolution.precinctParameters.numprecincts;
  41566. for (; k < numprecincts;) {
  41567. var packet = createPacket(resolution, k, l);
  41568. k++;
  41569. return packet;
  41570. }
  41571. k = 0;
  41572. }
  41573. i = 0;
  41574. }
  41575. l = 0;
  41576. }
  41577. throw 'Out of packets';
  41578. };
  41579. }
  41580. function buildPackets(context) {
  41581. var siz = context.SIZ;
  41582. var tileIndex = context.currentTile.index;
  41583. var tile = context.tiles[tileIndex];
  41584. var componentsCount = siz.Csiz;
  41585. // Creating resolutions and sub-bands for each component
  41586. for (var c = 0; c < componentsCount; c++) {
  41587. var component = tile.components[c];
  41588. var decompositionLevelsCount =
  41589. component.codingStyleParameters.decompositionLevelsCount;
  41590. // Section B.5 Resolution levels and sub-bands
  41591. var resolutions = [];
  41592. var subbands = [];
  41593. for (var r = 0; r <= decompositionLevelsCount; r++) {
  41594. var blocksDimensions = getBlocksDimensions(context, component, r);
  41595. var resolution = {};
  41596. var scale = 1 << (decompositionLevelsCount - r);
  41597. resolution.trx0 = Math.ceil(component.tcx0 / scale);
  41598. resolution.try0 = Math.ceil(component.tcy0 / scale);
  41599. resolution.trx1 = Math.ceil(component.tcx1 / scale);
  41600. resolution.try1 = Math.ceil(component.tcy1 / scale);
  41601. buildPrecincts(context, resolution, blocksDimensions);
  41602. resolutions.push(resolution);
  41603. var subband;
  41604. if (r === 0) {
  41605. // one sub-band (LL) with last decomposition
  41606. subband = {};
  41607. subband.type = 'LL';
  41608. subband.tbx0 = Math.ceil(component.tcx0 / scale);
  41609. subband.tby0 = Math.ceil(component.tcy0 / scale);
  41610. subband.tbx1 = Math.ceil(component.tcx1 / scale);
  41611. subband.tby1 = Math.ceil(component.tcy1 / scale);
  41612. subband.resolution = resolution;
  41613. buildCodeblocks(context, subband, blocksDimensions);
  41614. subbands.push(subband);
  41615. resolution.subbands = [subband];
  41616. } else {
  41617. var bscale = 1 << (decompositionLevelsCount - r + 1);
  41618. var resolutionSubbands = [];
  41619. // three sub-bands (HL, LH and HH) with rest of decompositions
  41620. subband = {};
  41621. subband.type = 'HL';
  41622. subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5);
  41623. subband.tby0 = Math.ceil(component.tcy0 / bscale);
  41624. subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5);
  41625. subband.tby1 = Math.ceil(component.tcy1 / bscale);
  41626. subband.resolution = resolution;
  41627. buildCodeblocks(context, subband, blocksDimensions);
  41628. subbands.push(subband);
  41629. resolutionSubbands.push(subband);
  41630. subband = {};
  41631. subband.type = 'LH';
  41632. subband.tbx0 = Math.ceil(component.tcx0 / bscale);
  41633. subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5);
  41634. subband.tbx1 = Math.ceil(component.tcx1 / bscale);
  41635. subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5);
  41636. subband.resolution = resolution;
  41637. buildCodeblocks(context, subband, blocksDimensions);
  41638. subbands.push(subband);
  41639. resolutionSubbands.push(subband);
  41640. subband = {};
  41641. subband.type = 'HH';
  41642. subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5);
  41643. subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5);
  41644. subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5);
  41645. subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5);
  41646. subband.resolution = resolution;
  41647. buildCodeblocks(context, subband, blocksDimensions);
  41648. subbands.push(subband);
  41649. resolutionSubbands.push(subband);
  41650. resolution.subbands = resolutionSubbands;
  41651. }
  41652. }
  41653. component.resolutions = resolutions;
  41654. component.subbands = subbands;
  41655. }
  41656. // Generate the packets sequence
  41657. var progressionOrder = tile.codingStyleDefaultParameters.progressionOrder;
  41658. switch (progressionOrder) {
  41659. case 0:
  41660. tile.packetsIterator =
  41661. new LayerResolutionComponentPositionIterator(context);
  41662. break;
  41663. case 1:
  41664. tile.packetsIterator =
  41665. new ResolutionLayerComponentPositionIterator(context);
  41666. break;
  41667. default:
  41668. throw 'Unsupported progression order ' + progressionOrder;
  41669. }
  41670. }
  41671. function parseTilePackets(context, data, offset, dataLength) {
  41672. var position = 0;
  41673. var buffer, bufferSize = 0, skipNextBit = false;
  41674. function readBits(count) {
  41675. while (bufferSize < count) {
  41676. var b = data[offset + position];
  41677. position++;
  41678. if (skipNextBit) {
  41679. buffer = (buffer << 7) | b;
  41680. bufferSize += 7;
  41681. skipNextBit = false;
  41682. } else {
  41683. buffer = (buffer << 8) | b;
  41684. bufferSize += 8;
  41685. }
  41686. if (b == 0xFF) {
  41687. skipNextBit = true;
  41688. }
  41689. }
  41690. bufferSize -= count;
  41691. return (buffer >>> bufferSize) & ((1 << count) - 1);
  41692. }
  41693. function alignToByte() {
  41694. bufferSize = 0;
  41695. if (skipNextBit) {
  41696. position++;
  41697. skipNextBit = false;
  41698. }
  41699. }
  41700. function readCodingpasses() {
  41701. if (readBits(1) === 0) {
  41702. return 1;
  41703. }
  41704. if (readBits(1) === 0) {
  41705. return 2;
  41706. }
  41707. var value = readBits(2);
  41708. if (value < 3) {
  41709. return value + 3;
  41710. }
  41711. value = readBits(5);
  41712. if (value < 31) {
  41713. return value + 6;
  41714. }
  41715. value = readBits(7);
  41716. return value + 37;
  41717. }
  41718. var tileIndex = context.currentTile.index;
  41719. var tile = context.tiles[tileIndex];
  41720. var packetsIterator = tile.packetsIterator;
  41721. while (position < dataLength) {
  41722. var packet = packetsIterator.nextPacket();
  41723. if (!readBits(1)) {
  41724. alignToByte();
  41725. continue;
  41726. }
  41727. var layerNumber = packet.layerNumber;
  41728. var queue = [], codeblock;
  41729. for (var i = 0, ii = packet.codeblocks.length; i < ii; i++) {
  41730. codeblock = packet.codeblocks[i];
  41731. var precinct = codeblock.precinct;
  41732. var codeblockColumn = codeblock.cbx - precinct.cbxMin;
  41733. var codeblockRow = codeblock.cby - precinct.cbyMin;
  41734. var codeblockIncluded = false;
  41735. var firstTimeInclusion = false;
  41736. var valueReady;
  41737. if ('included' in codeblock) {
  41738. codeblockIncluded = !!readBits(1);
  41739. } else {
  41740. // reading inclusion tree
  41741. precinct = codeblock.precinct;
  41742. var inclusionTree, zeroBitPlanesTree;
  41743. if ('inclusionTree' in precinct) {
  41744. inclusionTree = precinct.inclusionTree;
  41745. } else {
  41746. // building inclusion and zero bit-planes trees
  41747. var width = precinct.cbxMax - precinct.cbxMin + 1;
  41748. var height = precinct.cbyMax - precinct.cbyMin + 1;
  41749. inclusionTree = new InclusionTree(width, height, layerNumber);
  41750. zeroBitPlanesTree = new TagTree(width, height);
  41751. precinct.inclusionTree = inclusionTree;
  41752. precinct.zeroBitPlanesTree = zeroBitPlanesTree;
  41753. }
  41754. if (inclusionTree.reset(codeblockColumn, codeblockRow, layerNumber)) {
  41755. while (true) {
  41756. if (readBits(1)) {
  41757. valueReady = !inclusionTree.nextLevel();
  41758. if (valueReady) {
  41759. codeblock.included = true;
  41760. codeblockIncluded = firstTimeInclusion = true;
  41761. break;
  41762. }
  41763. } else {
  41764. inclusionTree.incrementValue(layerNumber);
  41765. break;
  41766. }
  41767. }
  41768. }
  41769. }
  41770. if (!codeblockIncluded) {
  41771. continue;
  41772. }
  41773. if (firstTimeInclusion) {
  41774. zeroBitPlanesTree = precinct.zeroBitPlanesTree;
  41775. zeroBitPlanesTree.reset(codeblockColumn, codeblockRow);
  41776. while (true) {
  41777. if (readBits(1)) {
  41778. valueReady = !zeroBitPlanesTree.nextLevel();
  41779. if (valueReady) {
  41780. break;
  41781. }
  41782. } else {
  41783. zeroBitPlanesTree.incrementValue();
  41784. }
  41785. }
  41786. codeblock.zeroBitPlanes = zeroBitPlanesTree.value;
  41787. }
  41788. var codingpasses = readCodingpasses();
  41789. while (readBits(1)) {
  41790. codeblock.Lblock++;
  41791. }
  41792. var codingpassesLog2 = log2(codingpasses);
  41793. // rounding down log2
  41794. var bits = ((codingpasses < (1 << codingpassesLog2)) ?
  41795. codingpassesLog2 - 1 : codingpassesLog2) + codeblock.Lblock;
  41796. var codedDataLength = readBits(bits);
  41797. queue.push({
  41798. codeblock: codeblock,
  41799. codingpasses: codingpasses,
  41800. dataLength: codedDataLength
  41801. });
  41802. }
  41803. alignToByte();
  41804. while (queue.length > 0) {
  41805. var packetItem = queue.shift();
  41806. codeblock = packetItem.codeblock;
  41807. if (!('data' in codeblock)) {
  41808. codeblock.data = [];
  41809. }
  41810. codeblock.data.push({
  41811. data: data,
  41812. start: offset + position,
  41813. end: offset + position + packetItem.dataLength,
  41814. codingpasses: packetItem.codingpasses
  41815. });
  41816. position += packetItem.dataLength;
  41817. }
  41818. }
  41819. return position;
  41820. }
  41821. function copyCoefficients(coefficients, levelWidth, levelHeight, subband,
  41822. delta, mb, reversible, segmentationSymbolUsed) {
  41823. var x0 = subband.tbx0;
  41824. var y0 = subband.tby0;
  41825. var width = subband.tbx1 - subband.tbx0;
  41826. var codeblocks = subband.codeblocks;
  41827. var right = subband.type.charAt(0) === 'H' ? 1 : 0;
  41828. var bottom = subband.type.charAt(1) === 'H' ? levelWidth : 0;
  41829. for (var i = 0, ii = codeblocks.length; i < ii; ++i) {
  41830. var codeblock = codeblocks[i];
  41831. var blockWidth = codeblock.tbx1_ - codeblock.tbx0_;
  41832. var blockHeight = codeblock.tby1_ - codeblock.tby0_;
  41833. if (blockWidth === 0 || blockHeight === 0) {
  41834. continue;
  41835. }
  41836. if (!('data' in codeblock)) {
  41837. continue;
  41838. }
  41839. var bitModel, currentCodingpassType;
  41840. bitModel = new BitModel(blockWidth, blockHeight, codeblock.subbandType,
  41841. codeblock.zeroBitPlanes, mb);
  41842. currentCodingpassType = 2; // first bit plane starts from cleanup
  41843. // collect data
  41844. var data = codeblock.data, totalLength = 0, codingpasses = 0;
  41845. var j, jj, dataItem;
  41846. for (j = 0, jj = data.length; j < jj; j++) {
  41847. dataItem = data[j];
  41848. totalLength += dataItem.end - dataItem.start;
  41849. codingpasses += dataItem.codingpasses;
  41850. }
  41851. var encodedData = new Uint8Array(totalLength);
  41852. var position = 0;
  41853. for (j = 0, jj = data.length; j < jj; j++) {
  41854. dataItem = data[j];
  41855. var chunk = dataItem.data.subarray(dataItem.start, dataItem.end);
  41856. encodedData.set(chunk, position);
  41857. position += chunk.length;
  41858. }
  41859. // decoding the item
  41860. var decoder = new ArithmeticDecoder(encodedData, 0, totalLength);
  41861. bitModel.setDecoder(decoder);
  41862. for (j = 0; j < codingpasses; j++) {
  41863. switch (currentCodingpassType) {
  41864. case 0:
  41865. bitModel.runSignificancePropogationPass();
  41866. break;
  41867. case 1:
  41868. bitModel.runMagnitudeRefinementPass();
  41869. break;
  41870. case 2:
  41871. bitModel.runCleanupPass();
  41872. if (segmentationSymbolUsed) {
  41873. bitModel.checkSegmentationSymbol();
  41874. }
  41875. break;
  41876. }
  41877. currentCodingpassType = (currentCodingpassType + 1) % 3;
  41878. }
  41879. var offset = (codeblock.tbx0_ - x0) + (codeblock.tby0_ - y0) * width;
  41880. var sign = bitModel.coefficentsSign;
  41881. var magnitude = bitModel.coefficentsMagnitude;
  41882. var bitsDecoded = bitModel.bitsDecoded;
  41883. var magnitudeCorrection = reversible ? 0 : 0.5;
  41884. var k, n, nb;
  41885. position = 0;
  41886. // Do the interleaving of Section F.3.3 here, so we do not need
  41887. // to copy later. LL level is not interleaved, just copied.
  41888. var interleave = (subband.type !== 'LL');
  41889. for (j = 0; j < blockHeight; j++) {
  41890. var row = (offset / width) | 0; // row in the non-interleaved subband
  41891. var levelOffset = 2 * row * (levelWidth - width) + right + bottom;
  41892. for (k = 0; k < blockWidth; k++) {
  41893. n = magnitude[position];
  41894. if (n !== 0) {
  41895. n = (n + magnitudeCorrection) * delta;
  41896. if (sign[position] !== 0) {
  41897. n = -n;
  41898. }
  41899. nb = bitsDecoded[position];
  41900. var pos = interleave ? (levelOffset + (offset << 1)) : offset;
  41901. if (reversible && (nb >= mb)) {
  41902. coefficients[pos] = n;
  41903. } else {
  41904. coefficients[pos] = n * (1 << (mb - nb));
  41905. }
  41906. }
  41907. offset++;
  41908. position++;
  41909. }
  41910. offset += width - blockWidth;
  41911. }
  41912. }
  41913. }
  41914. function transformTile(context, tile, c) {
  41915. var component = tile.components[c];
  41916. var codingStyleParameters = component.codingStyleParameters;
  41917. var quantizationParameters = component.quantizationParameters;
  41918. var decompositionLevelsCount =
  41919. codingStyleParameters.decompositionLevelsCount;
  41920. var spqcds = quantizationParameters.SPqcds;
  41921. var scalarExpounded = quantizationParameters.scalarExpounded;
  41922. var guardBits = quantizationParameters.guardBits;
  41923. var segmentationSymbolUsed = codingStyleParameters.segmentationSymbolUsed;
  41924. var precision = context.components[c].precision;
  41925. var reversible = codingStyleParameters.reversibleTransformation;
  41926. var transform = (reversible ? new ReversibleTransform() :
  41927. new IrreversibleTransform());
  41928. var subbandCoefficients = [];
  41929. var b = 0;
  41930. for (var i = 0; i <= decompositionLevelsCount; i++) {
  41931. var resolution = component.resolutions[i];
  41932. var width = resolution.trx1 - resolution.trx0;
  41933. var height = resolution.try1 - resolution.try0;
  41934. // Allocate space for the whole sublevel.
  41935. var coefficients = new Float32Array(width * height);
  41936. for (var j = 0, jj = resolution.subbands.length; j < jj; j++) {
  41937. var mu, epsilon;
  41938. if (!scalarExpounded) {
  41939. // formula E-5
  41940. mu = spqcds[0].mu;
  41941. epsilon = spqcds[0].epsilon + (i > 0 ? 1 - i : 0);
  41942. } else {
  41943. mu = spqcds[b].mu;
  41944. epsilon = spqcds[b].epsilon;
  41945. b++;
  41946. }
  41947. var subband = resolution.subbands[j];
  41948. var gainLog2 = SubbandsGainLog2[subband.type];
  41949. // calulate quantization coefficient (Section E.1.1.1)
  41950. var delta = (reversible ? 1 :
  41951. Math.pow(2, precision + gainLog2 - epsilon) * (1 + mu / 2048));
  41952. var mb = (guardBits + epsilon - 1);
  41953. // In the first resolution level, copyCoefficients will fill the
  41954. // whole array with coefficients. In the succeding passes,
  41955. // copyCoefficients will consecutively fill in the values that belong
  41956. // to the interleaved positions of the HL, LH, and HH coefficients.
  41957. // The LL coefficients will then be interleaved in Transform.iterate().
  41958. copyCoefficients(coefficients, width, height, subband, delta, mb,
  41959. reversible, segmentationSymbolUsed);
  41960. }
  41961. subbandCoefficients.push({
  41962. width: width,
  41963. height: height,
  41964. items: coefficients
  41965. });
  41966. }
  41967. var result = transform.calculate(subbandCoefficients,
  41968. component.tcx0, component.tcy0);
  41969. return {
  41970. left: component.tcx0,
  41971. top: component.tcy0,
  41972. width: result.width,
  41973. height: result.height,
  41974. items: result.items
  41975. };
  41976. }
  41977. function transformComponents(context) {
  41978. var siz = context.SIZ;
  41979. var components = context.components;
  41980. var componentsCount = siz.Csiz;
  41981. var resultImages = [];
  41982. for (var i = 0, ii = context.tiles.length; i < ii; i++) {
  41983. var tile = context.tiles[i];
  41984. var transformedTiles = [];
  41985. var c;
  41986. for (c = 0; c < componentsCount; c++) {
  41987. transformedTiles[c] = transformTile(context, tile, c);
  41988. }
  41989. var tile0 = transformedTiles[0];
  41990. var out = new Uint8Array(tile0.items.length * componentsCount);
  41991. var result = {
  41992. left: tile0.left,
  41993. top: tile0.top,
  41994. width: tile0.width,
  41995. height: tile0.height,
  41996. items: out
  41997. };
  41998. // Section G.2.2 Inverse multi component transform
  41999. var shift, offset, max, min;
  42000. var pos = 0, j, jj, y0, y1, y2, r, g, b, k, val;
  42001. if (tile.codingStyleDefaultParameters.multipleComponentTransform) {
  42002. var fourComponents = componentsCount === 4;
  42003. var y0items = transformedTiles[0].items;
  42004. var y1items = transformedTiles[1].items;
  42005. var y2items = transformedTiles[2].items;
  42006. var y3items = fourComponents ? transformedTiles[3].items : null;
  42007. // HACK: The multiple component transform formulas below assume that
  42008. // all components have the same precision. With this in mind, we
  42009. // compute shift and offset only once.
  42010. shift = components[0].precision - 8;
  42011. offset = (128 << shift) + 0.5;
  42012. max = (127.5 * (1 << shift));
  42013. min = -max;
  42014. var component0 = tile.components[0];
  42015. if (!component0.codingStyleParameters.reversibleTransformation) {
  42016. // inverse irreversible multiple component transform
  42017. for (j = 0, jj = y0items.length; j < jj; ++j) {
  42018. y0 = y0items[j];
  42019. y1 = y1items[j];
  42020. y2 = y2items[j];
  42021. r = y0 + 1.402 * y2;
  42022. g = y0 - 0.34413 * y1 - 0.71414 * y2;
  42023. b = y0 + 1.772 * y1;
  42024. out[pos++] = r <= min ? 0 : r >= max ? 255 : (r + offset) >> shift;
  42025. out[pos++] = g <= min ? 0 : g >= max ? 255 : (g + offset) >> shift;
  42026. out[pos++] = b <= min ? 0 : b >= max ? 255 : (b + offset) >> shift;
  42027. if (fourComponents) {
  42028. k = y3items[j];
  42029. out[pos++] =
  42030. k <= min ? 0 : k >= max ? 255 : (k + offset) >> shift;
  42031. }
  42032. }
  42033. } else {
  42034. // inverse reversible multiple component transform
  42035. for (j = 0, jj = y0items.length; j < jj; ++j) {
  42036. y0 = y0items[j];
  42037. y1 = y1items[j];
  42038. y2 = y2items[j];
  42039. g = y0 - ((y2 + y1) >> 2);
  42040. r = g + y2;
  42041. b = g + y1;
  42042. out[pos++] = r <= min ? 0 : r >= max ? 255 : (r + offset) >> shift;
  42043. out[pos++] = g <= min ? 0 : g >= max ? 255 : (g + offset) >> shift;
  42044. out[pos++] = b <= min ? 0 : b >= max ? 255 : (b + offset) >> shift;
  42045. if (fourComponents) {
  42046. k = y3items[j];
  42047. out[pos++] =
  42048. k <= min ? 0 : k >= max ? 255 : (k + offset) >> shift;
  42049. }
  42050. }
  42051. }
  42052. } else { // no multi-component transform
  42053. for (c = 0; c < componentsCount; c++) {
  42054. var items = transformedTiles[c].items;
  42055. shift = components[c].precision - 8;
  42056. offset = (128 << shift) + 0.5;
  42057. max = (127.5 * (1 << shift));
  42058. min = -max;
  42059. for (pos = c, j = 0, jj = items.length; j < jj; j++) {
  42060. val = items[j];
  42061. out[pos] = val <= min ? 0 :
  42062. val >= max ? 255 : (val + offset) >> shift;
  42063. pos += componentsCount;
  42064. }
  42065. }
  42066. }
  42067. resultImages.push(result);
  42068. }
  42069. return resultImages;
  42070. }
  42071. function initializeTile(context, tileIndex) {
  42072. var siz = context.SIZ;
  42073. var componentsCount = siz.Csiz;
  42074. var tile = context.tiles[tileIndex];
  42075. for (var c = 0; c < componentsCount; c++) {
  42076. var component = tile.components[c];
  42077. var qcdOrQcc = (c in context.currentTile.QCC ?
  42078. context.currentTile.QCC[c] : context.currentTile.QCD);
  42079. component.quantizationParameters = qcdOrQcc;
  42080. var codOrCoc = (c in context.currentTile.COC ?
  42081. context.currentTile.COC[c] : context.currentTile.COD);
  42082. component.codingStyleParameters = codOrCoc;
  42083. }
  42084. tile.codingStyleDefaultParameters = context.currentTile.COD;
  42085. }
  42086. // Section B.10.2 Tag trees
  42087. var TagTree = (function TagTreeClosure() {
  42088. function TagTree(width, height) {
  42089. var levelsLength = log2(Math.max(width, height)) + 1;
  42090. this.levels = [];
  42091. for (var i = 0; i < levelsLength; i++) {
  42092. var level = {
  42093. width: width,
  42094. height: height,
  42095. items: []
  42096. };
  42097. this.levels.push(level);
  42098. width = Math.ceil(width / 2);
  42099. height = Math.ceil(height / 2);
  42100. }
  42101. }
  42102. TagTree.prototype = {
  42103. reset: function TagTree_reset(i, j) {
  42104. var currentLevel = 0, value = 0, level;
  42105. while (currentLevel < this.levels.length) {
  42106. level = this.levels[currentLevel];
  42107. var index = i + j * level.width;
  42108. if (index in level.items) {
  42109. value = level.items[index];
  42110. break;
  42111. }
  42112. level.index = index;
  42113. i >>= 1;
  42114. j >>= 1;
  42115. currentLevel++;
  42116. }
  42117. currentLevel--;
  42118. level = this.levels[currentLevel];
  42119. level.items[level.index] = value;
  42120. this.currentLevel = currentLevel;
  42121. delete this.value;
  42122. },
  42123. incrementValue: function TagTree_incrementValue() {
  42124. var level = this.levels[this.currentLevel];
  42125. level.items[level.index]++;
  42126. },
  42127. nextLevel: function TagTree_nextLevel() {
  42128. var currentLevel = this.currentLevel;
  42129. var level = this.levels[currentLevel];
  42130. var value = level.items[level.index];
  42131. currentLevel--;
  42132. if (currentLevel < 0) {
  42133. this.value = value;
  42134. return false;
  42135. }
  42136. this.currentLevel = currentLevel;
  42137. level = this.levels[currentLevel];
  42138. level.items[level.index] = value;
  42139. return true;
  42140. }
  42141. };
  42142. return TagTree;
  42143. })();
  42144. var InclusionTree = (function InclusionTreeClosure() {
  42145. function InclusionTree(width, height, defaultValue) {
  42146. var levelsLength = log2(Math.max(width, height)) + 1;
  42147. this.levels = [];
  42148. for (var i = 0; i < levelsLength; i++) {
  42149. var items = new Uint8Array(width * height);
  42150. for (var j = 0, jj = items.length; j < jj; j++) {
  42151. items[j] = defaultValue;
  42152. }
  42153. var level = {
  42154. width: width,
  42155. height: height,
  42156. items: items
  42157. };
  42158. this.levels.push(level);
  42159. width = Math.ceil(width / 2);
  42160. height = Math.ceil(height / 2);
  42161. }
  42162. }
  42163. InclusionTree.prototype = {
  42164. reset: function InclusionTree_reset(i, j, stopValue) {
  42165. var currentLevel = 0;
  42166. while (currentLevel < this.levels.length) {
  42167. var level = this.levels[currentLevel];
  42168. var index = i + j * level.width;
  42169. level.index = index;
  42170. var value = level.items[index];
  42171. if (value == 0xFF) {
  42172. break;
  42173. }
  42174. if (value > stopValue) {
  42175. this.currentLevel = currentLevel;
  42176. // already know about this one, propagating the value to top levels
  42177. this.propagateValues();
  42178. return false;
  42179. }
  42180. i >>= 1;
  42181. j >>= 1;
  42182. currentLevel++;
  42183. }
  42184. this.currentLevel = currentLevel - 1;
  42185. return true;
  42186. },
  42187. incrementValue: function InclusionTree_incrementValue(stopValue) {
  42188. var level = this.levels[this.currentLevel];
  42189. level.items[level.index] = stopValue + 1;
  42190. this.propagateValues();
  42191. },
  42192. propagateValues: function InclusionTree_propagateValues() {
  42193. var levelIndex = this.currentLevel;
  42194. var level = this.levels[levelIndex];
  42195. var currentValue = level.items[level.index];
  42196. while (--levelIndex >= 0) {
  42197. level = this.levels[levelIndex];
  42198. level.items[level.index] = currentValue;
  42199. }
  42200. },
  42201. nextLevel: function InclusionTree_nextLevel() {
  42202. var currentLevel = this.currentLevel;
  42203. var level = this.levels[currentLevel];
  42204. var value = level.items[level.index];
  42205. level.items[level.index] = 0xFF;
  42206. currentLevel--;
  42207. if (currentLevel < 0) {
  42208. return false;
  42209. }
  42210. this.currentLevel = currentLevel;
  42211. level = this.levels[currentLevel];
  42212. level.items[level.index] = value;
  42213. return true;
  42214. }
  42215. };
  42216. return InclusionTree;
  42217. })();
  42218. // Section D. Coefficient bit modeling
  42219. var BitModel = (function BitModelClosure() {
  42220. var UNIFORM_CONTEXT = 17;
  42221. var RUNLENGTH_CONTEXT = 18;
  42222. // Table D-1
  42223. // The index is binary presentation: 0dddvvhh, ddd - sum of Di (0..4),
  42224. // vv - sum of Vi (0..2), and hh - sum of Hi (0..2)
  42225. var LLAndLHContextsLabel = new Uint8Array([
  42226. 0, 5, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 1, 6, 8, 0, 3, 7, 8, 0, 4,
  42227. 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6,
  42228. 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8
  42229. ]);
  42230. var HLContextLabel = new Uint8Array([
  42231. 0, 3, 4, 0, 5, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 1, 3, 4, 0, 6, 7, 7, 0, 8,
  42232. 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3,
  42233. 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8
  42234. ]);
  42235. var HHContextLabel = new Uint8Array([
  42236. 0, 1, 2, 0, 1, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 3, 4, 5, 0, 4, 5, 5, 0, 5,
  42237. 5, 5, 0, 0, 0, 0, 0, 6, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 0, 0, 0, 0, 8, 8,
  42238. 8, 0, 8, 8, 8, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8
  42239. ]);
  42240. function BitModel(width, height, subband, zeroBitPlanes, mb) {
  42241. this.width = width;
  42242. this.height = height;
  42243. this.contextLabelTable = (subband == 'HH' ? HHContextLabel :
  42244. (subband == 'HL' ? HLContextLabel : LLAndLHContextsLabel));
  42245. var coefficientCount = width * height;
  42246. // coefficients outside the encoding region treated as insignificant
  42247. // add border state cells for significanceState
  42248. this.neighborsSignificance = new Uint8Array(coefficientCount);
  42249. this.coefficentsSign = new Uint8Array(coefficientCount);
  42250. this.coefficentsMagnitude = mb > 14 ? new Uint32Array(coefficientCount) :
  42251. mb > 6 ? new Uint16Array(coefficientCount) :
  42252. new Uint8Array(coefficientCount);
  42253. this.processingFlags = new Uint8Array(coefficientCount);
  42254. var bitsDecoded = new Uint8Array(coefficientCount);
  42255. if (zeroBitPlanes !== 0) {
  42256. for (var i = 0; i < coefficientCount; i++) {
  42257. bitsDecoded[i] = zeroBitPlanes;
  42258. }
  42259. }
  42260. this.bitsDecoded = bitsDecoded;
  42261. this.reset();
  42262. }
  42263. BitModel.prototype = {
  42264. setDecoder: function BitModel_setDecoder(decoder) {
  42265. this.decoder = decoder;
  42266. },
  42267. reset: function BitModel_reset() {
  42268. // We have 17 contexts that are accessed via context labels,
  42269. // plus the uniform and runlength context.
  42270. this.contexts = new Int8Array(19);
  42271. // Contexts are packed into 1 byte:
  42272. // highest 7 bits carry the index, lowest bit carries mps
  42273. this.contexts[0] = (4 << 1) | 0;
  42274. this.contexts[UNIFORM_CONTEXT] = (46 << 1) | 0;
  42275. this.contexts[RUNLENGTH_CONTEXT] = (3 << 1) | 0;
  42276. },
  42277. setNeighborsSignificance:
  42278. function BitModel_setNeighborsSignificance(row, column, index) {
  42279. var neighborsSignificance = this.neighborsSignificance;
  42280. var width = this.width, height = this.height;
  42281. var left = (column > 0);
  42282. var right = (column + 1 < width);
  42283. var i;
  42284. if (row > 0) {
  42285. i = index - width;
  42286. if (left) {
  42287. neighborsSignificance[i - 1] += 0x10;
  42288. }
  42289. if (right) {
  42290. neighborsSignificance[i + 1] += 0x10;
  42291. }
  42292. neighborsSignificance[i] += 0x04;
  42293. }
  42294. if (row + 1 < height) {
  42295. i = index + width;
  42296. if (left) {
  42297. neighborsSignificance[i - 1] += 0x10;
  42298. }
  42299. if (right) {
  42300. neighborsSignificance[i + 1] += 0x10;
  42301. }
  42302. neighborsSignificance[i] += 0x04;
  42303. }
  42304. if (left) {
  42305. neighborsSignificance[index - 1] += 0x01;
  42306. }
  42307. if (right) {
  42308. neighborsSignificance[index + 1] += 0x01;
  42309. }
  42310. neighborsSignificance[index] |= 0x80;
  42311. },
  42312. runSignificancePropogationPass:
  42313. function BitModel_runSignificancePropogationPass() {
  42314. var decoder = this.decoder;
  42315. var width = this.width, height = this.height;
  42316. var coefficentsMagnitude = this.coefficentsMagnitude;
  42317. var coefficentsSign = this.coefficentsSign;
  42318. var neighborsSignificance = this.neighborsSignificance;
  42319. var processingFlags = this.processingFlags;
  42320. var contexts = this.contexts;
  42321. var labels = this.contextLabelTable;
  42322. var bitsDecoded = this.bitsDecoded;
  42323. var processedInverseMask = ~1;
  42324. var processedMask = 1;
  42325. var firstMagnitudeBitMask = 2;
  42326. for (var i0 = 0; i0 < height; i0 += 4) {
  42327. for (var j = 0; j < width; j++) {
  42328. var index = i0 * width + j;
  42329. for (var i1 = 0; i1 < 4; i1++, index += width) {
  42330. var i = i0 + i1;
  42331. if (i >= height) {
  42332. break;
  42333. }
  42334. // clear processed flag first
  42335. processingFlags[index] &= processedInverseMask;
  42336. if (coefficentsMagnitude[index] ||
  42337. !neighborsSignificance[index]) {
  42338. continue;
  42339. }
  42340. var contextLabel = labels[neighborsSignificance[index]];
  42341. var decision = decoder.readBit(contexts, contextLabel);
  42342. if (decision) {
  42343. var sign = this.decodeSignBit(i, j, index);
  42344. coefficentsSign[index] = sign;
  42345. coefficentsMagnitude[index] = 1;
  42346. this.setNeighborsSignificance(i, j, index);
  42347. processingFlags[index] |= firstMagnitudeBitMask;
  42348. }
  42349. bitsDecoded[index]++;
  42350. processingFlags[index] |= processedMask;
  42351. }
  42352. }
  42353. }
  42354. },
  42355. decodeSignBit: function BitModel_decodeSignBit(row, column, index) {
  42356. var width = this.width, height = this.height;
  42357. var coefficentsMagnitude = this.coefficentsMagnitude;
  42358. var coefficentsSign = this.coefficentsSign;
  42359. var contribution, sign0, sign1, significance1;
  42360. var contextLabel, decoded;
  42361. // calculate horizontal contribution
  42362. significance1 = (column > 0 && coefficentsMagnitude[index - 1] !== 0);
  42363. if (column + 1 < width && coefficentsMagnitude[index + 1] !== 0) {
  42364. sign1 = coefficentsSign[index + 1];
  42365. if (significance1) {
  42366. sign0 = coefficentsSign[index - 1];
  42367. contribution = 1 - sign1 - sign0;
  42368. } else {
  42369. contribution = 1 - sign1 - sign1;
  42370. }
  42371. } else if (significance1) {
  42372. sign0 = coefficentsSign[index - 1];
  42373. contribution = 1 - sign0 - sign0;
  42374. } else {
  42375. contribution = 0;
  42376. }
  42377. var horizontalContribution = 3 * contribution;
  42378. // calculate vertical contribution and combine with the horizontal
  42379. significance1 = (row > 0 && coefficentsMagnitude[index - width] !== 0);
  42380. if (row + 1 < height && coefficentsMagnitude[index + width] !== 0) {
  42381. sign1 = coefficentsSign[index + width];
  42382. if (significance1) {
  42383. sign0 = coefficentsSign[index - width];
  42384. contribution = 1 - sign1 - sign0 + horizontalContribution;
  42385. } else {
  42386. contribution = 1 - sign1 - sign1 + horizontalContribution;
  42387. }
  42388. } else if (significance1) {
  42389. sign0 = coefficentsSign[index - width];
  42390. contribution = 1 - sign0 - sign0 + horizontalContribution;
  42391. } else {
  42392. contribution = horizontalContribution;
  42393. }
  42394. if (contribution >= 0) {
  42395. contextLabel = 9 + contribution;
  42396. decoded = this.decoder.readBit(this.contexts, contextLabel);
  42397. } else {
  42398. contextLabel = 9 - contribution;
  42399. decoded = this.decoder.readBit(this.contexts, contextLabel) ^ 1;
  42400. }
  42401. return decoded;
  42402. },
  42403. runMagnitudeRefinementPass:
  42404. function BitModel_runMagnitudeRefinementPass() {
  42405. var decoder = this.decoder;
  42406. var width = this.width, height = this.height;
  42407. var coefficentsMagnitude = this.coefficentsMagnitude;
  42408. var neighborsSignificance = this.neighborsSignificance;
  42409. var contexts = this.contexts;
  42410. var bitsDecoded = this.bitsDecoded;
  42411. var processingFlags = this.processingFlags;
  42412. var processedMask = 1;
  42413. var firstMagnitudeBitMask = 2;
  42414. var length = width * height;
  42415. var width4 = width * 4;
  42416. for (var index0 = 0, indexNext; index0 < length; index0 = indexNext) {
  42417. indexNext = Math.min(length, index0 + width4);
  42418. for (var j = 0; j < width; j++) {
  42419. for (var index = index0 + j; index < indexNext; index += width) {
  42420. // significant but not those that have just become
  42421. if (!coefficentsMagnitude[index] ||
  42422. (processingFlags[index] & processedMask) !== 0) {
  42423. continue;
  42424. }
  42425. var contextLabel = 16;
  42426. if ((processingFlags[index] & firstMagnitudeBitMask) !== 0) {
  42427. processingFlags[index] ^= firstMagnitudeBitMask;
  42428. // first refinement
  42429. var significance = neighborsSignificance[index] & 127;
  42430. contextLabel = significance === 0 ? 15 : 14;
  42431. }
  42432. var bit = decoder.readBit(contexts, contextLabel);
  42433. coefficentsMagnitude[index] =
  42434. (coefficentsMagnitude[index] << 1) | bit;
  42435. bitsDecoded[index]++;
  42436. processingFlags[index] |= processedMask;
  42437. }
  42438. }
  42439. }
  42440. },
  42441. runCleanupPass: function BitModel_runCleanupPass() {
  42442. var decoder = this.decoder;
  42443. var width = this.width, height = this.height;
  42444. var neighborsSignificance = this.neighborsSignificance;
  42445. var coefficentsMagnitude = this.coefficentsMagnitude;
  42446. var coefficentsSign = this.coefficentsSign;
  42447. var contexts = this.contexts;
  42448. var labels = this.contextLabelTable;
  42449. var bitsDecoded = this.bitsDecoded;
  42450. var processingFlags = this.processingFlags;
  42451. var processedMask = 1;
  42452. var firstMagnitudeBitMask = 2;
  42453. var oneRowDown = width;
  42454. var twoRowsDown = width * 2;
  42455. var threeRowsDown = width * 3;
  42456. var iNext;
  42457. for (var i0 = 0; i0 < height; i0 = iNext) {
  42458. iNext = Math.min(i0 + 4, height);
  42459. var indexBase = i0 * width;
  42460. var checkAllEmpty = i0 + 3 < height;
  42461. for (var j = 0; j < width; j++) {
  42462. var index0 = indexBase + j;
  42463. // using the property: labels[neighborsSignificance[index]] == 0
  42464. // when neighborsSignificance[index] == 0
  42465. var allEmpty = (checkAllEmpty &&
  42466. processingFlags[index0] === 0 &&
  42467. processingFlags[index0 + oneRowDown] === 0 &&
  42468. processingFlags[index0 + twoRowsDown] === 0 &&
  42469. processingFlags[index0 + threeRowsDown] === 0 &&
  42470. neighborsSignificance[index0] === 0 &&
  42471. neighborsSignificance[index0 + oneRowDown] === 0 &&
  42472. neighborsSignificance[index0 + twoRowsDown] === 0 &&
  42473. neighborsSignificance[index0 + threeRowsDown] === 0);
  42474. var i1 = 0, index = index0;
  42475. var i = i0, sign;
  42476. if (allEmpty) {
  42477. var hasSignificantCoefficent =
  42478. decoder.readBit(contexts, RUNLENGTH_CONTEXT);
  42479. if (!hasSignificantCoefficent) {
  42480. bitsDecoded[index0]++;
  42481. bitsDecoded[index0 + oneRowDown]++;
  42482. bitsDecoded[index0 + twoRowsDown]++;
  42483. bitsDecoded[index0 + threeRowsDown]++;
  42484. continue; // next column
  42485. }
  42486. i1 = (decoder.readBit(contexts, UNIFORM_CONTEXT) << 1) |
  42487. decoder.readBit(contexts, UNIFORM_CONTEXT);
  42488. if (i1 !== 0) {
  42489. i = i0 + i1;
  42490. index += i1 * width;
  42491. }
  42492. sign = this.decodeSignBit(i, j, index);
  42493. coefficentsSign[index] = sign;
  42494. coefficentsMagnitude[index] = 1;
  42495. this.setNeighborsSignificance(i, j, index);
  42496. processingFlags[index] |= firstMagnitudeBitMask;
  42497. index = index0;
  42498. for (var i2 = i0; i2 <= i; i2++, index += width) {
  42499. bitsDecoded[index]++;
  42500. }
  42501. i1++;
  42502. }
  42503. for (i = i0 + i1; i < iNext; i++, index += width) {
  42504. if (coefficentsMagnitude[index] ||
  42505. (processingFlags[index] & processedMask) !== 0) {
  42506. continue;
  42507. }
  42508. var contextLabel = labels[neighborsSignificance[index]];
  42509. var decision = decoder.readBit(contexts, contextLabel);
  42510. if (decision === 1) {
  42511. sign = this.decodeSignBit(i, j, index);
  42512. coefficentsSign[index] = sign;
  42513. coefficentsMagnitude[index] = 1;
  42514. this.setNeighborsSignificance(i, j, index);
  42515. processingFlags[index] |= firstMagnitudeBitMask;
  42516. }
  42517. bitsDecoded[index]++;
  42518. }
  42519. }
  42520. }
  42521. },
  42522. checkSegmentationSymbol: function BitModel_checkSegmentationSymbol() {
  42523. var decoder = this.decoder;
  42524. var contexts = this.contexts;
  42525. var symbol = (decoder.readBit(contexts, UNIFORM_CONTEXT) << 3) |
  42526. (decoder.readBit(contexts, UNIFORM_CONTEXT) << 2) |
  42527. (decoder.readBit(contexts, UNIFORM_CONTEXT) << 1) |
  42528. decoder.readBit(contexts, UNIFORM_CONTEXT);
  42529. if (symbol != 0xA) {
  42530. throw 'Invalid segmentation symbol';
  42531. }
  42532. }
  42533. };
  42534. return BitModel;
  42535. })();
  42536. // Section F, Discrete wavelet transformation
  42537. var Transform = (function TransformClosure() {
  42538. function Transform() {}
  42539. Transform.prototype.calculate =
  42540. function transformCalculate(subbands, u0, v0) {
  42541. var ll = subbands[0];
  42542. for (var i = 1, ii = subbands.length; i < ii; i++) {
  42543. ll = this.iterate(ll, subbands[i], u0, v0);
  42544. }
  42545. return ll;
  42546. };
  42547. Transform.prototype.extend = function extend(buffer, offset, size) {
  42548. // Section F.3.7 extending... using max extension of 4
  42549. var i1 = offset - 1, j1 = offset + 1;
  42550. var i2 = offset + size - 2, j2 = offset + size;
  42551. buffer[i1--] = buffer[j1++];
  42552. buffer[j2++] = buffer[i2--];
  42553. buffer[i1--] = buffer[j1++];
  42554. buffer[j2++] = buffer[i2--];
  42555. buffer[i1--] = buffer[j1++];
  42556. buffer[j2++] = buffer[i2--];
  42557. buffer[i1] = buffer[j1];
  42558. buffer[j2] = buffer[i2];
  42559. };
  42560. Transform.prototype.iterate = function Transform_iterate(ll, hl_lh_hh,
  42561. u0, v0) {
  42562. var llWidth = ll.width, llHeight = ll.height, llItems = ll.items;
  42563. var width = hl_lh_hh.width;
  42564. var height = hl_lh_hh.height;
  42565. var items = hl_lh_hh.items;
  42566. var i, j, k, l, u, v;
  42567. // Interleave LL according to Section F.3.3
  42568. for (k = 0, i = 0; i < llHeight; i++) {
  42569. l = i * 2 * width;
  42570. for (j = 0; j < llWidth; j++, k++, l += 2) {
  42571. items[l] = llItems[k];
  42572. }
  42573. }
  42574. // The LL band is not needed anymore.
  42575. llItems = ll.items = null;
  42576. var bufferPadding = 4;
  42577. var rowBuffer = new Float32Array(width + 2 * bufferPadding);
  42578. // Section F.3.4 HOR_SR
  42579. if (width === 1) {
  42580. // if width = 1, when u0 even keep items as is, when odd divide by 2
  42581. if ((u0 & 1) !== 0) {
  42582. for (v = 0, k = 0; v < height; v++, k += width) {
  42583. items[k] *= 0.5;
  42584. }
  42585. }
  42586. } else {
  42587. for (v = 0, k = 0; v < height; v++, k += width) {
  42588. rowBuffer.set(items.subarray(k, k + width), bufferPadding);
  42589. this.extend(rowBuffer, bufferPadding, width);
  42590. this.filter(rowBuffer, bufferPadding, width);
  42591. items.set(
  42592. rowBuffer.subarray(bufferPadding, bufferPadding + width),
  42593. k);
  42594. }
  42595. }
  42596. // Accesses to the items array can take long, because it may not fit into
  42597. // CPU cache and has to be fetched from main memory. Since subsequent
  42598. // accesses to the items array are not local when reading columns, we
  42599. // have a cache miss every time. To reduce cache misses, get up to
  42600. // 'numBuffers' items at a time and store them into the individual
  42601. // buffers. The colBuffers should be small enough to fit into CPU cache.
  42602. var numBuffers = 16;
  42603. var colBuffers = [];
  42604. for (i = 0; i < numBuffers; i++) {
  42605. colBuffers.push(new Float32Array(height + 2 * bufferPadding));
  42606. }
  42607. var b, currentBuffer = 0;
  42608. ll = bufferPadding + height;
  42609. // Section F.3.5 VER_SR
  42610. if (height === 1) {
  42611. // if height = 1, when v0 even keep items as is, when odd divide by 2
  42612. if ((v0 & 1) !== 0) {
  42613. for (u = 0; u < width; u++) {
  42614. items[u] *= 0.5;
  42615. }
  42616. }
  42617. } else {
  42618. for (u = 0; u < width; u++) {
  42619. // if we ran out of buffers, copy several image columns at once
  42620. if (currentBuffer === 0) {
  42621. numBuffers = Math.min(width - u, numBuffers);
  42622. for (k = u, l = bufferPadding; l < ll; k += width, l++) {
  42623. for (b = 0; b < numBuffers; b++) {
  42624. colBuffers[b][l] = items[k + b];
  42625. }
  42626. }
  42627. currentBuffer = numBuffers;
  42628. }
  42629. currentBuffer--;
  42630. var buffer = colBuffers[currentBuffer];
  42631. this.extend(buffer, bufferPadding, height);
  42632. this.filter(buffer, bufferPadding, height);
  42633. // If this is last buffer in this group of buffers, flush all buffers.
  42634. if (currentBuffer === 0) {
  42635. k = u - numBuffers + 1;
  42636. for (l = bufferPadding; l < ll; k += width, l++) {
  42637. for (b = 0; b < numBuffers; b++) {
  42638. items[k + b] = colBuffers[b][l];
  42639. }
  42640. }
  42641. }
  42642. }
  42643. }
  42644. return {
  42645. width: width,
  42646. height: height,
  42647. items: items
  42648. };
  42649. };
  42650. return Transform;
  42651. })();
  42652. // Section 3.8.2 Irreversible 9-7 filter
  42653. var IrreversibleTransform = (function IrreversibleTransformClosure() {
  42654. function IrreversibleTransform() {
  42655. Transform.call(this);
  42656. }
  42657. IrreversibleTransform.prototype = Object.create(Transform.prototype);
  42658. IrreversibleTransform.prototype.filter =
  42659. function irreversibleTransformFilter(x, offset, length) {
  42660. var len = length >> 1;
  42661. offset = offset | 0;
  42662. var j, n, current, next;
  42663. var alpha = -1.586134342059924;
  42664. var beta = -0.052980118572961;
  42665. var gamma = 0.882911075530934;
  42666. var delta = 0.443506852043971;
  42667. var K = 1.230174104914001;
  42668. var K_ = 1 / K;
  42669. // step 1 is combined with step 3
  42670. // step 2
  42671. j = offset - 3;
  42672. for (n = len + 4; n--; j += 2) {
  42673. x[j] *= K_;
  42674. }
  42675. // step 1 & 3
  42676. j = offset - 2;
  42677. current = delta * x[j -1];
  42678. for (n = len + 3; n--; j += 2) {
  42679. next = delta * x[j + 1];
  42680. x[j] = K * x[j] - current - next;
  42681. if (n--) {
  42682. j += 2;
  42683. current = delta * x[j + 1];
  42684. x[j] = K * x[j] - current - next;
  42685. } else {
  42686. break;
  42687. }
  42688. }
  42689. // step 4
  42690. j = offset - 1;
  42691. current = gamma * x[j - 1];
  42692. for (n = len + 2; n--; j += 2) {
  42693. next = gamma * x[j + 1];
  42694. x[j] -= current + next;
  42695. if (n--) {
  42696. j += 2;
  42697. current = gamma * x[j + 1];
  42698. x[j] -= current + next;
  42699. } else {
  42700. break;
  42701. }
  42702. }
  42703. // step 5
  42704. j = offset;
  42705. current = beta * x[j - 1];
  42706. for (n = len + 1; n--; j += 2) {
  42707. next = beta * x[j + 1];
  42708. x[j] -= current + next;
  42709. if (n--) {
  42710. j += 2;
  42711. current = beta * x[j + 1];
  42712. x[j] -= current + next;
  42713. } else {
  42714. break;
  42715. }
  42716. }
  42717. // step 6
  42718. if (len !== 0) {
  42719. j = offset + 1;
  42720. current = alpha * x[j - 1];
  42721. for (n = len; n--; j += 2) {
  42722. next = alpha * x[j + 1];
  42723. x[j] -= current + next;
  42724. if (n--) {
  42725. j += 2;
  42726. current = alpha * x[j + 1];
  42727. x[j] -= current + next;
  42728. } else {
  42729. break;
  42730. }
  42731. }
  42732. }
  42733. };
  42734. return IrreversibleTransform;
  42735. })();
  42736. // Section 3.8.1 Reversible 5-3 filter
  42737. var ReversibleTransform = (function ReversibleTransformClosure() {
  42738. function ReversibleTransform() {
  42739. Transform.call(this);
  42740. }
  42741. ReversibleTransform.prototype = Object.create(Transform.prototype);
  42742. ReversibleTransform.prototype.filter =
  42743. function reversibleTransformFilter(x, offset, length) {
  42744. var len = length >> 1;
  42745. offset = offset | 0;
  42746. var j, n;
  42747. for (j = offset, n = len + 1; n--; j += 2) {
  42748. x[j] -= (x[j - 1] + x[j + 1] + 2) >> 2;
  42749. }
  42750. for (j = offset + 1, n = len; n--; j += 2) {
  42751. x[j] += (x[j - 1] + x[j + 1]) >> 1;
  42752. }
  42753. };
  42754. return ReversibleTransform;
  42755. })();
  42756. return JpxImage;
  42757. })();
  42758. var Jbig2Image = (function Jbig2ImageClosure() {
  42759. // Utility data structures
  42760. function ContextCache() {}
  42761. ContextCache.prototype = {
  42762. getContexts: function(id) {
  42763. if (id in this) {
  42764. return this[id];
  42765. }
  42766. return (this[id] = new Int8Array(1<<16));
  42767. }
  42768. };
  42769. function DecodingContext(data, start, end) {
  42770. this.data = data;
  42771. this.start = start;
  42772. this.end = end;
  42773. }
  42774. DecodingContext.prototype = {
  42775. get decoder() {
  42776. var decoder = new ArithmeticDecoder(this.data, this.start, this.end);
  42777. return shadow(this, 'decoder', decoder);
  42778. },
  42779. get contextCache() {
  42780. var cache = new ContextCache();
  42781. return shadow(this, 'contextCache', cache);
  42782. }
  42783. };
  42784. // Annex A. Arithmetic Integer Decoding Procedure
  42785. // A.2 Procedure for decoding values
  42786. function decodeInteger(contextCache, procedure, decoder) {
  42787. var contexts = contextCache.getContexts(procedure);
  42788. var prev = 1;
  42789. var state = 1, v = 0, s;
  42790. var toRead = 32, offset = 4436; // defaults for state 7
  42791. while (state) {
  42792. var bit = decoder.readBit(contexts, prev);
  42793. prev = (prev < 256 ? (prev << 1) | bit :
  42794. (((prev << 1) | bit) & 511) | 256);
  42795. switch (state) {
  42796. case 1:
  42797. s = !!bit;
  42798. break;
  42799. case 2:
  42800. if (bit) {
  42801. break;
  42802. }
  42803. state = 7;
  42804. toRead = 2;
  42805. offset = 0;
  42806. break;
  42807. case 3:
  42808. if (bit) {
  42809. break;
  42810. }
  42811. state = 7;
  42812. toRead = 4;
  42813. offset = 4;
  42814. break;
  42815. case 4:
  42816. if (bit) {
  42817. break;
  42818. }
  42819. state = 7;
  42820. toRead = 6;
  42821. offset = 20;
  42822. break;
  42823. case 5:
  42824. if (bit) {
  42825. break;
  42826. }
  42827. state = 7;
  42828. toRead = 8;
  42829. offset = 84;
  42830. break;
  42831. case 6:
  42832. if (bit) {
  42833. break;
  42834. }
  42835. state = 7;
  42836. toRead = 12;
  42837. offset = 340;
  42838. break;
  42839. default:
  42840. v = ((v << 1) | bit) >>> 0;
  42841. if (--toRead === 0) {
  42842. state = 0;
  42843. }
  42844. continue;
  42845. }
  42846. state++;
  42847. }
  42848. v += offset;
  42849. return (!s ? v : (v > 0 ? -v : null));
  42850. }
  42851. // A.3 The IAID decoding procedure
  42852. function decodeIAID(contextCache, decoder, codeLength) {
  42853. var contexts = contextCache.getContexts('IAID');
  42854. var prev = 1;
  42855. for (var i = 0; i < codeLength; i++) {
  42856. var bit = decoder.readBit(contexts, prev);
  42857. prev = (prev << 1) | bit;
  42858. }
  42859. if (codeLength < 31) {
  42860. return prev & ((1 << codeLength) - 1);
  42861. }
  42862. return prev & 0x7FFFFFFF;
  42863. }
  42864. // 7.3 Segment types
  42865. var SegmentTypes = [
  42866. 'SymbolDictionary', null, null, null, 'IntermediateTextRegion', null,
  42867. 'ImmediateTextRegion', 'ImmediateLosslessTextRegion', null, null, null,
  42868. null, null, null, null, null, 'patternDictionary', null, null, null,
  42869. 'IntermediateHalftoneRegion', null, 'ImmediateHalftoneRegion',
  42870. 'ImmediateLosslessHalftoneRegion', null, null, null, null, null, null, null,
  42871. null, null, null, null, null, 'IntermediateGenericRegion', null,
  42872. 'ImmediateGenericRegion', 'ImmediateLosslessGenericRegion',
  42873. 'IntermediateGenericRefinementRegion', null,
  42874. 'ImmediateGenericRefinementRegion',
  42875. 'ImmediateLosslessGenericRefinementRegion', null, null, null, null,
  42876. 'PageInformation', 'EndOfPage', 'EndOfStripe', 'EndOfFile', 'Profiles',
  42877. 'Tables', null, null, null, null, null, null, null, null,
  42878. 'Extension'
  42879. ];
  42880. var CodingTemplates = [
  42881. [{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: -2, y: -1},
  42882. {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: 2, y: -1},
  42883. {x: -4, y: 0}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}],
  42884. [{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: 2, y: -2},
  42885. {x: -2, y: -1}, {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1},
  42886. {x: 2, y: -1}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}],
  42887. [{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: -2, y: -1},
  42888. {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: -2, y: 0},
  42889. {x: -1, y: 0}],
  42890. [{x: -3, y: -1}, {x: -2, y: -1}, {x: -1, y: -1}, {x: 0, y: -1},
  42891. {x: 1, y: -1}, {x: -4, y: 0}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}]
  42892. ];
  42893. var RefinementTemplates = [
  42894. {
  42895. coding: [{x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}],
  42896. reference: [{x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}, {x: 0, y: 0},
  42897. {x: 1, y: 0}, {x: -1, y: 1}, {x: 0, y: 1}, {x: 1, y: 1}]
  42898. },
  42899. {
  42900. coding: [{x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}],
  42901. reference: [{x: 0, y: -1}, {x: -1, y: 0}, {x: 0, y: 0}, {x: 1, y: 0},
  42902. {x: 0, y: 1}, {x: 1, y: 1}]
  42903. }
  42904. ];
  42905. var ReusedContexts = [
  42906. 0x1CD3, // '00111001101' (template) + '0011' (at),
  42907. 0x079A, // '001111001101' + '0',
  42908. 0x00E3, // '001110001' + '1',
  42909. 0x018B // '011000101' + '1'
  42910. ];
  42911. var RefinementReusedContexts = [
  42912. 0x0020, // '000' + '0' (coding) + '00010000' + '0' (reference)
  42913. 0x0008 // '0000' + '001000'
  42914. ];
  42915. // 6.2 Generic Region Decoding Procedure
  42916. function decodeBitmap(mmr, width, height, templateIndex, prediction, skip, at,
  42917. decodingContext) {
  42918. if (mmr) {
  42919. error('JBIG2 error: MMR encoding is not supported');
  42920. }
  42921. var useskip = !!skip;
  42922. var template = CodingTemplates[templateIndex].concat(at);
  42923. // Sorting is non-standard, and it is not required. But sorting increases
  42924. // the number of template bits that can be reused from the previous
  42925. // contextLabel in the main loop.
  42926. template.sort(function (a, b) {
  42927. return (a.y - b.y) || (a.x - b.x);
  42928. });
  42929. var templateLength = template.length;
  42930. var templateX = new Int8Array(templateLength);
  42931. var templateY = new Int8Array(templateLength);
  42932. var changingTemplateEntries = [];
  42933. var reuseMask = 0, minX = 0, maxX = 0, minY = 0;
  42934. var c, k;
  42935. for (k = 0; k < templateLength; k++) {
  42936. templateX[k] = template[k].x;
  42937. templateY[k] = template[k].y;
  42938. minX = Math.min(minX, template[k].x);
  42939. maxX = Math.max(maxX, template[k].x);
  42940. minY = Math.min(minY, template[k].y);
  42941. // Check if the template pixel appears in two consecutive context labels,
  42942. // so it can be reused. Otherwise, we add it to the list of changing
  42943. // template entries.
  42944. if (k < templateLength - 1 &&
  42945. template[k].y === template[k + 1].y &&
  42946. template[k].x === template[k + 1].x - 1) {
  42947. reuseMask |= 1 << (templateLength - 1 - k);
  42948. } else {
  42949. changingTemplateEntries.push(k);
  42950. }
  42951. }
  42952. var changingEntriesLength = changingTemplateEntries.length;
  42953. var changingTemplateX = new Int8Array(changingEntriesLength);
  42954. var changingTemplateY = new Int8Array(changingEntriesLength);
  42955. var changingTemplateBit = new Uint16Array(changingEntriesLength);
  42956. for (c = 0; c < changingEntriesLength; c++) {
  42957. k = changingTemplateEntries[c];
  42958. changingTemplateX[c] = template[k].x;
  42959. changingTemplateY[c] = template[k].y;
  42960. changingTemplateBit[c] = 1 << (templateLength - 1 - k);
  42961. }
  42962. // Get the safe bounding box edges from the width, height, minX, maxX, minY
  42963. var sbb_left = -minX;
  42964. var sbb_top = -minY;
  42965. var sbb_right = width - maxX;
  42966. var pseudoPixelContext = ReusedContexts[templateIndex];
  42967. var row = new Uint8Array(width);
  42968. var bitmap = [];
  42969. var decoder = decodingContext.decoder;
  42970. var contexts = decodingContext.contextCache.getContexts('GB');
  42971. var ltp = 0, j, i0, j0, contextLabel = 0, bit, shift;
  42972. for (var i = 0; i < height; i++) {
  42973. if (prediction) {
  42974. var sltp = decoder.readBit(contexts, pseudoPixelContext);
  42975. ltp ^= sltp;
  42976. if (ltp) {
  42977. bitmap.push(row); // duplicate previous row
  42978. continue;
  42979. }
  42980. }
  42981. row = new Uint8Array(row);
  42982. bitmap.push(row);
  42983. for (j = 0; j < width; j++) {
  42984. if (useskip && skip[i][j]) {
  42985. row[j] = 0;
  42986. continue;
  42987. }
  42988. // Are we in the middle of a scanline, so we can reuse contextLabel
  42989. // bits?
  42990. if (j >= sbb_left && j < sbb_right && i >= sbb_top) {
  42991. // If yes, we can just shift the bits that are reusable and only
  42992. // fetch the remaining ones.
  42993. contextLabel = (contextLabel << 1) & reuseMask;
  42994. for (k = 0; k < changingEntriesLength; k++) {
  42995. i0 = i + changingTemplateY[k];
  42996. j0 = j + changingTemplateX[k];
  42997. bit = bitmap[i0][j0];
  42998. if (bit) {
  42999. bit = changingTemplateBit[k];
  43000. contextLabel |= bit;
  43001. }
  43002. }
  43003. } else {
  43004. // compute the contextLabel from scratch
  43005. contextLabel = 0;
  43006. shift = templateLength - 1;
  43007. for (k = 0; k < templateLength; k++, shift--) {
  43008. j0 = j + templateX[k];
  43009. if (j0 >= 0 && j0 < width) {
  43010. i0 = i + templateY[k];
  43011. if (i0 >= 0) {
  43012. bit = bitmap[i0][j0];
  43013. if (bit) {
  43014. contextLabel |= bit << shift;
  43015. }
  43016. }
  43017. }
  43018. }
  43019. }
  43020. var pixel = decoder.readBit(contexts, contextLabel);
  43021. row[j] = pixel;
  43022. }
  43023. }
  43024. return bitmap;
  43025. }
  43026. // 6.3.2 Generic Refinement Region Decoding Procedure
  43027. function decodeRefinement(width, height, templateIndex, referenceBitmap,
  43028. offsetX, offsetY, prediction, at,
  43029. decodingContext) {
  43030. var codingTemplate = RefinementTemplates[templateIndex].coding;
  43031. if (templateIndex === 0) {
  43032. codingTemplate = codingTemplate.concat([at[0]]);
  43033. }
  43034. var codingTemplateLength = codingTemplate.length;
  43035. var codingTemplateX = new Int32Array(codingTemplateLength);
  43036. var codingTemplateY = new Int32Array(codingTemplateLength);
  43037. var k;
  43038. for (k = 0; k < codingTemplateLength; k++) {
  43039. codingTemplateX[k] = codingTemplate[k].x;
  43040. codingTemplateY[k] = codingTemplate[k].y;
  43041. }
  43042. var referenceTemplate = RefinementTemplates[templateIndex].reference;
  43043. if (templateIndex === 0) {
  43044. referenceTemplate = referenceTemplate.concat([at[1]]);
  43045. }
  43046. var referenceTemplateLength = referenceTemplate.length;
  43047. var referenceTemplateX = new Int32Array(referenceTemplateLength);
  43048. var referenceTemplateY = new Int32Array(referenceTemplateLength);
  43049. for (k = 0; k < referenceTemplateLength; k++) {
  43050. referenceTemplateX[k] = referenceTemplate[k].x;
  43051. referenceTemplateY[k] = referenceTemplate[k].y;
  43052. }
  43053. var referenceWidth = referenceBitmap[0].length;
  43054. var referenceHeight = referenceBitmap.length;
  43055. var pseudoPixelContext = RefinementReusedContexts[templateIndex];
  43056. var bitmap = [];
  43057. var decoder = decodingContext.decoder;
  43058. var contexts = decodingContext.contextCache.getContexts('GR');
  43059. var ltp = 0;
  43060. for (var i = 0; i < height; i++) {
  43061. if (prediction) {
  43062. var sltp = decoder.readBit(contexts, pseudoPixelContext);
  43063. ltp ^= sltp;
  43064. if (ltp) {
  43065. error('JBIG2 error: prediction is not supported');
  43066. }
  43067. }
  43068. var row = new Uint8Array(width);
  43069. bitmap.push(row);
  43070. for (var j = 0; j < width; j++) {
  43071. var i0, j0;
  43072. var contextLabel = 0;
  43073. for (k = 0; k < codingTemplateLength; k++) {
  43074. i0 = i + codingTemplateY[k];
  43075. j0 = j + codingTemplateX[k];
  43076. if (i0 < 0 || j0 < 0 || j0 >= width) {
  43077. contextLabel <<= 1; // out of bound pixel
  43078. } else {
  43079. contextLabel = (contextLabel << 1) | bitmap[i0][j0];
  43080. }
  43081. }
  43082. for (k = 0; k < referenceTemplateLength; k++) {
  43083. i0 = i + referenceTemplateY[k] + offsetY;
  43084. j0 = j + referenceTemplateX[k] + offsetX;
  43085. if (i0 < 0 || i0 >= referenceHeight || j0 < 0 ||
  43086. j0 >= referenceWidth) {
  43087. contextLabel <<= 1; // out of bound pixel
  43088. } else {
  43089. contextLabel = (contextLabel << 1) | referenceBitmap[i0][j0];
  43090. }
  43091. }
  43092. var pixel = decoder.readBit(contexts, contextLabel);
  43093. row[j] = pixel;
  43094. }
  43095. }
  43096. return bitmap;
  43097. }
  43098. // 6.5.5 Decoding the symbol dictionary
  43099. function decodeSymbolDictionary(huffman, refinement, symbols,
  43100. numberOfNewSymbols, numberOfExportedSymbols,
  43101. huffmanTables, templateIndex, at,
  43102. refinementTemplateIndex, refinementAt,
  43103. decodingContext) {
  43104. if (huffman) {
  43105. error('JBIG2 error: huffman is not supported');
  43106. }
  43107. var newSymbols = [];
  43108. var currentHeight = 0;
  43109. var symbolCodeLength = log2(symbols.length + numberOfNewSymbols);
  43110. var decoder = decodingContext.decoder;
  43111. var contextCache = decodingContext.contextCache;
  43112. while (newSymbols.length < numberOfNewSymbols) {
  43113. var deltaHeight = decodeInteger(contextCache, 'IADH', decoder); // 6.5.6
  43114. currentHeight += deltaHeight;
  43115. var currentWidth = 0;
  43116. var totalWidth = 0;
  43117. while (true) {
  43118. var deltaWidth = decodeInteger(contextCache, 'IADW', decoder); // 6.5.7
  43119. if (deltaWidth === null) {
  43120. break; // OOB
  43121. }
  43122. currentWidth += deltaWidth;
  43123. totalWidth += currentWidth;
  43124. var bitmap;
  43125. if (refinement) {
  43126. // 6.5.8.2 Refinement/aggregate-coded symbol bitmap
  43127. var numberOfInstances = decodeInteger(contextCache, 'IAAI', decoder);
  43128. if (numberOfInstances > 1) {
  43129. bitmap = decodeTextRegion(huffman, refinement,
  43130. currentWidth, currentHeight, 0,
  43131. numberOfInstances, 1, //strip size
  43132. symbols.concat(newSymbols),
  43133. symbolCodeLength,
  43134. 0, //transposed
  43135. 0, //ds offset
  43136. 1, //top left 7.4.3.1.1
  43137. 0, //OR operator
  43138. huffmanTables,
  43139. refinementTemplateIndex, refinementAt,
  43140. decodingContext);
  43141. } else {
  43142. var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength);
  43143. var rdx = decodeInteger(contextCache, 'IARDX', decoder); // 6.4.11.3
  43144. var rdy = decodeInteger(contextCache, 'IARDY', decoder); // 6.4.11.4
  43145. var symbol = (symbolId < symbols.length ? symbols[symbolId] :
  43146. newSymbols[symbolId - symbols.length]);
  43147. bitmap = decodeRefinement(currentWidth, currentHeight,
  43148. refinementTemplateIndex, symbol, rdx, rdy, false, refinementAt,
  43149. decodingContext);
  43150. }
  43151. } else {
  43152. // 6.5.8.1 Direct-coded symbol bitmap
  43153. bitmap = decodeBitmap(false, currentWidth, currentHeight,
  43154. templateIndex, false, null, at, decodingContext);
  43155. }
  43156. newSymbols.push(bitmap);
  43157. }
  43158. }
  43159. // 6.5.10 Exported symbols
  43160. var exportedSymbols = [];
  43161. var flags = [], currentFlag = false;
  43162. var totalSymbolsLength = symbols.length + numberOfNewSymbols;
  43163. while (flags.length < totalSymbolsLength) {
  43164. var runLength = decodeInteger(contextCache, 'IAEX', decoder);
  43165. while (runLength--) {
  43166. flags.push(currentFlag);
  43167. }
  43168. currentFlag = !currentFlag;
  43169. }
  43170. for (var i = 0, ii = symbols.length; i < ii; i++) {
  43171. if (flags[i]) {
  43172. exportedSymbols.push(symbols[i]);
  43173. }
  43174. }
  43175. for (var j = 0; j < numberOfNewSymbols; i++, j++) {
  43176. if (flags[i]) {
  43177. exportedSymbols.push(newSymbols[j]);
  43178. }
  43179. }
  43180. return exportedSymbols;
  43181. }
  43182. function decodeTextRegion(huffman, refinement, width, height,
  43183. defaultPixelValue, numberOfSymbolInstances,
  43184. stripSize, inputSymbols, symbolCodeLength,
  43185. transposed, dsOffset, referenceCorner,
  43186. combinationOperator, huffmanTables,
  43187. refinementTemplateIndex, refinementAt,
  43188. decodingContext) {
  43189. if (huffman) {
  43190. error('JBIG2 error: huffman is not supported');
  43191. }
  43192. // Prepare bitmap
  43193. var bitmap = [];
  43194. var i, row;
  43195. for (i = 0; i < height; i++) {
  43196. row = new Uint8Array(width);
  43197. if (defaultPixelValue) {
  43198. for (var j = 0; j < width; j++) {
  43199. row[j] = defaultPixelValue;
  43200. }
  43201. }
  43202. bitmap.push(row);
  43203. }
  43204. var decoder = decodingContext.decoder;
  43205. var contextCache = decodingContext.contextCache;
  43206. var stripT = -decodeInteger(contextCache, 'IADT', decoder); // 6.4.6
  43207. var firstS = 0;
  43208. i = 0;
  43209. while (i < numberOfSymbolInstances) {
  43210. var deltaT = decodeInteger(contextCache, 'IADT', decoder); // 6.4.6
  43211. stripT += deltaT;
  43212. var deltaFirstS = decodeInteger(contextCache, 'IAFS', decoder); // 6.4.7
  43213. firstS += deltaFirstS;
  43214. var currentS = firstS;
  43215. do {
  43216. var currentT = (stripSize == 1 ? 0 :
  43217. decodeInteger(contextCache, 'IAIT', decoder)); // 6.4.9
  43218. var t = stripSize * stripT + currentT;
  43219. var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength);
  43220. var applyRefinement = (refinement &&
  43221. decodeInteger(contextCache, 'IARI', decoder));
  43222. var symbolBitmap = inputSymbols[symbolId];
  43223. var symbolWidth = symbolBitmap[0].length;
  43224. var symbolHeight = symbolBitmap.length;
  43225. if (applyRefinement) {
  43226. var rdw = decodeInteger(contextCache, 'IARDW', decoder); // 6.4.11.1
  43227. var rdh = decodeInteger(contextCache, 'IARDH', decoder); // 6.4.11.2
  43228. var rdx = decodeInteger(contextCache, 'IARDX', decoder); // 6.4.11.3
  43229. var rdy = decodeInteger(contextCache, 'IARDY', decoder); // 6.4.11.4
  43230. symbolWidth += rdw;
  43231. symbolHeight += rdh;
  43232. symbolBitmap = decodeRefinement(symbolWidth, symbolHeight,
  43233. refinementTemplateIndex, symbolBitmap, (rdw >> 1) + rdx,
  43234. (rdh >> 1) + rdy, false, refinementAt,
  43235. decodingContext);
  43236. }
  43237. var offsetT = t - ((referenceCorner & 1) ? 0 : symbolHeight);
  43238. var offsetS = currentS - ((referenceCorner & 2) ? symbolWidth : 0);
  43239. var s2, t2, symbolRow;
  43240. if (transposed) {
  43241. // Place Symbol Bitmap from T1,S1
  43242. for (s2 = 0; s2 < symbolHeight; s2++) {
  43243. row = bitmap[offsetS + s2];
  43244. if (!row) {
  43245. continue;
  43246. }
  43247. symbolRow = symbolBitmap[s2];
  43248. // To ignore Parts of Symbol bitmap which goes
  43249. // outside bitmap region
  43250. var maxWidth = Math.min(width - offsetT, symbolWidth);
  43251. switch (combinationOperator) {
  43252. case 0: // OR
  43253. for (t2 = 0; t2 < maxWidth; t2++) {
  43254. row[offsetT + t2] |= symbolRow[t2];
  43255. }
  43256. break;
  43257. case 2: // XOR
  43258. for (t2 = 0; t2 < maxWidth; t2++) {
  43259. row[offsetT + t2] ^= symbolRow[t2];
  43260. }
  43261. break;
  43262. default:
  43263. error('JBIG2 error: operator ' + combinationOperator +
  43264. ' is not supported');
  43265. }
  43266. }
  43267. currentS += symbolHeight - 1;
  43268. } else {
  43269. for (t2 = 0; t2 < symbolHeight; t2++) {
  43270. row = bitmap[offsetT + t2];
  43271. if (!row) {
  43272. continue;
  43273. }
  43274. symbolRow = symbolBitmap[t2];
  43275. switch (combinationOperator) {
  43276. case 0: // OR
  43277. for (s2 = 0; s2 < symbolWidth; s2++) {
  43278. row[offsetS + s2] |= symbolRow[s2];
  43279. }
  43280. break;
  43281. case 2: // XOR
  43282. for (s2 = 0; s2 < symbolWidth; s2++) {
  43283. row[offsetS + s2] ^= symbolRow[s2];
  43284. }
  43285. break;
  43286. default:
  43287. error('JBIG2 error: operator ' + combinationOperator +
  43288. ' is not supported');
  43289. }
  43290. }
  43291. currentS += symbolWidth - 1;
  43292. }
  43293. i++;
  43294. var deltaS = decodeInteger(contextCache, 'IADS', decoder); // 6.4.8
  43295. if (deltaS === null) {
  43296. break; // OOB
  43297. }
  43298. currentS += deltaS + dsOffset;
  43299. } while (true);
  43300. }
  43301. return bitmap;
  43302. }
  43303. function readSegmentHeader(data, start) {
  43304. var segmentHeader = {};
  43305. segmentHeader.number = readUint32(data, start);
  43306. var flags = data[start + 4];
  43307. var segmentType = flags & 0x3F;
  43308. if (!SegmentTypes[segmentType]) {
  43309. error('JBIG2 error: invalid segment type: ' + segmentType);
  43310. }
  43311. segmentHeader.type = segmentType;
  43312. segmentHeader.typeName = SegmentTypes[segmentType];
  43313. segmentHeader.deferredNonRetain = !!(flags & 0x80);
  43314. var pageAssociationFieldSize = !!(flags & 0x40);
  43315. var referredFlags = data[start + 5];
  43316. var referredToCount = (referredFlags >> 5) & 7;
  43317. var retainBits = [referredFlags & 31];
  43318. var position = start + 6;
  43319. if (referredFlags == 7) {
  43320. referredToCount = readUint32(data, position - 1) & 0x1FFFFFFF;
  43321. position += 3;
  43322. var bytes = (referredToCount + 7) >> 3;
  43323. retainBits[0] = data[position++];
  43324. while (--bytes > 0) {
  43325. retainBits.push(data[position++]);
  43326. }
  43327. } else if (referredFlags == 5 || referredFlags == 6) {
  43328. error('JBIG2 error: invalid referred-to flags');
  43329. }
  43330. segmentHeader.retainBits = retainBits;
  43331. var referredToSegmentNumberSize = (segmentHeader.number <= 256 ? 1 :
  43332. (segmentHeader.number <= 65536 ? 2 : 4));
  43333. var referredTo = [];
  43334. var i, ii;
  43335. for (i = 0; i < referredToCount; i++) {
  43336. var number = (referredToSegmentNumberSize == 1 ? data[position] :
  43337. (referredToSegmentNumberSize == 2 ? readUint16(data, position) :
  43338. readUint32(data, position)));
  43339. referredTo.push(number);
  43340. position += referredToSegmentNumberSize;
  43341. }
  43342. segmentHeader.referredTo = referredTo;
  43343. if (!pageAssociationFieldSize) {
  43344. segmentHeader.pageAssociation = data[position++];
  43345. } else {
  43346. segmentHeader.pageAssociation = readUint32(data, position);
  43347. position += 4;
  43348. }
  43349. segmentHeader.length = readUint32(data, position);
  43350. position += 4;
  43351. if (segmentHeader.length == 0xFFFFFFFF) {
  43352. // 7.2.7 Segment data length, unknown segment length
  43353. if (segmentType === 38) { // ImmediateGenericRegion
  43354. var genericRegionInfo = readRegionSegmentInformation(data, position);
  43355. var genericRegionSegmentFlags = data[position +
  43356. RegionSegmentInformationFieldLength];
  43357. var genericRegionMmr = !!(genericRegionSegmentFlags & 1);
  43358. // searching for the segment end
  43359. var searchPatternLength = 6;
  43360. var searchPattern = new Uint8Array(searchPatternLength);
  43361. if (!genericRegionMmr) {
  43362. searchPattern[0] = 0xFF;
  43363. searchPattern[1] = 0xAC;
  43364. }
  43365. searchPattern[2] = (genericRegionInfo.height >>> 24) & 0xFF;
  43366. searchPattern[3] = (genericRegionInfo.height >> 16) & 0xFF;
  43367. searchPattern[4] = (genericRegionInfo.height >> 8) & 0xFF;
  43368. searchPattern[5] = genericRegionInfo.height & 0xFF;
  43369. for (i = position, ii = data.length; i < ii; i++) {
  43370. var j = 0;
  43371. while (j < searchPatternLength && searchPattern[j] === data[i + j]) {
  43372. j++;
  43373. }
  43374. if (j == searchPatternLength) {
  43375. segmentHeader.length = i + searchPatternLength;
  43376. break;
  43377. }
  43378. }
  43379. if (segmentHeader.length == 0xFFFFFFFF) {
  43380. error('JBIG2 error: segment end was not found');
  43381. }
  43382. } else {
  43383. error('JBIG2 error: invalid unknown segment length');
  43384. }
  43385. }
  43386. segmentHeader.headerEnd = position;
  43387. return segmentHeader;
  43388. }
  43389. function readSegments(header, data, start, end) {
  43390. var segments = [];
  43391. var position = start;
  43392. while (position < end) {
  43393. var segmentHeader = readSegmentHeader(data, position);
  43394. position = segmentHeader.headerEnd;
  43395. var segment = {
  43396. header: segmentHeader,
  43397. data: data
  43398. };
  43399. if (!header.randomAccess) {
  43400. segment.start = position;
  43401. position += segmentHeader.length;
  43402. segment.end = position;
  43403. }
  43404. segments.push(segment);
  43405. if (segmentHeader.type == 51) {
  43406. break; // end of file is found
  43407. }
  43408. }
  43409. if (header.randomAccess) {
  43410. for (var i = 0, ii = segments.length; i < ii; i++) {
  43411. segments[i].start = position;
  43412. position += segments[i].header.length;
  43413. segments[i].end = position;
  43414. }
  43415. }
  43416. return segments;
  43417. }
  43418. // 7.4.1 Region segment information field
  43419. function readRegionSegmentInformation(data, start) {
  43420. return {
  43421. width: readUint32(data, start),
  43422. height: readUint32(data, start + 4),
  43423. x: readUint32(data, start + 8),
  43424. y: readUint32(data, start + 12),
  43425. combinationOperator: data[start + 16] & 7
  43426. };
  43427. }
  43428. var RegionSegmentInformationFieldLength = 17;
  43429. function processSegment(segment, visitor) {
  43430. var header = segment.header;
  43431. var data = segment.data, position = segment.start, end = segment.end;
  43432. var args, at, i, atLength;
  43433. switch (header.type) {
  43434. case 0: // SymbolDictionary
  43435. // 7.4.2 Symbol dictionary segment syntax
  43436. var dictionary = {};
  43437. var dictionaryFlags = readUint16(data, position); // 7.4.2.1.1
  43438. dictionary.huffman = !!(dictionaryFlags & 1);
  43439. dictionary.refinement = !!(dictionaryFlags & 2);
  43440. dictionary.huffmanDHSelector = (dictionaryFlags >> 2) & 3;
  43441. dictionary.huffmanDWSelector = (dictionaryFlags >> 4) & 3;
  43442. dictionary.bitmapSizeSelector = (dictionaryFlags >> 6) & 1;
  43443. dictionary.aggregationInstancesSelector = (dictionaryFlags >> 7) & 1;
  43444. dictionary.bitmapCodingContextUsed = !!(dictionaryFlags & 256);
  43445. dictionary.bitmapCodingContextRetained = !!(dictionaryFlags & 512);
  43446. dictionary.template = (dictionaryFlags >> 10) & 3;
  43447. dictionary.refinementTemplate = (dictionaryFlags >> 12) & 1;
  43448. position += 2;
  43449. if (!dictionary.huffman) {
  43450. atLength = dictionary.template === 0 ? 4 : 1;
  43451. at = [];
  43452. for (i = 0; i < atLength; i++) {
  43453. at.push({
  43454. x: readInt8(data, position),
  43455. y: readInt8(data, position + 1)
  43456. });
  43457. position += 2;
  43458. }
  43459. dictionary.at = at;
  43460. }
  43461. if (dictionary.refinement && !dictionary.refinementTemplate) {
  43462. at = [];
  43463. for (i = 0; i < 2; i++) {
  43464. at.push({
  43465. x: readInt8(data, position),
  43466. y: readInt8(data, position + 1)
  43467. });
  43468. position += 2;
  43469. }
  43470. dictionary.refinementAt = at;
  43471. }
  43472. dictionary.numberOfExportedSymbols = readUint32(data, position);
  43473. position += 4;
  43474. dictionary.numberOfNewSymbols = readUint32(data, position);
  43475. position += 4;
  43476. args = [dictionary, header.number, header.referredTo,
  43477. data, position, end];
  43478. break;
  43479. case 6: // ImmediateTextRegion
  43480. case 7: // ImmediateLosslessTextRegion
  43481. var textRegion = {};
  43482. textRegion.info = readRegionSegmentInformation(data, position);
  43483. position += RegionSegmentInformationFieldLength;
  43484. var textRegionSegmentFlags = readUint16(data, position);
  43485. position += 2;
  43486. textRegion.huffman = !!(textRegionSegmentFlags & 1);
  43487. textRegion.refinement = !!(textRegionSegmentFlags & 2);
  43488. textRegion.stripSize = 1 << ((textRegionSegmentFlags >> 2) & 3);
  43489. textRegion.referenceCorner = (textRegionSegmentFlags >> 4) & 3;
  43490. textRegion.transposed = !!(textRegionSegmentFlags & 64);
  43491. textRegion.combinationOperator = (textRegionSegmentFlags >> 7) & 3;
  43492. textRegion.defaultPixelValue = (textRegionSegmentFlags >> 9) & 1;
  43493. textRegion.dsOffset = (textRegionSegmentFlags << 17) >> 27;
  43494. textRegion.refinementTemplate = (textRegionSegmentFlags >> 15) & 1;
  43495. if (textRegion.huffman) {
  43496. var textRegionHuffmanFlags = readUint16(data, position);
  43497. position += 2;
  43498. textRegion.huffmanFS = (textRegionHuffmanFlags) & 3;
  43499. textRegion.huffmanDS = (textRegionHuffmanFlags >> 2) & 3;
  43500. textRegion.huffmanDT = (textRegionHuffmanFlags >> 4) & 3;
  43501. textRegion.huffmanRefinementDW = (textRegionHuffmanFlags >> 6) & 3;
  43502. textRegion.huffmanRefinementDH = (textRegionHuffmanFlags >> 8) & 3;
  43503. textRegion.huffmanRefinementDX = (textRegionHuffmanFlags >> 10) & 3;
  43504. textRegion.huffmanRefinementDY = (textRegionHuffmanFlags >> 12) & 3;
  43505. textRegion.huffmanRefinementSizeSelector =
  43506. !!(textRegionHuffmanFlags & 14);
  43507. }
  43508. if (textRegion.refinement && !textRegion.refinementTemplate) {
  43509. at = [];
  43510. for (i = 0; i < 2; i++) {
  43511. at.push({
  43512. x: readInt8(data, position),
  43513. y: readInt8(data, position + 1)
  43514. });
  43515. position += 2;
  43516. }
  43517. textRegion.refinementAt = at;
  43518. }
  43519. textRegion.numberOfSymbolInstances = readUint32(data, position);
  43520. position += 4;
  43521. // TODO 7.4.3.1.7 Symbol ID Huffman table decoding
  43522. if (textRegion.huffman) {
  43523. error('JBIG2 error: huffman is not supported');
  43524. }
  43525. args = [textRegion, header.referredTo, data, position, end];
  43526. break;
  43527. case 38: // ImmediateGenericRegion
  43528. case 39: // ImmediateLosslessGenericRegion
  43529. var genericRegion = {};
  43530. genericRegion.info = readRegionSegmentInformation(data, position);
  43531. position += RegionSegmentInformationFieldLength;
  43532. var genericRegionSegmentFlags = data[position++];
  43533. genericRegion.mmr = !!(genericRegionSegmentFlags & 1);
  43534. genericRegion.template = (genericRegionSegmentFlags >> 1) & 3;
  43535. genericRegion.prediction = !!(genericRegionSegmentFlags & 8);
  43536. if (!genericRegion.mmr) {
  43537. atLength = genericRegion.template === 0 ? 4 : 1;
  43538. at = [];
  43539. for (i = 0; i < atLength; i++) {
  43540. at.push({
  43541. x: readInt8(data, position),
  43542. y: readInt8(data, position + 1)
  43543. });
  43544. position += 2;
  43545. }
  43546. genericRegion.at = at;
  43547. }
  43548. args = [genericRegion, data, position, end];
  43549. break;
  43550. case 48: // PageInformation
  43551. var pageInfo = {
  43552. width: readUint32(data, position),
  43553. height: readUint32(data, position + 4),
  43554. resolutionX: readUint32(data, position + 8),
  43555. resolutionY: readUint32(data, position + 12)
  43556. };
  43557. if (pageInfo.height == 0xFFFFFFFF) {
  43558. delete pageInfo.height;
  43559. }
  43560. var pageSegmentFlags = data[position + 16];
  43561. var pageStripingInformatiom = readUint16(data, position + 17);
  43562. pageInfo.lossless = !!(pageSegmentFlags & 1);
  43563. pageInfo.refinement = !!(pageSegmentFlags & 2);
  43564. pageInfo.defaultPixelValue = (pageSegmentFlags >> 2) & 1;
  43565. pageInfo.combinationOperator = (pageSegmentFlags >> 3) & 3;
  43566. pageInfo.requiresBuffer = !!(pageSegmentFlags & 32);
  43567. pageInfo.combinationOperatorOverride = !!(pageSegmentFlags & 64);
  43568. args = [pageInfo];
  43569. break;
  43570. case 49: // EndOfPage
  43571. break;
  43572. case 50: // EndOfStripe
  43573. break;
  43574. case 51: // EndOfFile
  43575. break;
  43576. case 62: // 7.4.15 defines 2 extension types which
  43577. // are comments and can be ignored.
  43578. break;
  43579. default:
  43580. error('JBIG2 error: segment type ' + header.typeName + '(' +
  43581. header.type + ') is not implemented');
  43582. }
  43583. var callbackName = 'on' + header.typeName;
  43584. if (callbackName in visitor) {
  43585. visitor[callbackName].apply(visitor, args);
  43586. }
  43587. }
  43588. function processSegments(segments, visitor) {
  43589. for (var i = 0, ii = segments.length; i < ii; i++) {
  43590. processSegment(segments[i], visitor);
  43591. }
  43592. }
  43593. function parseJbig2(data, start, end) {
  43594. var position = start;
  43595. if (data[position] != 0x97 || data[position + 1] != 0x4A ||
  43596. data[position + 2] != 0x42 || data[position + 3] != 0x32 ||
  43597. data[position + 4] != 0x0D || data[position + 5] != 0x0A ||
  43598. data[position + 6] != 0x1A || data[position + 7] != 0x0A) {
  43599. error('JBIG2 error: invalid header');
  43600. }
  43601. var header = {};
  43602. position += 8;
  43603. var flags = data[position++];
  43604. header.randomAccess = !(flags & 1);
  43605. if (!(flags & 2)) {
  43606. header.numberOfPages = readUint32(data, position);
  43607. position += 4;
  43608. }
  43609. var segments = readSegments(header, data, position, end);
  43610. error('Not implemented');
  43611. // processSegments(segments, new SimpleSegmentVisitor());
  43612. }
  43613. function parseJbig2Chunks(chunks) {
  43614. var visitor = new SimpleSegmentVisitor();
  43615. for (var i = 0, ii = chunks.length; i < ii; i++) {
  43616. var chunk = chunks[i];
  43617. var segments = readSegments({}, chunk.data, chunk.start, chunk.end);
  43618. processSegments(segments, visitor);
  43619. }
  43620. return visitor.buffer;
  43621. }
  43622. function SimpleSegmentVisitor() {}
  43623. SimpleSegmentVisitor.prototype = {
  43624. onPageInformation: function SimpleSegmentVisitor_onPageInformation(info) {
  43625. this.currentPageInfo = info;
  43626. var rowSize = (info.width + 7) >> 3;
  43627. var buffer = new Uint8Array(rowSize * info.height);
  43628. // The contents of ArrayBuffers are initialized to 0.
  43629. // Fill the buffer with 0xFF only if info.defaultPixelValue is set
  43630. if (info.defaultPixelValue) {
  43631. for (var i = 0, ii = buffer.length; i < ii; i++) {
  43632. buffer[i] = 0xFF;
  43633. }
  43634. }
  43635. this.buffer = buffer;
  43636. },
  43637. drawBitmap: function SimpleSegmentVisitor_drawBitmap(regionInfo, bitmap) {
  43638. var pageInfo = this.currentPageInfo;
  43639. var width = regionInfo.width, height = regionInfo.height;
  43640. var rowSize = (pageInfo.width + 7) >> 3;
  43641. var combinationOperator = pageInfo.combinationOperatorOverride ?
  43642. regionInfo.combinationOperator : pageInfo.combinationOperator;
  43643. var buffer = this.buffer;
  43644. var mask0 = 128 >> (regionInfo.x & 7);
  43645. var offset0 = regionInfo.y * rowSize + (regionInfo.x >> 3);
  43646. var i, j, mask, offset;
  43647. switch (combinationOperator) {
  43648. case 0: // OR
  43649. for (i = 0; i < height; i++) {
  43650. mask = mask0;
  43651. offset = offset0;
  43652. for (j = 0; j < width; j++) {
  43653. if (bitmap[i][j]) {
  43654. buffer[offset] |= mask;
  43655. }
  43656. mask >>= 1;
  43657. if (!mask) {
  43658. mask = 128;
  43659. offset++;
  43660. }
  43661. }
  43662. offset0 += rowSize;
  43663. }
  43664. break;
  43665. case 2: // XOR
  43666. for (i = 0; i < height; i++) {
  43667. mask = mask0;
  43668. offset = offset0;
  43669. for (j = 0; j < width; j++) {
  43670. if (bitmap[i][j]) {
  43671. buffer[offset] ^= mask;
  43672. }
  43673. mask >>= 1;
  43674. if (!mask) {
  43675. mask = 128;
  43676. offset++;
  43677. }
  43678. }
  43679. offset0 += rowSize;
  43680. }
  43681. break;
  43682. default:
  43683. error('JBIG2 error: operator ' + combinationOperator +
  43684. ' is not supported');
  43685. }
  43686. },
  43687. onImmediateGenericRegion:
  43688. function SimpleSegmentVisitor_onImmediateGenericRegion(region, data,
  43689. start, end) {
  43690. var regionInfo = region.info;
  43691. var decodingContext = new DecodingContext(data, start, end);
  43692. var bitmap = decodeBitmap(region.mmr, regionInfo.width, regionInfo.height,
  43693. region.template, region.prediction, null,
  43694. region.at, decodingContext);
  43695. this.drawBitmap(regionInfo, bitmap);
  43696. },
  43697. onImmediateLosslessGenericRegion:
  43698. function SimpleSegmentVisitor_onImmediateLosslessGenericRegion() {
  43699. this.onImmediateGenericRegion.apply(this, arguments);
  43700. },
  43701. onSymbolDictionary:
  43702. function SimpleSegmentVisitor_onSymbolDictionary(dictionary,
  43703. currentSegment,
  43704. referredSegments,
  43705. data, start, end) {
  43706. var huffmanTables;
  43707. if (dictionary.huffman) {
  43708. error('JBIG2 error: huffman is not supported');
  43709. }
  43710. // Combines exported symbols from all referred segments
  43711. var symbols = this.symbols;
  43712. if (!symbols) {
  43713. this.symbols = symbols = {};
  43714. }
  43715. var inputSymbols = [];
  43716. for (var i = 0, ii = referredSegments.length; i < ii; i++) {
  43717. inputSymbols = inputSymbols.concat(symbols[referredSegments[i]]);
  43718. }
  43719. var decodingContext = new DecodingContext(data, start, end);
  43720. symbols[currentSegment] = decodeSymbolDictionary(dictionary.huffman,
  43721. dictionary.refinement, inputSymbols, dictionary.numberOfNewSymbols,
  43722. dictionary.numberOfExportedSymbols, huffmanTables,
  43723. dictionary.template, dictionary.at,
  43724. dictionary.refinementTemplate, dictionary.refinementAt,
  43725. decodingContext);
  43726. },
  43727. onImmediateTextRegion:
  43728. function SimpleSegmentVisitor_onImmediateTextRegion(region,
  43729. referredSegments,
  43730. data, start, end) {
  43731. var regionInfo = region.info;
  43732. var huffmanTables;
  43733. // Combines exported symbols from all referred segments
  43734. var symbols = this.symbols;
  43735. var inputSymbols = [];
  43736. for (var i = 0, ii = referredSegments.length; i < ii; i++) {
  43737. inputSymbols = inputSymbols.concat(symbols[referredSegments[i]]);
  43738. }
  43739. var symbolCodeLength = log2(inputSymbols.length);
  43740. var decodingContext = new DecodingContext(data, start, end);
  43741. var bitmap = decodeTextRegion(region.huffman, region.refinement,
  43742. regionInfo.width, regionInfo.height, region.defaultPixelValue,
  43743. region.numberOfSymbolInstances, region.stripSize, inputSymbols,
  43744. symbolCodeLength, region.transposed, region.dsOffset,
  43745. region.referenceCorner, region.combinationOperator, huffmanTables,
  43746. region.refinementTemplate, region.refinementAt, decodingContext);
  43747. this.drawBitmap(regionInfo, bitmap);
  43748. },
  43749. onImmediateLosslessTextRegion:
  43750. function SimpleSegmentVisitor_onImmediateLosslessTextRegion() {
  43751. this.onImmediateTextRegion.apply(this, arguments);
  43752. }
  43753. };
  43754. function Jbig2Image() {}
  43755. Jbig2Image.prototype = {
  43756. parseChunks: function Jbig2Image_parseChunks(chunks) {
  43757. return parseJbig2Chunks(chunks);
  43758. }
  43759. };
  43760. return Jbig2Image;
  43761. })();
  43762. var bidi = PDFJS.bidi = (function bidiClosure() {
  43763. // Character types for symbols from 0000 to 00FF.
  43764. var baseTypes = [
  43765. 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'S', 'B', 'S', 'WS',
  43766. 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
  43767. 'BN', 'BN', 'B', 'B', 'B', 'S', 'WS', 'ON', 'ON', 'ET', 'ET', 'ET', 'ON',
  43768. 'ON', 'ON', 'ON', 'ON', 'ON', 'CS', 'ON', 'CS', 'ON', 'EN', 'EN', 'EN',
  43769. 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'ON', 'ON', 'ON', 'ON', 'ON',
  43770. 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43771. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'ON',
  43772. 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43773. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43774. 'L', 'ON', 'ON', 'ON', 'ON', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'B', 'BN',
  43775. 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
  43776. 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
  43777. 'BN', 'CS', 'ON', 'ET', 'ET', 'ET', 'ET', 'ON', 'ON', 'ON', 'ON', 'L', 'ON',
  43778. 'ON', 'ON', 'ON', 'ON', 'ET', 'ET', 'EN', 'EN', 'ON', 'L', 'ON', 'ON', 'ON',
  43779. 'EN', 'L', 'ON', 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43780. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43781. 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43782. 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
  43783. 'L', 'L', 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L'
  43784. ];
  43785. // Character types for symbols from 0600 to 06FF
  43786. var arabicTypes = [
  43787. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43788. 'CS', 'AL', 'ON', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL',
  43789. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43790. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43791. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43792. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43793. 'AL', 'AL', 'AL', 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
  43794. 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'AL', 'AL',
  43795. 'AL', 'AL', 'AL', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN',
  43796. 'AN', 'ET', 'AN', 'AN', 'AL', 'AL', 'AL', 'NSM', 'AL', 'AL', 'AL', 'AL',
  43797. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43798. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43799. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43800. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43801. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43802. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43803. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43804. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43805. 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
  43806. 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'ON', 'NSM',
  43807. 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
  43808. 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL'
  43809. ];
  43810. function isOdd(i) {
  43811. return (i & 1) !== 0;
  43812. }
  43813. function isEven(i) {
  43814. return (i & 1) === 0;
  43815. }
  43816. function findUnequal(arr, start, value) {
  43817. for (var j = start, jj = arr.length; j < jj; ++j) {
  43818. if (arr[j] != value) {
  43819. return j;
  43820. }
  43821. }
  43822. return j;
  43823. }
  43824. function setValues(arr, start, end, value) {
  43825. for (var j = start; j < end; ++j) {
  43826. arr[j] = value;
  43827. }
  43828. }
  43829. function reverseValues(arr, start, end) {
  43830. for (var i = start, j = end - 1; i < j; ++i, --j) {
  43831. var temp = arr[i];
  43832. arr[i] = arr[j];
  43833. arr[j] = temp;
  43834. }
  43835. }
  43836. function createBidiText(str, isLTR, vertical) {
  43837. return {
  43838. str: str,
  43839. dir: (vertical ? 'ttb' : (isLTR ? 'ltr' : 'rtl'))
  43840. };
  43841. }
  43842. // These are used in bidi(), which is called frequently. We re-use them on
  43843. // each call to avoid unnecessary allocations.
  43844. var chars = [];
  43845. var types = [];
  43846. function bidi(str, startLevel, vertical) {
  43847. var isLTR = true;
  43848. var strLength = str.length;
  43849. if (strLength === 0 || vertical) {
  43850. return createBidiText(str, isLTR, vertical);
  43851. }
  43852. // Get types and fill arrays
  43853. chars.length = 0;
  43854. types.length = 0;
  43855. var numBidi = 0;
  43856. var i, ii;
  43857. for (i = 0; i < strLength; ++i) {
  43858. chars[i] = str.charAt(i);
  43859. var charCode = str.charCodeAt(i);
  43860. var charType = 'L';
  43861. if (charCode <= 0x00ff) {
  43862. charType = baseTypes[charCode];
  43863. } else if (0x0590 <= charCode && charCode <= 0x05f4) {
  43864. charType = 'R';
  43865. } else if (0x0600 <= charCode && charCode <= 0x06ff) {
  43866. charType = arabicTypes[charCode & 0xff];
  43867. } else if (0x0700 <= charCode && charCode <= 0x08AC) {
  43868. charType = 'AL';
  43869. }
  43870. if (charType == 'R' || charType == 'AL' || charType == 'AN') {
  43871. numBidi++;
  43872. }
  43873. types[i] = charType;
  43874. }
  43875. // Detect the bidi method
  43876. // - If there are no rtl characters then no bidi needed
  43877. // - If less than 30% chars are rtl then string is primarily ltr
  43878. // - If more than 30% chars are rtl then string is primarily rtl
  43879. if (numBidi === 0) {
  43880. isLTR = true;
  43881. return createBidiText(str, isLTR);
  43882. }
  43883. if (startLevel == -1) {
  43884. if ((strLength / numBidi) < 0.3) {
  43885. isLTR = true;
  43886. startLevel = 0;
  43887. } else {
  43888. isLTR = false;
  43889. startLevel = 1;
  43890. }
  43891. }
  43892. var levels = [];
  43893. for (i = 0; i < strLength; ++i) {
  43894. levels[i] = startLevel;
  43895. }
  43896. /*
  43897. X1-X10: skip most of this, since we are NOT doing the embeddings.
  43898. */
  43899. var e = (isOdd(startLevel) ? 'R' : 'L');
  43900. var sor = e;
  43901. var eor = sor;
  43902. /*
  43903. W1. Examine each non-spacing mark (NSM) in the level run, and change the
  43904. type of the NSM to the type of the previous character. If the NSM is at the
  43905. start of the level run, it will get the type of sor.
  43906. */
  43907. var lastType = sor;
  43908. for (i = 0; i < strLength; ++i) {
  43909. if (types[i] == 'NSM') {
  43910. types[i] = lastType;
  43911. } else {
  43912. lastType = types[i];
  43913. }
  43914. }
  43915. /*
  43916. W2. Search backwards from each instance of a European number until the
  43917. first strong type (R, L, AL, or sor) is found. If an AL is found, change
  43918. the type of the European number to Arabic number.
  43919. */
  43920. lastType = sor;
  43921. var t;
  43922. for (i = 0; i < strLength; ++i) {
  43923. t = types[i];
  43924. if (t == 'EN') {
  43925. types[i] = (lastType == 'AL') ? 'AN' : 'EN';
  43926. } else if (t == 'R' || t == 'L' || t == 'AL') {
  43927. lastType = t;
  43928. }
  43929. }
  43930. /*
  43931. W3. Change all ALs to R.
  43932. */
  43933. for (i = 0; i < strLength; ++i) {
  43934. t = types[i];
  43935. if (t == 'AL') {
  43936. types[i] = 'R';
  43937. }
  43938. }
  43939. /*
  43940. W4. A single European separator between two European numbers changes to a
  43941. European number. A single common separator between two numbers of the same
  43942. type changes to that type:
  43943. */
  43944. for (i = 1; i < strLength - 1; ++i) {
  43945. if (types[i] == 'ES' && types[i - 1] == 'EN' && types[i + 1] == 'EN') {
  43946. types[i] = 'EN';
  43947. }
  43948. if (types[i] == 'CS' && (types[i - 1] == 'EN' || types[i - 1] == 'AN') &&
  43949. types[i + 1] == types[i - 1]) {
  43950. types[i] = types[i - 1];
  43951. }
  43952. }
  43953. /*
  43954. W5. A sequence of European terminators adjacent to European numbers changes
  43955. to all European numbers:
  43956. */
  43957. for (i = 0; i < strLength; ++i) {
  43958. if (types[i] == 'EN') {
  43959. // do before
  43960. var j;
  43961. for (j = i - 1; j >= 0; --j) {
  43962. if (types[j] != 'ET') {
  43963. break;
  43964. }
  43965. types[j] = 'EN';
  43966. }
  43967. // do after
  43968. for (j = i + 1; j < strLength; --j) {
  43969. if (types[j] != 'ET') {
  43970. break;
  43971. }
  43972. types[j] = 'EN';
  43973. }
  43974. }
  43975. }
  43976. /*
  43977. W6. Otherwise, separators and terminators change to Other Neutral:
  43978. */
  43979. for (i = 0; i < strLength; ++i) {
  43980. t = types[i];
  43981. if (t == 'WS' || t == 'ES' || t == 'ET' || t == 'CS') {
  43982. types[i] = 'ON';
  43983. }
  43984. }
  43985. /*
  43986. W7. Search backwards from each instance of a European number until the
  43987. first strong type (R, L, or sor) is found. If an L is found, then change
  43988. the type of the European number to L.
  43989. */
  43990. lastType = sor;
  43991. for (i = 0; i < strLength; ++i) {
  43992. t = types[i];
  43993. if (t == 'EN') {
  43994. types[i] = ((lastType == 'L') ? 'L' : 'EN');
  43995. } else if (t == 'R' || t == 'L') {
  43996. lastType = t;
  43997. }
  43998. }
  43999. /*
  44000. N1. A sequence of neutrals takes the direction of the surrounding strong
  44001. text if the text on both sides has the same direction. European and Arabic
  44002. numbers are treated as though they were R. Start-of-level-run (sor) and
  44003. end-of-level-run (eor) are used at level run boundaries.
  44004. */
  44005. for (i = 0; i < strLength; ++i) {
  44006. if (types[i] == 'ON') {
  44007. var end = findUnequal(types, i + 1, 'ON');
  44008. var before = sor;
  44009. if (i > 0) {
  44010. before = types[i - 1];
  44011. }
  44012. var after = eor;
  44013. if (end + 1 < strLength) {
  44014. after = types[end + 1];
  44015. }
  44016. if (before != 'L') {
  44017. before = 'R';
  44018. }
  44019. if (after != 'L') {
  44020. after = 'R';
  44021. }
  44022. if (before == after) {
  44023. setValues(types, i, end, before);
  44024. }
  44025. i = end - 1; // reset to end (-1 so next iteration is ok)
  44026. }
  44027. }
  44028. /*
  44029. N2. Any remaining neutrals take the embedding direction.
  44030. */
  44031. for (i = 0; i < strLength; ++i) {
  44032. if (types[i] == 'ON') {
  44033. types[i] = e;
  44034. }
  44035. }
  44036. /*
  44037. I1. For all characters with an even (left-to-right) embedding direction,
  44038. those of type R go up one level and those of type AN or EN go up two
  44039. levels.
  44040. I2. For all characters with an odd (right-to-left) embedding direction,
  44041. those of type L, EN or AN go up one level.
  44042. */
  44043. for (i = 0; i < strLength; ++i) {
  44044. t = types[i];
  44045. if (isEven(levels[i])) {
  44046. if (t == 'R') {
  44047. levels[i] += 1;
  44048. } else if (t == 'AN' || t == 'EN') {
  44049. levels[i] += 2;
  44050. }
  44051. } else { // isOdd
  44052. if (t == 'L' || t == 'AN' || t == 'EN') {
  44053. levels[i] += 1;
  44054. }
  44055. }
  44056. }
  44057. /*
  44058. L1. On each line, reset the embedding level of the following characters to
  44059. the paragraph embedding level:
  44060. segment separators,
  44061. paragraph separators,
  44062. any sequence of whitespace characters preceding a segment separator or
  44063. paragraph separator, and any sequence of white space characters at the end
  44064. of the line.
  44065. */
  44066. // don't bother as text is only single line
  44067. /*
  44068. L2. From the highest level found in the text to the lowest odd level on
  44069. each line, reverse any contiguous sequence of characters that are at that
  44070. level or higher.
  44071. */
  44072. // find highest level & lowest odd level
  44073. var highestLevel = -1;
  44074. var lowestOddLevel = 99;
  44075. var level;
  44076. for (i = 0, ii = levels.length; i < ii; ++i) {
  44077. level = levels[i];
  44078. if (highestLevel < level) {
  44079. highestLevel = level;
  44080. }
  44081. if (lowestOddLevel > level && isOdd(level)) {
  44082. lowestOddLevel = level;
  44083. }
  44084. }
  44085. // now reverse between those limits
  44086. for (level = highestLevel; level >= lowestOddLevel; --level) {
  44087. // find segments to reverse
  44088. var start = -1;
  44089. for (i = 0, ii = levels.length; i < ii; ++i) {
  44090. if (levels[i] < level) {
  44091. if (start >= 0) {
  44092. reverseValues(chars, start, i);
  44093. start = -1;
  44094. }
  44095. } else if (start < 0) {
  44096. start = i;
  44097. }
  44098. }
  44099. if (start >= 0) {
  44100. reverseValues(chars, start, levels.length);
  44101. }
  44102. }
  44103. /*
  44104. L3. Combining marks applied to a right-to-left base character will at this
  44105. point precede their base character. If the rendering engine expects them to
  44106. follow the base characters in the final display process, then the ordering
  44107. of the marks and the base character must be reversed.
  44108. */
  44109. // don't bother for now
  44110. /*
  44111. L4. A character that possesses the mirrored property as specified by
  44112. Section 4.7, Mirrored, must be depicted by a mirrored glyph if the resolved
  44113. directionality of that character is R.
  44114. */
  44115. // don't mirror as characters are already mirrored in the pdf
  44116. // Finally, return string
  44117. var result = '';
  44118. for (i = 0, ii = chars.length; i < ii; ++i) {
  44119. var ch = chars[i];
  44120. if (ch != '<' && ch != '>') {
  44121. result += ch;
  44122. }
  44123. }
  44124. return createBidiText(result, isLTR);
  44125. }
  44126. return bidi;
  44127. })();
  44128. /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  44129. /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
  44130. /* Copyright 2014 Opera Software ASA
  44131. *
  44132. * Licensed under the Apache License, Version 2.0 (the "License");
  44133. * you may not use this file except in compliance with the License.
  44134. * You may obtain a copy of the License at
  44135. *
  44136. * http://www.apache.org/licenses/LICENSE-2.0
  44137. *
  44138. * Unless required by applicable law or agreed to in writing, software
  44139. * distributed under the License is distributed on an "AS IS" BASIS,
  44140. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  44141. * See the License for the specific language governing permissions and
  44142. * limitations under the License.
  44143. *
  44144. *
  44145. * Based on https://code.google.com/p/smhasher/wiki/MurmurHash3.
  44146. * Hashes roughly 100 KB per millisecond on i7 3.4 GHz.
  44147. */
  44148. /* globals Uint32ArrayView */
  44149. 'use strict';
  44150. var MurmurHash3_64 = (function MurmurHash3_64Closure (seed) {
  44151. // Workaround for missing math precison in JS.
  44152. var MASK_HIGH = 0xffff0000;
  44153. var MASK_LOW = 0xffff;
  44154. function MurmurHash3_64 (seed) {
  44155. var SEED = 0xc3d2e1f0;
  44156. this.h1 = seed ? seed & 0xffffffff : SEED;
  44157. this.h2 = seed ? seed & 0xffffffff : SEED;
  44158. }
  44159. MurmurHash3_64.prototype = {
  44160. update: function MurmurHash3_64_update(input) {
  44161. var useUint32ArrayView = false;
  44162. var i;
  44163. if (typeof input == 'string') {
  44164. var data = new Uint8Array(input.length * 2);
  44165. var length = 0;
  44166. for (i = 0; i < input.length; i++) {
  44167. var code = input.charCodeAt(i);
  44168. if (code <= 0xff) {
  44169. data[length++] = code;
  44170. }
  44171. else {
  44172. data[length++] = code >>> 8;
  44173. data[length++] = code & 0xff;
  44174. }
  44175. }
  44176. } else if (input instanceof Uint8Array) {
  44177. data = input;
  44178. length = data.length;
  44179. } else if (typeof input === 'object' && ('length' in input)) {
  44180. // processing regular arrays as well, e.g. for IE9
  44181. data = input;
  44182. length = data.length;
  44183. useUint32ArrayView = true;
  44184. } else {
  44185. throw new Error('Wrong data format in MurmurHash3_64_update. ' +
  44186. 'Input must be a string or array.');
  44187. }
  44188. var blockCounts = length >> 2;
  44189. var tailLength = length - blockCounts * 4;
  44190. // we don't care about endianness here
  44191. var dataUint32 = useUint32ArrayView ?
  44192. new Uint32ArrayView(data, blockCounts) :
  44193. new Uint32Array(data.buffer, 0, blockCounts);
  44194. var k1 = 0;
  44195. var k2 = 0;
  44196. var h1 = this.h1;
  44197. var h2 = this.h2;
  44198. var C1 = 0xcc9e2d51;
  44199. var C2 = 0x1b873593;
  44200. var C1_LOW = C1 & MASK_LOW;
  44201. var C2_LOW = C2 & MASK_LOW;
  44202. for (i = 0; i < blockCounts; i++) {
  44203. if (i & 1) {
  44204. k1 = dataUint32[i];
  44205. k1 = (k1 * C1 & MASK_HIGH) | (k1 * C1_LOW & MASK_LOW);
  44206. k1 = k1 << 15 | k1 >>> 17;
  44207. k1 = (k1 * C2 & MASK_HIGH) | (k1 * C2_LOW & MASK_LOW);
  44208. h1 ^= k1;
  44209. h1 = h1 << 13 | h1 >>> 19;
  44210. h1 = h1 * 5 + 0xe6546b64;
  44211. } else {
  44212. k2 = dataUint32[i];
  44213. k2 = (k2 * C1 & MASK_HIGH) | (k2 * C1_LOW & MASK_LOW);
  44214. k2 = k2 << 15 | k2 >>> 17;
  44215. k2 = (k2 * C2 & MASK_HIGH) | (k2 * C2_LOW & MASK_LOW);
  44216. h2 ^= k2;
  44217. h2 = h2 << 13 | h2 >>> 19;
  44218. h2 = h2 * 5 + 0xe6546b64;
  44219. }
  44220. }
  44221. k1 = 0;
  44222. switch (tailLength) {
  44223. case 3:
  44224. k1 ^= data[blockCounts * 4 + 2] << 16;
  44225. /* falls through */
  44226. case 2:
  44227. k1 ^= data[blockCounts * 4 + 1] << 8;
  44228. /* falls through */
  44229. case 1:
  44230. k1 ^= data[blockCounts * 4];
  44231. /* falls through */
  44232. k1 = (k1 * C1 & MASK_HIGH) | (k1 * C1_LOW & MASK_LOW);
  44233. k1 = k1 << 15 | k1 >>> 17;
  44234. k1 = (k1 * C2 & MASK_HIGH) | (k1 * C2_LOW & MASK_LOW);
  44235. if (blockCounts & 1) {
  44236. h1 ^= k1;
  44237. } else {
  44238. h2 ^= k1;
  44239. }
  44240. }
  44241. this.h1 = h1;
  44242. this.h2 = h2;
  44243. return this;
  44244. },
  44245. hexdigest: function MurmurHash3_64_hexdigest () {
  44246. var h1 = this.h1;
  44247. var h2 = this.h2;
  44248. h1 ^= h2 >>> 1;
  44249. h1 = (h1 * 0xed558ccd & MASK_HIGH) | (h1 * 0x8ccd & MASK_LOW);
  44250. h2 = (h2 * 0xff51afd7 & MASK_HIGH) |
  44251. (((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16);
  44252. h1 ^= h2 >>> 1;
  44253. h1 = (h1 * 0x1a85ec53 & MASK_HIGH) | (h1 * 0xec53 & MASK_LOW);
  44254. h2 = (h2 * 0xc4ceb9fe & MASK_HIGH) |
  44255. (((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16);
  44256. h1 ^= h2 >>> 1;
  44257. for (var i = 0, arr = [h1, h2], str = ''; i < arr.length; i++) {
  44258. var hex = (arr[i] >>> 0).toString(16);
  44259. while (hex.length < 8) {
  44260. hex = '0' + hex;
  44261. }
  44262. str += hex;
  44263. }
  44264. return str;
  44265. }
  44266. };
  44267. return MurmurHash3_64;
  44268. })();
  44269. }).call((typeof window === 'undefined') ? this : window);
  44270. if (!PDFJS.workerSrc && typeof document !== 'undefined') {
  44271. // workerSrc is not set -- using last script url to define default location
  44272. PDFJS.workerSrc = (function () {
  44273. 'use strict';
  44274. var scriptTagContainer = document.body ||
  44275. document.getElementsByTagName('head')[0];
  44276. var pdfjsSrc = scriptTagContainer.lastChild.src;
  44277. return pdfjsSrc && pdfjsSrc.replace(/\.js$/i, '.worker.js');
  44278. })();
  44279. }